Arch User Repository

From XennisWiki
Jump to: navigation, search

Arch User Repository (AUR) of Arch Linux

Setup

Install dependencies

pacman -S base-devel

Usage

Download, unpack, compile and install a package

curl -O https://aur.archlinux.org/cgit/aur.git/snapshot/<package>.tar.gz
tar -xvzf  <package>.tar.gz
cd <package>
# i: install after a successful build; s: install missing dependencies
makepkg -si

aurutils

Installation

  • Install the dependencies pacman -S devtools
  • Install the aurutils-git package

Setup

The <name> could be aur for instance. Note: Avoid using the name local, as this name is reserved by Pacman.

Create the configuration file /etc/pacman.d/<name>

[options]
CacheDir = /var/cache/pacman/pkg
CacheDir = /var/cache/pacman/<name>
CleanMethod = KeepCurrent

[<name>]
SigLevel = Optional TrustAll
Server = file:///var/cache/pacman/<name>

Add at the end of /etc/pacman.conf include the configuration file:

# Custom package repository
Include = /etc/pacman.d/<name>

Create the repository and the datase

sudo install -d /var/cache/pacman/<name> -o $USER
repo-add /var/cache/pacman/<name>/<name>.db.tar

Synchronise Pacman

pacman -Syu

Install a package

Install a package

aur sync -c <package>
pacman -Syu <package>

Remove a package from database

repo-remove /var/cache/pacman/<name>/<name>.db.tar <package>
pacman -Syu

Update packages

aur sync -u
pacman -Syu

Errors and problems

PGP signatures could not be verified

Further information: Makepkg signature checking

Error message
==> Verifying source file signatures with gpg...
    tower-12.tar.gz ... FAILED (unknown public key 1EB4338FF56C0C21)
==> ERROR: One or more PGP signatures could not be verified!
Solution

Get the key from the PKGBUILD file

grep "validpgpkeys" PKGBUILD

Download the key using GPG

gpg --receive-keys <key id>

See also

External links