[Soc-coordination] Bootstrappable Debian - Report 2
P. J. McDermott
pjm at nac.net
Tue Jun 19 02:43:45 UTC 2012
This is report two for the "Bootstrappable Debian" project [1][2]
mentored by Wookey and co-mentored by Jonathan Austin.
A copy of this report is sent to the debian-bootstrap list [3].
Work Done
=========
Staged Build Support in dpkg-dev
--------------------------------
I discussed with the dpkg developers in bug #661538 [4] my ideas regarding:
* Support for "Build-Depends-StageN" and "Build-Depends-Indep-StageN"
fields for any value of "N" and
* A new "Build-Stage" (or similar) field set by dpkg-gencontrol to mark
staged packages.
I implemented the latter idea in a currently standalone patch [5][6]
against dpkg 1.16.4.
I've been working on implementing the former idea using a new
"%FIELDS_RE" hash for "pattern" fields like "Build-Depends-Stage\d" and
one or two new subroutines for accessing field elements by key, all in
Dpkg::Control::Fields. Unfortunately, this has proven a bit more
complex than I initially expected, since keys and values in the %FIELDS
hash are used in various direct and indirect ways outside of the
Dpkg::Control::Fields module, including in dpkg-gencontrol, dpkg-source,
and Dpkg::Control. My lack of prior experience with writing Perl code
and with the dpkg-dev codebase has not helped in this matter.
Perl Cross Building Support
---------------------------
Due to my work on another project, I knew that Perl's build system
doesn't support cross compilation in a way that can be easily supported
by a distribution such as Debian. This is a problem because perl-base
has a "Priority: required" field and is therefore one of the packages
that must be cross built to form a base system that can natively build
other packages.
I found in bug #633884 [7] a patch by Peter Pearse and Steve McIntyre that:
* Adds cross configurations for armel and armhf,
* Adds a new "Configure" file in Cross/,
* Modifies Makefile.SH, and
* Enables cross building (by using the Perl installation on the build
system) in debian/rules.
I also found a similar but more intrusive patch in Cross LFS - Sysroot
and a tar archive containing an alternative cross build system on Perl's
upstream development mailing list.
I sent a full report [8] of my findings to the debian-bootstrap and
debian-embedded mailing lists. More details and references in this
matter may be found there.
Following the report, I reviewed the archive with the alternative build
system and found that it was fairly invasive and not very well documented.
Investigation of sbuild 0.63.1's Cross Building Support
-------------------------------------------------------
I compared the source code of versions 0.62.6 and 0.63.1 of sbuild to
learn about the new cross building support. I noted the new
command-line interface for defining build and host architectures and
observed the way sbuild now works with and configures tools like dpkg,
APT, xapt, dpkg-cross, and cross toolchains to cross build packages.
Next Steps
==========
Staged Build Support in dpkg-dev
--------------------------------
Upon finishing my work on "pattern" fields like "Build-Depends-Stage\d"
in dpkg-dev, I will refresh the patch proposed by Wookey and add to it
my work on control fields, including my "Build-Stage" field patch.
I will then submit the complete patch for review and hopeful inclusion
in dpkg pending consensus from debian-devel on the design aspects of
staged package builds.
Perl Cross Building Support
---------------------------
I plan to look through Perl's build system and the debian/rules file of
src:perl to see what's changed between the version 5.12.4-1 on which the
patch in #633884 is based and the newer versions 5.14.2-11 and 5.16.0-1
in Debian sid and experimental. With that knowledge, I can refresh the
patch to apply to the new src:perl versions, forward the updated patch
upstream for comments (as requested by the src:perl maintainers), and
submit it for inclusion in src:perl.
sbuild Chroot for Cross Building
--------------------------------
Finally, I plan to set up a new sbuild chroot and use Thibaut Girka's
multiarch cross toolchain packages to begin attempting to cross build
packages.
[1]: http://wiki.debian.org/SummerOfCode2012/Projects#Bootstrappable_Debian
[2]: http://wiki.debian.org/SummerOfCode2012/StudentApplications/PJMcDermott
[3]: http://lists.mister-muffin.de/cgi-bin/mailman/listinfo/debian-bootstrap
[4]: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=661538#71
[5]:
http://odin1.pehjota.net/~pj/debian-bootstrap/dpkg/dpkg-gencontrol.patch
[6]: http://odin1.pehjota.net/~pj/debian-bootstrap/dpkg/notes.txt
[7]: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=633884
[8]: https://lists.debian.org/debian-embedded/2012/06/msg00011.html
--
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