rss.png profile for ebal on Stack Exchange, a network of free, community-driven Q&A sites
Dec
15
2012
febootstrap with custom PKGBUILDs in archlinux

There is an updated blog post about febootstrap. Click here

At some point, especially if you are using libguestfs, you will end up using febootstrap.

febootstrap is a tool to build a supermin appliance to boot strap a tiny base.img with the packages you need.

febootstrap support archlinux so we (archers) can use febootstrap or libguestfs based on an archlinux boot strap tiny appliance. So no extra work for archlinux in rescue virtual-machines or mount virtual disks.

febootstrap has the ability of searching through Arch User Repository to include any extra packages that dont exist in default repositories. This isnt the right way of installing packages from aur … but for lazy people febootstrap seems to do exactly what it should be.

Yesterday i’ve sent my first tiny ocaml patch at febootstrap for changing the location of aur packages.
You can check the patch here.
Hopefully its ok.

Today i want to write down the right way of installing extra packages from aur. The main reason is that aur has a lot of flagged-out-of-date packages and some of them are really … lets say the PKGBUILDs arent up-to-date or with proper dependencies. I am not expert in archlinux packaging so this from a user perspective guide.

1.

First, download the PKGBUILD you want (or use a customize abs PKGBUILD) of the package you need to install in febootstrap.

Check the PKGBUILD, correct the version, add checksum (for package integrity), review the dependencies, make the pkg. Check it again.
This is the most important thing. Try hard not to be lazy on this.

2.

Create the package with makepkg command. You’ll need base-devel packages for this.
Check the files inside the package

pacman -Qpl *.pkg.tar.xz

binaries must be under /usr/bin, libraries under /usr/lib

Be careful

3.

Create a new directory to hold your custom build packages from aur or abs.

eg.

 mkdir -pv /opt/custom_repo/

and move your *.pkg.tar.xz file (or files) under this directory

eg.

move *.pkg.tar.xz  /opt/custom_repo/

4.

At this point you are ready to create your custom repo db file

eg.

repo-add  /opt/custom_repo/repo.db.tar.gz  /opt/custom_repo/*pkg.tar.xz

and

5.

append the below lines at your /etc/pacman.conf file

[repo]
SigLevel = Never
Server = file:///opt/custom_repo/

type

pacman -Syy

to sync your repositories and you are done!

Now you can use febootstrap without searching in aur.archlinux.org for extra packages.