#758461 [cyrus-sasl2] Allow bootstrapping without Heimdal, PostgreSQL and LDAP

#758461#5
Date:
2014-08-17 18:44:59 UTC
From:
To:
Hi,

Thanks for taking care of cyrus-sasl2 in Debian!

As part of this year's "Bootstrappable Debian" Google Summer of Code
project I took a look at cyrus-sasl2 to break a circular build dependency
as noted in the "Feedback Arc Set" section of
http://bootstrap.debian.net/amd64/ and, more specifically, at
http://bootstrap.debian.net/source/cyrus-sasl2.html and the
version-specific pages linked from it.  There are two primary goals to
my work on this GSoC project:
- The first goal is to modify some packages so that they may be built in
  some limited way ("nocheck", binary-only, or build profiles like
  "stage1") without some of their usual build dependencies.  In most
  cases this is caused by one or more dependency loops between binary
  and source packages, so that a source package requires for its
  building, directly or indirectly, one of its own binary packages to be
  already built.  The modifications make the source build in a limited
  fashion (not generating documentation, not running tests, not building
  some of the binary packages) so that this may happen with only the
  rest of the build dependencies, so Debian may be bootstrapped on a new
  architecture starting from a very few cross-built toolchain packages
  and then moving along, source package by source package.
- The second goal, which is actually closely related to the first, is
  that in the process of modifications, any changes (some files not
  regenerated, others not built at all) can be made with binary package
  level granularity.  This means that if a binary package is built at
  all during a limited build, then it must have the same contents as the
  same binary package resulting from a full build.  The point here is to
  avoid breakage if other packages in the archive depend on some
  functionality provided by the omitted files; if so, it should be
  obvious that the functionality is missing, and the clearest way to do
  that is by omitting a full binary package or, rather, delaying its
  build until the rest of the build dependencies are present.

The problem with cyrus-sasl2 is threefold - there are various build
dependency loops triggered by the Heimdal, PostgreSQL and LDAP support
in the various modules.  So what do you think about the attached patch
that checks for a "stage1" build profile specified in the
DEB_BUILD_PROFILES variable and, if so, builds Cyrus without the LDAP,
SQL and GSSAPI-Heimdal modules?

In this iteration, one would also have to manually remove the offending
build dependencies from the control file; I will file another bug that
makes use of the new <profile.*> restriction and the new Build-Profiles
binary stanza header to make this completely automated.  However, that
would have to wait for the actual introduction of build profile-aware
tools in the Debian archive infrastructure.

If anything should go wrong with the patch, it is also available at
https://gitorious.org/roam-debian-bootstrap/cyrus-sasl2-debian/commits/roam-stage1-build-2

Thanks in advance for your time, and thanks for your work on Debian!

G'luck,
Peter