aur-sync

aur-sync is a high-level command that automates the process of downloading, building, and updating AUR packages into a local repository.

Synopsis

aur sync [options] <pkgname...>

Description

aur-sync is the primary tool for day-to-day management of AUR packages. It orchestrates several other aurutils commands to provide a seamless workflow:

  1. Dependency Resolution: Uses aur-depends to resolve the full dependency tree for the target packages.
  2. Source Retrieval: Uses aur-fetch to download the build files (PKGBUILD, .SRCINFO, etc.) from the AUR.
  3. File Inspection: Uses aur-view to present the downloaded build files for user review and approval before building.
  4. Package Building: Uses aur-build to compile the packages and add them to the configured local repository.

Options

  • --continue: Do not download package files; assumes they are already present in AURDEST.
  • --ignore=<PACKAGE>: Ignore a specific package during an upgrade. Can be specified multiple times or as a comma-separated list.
  • --ignore-file=<FILE>: Ignore all packages listed in the specified file. Defaults to $XDG_CONFIG_HOME/aurutils/sync/ignore.
  • -k NUM, --keep-going=NUM: Keep building until NUM packages fail. If NUM is 0, it continues indefinitely. Requires AUR_SYNC_USE_NINJA to be set.
  • --noview, --no-view: Skip the file inspection step with aur-view.
  • -u, --upgrades: Check the local repository for all obsolete AUR packages and add them to the build queue.

Dependency Options

  • --optdepends: Include optional dependencies when resolving the dependency tree.
  • --nocheck, --no-check: Do not resolve checkdepends and pass --nocheck to aur-build.
  • --nograph, --no-graph: Skip the verification of the dependency graph with aur-graph.
  • --nover, --no-ver: Disable all version checking. All specified packages and their dependencies will be built.
  • --nover-argv: Disable version checking only for packages specified on the command line or identified by --upgrades.
  • --noprovides, --no-provides: Do not consider provides from official repositories when resolving dependencies.

Database Options

  • -d NAME, --database=NAME: Specify the local repository name to use.
  • --root=DIR: Specify the root directory for the local repository.

Build Options

These options are passed through to aur-build.

  • -c, --chroot: Build packages in a systemd-nspawn container.
  • -f, --force: Force building a package even if it already exists in the repository.
  • -o, --no-build: Print the ordered list of packages to be built to stdout instead of building them.
  • -r, --rmdeps: Remove build-time dependencies after a successful build.
  • -S, --sign: Sign the built packages and the repository database with GPG.

View Options

These options are passed through to aur-view.

  • --format=<TYPE>: Set the diff format (diff or log).
  • --exclude=<FILE>: Exclude a file from the diff output.
  • --prefix: Prepend package names to diff paths.

Environment Variables

  • AURDEST: The directory where build files are cloned. Defaults to $XDG_CACHE_HOME/aurutils/sync.
  • AUR_SYNC_USE_NINJA: If set to a positive integer, aur-sync uses the ninja build system to manage the build queue. This allows for parallel builds and better handling of build failures with --keep-going.
  • AUR_SYNC_GNUPGHOME: GPG home directory for automatically retrieved keys via --auto-key-retrieve. Defaults to $XDG_DATA_HOME/aurutils/sync/gnupg.