A "sid" cowbuilder under "etch"

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.

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.

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: