[Soc-coordination] Bootstrappable Debian - Report 1

P. J. McDermott pjm at nac.net
Mon Jun 4 03:17:21 UTC 2012


This is report one for the "Bootstrappable Debian" project mentored by
Wookey and co-mentored by Jonathan Austin.

The goal of this project is to make it easier to bootstrap Debian (i.e.
build the whole package archive) from scratch, which is currently made
difficult by cyclic build dependencies.  There are two principal ways to
break these cyclic dependencies: building selected packages in "staged"
forms (which have reduced build-time and/or run-time dependencies) and
cross building packages to make use of dependencies provided by the
system on which packages are built.  Additionally, a number of packages
need to be cross built to provide a base system capable of natively
building other packages.

The project involves adding support for staged packages to the Debian
build and package management systems, making sure that a set of packages
(all that are necessary for the base build system plus any that are
useful and possible to cross build) can be cross built, and modifying a
number of packages to support staged builds.


Work So Far
===========

Unfortunately I was busy through much of the "community bonding period".
I had projects and exams to finish, after which I had to move out of my
dormitory room and graduate from university.  I spent the spare time I
had becoming familiar with some of the tools I'd be using this summer,
including reprepro and debootstrap.  As my schedule cleared up, I filled
in some remaining gaps in my understanding of multiarch (particularly as
it relates to control fields such as "Multi-Arch" and "Depends") and
became familiar with sbuild.

More recently, I reviewed bug #661538 filed against dpkg-dev and the
proposed patch (written by Wookey and updated at one point by Gustavo
Alkmim).  I learned more about the syntax of Perl (my previous
experience with Perl is limited to a few months of reading other
codebases like debhelper).  Finally, I looked through the source code of
dpkg-dev, thought of ways to complete the patch filed against it, and
discussed my ideas with Wookey.


Next Steps
==========

I will propose to bug #661538 my design ideas for the patch to support
staged builds in dpkg-dev, including:

  * The generalization of the "Build-Depends-StageN" and
    "Build-Depends-Indep-StageN" fields for any value of "N" (currently
    the patch supports 1 and 2, which are likely sufficient, but not
    general).
  * The addition of a new "Build-Stage" (or similar) field to %FIELDS in
    the Dpkg::Control::Fields module.
  * The addition of "Build-Stage" to dpkg-gencontrol to be set to mark
    staged packages.

With feedback from dpkg developers and my mentors, and pending consensus
from the debian-devel mailing list on certain design aspects, I plan to
finish the patch against dpkg-dev.  Depending on the time frame and the
feedback we receive, I hope to get the patch included in wheezy.

I also plan to install the new 0.63.1 version of sbuild and look
through the new cross building support, in preparation for cross
building base system packages identified by Johannes's
"basebuildsystem.ml" program.  Additionally, I expect to have set up a
package archive (on my server and managed using reprepro) for cross
built and staged packages.

-- 
P. J. McDermott                                        (_/@\_)    ,--.
http://www.pehjota.net/                           o    < o o >   / oo \
http://www.pehjota.net/contact.html                 o   \ `-/    | <> |.
                                                o o o    "~v    /_\--/_/



More information about the Soc-coordination mailing list