Add experimental build profiles support
authorGuillem Jover <guillem@debian.org>
Wed, 4 Dec 2013 04:56:17 +0000 (05:56 +0100)
committerGuillem Jover <guillem@debian.org>
Thu, 5 Dec 2013 03:56:11 +0000 (04:56 +0100)
commit7662e0937bb064a0754d12605d80a96a17e2aadf
tree6c6f27f8c858c6863a40562bebdb5fc9338f3644
parentbb53fa0defe392d55ae7b7f49bb28d9e647acb9c
Add experimental build profiles support

This adds the basic infrastructure support for a new class of generic
build-time dependency restrictions, and in particular implements the
specific build profiles, which will allow to cull build dependencies
depending on the profile being used. There's several things this can
be used for, like new port bootstrapping, reduced package builds, and
similar. In the future other kinds of restrictions could be added as
the build profiles are namespaced with “profile.”. An example field
could be:

  Build-Depends: exotic-compiler, libneeded-dev, tool-tiny,
   tool-huge (>= 1.0) [linux-any] <!profile.embedded !profile.bootstrap>

or even stuff like:

  Depends: net-tools <profile.network>, plugin-curl <!profile.no-plugins>

The generated binary packages and .changes files will get a new
Built-For-Profiles field containing the active profiles during the build.

In addition the build profile can be selected using the environment
variable DEB_BUILD_PROFILES, with space separated values, such as:

  DEB_BUILD_PROFILES="embedded bootstrap"

The management and possible registration in the profile namespace is
currently out of scope in dpkg, this should probably be handled by a
distribution specific process.

See draft <http://www.hadrons.org/~guillem/debian/docs/embedded.proposal>.

Closes: #661538

Based-on-patch-by: Patrick "P. J." McDermott <pjm@nac.net>
Based-on-patch-by: Wookey <wookey@debian.org>
Based-on-patch-by: Johannes Schauer <j.schauer@email.de>
Signed-off-by: Guillem Jover <guillem@debian.org>
15 files changed:
debian/changelog
dpkg-deb/build.c
man/deb-src-control.5
man/dpkg-buildpackage.1
man/dpkg-checkbuilddeps.1
scripts/Dpkg/BuildProfiles.pm [new file with mode: 0644]
scripts/Dpkg/Control/FieldsCore.pm
scripts/Dpkg/Deps.pm
scripts/Makefile.am
scripts/dpkg-buildpackage.pl
scripts/dpkg-checkbuilddeps.pl
scripts/dpkg-genchanges.pl
scripts/dpkg-gencontrol.pl
scripts/dpkg-shlibdeps.pl
scripts/t/400_Dpkg_Deps.t