Introduction

Cowbuilder is an auto-build environment that uses copy-on-write semantics to make a very fast build environment. Rather than having to first copy (or untar) the entire build environment before compilation can commence, cowbuilder works in an overlay image.

The initial announcement about cowbuilder can be found in the debian-devel archives.

Unfortunately, you normally use tools like cowbuilder to compile packages for "sid", but the cowdancer package in etch is unable to successfully contain a sid chroot. (Many .ilist errors are seen, similar to those described in bug #441463.)

A sid cowbuilder under etch

To create a sid cowbuilder under etch, you will need to backport the current sid cowbuilder.

 # apt-get build-dep cowdancer
 # aptitude install fakeroot
 
 $ fakeroot apt-get source -b cowdancer  
 
 # dpkg -i /tmp/cowdancer_0.44_i386.deb

Once installed, you should edit /etc/pbuilderrc and edit the MIRRORSITE option in particular. You may also wish to include a local repository of other packages that you have been building.

You can then create or update the new cowbuilder:

 # cowbuilder --create
 # cowbuilder --update

Note that creating a new sid pbuilder environment doesn't always succeed... sometimes you need to come back in a few days and try again. If it stalls at P: Configuring helper cdebootstrap-helper-apt, then you are seeing bug #457093 which you can work around by using debootstrap rather than cdebootstrap:

 cowbuilder --create --debootstrap debootstrap

Backporting cdebootstrap from sid should also work around this problem.

Building packages

Building packages can be done with the usual tools. There's probably an easier way than this (perhaps set PDEBUILD_PBUILDER=cowbuilder in /etc/pbuilderrc?), but this works:

 svn-buildpackage --svn-builder='\''pdebuild --pbuilder cowbuilder --buildresult .. --auto-debsign --debsign-k your@email.address'\''

Obviously, setting up an alias for this is a good plan...


Last edited: Tuesday April 1, 2008

Valid XHTML 1.1 Valid CSS 2