[arch-dev-public] buildstuff: building packages in virtual machines
bisson at archlinux.org
Mon Sep 17 22:53:54 EDT 2012
For the past several months, I have been building all my packages in
virtual machines using this set of scripts:
It has served me really well and I am very happy with how it performs.
However, the code is currently limited in many ways, mostly due to me
not caring enough to make it extensible and robust (since I have been
its only user). By advertising these scripts here, I am hoping others
will find them useful and possibly help improve them.
Essentially, from within any directory containing a PKGBUILD, this
package allows you to run, for instance,
arch.build i686 testing community-testing
to have that PKGBUILD built inside a clean (as in: clean chroots) 32-bit
virtual machine with [testing] and [community-testing] enabled on top of
[core], [extra], and [community]. The virtual machine runs entirely from
memory (except for a [base] image mounted as copy-on-write), which makes
the whole process very efficient.
Anyway, if you wish to give it a try, you should:
- have jfsutils installed 
- have a KVM-capable Intel CPU 
- have a couple gigs available in /var/lib
- have an SSH public key available as ~/.ssh/id_*.pub
- have an HTTP server run on localhost and put proxy.cgi at its root 
 Or replace jfs by another filesystem in arch.install and fstab.
 Or, if not Intel, adapt the modprobe line in arch.build.
 Or remove the sed line that mentions proxy.cgi from arch.install.
See the included README file for more information. Other prerequisites
might have slipped my mind, so let me know if you find any shortcomings.
To end on a negative note: I know the code sucks. But, if some of you
are interested, I'd be glad to improve this package with their help, so
feel free to send me any comments and suggestions you might have.
More information about the arch-dev-public