Skip to content

Instantly share code, notes, and snippets.

@geosharma
Last active November 14, 2024 01:36
Show Gist options
  • Save geosharma/afe1ea9ebe58cb67aaaba62a0d47bc7a to your computer and use it in GitHub Desktop.
Save geosharma/afe1ea9ebe58cb67aaaba62a0d47bc7a to your computer and use it in GitHub Desktop.
Arch Linux: aurutils installation and configuration

aurutils installation and configuration

This is not a getting started guide, just notes to myself. Due to my limited knowledge there could be mistakes and better ways to do things. I have configured aurutils to the best of my knowledge after reading the manpages and forums. Please refer to aurutils(7) manpages for installation and configuration.

Reference: aurutils(7)

Install aurutils

Install the aurutils using the normal AUR package installation procedure. Until I found aurutils, I used to create a separate directory ~/aur/ for all AUR packages.

$ cd ~/aur
$ git clone https://aur.archlinux.org/aurutils.git
$ cd aurutils-git
$ makepkg -si

Creating local repository

Create a separate pacman configuration file for the custom repository in /etc/pacman.d/

$ sudo nano /etc/pacman.d/custom

Add the lines in the file /etc/pacman.d/custom:

[options]
CacheDir = /var/cache/pacman/pkg
CacheDir = /var/cache/pacman/custom
CleanMethod = KeepCurrent

[custom]
SigLevel = Optional TrustAll
Server = file:///var/cache/pacman/custom

Add the following lines for the custom repository configuration to the end of /etc/pacman.conf

Include = /etc/pacman.d/custom

Create the repository root in /var/cache/pacman

sudo install -d /var/cache/pacman/custom -o $USER

Create the database in /var/cache/pacman/custom/

repo-add /var/cache/pacman/custom/custom.db.tar

I have not tried this, if you already have built packages from AUR using makepkg -si copy/move all the *.pkg.tar.xz files to /var/cache/pacman/custom/ and

$ cd /var/cache/pacman/custom
$ repo-add -n myrepo.db.tar *.pkg.tar.xz

Then synchronize pacman:

$ sudo pacman -Syu

For the above change from repose to repo-add see discussion

Install packages

For example we want to install tor-browser-en from AUR. Use aursync to download and build AUR package and place it in the custom repository. Then use pacman -S packagename to install the package.

$ aursync tor-browser-en
$ sudo pacman -S tor-browser-en

Build and update all installed AUR packages

Update all installed AUR packages with aursync

aur sync -u
@alex-semov
Copy link

I followed this guide but on the step repo-add /var/cache/pacman/custom/custom.db.tar i get ==> No changes made to package database. is this guide still accurate?

I found a way by copying the previously built aurutils to the custom repo aur

cp aurutils-19.3-1-any.pkg.tar.zst /var/cache/pacman/aur
repo-add /var/cache/pacman/aur/aur.db.tar.gz /var/cache/pacman/aur/aurutils*.pkg.tar.zst
pacman -Syu

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment