LinuxCommandLibrary

aur

Install, manage, and search AUR packages

TLDR

Initialize the repository that matches the path in /etc/pacman.conf

$ repo-add [path/to/database.db.tar.gz]
copy

Search the AUR database for a package
$ aur search [keyword]
copy

Download one or more packages and their dependencies from the AUR, build them, and add them to a local repository
$ aur sync [package1 package2 ...]
copy

List packages available in your local repository
$ aur repo [[-l|--list]]
copy

Upgrade local repository packages
$ aur sync [[-u|--upgrades]]
copy

Clean build files after install
$ aur sync [[-C|--clean]] [package]
copy

Install a package without viewing changes in Vim and do not confirm dependency installation
$ aur sync --noview [[-n|--noconfirm]] [package]
copy

Remove a package form the repository metadata (does not remove the package file itself)
$ repo-remove [path/to/database.db.tar.gz] [package]
copy

SYNOPSIS

aur [] []
Common commands include:
aur search
aur build
aur sync (or aur repo -u)
aur repo -r
aur fetch
aur clean
aur vercmp

PARAMETERS

--chroot
    Specifies an alternative chroot environment for building packages.

--repo
    Specifies the local repository name to use (as defined in aurutils.conf).

--sign
    Signs built packages with the specified GPG key.

--force
    Forces an action, such as rebuilding a package or overwriting existing files.

--skipinteg
    Skips integrity checks (md5sum, sha256sum) when building packages. Use with caution.

--pm
    Specifies an alternative makepkg command to use during the build process.

--config
    Specifies an alternative configuration file for aurutils to use.

--color
    Enables colored output.

--nocolor
    Disables colored output.

--quiet
    Suppresses non-error messages, reducing output verbosity.

--verbose
    Increases the verbosity of output, providing more detailed information.

--help
    Displays a help message for the main command or a specified subcommand.

DESCRIPTION

The aur command, part of the aurutils suite, is a powerful tool for managing packages from the Arch User Repository (AUR) and integrating them with your Arch Linux system. Unlike all-in-one AUR helpers like yay or paru, aurutils takes a more pacman-like approach, emphasizing a local repository where AUR packages are built, signed, and then installed using pacman. This modular design promotes explicit actions and better control over the build process.

It allows users to search for packages, fetch their PKGBUILDs, build them securely in a clean chroot environment, and then add them to a local pacman repository. This local repository acts as a bridge, enabling pacman to manage AUR-built packages alongside official repository packages, simplifying updates and dependency resolution. The aur command orchestrates these tasks, providing subcommands for repository management, package building, synchronization, and more, making it a robust choice for users who prefer granular control and a pacman-centric workflow for their AUR software.

CAVEATS

The aur command relies heavily on the aurutils configuration and its proper setup, especially regarding chroot environments and local repository paths. Using aurutils requires a deeper understanding of makepkg and pacman concepts compared to simpler AUR helpers.

Building AUR packages, especially without reviewing their PKGBUILD files, carries inherent security risks as they are community-contributed and not officially vetted by Arch Linux. Users are responsible for ensuring the safety and integrity of packages they install from the AUR.

LOCAL REPOSITORY INTEGRATION

aurutils's core strength lies in its ability to manage a local pacman repository. Packages built with aur build are placed into this repository, which then needs to be added to pacman.conf. This allows pacman to handle updates, dependencies, and removal of AUR-built packages seamlessly, just like official ones, by running pacman -Syu after aur sync.

CLEAN CHROOT BUILDS

By default, aurutils builds packages in a clean chroot environment. This ensures that the build process is isolated from the host system, preventing 'build pollution' from locally installed dependencies and making the build process more reproducible and secure. This also helps in identifying missing makedepends in PKGBUILDs.

HISTORY

The aurutils project, which provides the aur command, emerged as a response to the need for a more robust, pacman-like workflow for managing AUR packages. Its development focused on leveraging pacman's capabilities by treating AUR packages as if they were part of a local repository. This approach, which includes clean chroot builds and explicit repository synchronization, aims to provide greater control, reproducibility, and security compared to earlier, less integrated AUR helper scripts. It gained popularity among users who prioritize explicit management and a clear separation between official and AUR packages, evolving from simple scripts to a comprehensive suite of utilities.

SEE ALSO

pacman(8): Arch Linux package manager., makepkg(8): Utility for building packages from PKGBUILDs., chroot(1): Executes commands in a different root directory.

Copied to clipboard