On Thu, 11 Nov 2010 17:32:06 -0200, Guilherme Salgado salgado@canonical.com wrote:
Oh, that looks interesting. I'm very keen to have a cross-autobuilder churning through things to find out how much stuff actually cross-builds at the moment.
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).
We want to enable people to testbuild packages in a chroot. That may be a building block that you can make use of to set up an autobuilder.
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
That's one way of using it. I believe that if you just use a plain chroot type then sbuild will attempt to remove the build-dependencies it installed at the end of its run (obviously this is less reliable).
I think there is a better way, as largely elaborated above: give sbuild a cross-dep resolver, use apt to install things of the appropriate arch, passed through dpkg-cross if no multiarch version of package available. And just issue dpkg-buildpackage -a<arch> to do cross-builds.
That sounds fine as well, and it's definitely more appealing given that we should be able to share at least parts of the new tools/libraries we develop.
sbuild already understands something about architectures, as you can e.g. do -ai386 on an amd64 system, and it will do the right thing. Perhaps it just needs this extending to handle cases where it should cross-build, and use an appropriate dep-solving algorithm and toolchain.
Also of interest is
http://lists.debian.org/debian-devel/2010/11/msg00170.html
Would that change allow us to piggyback on any other work for the cross-dep-solving, or would that basically require multi-arch to be implemented?
Thanks,
James