Clean build with sbuild

$ sudo apt-get install sbuild
$ sudo sbuild-adduser $LOGNAME # substitute your username for $LOGNAME
     ... *logout* and *re-login* or use `newgrp sbuild` in your current shell

Now you can build packages in an isolated environment using

$ sudo sbuild-createchroot --include=eatmydata,ccache,gnupg,auto-apt-proxy unstable /srv/chroot/unstable-amd64-sbuild http://deb.debian.org/debian
$ sudo sbuild -A -d unstable

Or if you have an apt proxy setup, you can use auto-apt-proxy command to speed up chroot creation and build process,

$ sudo auto-apt-proxy sbuild-createchroot --include=eatmydata,ccache,gnupg,auto-apt-proxy unstable /srv/chroot/unstable-amd64-sbuild http://deb.debian.org/debian
$ sudo sbuild -A -d unstable

See sbuild for more options.


CategoryPackaging