From: Manoj Srivastava Date: Thu, 10 Sep 2009 21:18:51 +0000 (-0500) Subject: bug530687-srivasta: Support for architecture wildcards X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=ec4fbc8a14591d5f199003971cfdb698c6c5c93f;p=debian%2Fdebian-policy.git bug530687-srivasta: Support for architecture wildcards Support for architecture wildcards has been added to dpkg-1.13.13. This patch, based on a proposal from Andres Mejia, provides policy on how architecture wildcards should be used for other tools such as sbuild and pbuilder. This patch has tracked and incorporated suggestions embedded the discussion of the proposal. It also brings policy up to speed and in line with dpkg-dev which appears to generate an Architecture line that includes both architectures and special values like "all". See: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=530687 http://lists.debian.org/debian-policy/2009/05/msg00108.html for details. Signed-off-by: Andres Mejia Signed-off-by: Manoj Srivastava --- diff --git a/policy.sgml b/policy.sgml index 0bf1001..45d6643 100644 --- a/policy.sgml +++ b/policy.sgml @@ -2726,7 +2726,12 @@ Package: libc6 values: A unique single word identifying a Debian machine - architecture as described in . + architecture as described in . + + + An architecture wildcard identifying a set of Debian + machine architectures, see . + all, which indicates an architecture-independent package. any, which indicates a package available @@ -2739,13 +2744,14 @@ Package: libc6 In the main debian/control file in the source package, this field may contain the special value any, the special value all, or a list of - architectures separated by spaces. If any or - all appear, they must be the entire contents of the - field. Most packages will use either any or - all. Specifying a specific list of architectures is - for the minority of cases where a program is not portable or - is not useful on some architectures, and where possible the - program should be made portable instead. + specific and wildcard architectures separated by + spaces. If the special value any appears, it must + be the entire contents of the field. Most packages will + use either any or all. Specifying a + specific list of architectures is for the minority of + cases where a program is not portable or is not useful on + some architectures, and where possible the program should + be made portable instead.

@@ -2786,6 +2792,24 @@ Package: libc6 package, all will also be included in the list.

+

+ Specifying a list of architecture wildcards indicates that + the source will build an architecture-dependent package on + the union of the lists of architectures from the expansion + of each specified architecture wildcard, and will only + work correctly on the architectures in the union of the + lists. As mentioned in the footnote for + specifying a list of architectures, this is for a minority + of cases where the program is not portable. Generally, it + should not be used for new packages. Wildcards are not + expanded into a list of known architectures before + comparing to the build architecutre. Instead, the build + architecture is matched against wildcards and this package + is built if the wildcard matches. If the source + package also builds at least one architecture-independent + package, all will also be included in the list. +

+

In a .changes file, the Architecture field lists the architecture(s) of the package(s) @@ -4257,6 +4281,23 @@ Build-Depends: foo [!i386] | bar [!amd64] source package section of the control file (which is the first section).

+

+ All fields that specify build-time relationships + (Build-Depends, Build-Depends-Indep, + Build-Conflicts and Build-Conflicts-Indep) may also + be restricted to a certain set of architectures using architecture + wildcards. The syntax for declaring such restrictions is the same as + declaring restrictions using a certain set of architectures without + architecture wildcards. + For example: + +Build-Depends: foo [linux-any], bar [any-i386], baz [!linux-any] + + is equivalent to foo on architectures using the + Linux kernel and any cpu, bar on architectures + using any kernel and an i386 cpu, and baz on + on any architecture using a kernel other than Linux. +

@@ -7895,6 +7936,27 @@ done

+ + Architecture Wildcards + +

+ A package may specify an architecture wildcard. Architecture + wildcards are in the format os-any and + any-cpu. Internally, the package + system normalizes the GNU triplets and the Debian + arches into Debian arch triplets (which are kind of inverted GNU + triplets). So when matching two Debian arch triplets, whenever an + any is found it matches with anything on the other side, + like in: + + gnu-linux-i386 is matched by gnu-linux-any + gnu-kfreebsd-amd64 is matched by any-any-amd64 + + And for example any is normalized to any-any-any. + +

+
+ Daemons