On Thu, Nov 11, 2010, Guilherme Salgado wrote:
In fact reading that work thing you seem to be wanting to build exactly what I want to build: a system that repeatably builds packages in pristine chroots. I thought sbuild didn't normally do the pristine chroot thing? (which is why I've been using pbuilder to supply that functionality to date).
Yeah, I don't think sbuild itself provides that, so I'm using schroot's type=file chroots for that. You just point schroot to a tarball containing your chroot and it will (by default) create a new session (with a pristine chroot) every time you 'schroot -c <name>'. If you want to change the contents of the tarball you can easily do that with 'schroot -c <name>-source'. All you need for that to work is the following config:
[natty] description=Natty chroot type=file file=/var/chroots/natty.tar location=/natty
Seems it's actually on topic, I'd love sharing my setup! :-)
To setup, I use this schroot.conf snippet: [natty] type=file description=Ubuntu natty root-users=lool file=/srv/schroot/chroot-ubuntu-natty-amd64.tar.bz2 location=/chroot-autobuild preserve-environment=true
/srv/schroot/chroot-ubuntu-natty-amd64.tar.bz2 is the chroot used on Launchpad buildds for natty/amd64. I'm attaching dl-lp-chroot which downloads such a chroot; it's a trivial wrapper around https://launchpad.net/api/devel/ubuntu/%24dist/%24arch/chroot_url URLs
To use, I then do something like: mkdir ~/xdeb-dpkg cd ~/xdeb-dpkg schroot-xdeb --apt-source --only-explicit dpkg -aarmel
(the above are just whatever xdeb args I'd like to use)
schroot-xdeb will install xdeb and a cross-toolchain; it's sadly hardcodes my local mirror, but could obviously be adapted
I should probably implement a feature to wait for confirmation before destroying the temporary chroot on failure.
PS: the above run will fail because xdeb doesn't import selinux for some reason; but it does illustrate things quite well here :-)