Following the announcement of version 4.0.0 of the Arch User Repository, a new Git-based AUR, those maintaining packages need to migrate them.
These notes are about migrating to the new Arch Linux Git-based AUR4 repository.
Create a new working directory
$ mkdir aur4-maintained $ cd aur4-maintained
Create a new SSH key to use for the AUR:
$ ssh-keygen -f aur-key -t rsa -b 4096 -C "firstname.lastname@example.org"
Next, log in to the AUR4 page and paste the contents of the public key
aur-key.pub into the space on the profile page.
Then test that the key setup works:
$ ssh -i aur-key email@example.com list-repos
and set up SSH to use the key for the AUR.
$ echo -e "Host aur4.archlinux.org\nIdentityFile /home/build/aur4-maintained/aur-key" >> ~/.ssh/config
and test again:
$ ssh firstname.lastname@example.org list-repos
Download helper script
$ wget https://gist.githubusercontent.com/amiad/d9876a004c3e836a69a7/raw/d75f684b715442116e1d2438bec531c00c4a7574/import-to-aur4.sh $ chmod +x import-to-aur4.sh
Update pkgbuild-introspection to get
mksrcinfo that the helper script needs (it's in version pkgbuild-introspection-7-1.
$ pacman -S pkgbuild-introspection
aur-key has a passphrase then using the SSH agent avoids the need to keep entering it:
$ eval `ssh-agent` $ ssh-add aur-key
The following command gets the list of repos from the AUR and runs the helper script to import them:
$ ssh email@example.com list-repos | grep '^*' | sed -e 's/^*//' | xargs -n1 ./import-to-aur4.sh
Entries in list returned by
list-repos are prefixed with an asterisk (
*) if the repo is empty. The command only processes empty repos.
The helper script has since been publised as aur2aur4 on GitHub and can be downloaded thus:
$ wget https://raw.githubusercontent.com/amiad/aur2aur4/master/aur2aur4.sh
It supports a
-a inspired by my suggested command-line to get the list of repositories from the AUR.