This cheat sheet was more or less generated during setting up buildds for experimental and backports.org. I used a changed version of the buildd located at db.debian.org. If it's not fully consistent to normal debian setup - than is because I use it for a bit different purposes.

Add deb http://db.debian.org debian-admin/ to sources.list and install buildd.

You need to create directories:

install -d build mqueue -o buildd -g buildd
install -d chroots -m 755
install -d logs stats -o buildd -g buildd
install -d secret -o buildd -g adm -m 2770
install -d /var/debbuild/srcdep-lock -o buildd
install -d /var/lib/sbuild/srcdep-lock -o buildd
install -d chroots/sid/var/debbuild/srcdep-lock -o buildd
install -d chroots/sid/build/buildd -m 777
install -d chroots/woody-backports/var/debbuild/srcdep-lock -o buildd
install -d chroots/woody-backports/build/buildd -m 777
install -d bin -o buildd -g adm -m 775
cp /etc/passwd chroots/sid/etc/
cp /etc/passwd chroots/woody-backports/etc/
ln -s source-dependencies-unstable /etc/source-dependencies-sid-nonfree
sudo ln -s source-dependencies-stable /etc/source-dependencies-woody-backports.org

Ok, that's done. Now let's create the chroots:

sudo debootstrap-farm --variant=buildd sid chroots/sid ftp://linux.mathematik.tu-darmstadt.de/debian
sudo ln -s /org/buildd/chroots/sid/ build/chroot-unstable

Let's edit chroots/sid/etc/apt/sources.list

deb ftp://linux.mathematik.tu-darmstadt.de/debian sid main non-free contrib
deb-src ftp://linux.mathematik.tu-darmstadt.de/debian sid main non-free contrib

And let's upgrade and install things

sudo chroot chroots/sid apt-get update
sudo chroot chroots/sid apt-get install fakeroot build-essential sudo debfoster
sudo chroot chroots/sid debfoster

Same for woody-backports:

sudo debootstrap-farm --variant=buildd woody chroots/woody-backports ftp://linux.mathematik.tu-darmstadt.de/debian
sudo ln -s /org/buildd/chroots/woody-backports/ build/chroot-woody-backports.org

Let's edit chroots/woody-backports/etc/apt/sources.list

deb ftp://linux.mathematik.tu-darmstadt.de/debian woody main non-free contrib
deb-src ftp://linux.mathematik.tu-darmstadt.de/debian woody main non-free contrib
deb-src ftp://linux.mathematik.tu-darmstadt.de/pub/linux/distributions/debian-backports/debian woody all

And let's upgrade and install things

sudo chroot chroots/woody-backports apt-get update
sudo chroot chroots/woody-backports apt-get install fakeroot build-essential sudo debfoster
sudo chroot chroots/woody-backports debfoster

Ok, let's create the .sbuildrc

# Mail address where logs are sent to (mandatory, no default!)
$mailto = 'wherever you want';

# Maintainer name to use in .changes files (mandatory, no default!)
$maintainer_name='what should be in changes';

#$fakeroot='/usr/bin/sudo';
$fakeroot='/usr/bin/fakeroot';

%dist_order = ( 'oldstable-security' => 0, stable => 1, 'stable-security' => 1, testing => 2, 'testing-security' => 2, unstable => 3, 'woody-backports.org' => 5, 'sarge-backports.org' => 6, experimental => 7 );

Don't forget to add the buildd user to the sudo-users.

Ok, let's test it now: Go to ~buildd/build, and let's build a package:

sbuild -d unstable -v netpbm-nonfree_2:9.20-2
sbuild -d woody-backports.org -v arj_3.10.19-1.backports.org.1

Let's add |/usr/bin/buildd-mail-wrapper to ~buildd/.forward, so that we can answer buildds mails.

You have also to tweak ~buildd/buildd.conf - but sorry, no cheat for that, as this depends on your wanna-build.

About the buildd states, see http://people.debian.org/~wouter/wanna-build-states and http://people.debian.org/~wouter/wanna-build.png for details. You should answer the mails of the buildd either with the signed changes file, or with "give-back", "retry", "dep-wait", or "failed", or "dep-wait " or "failed\n".

I use in cron

@reboot        touch ~buildd/NO-DAEMON-PLEASE
17 * * * * /usr/bin/buildd-watcher
47 * * * * /usr/bin/buildd-uploader
[2004-10-26, Andreas Barth]