Emdebian Multistrap information
Multistrap - pbuilder chroots
[ Multistrap overview ] [ Secure Apt ] [ Example configurations ] [ Using multistrap for pbuilder chroots ] [ Multiple repositories ] [ Cascading configuration ] [ Cross building support ] [ Multistrap Wiki page ]
The simplest way to get a build chroot is to use multistrap and pdebuild-cross which gives these advantages:
The chroot is disposable and pbuilder maintains it for you
You can mess with it without breaking the config - including logging in to the chroot:
$ sudo pbuilder login --configfile /etc/pdebuild-cross/pdebuild-cross.rc
To retain changes in the chroot for later (use with care):
$ sudo pbuilder login --configfile /etc/pdebuild-cross/pdebuild-cross.rc --save-after-login
pbuilder and pdebuild-cross retain an aptcache for you.
it takes up less space when you're not using it.
Cross-dependencies
During the development of Emdebian Crush 1.0, there was an experimental method of identifying cross-dependencies using a debian/xcontrol file which separated the Build-Depends-Tools (packages which provide tools executed during the build) and Build-Depends which provide the development headers and foreign architecture shared libraries and other architecture-dependent files.
Adding and maintaining debian/xcontrol files in packages which change their build-dependencies independently is an unwelcome burden. The current model uses xapt which also provides embuilddeps and uses the original (and maintained) debian/control file. This does mean that certain packages (those which would have been Build-Depends-Tools) are downloaded and passed to dpkg-cross, then installed as empty packages inside the chroot. This method is far simpler than the original method using apt-cross, at the cost of installing more packages. (Surprisingly, it doesn't necessarily take any more time - resolving dependencies in apt-cross was a very slow process.)
xapt and embuilddeps can also be used outside a chroot.
Note: this mechanism will change again with Multiarch.
Method
Copy one of the files from /usr/share/multistrap and tweak it. Pass that to multistrap and create a local pbuilderrc (copied from /etc/pdebuild-cross/pbuilder.rc) and give that configfile to pbuilder:
$ sudo pbuilder login --configfile mycfg
Useful packages to add
For a native build chroot - Start with /usr/share/multistrap/buildchroot-stable.conf, /usr/share/multistrap/buildchroot-testing.conf or /usr/share/multistrap/buildchroot.conf as needed.
For a cross build chroot - Start with /usr/share/multistrap/crosschroot-stable.conf, /usr/share/multistrap/crosschroot-testing.conf or /usr/share/multistrap/crosschroot.conf as needed.
For a native plain chroot - Start with /usr/share/multistrap/lenny.conf, /usr/share/multistrap/squeeze.conf or /usr/share/multistrap/sid.conf as needed.
The plain chroots may need to have a tarball name specified so that pbuilder can use them more efficiently.
Back to the Emdebian Project homepage.