Introducing AUR
One of the most important strength to Arch,
is the number of packages can be achieved from AUR (Arch User Repository).
In order to use AUR you have to go through automatic build process.
Don’t be scared, this process is easy, and won’t hurt you.
Personally I love the colored output
In case you forget, this good reading is a must.
https://wiki.archlinux.org/index.php/Arch_User_Repository
We have already discussed makepkg
,
now consider these two low level AUR helpers.
Package Query
package-query
is,
the base dependency of some AUR tools,
such as cower
and yaourt
.
Now that we already have package-query
installed.
Consider see it in action, querying sync , local , and AUR .
$ cd ..
$ package-query -S package-query
$ package-query -Q package-query
local /package-query 1.9-2
$ package-query -A package-query
aur/package-query 1.9-2 [ installed] ( 1148) ( 9.78)
In its manual, you can see that package-query
provide flexible nice formatting.
cower
There is AUR tools that could make our life easier such as cower
.
First we have to find the cower
origin.
Since cower is AUR package, we can repeat the same process,
like what we does to package-query to cower.
$ package-query --aur --sync --query cower
aur/cower 17-2 ( 932) ( 28.91)
$ cd ~
$ wget -q https://aur.archlinux.org/cgit/aur.git/snapshot/cower.tar.gz
$ tar -xzf cower.tar.gz
$ cd cower
There are these errors however.
$ makepkg -i
...
==> Verifying source file signatures with gpg...
cower-17.tar.gz ... FAILED ( unknown public key 1EB2638FF56C0C53)
==> ERROR: One or more PGP signatures could not be verified!
Use --skippgpcheck
to pass PGP Check.
$ makepkg -i --skippgpcheck
...
/bin/sh: pod2man: command not found
make: *** [ Makefile:90: cower.1] Error 127
==> ERROR: A failure occurred in build() .
Aborting...
And fix Perl $PATH
if necessary.
.
$ touch .profile
$ nano .profile
$ cat .profile
export PATH = $PATH :/usr/bin/core_perl
$ source .profile && export PATH
$ echo $PATH
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/bin/core_perl
$ cd ~/cower
$ makepkg -i --skippgpcheck
makepkg -i --skippgpcheck
==> WARNING: A package has already been built, installing existing package...
==> Installing package cower with pacman -U ...
...
Always RTFM
$ man cower
Consider see cower in action
$ cower -c -s cower
aur/burgaur 2.2-2 ( 7, 0.10)
A delicious AUR helper. Made from cower.
aur/burgaur-git 2.2-2 ( 1, 0.49)
A delicious AUR helper. Made from cower.
aur/cower 17-2 ( 932, 28.91) [ installed]
A simple AUR agent with a pretentious name
aur/cower-git 17-1 ( 81, 2.11)
A simple AUR agent with a pretentious name
aur/owlman 0.8-1 ( 1, 0.00)
A pacman and cower wrapper focused on simplicity
You can have more screenshot here
Foreign Package
We can identify any foreign package, such as build from AUR.
$ pacman -Qm
Equal to:
$ pacman --query --foreign
asp-git 2-1
aura-bin 1.3.9-1
cower 17-2
pacaur 4.7.10-1
package-query 1.9-2
packer 20160325-1
yaourt 1.9-1
![Docker pacman: query foreign][image-ss-query-foreign]{: .img-responsive }
AUR Helper
Consider make our live easier with AUR Helper.
Make compilation process more automatic.
Reading official documentation is a must.
https://wiki.archlinux.org/index.php/AUR_helpers
yaourt
I also wrote an article once.
With some configuration explained.
Now consider cower again.
$ cd ~
$ cower -d -c yaourt
:: yaourt downloaded to /home/epsi
$ cd yaourt
$ makepkg -i
makepkg -i
==> Making package: yaourt 1.9-1 ( Sat Sep 16 04:20:38 UTC 2017)
==> Checking runtime dependencies...
==> Checking buildtime dependencies...
==> Retrieving sources...
-> Downloading yaourt-1.9.tar.gz...
...
Always RTFM
$ man yaourt
Consider use yaourt
to query other AUR Helper.
$ yaourt pacaur
...
3 aur/pacaur 4.7.10-1 ( 1001) ( 52.44)
An AUR helper that minimizes user interaction
...
==> Enter n° of packages to be installed ( e.g., 1 2 3 or 1-3)
==> ----------------------------------------------------------
==> 3
Pressing 3
and Enter
will install aur/pacaur
Yaourt comes with config file.
Just copy them to your home directory
$ cat /etc/yaourtrc
$ cp /etc/yaourtrc ~/.yaourtrc
I left my ~/.yauortrc
config as below to avoid
too many confirmation question from yaourt.
$ cat ~/.yauortrc
# SUDO
SUDONOVERIF =1 # Avoid multiple sudo checks when timestamp_timeout=0
# Prompt
BUILD_NOCONFIRM =1 # Only prompt for editing files
EDITFILES =0
# Command
MAKEPKG ="makepkg --skippgpcheck"
This configuration is very helpful
if you maintain your AUR upgrade regularly
with a lot of Syua option in yaourt.
This yaourt -Syua
command will update all your AUR at once.
Make sure you know what you are doing when skipping PGP Verification.
$ yaourt -Syua
pacaur
Set editor as environment variable if necessary.
$ cat .profile
export EDITOR = vim
$ . .profile
Consider use pacaur
to install asp
.
$ pacaur -S asp
[ sudo ] password for epsi:
resolving dependencies...
looking for conflicting packages...
Packages ( 3) jq-1.5-5 oniguruma-6.6.1-1 asp-2-1
Total Download Size: 0.35 MiB
Total Installed Size: 1.50 MiB
:: Proceed with installation? [ Y/n] y
:: Retrieving packages...
asp-2-1-any 10.3 KiB 103K/s 00:00 [ ##########] 100%
oniguruma-6.6.1-1-x... 154.3 KiB 359K/s 00:00 [ ##########] 100%
jq-1.5-5-x86_64 191.8 KiB 291K/s 00:01 [ ##########] 100%
( 3/3) checking keys in keyring [ ##########] 100%
( 3/3) checking package integrity [ ##########] 100%
( 3/3) loading package files [ ##########] 100%
( 3/3) checking for file conflicts [ ##########] 100%
:: Processing package changes...
( 1/3) installing oniguruma [ ##########] 100%
( 2/3) installing jq [ ##########] 100%
( 3/3) installing asp [ ##########] 100%
This behave like pacman
.
On most cases pacaur
goes well.
Consider try another.
Use pacaur
to query AUR Helper.
$ pacaur -S packer
:: Package packer not found in repositories, trying AUR...
:: resolving dependencies...
:: looking for inter-conflicts...
:: packer-20150808-1 has been flagged out of date on Sun Apr 2 10:26:23 2017
AUR Packages ( 1) packer-20150808-1
Repo Packages ( 2) jansson-2.10-2 jshon-20131105-1
Repo Download Size: 0.05 MiB
Repo Installed Size: 0.19 MiB
:: Proceed with installation? [ Y/n]
...
==> Cleaning up...
:: Installing packer package( s) ...
:: packer package( s) failed to install.
:: ensure package version does not mismatch between .SRCINFO and PKGBUILD
:: ensure package name has a VCS suffix if this is a devel package
:: jshon is now an orphan package
But oouch, sometimes an issue happened such as failed to install .
This time we need a lower level method.
$ cower -d packer
:: packer downloaded to /home/epsi
$ cd packer/
$ makepkg
==> Making package: packer 20150808-1 ( Sat Sep 16 05:21:21 UTC 2017)
==> Checking runtime dependencies...
==> Checking buildtime dependencies...
==> Retrieving sources...
-> Cloning packer git repo...
$ sudo pacman -U packer-20160325-1-any.pkg.tar.xz
...
:: Processing package changes...
( 1/1) installing packer [ ##########] 100%
...
packer
Consider use packer
to query other AUR Helper.
$ packer -S aura-bin
packer -S aura-bin
Aur Targets ( 1) : aura-bin
Proceed with installation? [ Y/n] y
Edit aura-bin PKGBUILD with $EDITOR ? [ Y/n] n
==> Making package: aura-bin 1.3.9-1 ( Sat Sep 16 05:28:01 UTC 2017)
==> Checking runtime dependencies...
==> Checking buildtime dependencies...
==> Retrieving sources...
-> Downloading aura-1.3.9-x86_64.tar.gz...
...
==> Checking for packaging issue...
==> Creating package "aura-bin" ...
-> Generating .PKGINFO file...
-> Generating .BUILDINFO file...
-> Generating .MTREE file...
-> Compressing package...
==> Leaving fakeroot environment.
==> Finished making: aura-bin 1.3.9-1 ( Sat Sep 16 05:28:47 UTC 2017)
I like to have aliases in .bashrc
so I do not have to remember all the options.
This is an unoffocial tip for unofficial package.
alias pksyu = "packer -Syu --noconfirm --noedit"
$ pksyu
[ sudo ] password for epsi:
:: Synchronizing package databases...
core is up to date
extra is up to date
community is up to date
:: Starting full system upgrade...
there is nothing to do
:: Synchronizing aur database...
aur 6 6 [ ##########]100%
:: Starting full aur upgrade...
local database is up to date
There are still some other AUR helpers, but I never use any of them.
Yet this article is already long. I have decided not to make it any longer.
Screenshot
Query AUR
A special case for AUR,
there are so many way to Query AUR in one system.
I Didn’t Know What To Do Last Summer
I still don’t know what to do today.
So I play with AUR instead.
$ package-query - As gst
$ cower - s gst
$ yaourt - s gst
$ aura - As gst
$ packer - Ss gst -- auronly
$ pacaur - Ssa gst
Screenshot: Query AUR
OS: Arch Linux
Window Manager: HerbstluftWM
Conclusion
After years of being user,
I realize that I do not now anything about ALPM.
These are just preliminary knowledge about ALPM.
Thank you for reading