From 7662e0937bb064a0754d12605d80a96a17e2aadf Mon Sep 17 00:00:00 2001 From: Guillem Jover Date: Wed, 4 Dec 2013 05:56:17 +0100 Subject: Add experimental build profiles support MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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] or even stuff like: Depends: net-tools , plugin-curl 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 . Closes: #661538 Based-on-patch-by: Patrick "P. J." McDermott Based-on-patch-by: Wookey Based-on-patch-by: Johannes Schauer Signed-off-by: Guillem Jover --- scripts/Dpkg/Control/FieldsCore.pm | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'scripts/Dpkg/Control') diff --git a/scripts/Dpkg/Control/FieldsCore.pm b/scripts/Dpkg/Control/FieldsCore.pm index e0124fcd8..a8d63e0ef 100644 --- a/scripts/Dpkg/Control/FieldsCore.pm +++ b/scripts/Dpkg/Control/FieldsCore.pm @@ -111,6 +111,10 @@ our %FIELDS = ( dependency => 'normal', dep_order => 3, }, + 'Built-For-Profiles' => { + allowed => ALL_PKG | CTRL_FILE_CHANGES, + separator => FIELD_SEP_SPACE, + }, 'Built-Using' => { allowed => ALL_PKG, separator => FIELD_SEP_COMMA, @@ -337,7 +341,8 @@ my @sum_fields = map { $_ eq 'md5' ? 'MD5sum' : &field_capitalize($_) } our %FIELD_ORDER = ( CTRL_PKG_DEB() => [ qw(Package Package-Type Source Version Built-Using Kernel-Version - Architecture Subarchitecture Installer-Menu-Item Essential Origin Bugs + Built-For-Profiles Architecture Subarchitecture + Installer-Menu-Item Essential Origin Bugs Maintainer Installed-Size), &field_list_pkg_dep(), qw(Section Priority Multi-Arch Homepage Description Tag Task) ], @@ -349,8 +354,8 @@ our %FIELD_ORDER = ( @checksum_fields, qw(Files) ], CTRL_FILE_CHANGES() => [ - qw(Format Date Source Binary Binary-Only Architecture Version - Distribution Urgency Maintainer Changed-By Description + qw(Format Date Source Binary Binary-Only Built-For-Profiles Architecture + Version Distribution Urgency Maintainer Changed-By Description Closes Changes), @checksum_fields, qw(Files) ], -- cgit v1.2.3