CowBuilder is a faster pbuilder build environment, which uses CowDancer, a copy-on-write in userland system (this means it is faster ;). Used together with CCache you get a very fast system for recompiling the same packages over and over aswell.
Well, let's get to the setup. Just follow the steps outlined below:
- Install the required packages:
- sudo apt-get install cowdancer ccache
- Install the required packages:
- Edit ~/.pbuilderrc:
- ## Overrides /etc/pbuilderrc # Default distribution DISTRIBUTION=feisty COMPONENTS="main restricted universe multiverse" # Repositories (add the fastest one for you)
MIRRORSITE=http://archive.ubuntu.com/ubuntu # Bash prompt inside pbuilder export debian_chroot="pbuild$$" # Faster dependency resolution PBUILDERSATISFYDEPENDSCMD="/usr/lib/pbuilder/pbuilder-satisfydepends-gdebi" # CCache setup export CCACHE_DIR="/var/cache/pbuilder/ccache" export PATH="/usr/lib/ccache:${PATH}" EXTRAPACKAGES=ccache BINDMOUNTS="${CCACHE_DIR}"
- ## Overrides /etc/pbuilderrc # Default distribution DISTRIBUTION=feisty COMPONENTS="main restricted universe multiverse" # Repositories (add the fastest one for you)
- Edit ~/.pbuilderrc:
- Create CCache directory (user 1234 is default inside cowbuilder):
- sudo mkdir /var/cache/pbuilder/ccache sudo chown 1234 /var/cache/pbuilder/ccache
- Create CCache directory (user 1234 is default inside cowbuilder):
- Create the build environment:
- sudo cowbuilder --create --distribution feisty
- Create the build environment:
After the (rather long) download and install procedure you can start compiling your own packages like this (example):
- cowbuilder cd flv2mpeg4-0+svn3/ debuild -S -sa cd .. sudo cowbuilder --build flv2mpeg4_0+svn3-1~getdeb1.dsc
The resulting package can be found in /var/cache/pbuilder/result/ . Then you can dput the package to GetDeb like this:
- mkdir -p package/{source,build} mv flv2mpeg4*.* package/source mv /var/cache/pbuilder/result/flv2mpeg4* package/build dput package/source/*.change
External resources:
Building Debian packages with cowbuilder Debian Wiki - Cowbuilder
