AUR-SYNC(1)

NAME
aur-sync - download and build AUR packages automatically

SYNOPSIS
aur sync [-cfknorSu] pkgname...

DESCRIPTION
aur-sync downloads and builds AUR packages automatically to a local repository. It can be seen as a high level composition of aurutils programs. aur-sync performs the following tasks:

•   Resolve AUR dependencies with aur-depends(1)

•   Retrieve build files with aur-fetch(1)

•   Present build files before their execution with aur-view(1)

•   Build the packages with aur-build(1)

Package names serve as arguments.

Note: aur-sync does not expose all available functionality from aurutils programs. It serves as an example how these programs can interoperate for a fully automated AUR workflow.

OPTIONS

--continue
    Do not download package files.

--ignore=PACKAGE
    Ignore a package upgrade. Multiple packages can be specified by separating them with a comma, or by repeating the --ignore option.

--ignore-file=FILE
    Ignore package upgrades listed in FILE. Each package name should be specified on a separate line. If a section (enclosed in square brackets) is specified, package names only apply to the local repository matching this section. Comments can be specified after a number sign. For example:

        [custom]
        package-foo
        package-bar
        [custom-testing]
        package-baz

    Defaults to $XDG_CONFIG_HOME/aurutils/sync/ignore.

-k NUM, --keep-going=NUM
    Keep going until NUM packages fail to build (ninja -k). If NUM is set to 0, continue indefinitely. On failure, a summary is printed of failed and succeeded builds. Requires AUR_SYNC_USE_NINJA (see ENVIRONMENT).

--noview, --no-view
    Do not present build files for inspection.

-u, --upgrades
    Update all obsolete AUR packages in a local repository.

  Dependency options
Build dependencies are resolved with aur-depends(1).

--optdepends
    Take optdepends into account when resolving dependencies. (aur-depends --optdepends)

--nocheck, --no-check
    Do not handle checkdepends. (aur-build --no-check, aur-depends --no-checkdepends)

--nograph, --no-graph
    Do not verify the AUR dependency graph with aur-graph(1).

--nover, --no-ver
    Disable version checking for packages.

--nover-argv, --no-ver-argv
    Disable version checking for packages specified on the command line or upgrade candidates from --upgrades. Version checks for package dependencies remain enabled.

--noprovides, --no-provides
    Do not take virtual dependencies (provides) in pacman sync repositories into account to resolve package dependencies. Packages specified on the command-line or available as an upgrade (aur-sync -u), are taken as targets regardless of this setting.

--provides-from=DIR1,...
    Only take specified (comma-separated) pacman(8) repositories into account when checking virtual dependencies. If the same package is provided in multiple repositories, ordering is ignored (for example, --provides-from=a,b is equivalent to --provides-from=b,a) and dependencies are installed according to the order defined in pacman.conf(5). Packages specified on the command-line or available as an upgrade ( aur-sync -u ), are taken as targets regardless of this setting.

  Database options
Values for the following options are automatically selected, if a single local repository is defined in pacman.conf(5). See aur-repo(1) for details.

-d NAME, --database=NAME
    Use the NAME repository. If this option is not specified, aur-sync defaults to the first file:// repository in pacman.conf(5), or aborts if multiple are available.

--root=DIR
    The location of the repository root. Defaults to the Server value of the configured repository.

  Build options
The default build command is aur-build --clean --syncdeps. Specifying aur-build(1) options such as --chroot or --force to aur-sync will append these options to the build command. This section only lists common options. See aur-build(1) for more information.

-c, --chroot
    Build packages in a systemd-nspawn container. (aur build -c)

-f, --force
    Continue the build process if a package with the same name exists. (aur build -f)

-n, --noconfirm, --no-confirm
    Do not wait for user input when installing or removing build dependencies. (aur build -n)

-o, --nobuild, --no-build
    Print target packages and their paths instead of building them.

--pkgver
    Run makepkg -od --noprepare before the build process. (aur-build --pkgver)

-r, --rmdeps, --rm-deps
    Remove dependencies installed by makepkg. (aur build -r)

-S, --sign, --gpg-sign
    Sign built packages with gpg(1). (aur build -S)

--makepkg-conf
    The makepkg.conf(5) file for chroot and makepkg(8) operations. (aur-build --makepkg-conf)

--pacman-conf
    The pacman.conf(5) file for chroot and local repository operations. (aur-build --pacman-conf, aur-repo --config)

  Aliases

--rebuild
    Alias for -f --nover-argv.

--rebuildtree, --rebuild-tree
    Alias for -f --nover.

--rebuildall, --rebuild-all
    As --rebuild-tree, but append all packages in the repository (see -d) as targets. May be used together with -o to repopulate source directories in $AURDEST.

ENVIRONMENT
Environment variables for other aur programs are also supported in aur-sync. The below are specific to aur-sync.

AURDEST
    Determines where build files will be cloned. This must be an absolute path. Defaults to $XDG_CACHE_HOME/aurutils/sync.

AUR_SYNC_USE_NINJA
    When set to a positive value, run aur-build command-lines with ninja. If a package fails to build, this allows aur-sync --keep-going to continue with remaining, independent packages.

    The $AURDEST/ninja-$USER-$$ directory contains the build.ninja file and timestamps (pkgbase.stamp) for each job. It is removed on successful completion of ninja, or if --no-build is specified.

NOTES

  Standard input
Targets may be taken from stdin using xargs(1). For example, to sync all installed packages in a local repository named custom:

        $ paclist custom | awk '{print $1}' | xargs -r aur sync --noconfirm

Note that command output interferes with input from the tty. The --noconfirm option is used to disable interaction with pacman when installing dependencies. Alternatively, command or process substitution can be used:

        $ xargs -a <(paclist custom | awk '{print $1}') aur sync
        $ aur sync $(paclist custom | awk '{print $1}')

  File retrieval
When version checks are enabled (i.e. --no-ver is not specified), build files are only retrieved if the remote (RPC) version is newer than the version in a pacman database. Checks assume there are no mismatches between .SRCINFO and PKGBUILD files.

  lib32
Architecture-specific depends (as introduced with pacman 4.2) are merged with regular depends in RPC queries. aur-sync works around this by stripping the lib32- prefix from packages and removing gcc-multilib if the i686 architecture is detected.

SEE ALSO
aur(1), aur-build(1), aur-depends(1), aur-fetch(1), aur-graph(1), aur-repo(1), aur-repo-filter(1), aur-vercmp(1), aur-view(1)

AUTHORS
Alad Wenter (https://github.com/AladW)