Bootstrappable Debian - Report 3 + N + 2
This is the final report for the "Bootstrappable Debian" project
mentored by Wookey and co-mentored by Jonathan Austin.
Copies of this report are sent to the debian-bootstrap and
I implemented in dpkg  and sbuild  support for "build profiles".
I then built  some packages in "stage1" and "nodocs" profiles to
break dependency cycles. I also fixed  problems that are
preventing some base system packages from being cross built.
Since submitting the patch to implement build profiles in dpkg, I
* I forgot to document the new options in Dpkg::Deps::deps_parse() and
* A "use_profile" option was missing from deps_parse().
I submitted to bug #661538  an updated patch in which these issues
I had previously patched sbuild to support build profiles and properly
reduce them in build dependencies. A profile could be selected using
the "--profile=<profile>" option of sbuild(1).
Since I wrote the original patch, Wookey and I discussed sbuild's
interfaces for specifying profiles. We agreed that sbuild should also
allow profile selection through an environment variable. So I updated
my patch  to make sbuild(1) use the value of DEB_BUILD_PROFILE unless
the "--profile=<profile>" option is given. Now the following example
shell command language simple command works as expected:
$ DEB_BUILD_PROFILE=stage1 sbuild --build=i386 --host=i386 -d sid \
Multiarch Cross Building
When bootstrapping a new Debian architecture, at least the base system
needs to be cross built; however, many packages in Debian fail to cross
In many cases, this is at least in part simply because cross build
dependencies can't be resolved. So in my work to cross build the base
system, I've been marking certain dependent binary packages as being
able to satisfy dependencies of packages either of any architecture or
of only the same architecture.
The following binary packages provide some of the tools used when
building base system packages:
I added to these packages a "Multi-Arch: foreign" control field,
indicating that the packages provide architecture-independent interfaces
and can therefore satisfy build dependencies of source packages being
built for any host architecture.
The gettext binary package in Debian provides internationalization tools
often used by other source packages at build time. It also provides
development files to complement the libgettextpo0 and libasprintf0c2
Because of the presence of these architecture-dependent development
files, gettext can't simply be marked "Multi-Arch: foreign" like most
other utility packages can be.
Johannes Schauer, Steve Langasek, Santiago Vila, and I discussed this
issue in bug #683751 .
The solution Steve used in Ubuntu was to mark gettext "Multi-Arch:
allowed" and add ":any" architecture specifiers to the build dependency
lists of many packages. This worked well for Ubuntu and avoided the
introduction into Ubuntu of major changes not present in Debian.
However, it has the disadvantage of requiring metadata changes in many
source packages simply to describe an interface offered by the gettext
I felt that a better option would be to split the library development
files out of the gettext package. As a result of such a split, gettext
would provide only architecture-independent interfaces (and could be
marked "Multi-Arch: foreign") and a new libgettext-dev package would
provide architecture-dependent interfaces (and therefore must be marked
libgettext-dev would provide libgettextpo-dev and libasprintf-dev, the
virtual packages on which source packages should depend if they are to
use the libgettextpo.so and libasprintf.so objects, respectively.
Therefore, this split maintains compatibility with existing build
dependency lists. Any incompatibilities that might exist are bugs in
the depending source packages.
I submitted a patch  implementing this split in gettext.
"Packages" Indices Patches
I wrote a script  to generate, twice a day, patches  against
the "Packages" indices of Debian sid's main component for architectures
i386 and armhf. These patches include the "Multi-Arch" fields I've
added to packages to resolve cross build dependency issues.
The patches are similar to the "Sources" index patch  I mentioned in
my previous report.
P. J. McDermott (_/@\_) ,--.
http://www.pehjota.net/ o < o o > / oo \
http://www.pehjota.net/contact.html o \ `-/ | <> |.
o o o "~v /_\--/_/