summaryrefslogtreecommitdiff
path: root/scripts/Dpkg/Control
diff options
context:
space:
mode:
authorGuillem Jover <guillem@debian.org>2013-12-04 05:56:17 +0100
committerGuillem Jover <guillem@debian.org>2013-12-05 04:56:11 +0100
commit7662e0937bb064a0754d12605d80a96a17e2aadf (patch)
tree6c6f27f8c858c6863a40562bebdb5fc9338f3644 /scripts/Dpkg/Control
parentbb53fa0defe392d55ae7b7f49bb28d9e647acb9c (diff)
downloaddpkg-7662e0937bb064a0754d12605d80a96a17e2aadf.tar.gz
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>
Diffstat (limited to 'scripts/Dpkg/Control')
-rw-r--r--scripts/Dpkg/Control/FieldsCore.pm11
1 files changed, 8 insertions, 3 deletions
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)
],