
debootstrap has only ever been designed to work with a single repository and the current code includes a comment:
# XXX: I can't think how to deal well with dependency resolution and
# lots of Packages files. -- aj 2005/06/12
The main reason for that, AFAICT, is that debootstrap has a perfectly valid goal of trying to work without needing dpkg or apt themselves, doing everything in the chroot. Theoretically, anything that can run POSIX shell should be able to run debootstrap.
Emdebian has a need for a different script that can assume that both dpkg and apt are fully functional already and behave as normal Debian packages which opens the door to supporting as many repositories as apt itself can handle and, until now, that support was --foreign only. i.e. it was explicitly for cross-debootstrap (armel, etc.) for use with Emdebian Grip and actually used debootstrap for some of the work.
That code has been simplified and there is no need for debootstrap now in multistrap. (multistrap itself is written in perl.)
I recognise that native support could be useful so I've been working on a fix for the native support - partially achieved by dropping the need to use debootstrap at all and porting the existing fix for
#518719 from the
emdebian-rootfs package (shell) into perl.
In effect, multistrap allows you to collapse the following stages into one:
- $ sudo debootstrap $suite $dir $mirror
- $ sudo chroot $dir
- # nano /etc/apt/sources.list
- # apt-get update
- # apt-get install $package_list
- # apt-get clean
- $ sudo $my_config_script
That much is architecture-neutral (due to the support for working around #518719 which allows packages to be unpacked without running the configure scripts) - what I've added for native support is that
sudo chroot $dir dpkg --configure -a can be automatically run before the config_script. In the typical Emdebian case, the configure stage would happen immediately after unpacking the multistrap filesystem onto the device (certainly before first boot).
That gives you a single method for creating a complete root filesystem with everything you need installed, everything configured and the config_script hook allows you to put in things like kernels and kernel modules etc. too - all ready for tar -czf and unpacking onto your device. Instead of a plain debootstrap, multistrap can give you a complete filesystem with all the packages you'd only install as soon as debootstrap had finished.
In addition, multistrap allows apt to decide which versions to install from the collection of Packages files so you can implement fallbacks and other permutations of mirrors and packages. Emdebian is using this functionality to mix private packages with official packages from Emdebian Grip 1.0 and ensure that not only are all dependencies met but that each dependency has the chance to be the latest version without needing any configuration or manual parsing. Just specify the repositories and which packages you need at the top level from each one. apt does the rest.
So, the question:
Does this deserve to be a separate source package ? For now, it's heading into Emdebian as part of the emdebian-rootfs package, version 1.6.1.
The advantages will be that multistrap itself doesn't need to be tied to the still rapidly developing emdebian-tools source package and doesn't need to carry the quite large changelog from emdebian-tools (which is just going to keep on growing).
3014 2009-03-17 20:54 ./usr/share/doc/multistrap/README
2265 2009-02-18 18:32 ./usr/share/doc/multistrap/TODO
1536 2008-08-20 14:25 ./usr/share/doc/multistrap/copyright
21067 2009-03-17 21:58 ./usr/share/doc/multistrap/changelog.gz
1233 2008-10-28 13:13 ./usr/share/doc/multistrap/NEWS.Debian.gz
Disadvantages, it's very small (a lot of the current content is actually POD documentation) and probably doesn't warrant a source package all alone.
17774 2009-03-22 13:41 ./usr/sbin/multistrap
Details:
Package: multistrap
Source: emdebian-tools
Version: 1.6.1
Architecture: all
Maintainer: Neil Williams
Installed-Size: 120
Depends: perl, apt, debhelper (>= 5),
libconfig-auto-perl, libparse-debian-packages-perl
Replaces: emdebian-rootfs (<= 1.6.0)
Section: admin
Priority: extra
Homepage: http://www.emdebian.org/
Description: multiple repository bootstrap based on apt
debootstrap replacement with multiple repository support
using apt to handle all dependency issues and conflicts.
.
Includes support for foreign architecture multistraps that need
only minimal configuration on the final device. Supports cleaning
up the generated bootstrap filesystem to remove downloaded packages
and hooks to modify the files in the bootstrap filesystem after
the packages have been unpacked but before being configured.
Is there a better home? devscripts? Ideas? (It would need to be a package I can join as Uploader: and I'd prefer if that package used subversion.)