Cowdancer

Cowdancer

I use cowbuilder, a wrapper over pbuilder using Cowdancer to build Debian packages. Cowdancer is much faster than pbuilder because it creates a local cache of packages.

To read more about cowdancer refer to these pages:
http://www.netfort.gr.jp/~dancer/software/pbuilder-doc/pbuilder-doc.html

Here I list down some “quick recipes” to get you started.

Install cowdancer package and run the following command to create the default base.cow image of unstable main. The debian mirror can be specified in /etc/pbuilderrc or $HOME/.pbuilderrc

sudo cowbuilder --create

To build packages from contrib/non-free it is better to create a separate image which includes contrib and non-free packages. To do so run the following command (I name this image as sid.cow):


sudo cowbuilder --create --othermirror "deb http://http.us.debian.org/debian sid main contrib non-free" \
--basepath /var/cache/pbuilder/sid.cow

If you are on amd64 and would like to build i386 packages than use this command to create an i386 image:

sudo cowbuilder --create --basepath /var/cache/pbuilder/base-i386.cow --debootstrapopts --arch --debootstrapopts i386

Now that we have the required images, I use svncowbuild shell script to build packages under svn which automatically selects the correct image for main and contrib/non-free packages.

Some other useful shell aliases:

To update the images: svncowupdate

alias svncowupdate="sudo cowbuilder --update; sudo cowbuilder --update --basepath /var/cache/pbuilder/sid.cow"

Finally to make cowbuilder the default pbuilder add this to .pbuilderrc:

PDEBUILD_PBUILDER=cowbuilder

-- Varun Hiremath <varun@debian.org> Thu, 2 Apr 2009 04:17:10 -0400