Setup an Arch Linux ABS System in a Chroot Environment

As I mentioned in my earlier blog posts, I have started using Unity on Arch Linux. However the packages that are hosted at haven’t been updated in a while and has resulted in some conflicts with the updates coming through the main repositories. I have written an email to the person who’s managing the repo, but decided to build my own packages as well. This is how I setup a pristine chroot environment to build the Unity PKGBUILDS created by Xiao-Long Chen. I’m not sure if its the prescribed way to do it, but it works!

Steps to setup the chroot environment to build packages using ABS:

sudo pacman -S devtools
mkdir ~/Developer/unity/chroot -p
sudo mkarchroot $UNITYCHROOT/root base base-devel sudo
sudo arch-chroot $UNITYCHROOT
adduser pratik
pacman -S sudo git abs
sed -e 's/# %wheel ALL=(ALL) NOPASSWD: ALL/%wheel ALL=(ALL) NOPASSWD: ALL/' /etc/sudoers
usermod -G wheel pratik
su pratik
sudo abs
cd /home/pratik
cp -R PKGDIR /home/pratik #if you wanted to create a single package then copy it to the home directory and build it
makepkg -s
Prescribed way of creating single packages is documented here.

To create the Unity Packages, there’s a build script which was posted on the Arch Linux BBS and I have forked that gist.

The steps below show how to use the build script to create Unity Packages.

#Create Unity Packages from the PKGBUILDs created by Xiao-Long Chen
cd /home/pratik
Download the gist as
chmod +x

The script isn’t without its faults and might not build smoothly for all packages. I’m still working on clearing out the kinks.

About Pratik Sinha

Linux Nerd, Socialist, Atheist, Adventuristic, Nature Lover, Geeky.


Leave a Reply