From: Russ Allbery Date: Mon, 31 May 2010 16:34:44 +0000 (-0700) Subject: Merge branch 'master' into bug530687-rra X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=baea58c43486488c3c9bd0b4e52957ce88ddd94c;hp=-c;p=debian%2Fdebian-policy.git Merge branch 'master' into bug530687-rra --- baea58c43486488c3c9bd0b4e52957ce88ddd94c diff --combined policy.sgml index 45d6643,ab8fedf..1de2494 --- a/policy.sgml +++ b/policy.sgml @@@ -90,11 -90,10 +90,10 @@@ is used by, a significant number of packages, and therefore should not be changed without peer review. Package maintainers can then rely on this - interfaces not changing, and the package - management software authors need to ensure - compatibility with these interface - definitions. (Control file and changelog file - formats are examples.) + interface not changing, and the package management + software authors need to ensure compatibility with + this interface definition. (Control file and + changelog file formats are examples.) Chosen Convention @@@ -366,7 -365,7 +365,7 @@@ The Debian Free Software Guidelines (DFSG) form our definition of "free software". These are: - Free Redistribution + 1. Free Redistribution The license of a Debian component may not restrict any @@@ -376,20 -375,20 +375,20 @@@ sources. The license may not require a royalty or other fee for such sale. - Source Code + 2. Source Code The program must include source code, and must allow distribution in source code as well as compiled form. - Derived Works + 3. Derived Works The license must allow modifications and derived works, and must allow them to be distributed under the same terms as the license of the original software. - Integrity of The Author's Source Code + 4. Integrity of The Author's Source Code The license may restrict source-code from being @@@ -404,13 -403,13 +403,13 @@@ Project encourages all authors to not restrict any files, source or binary, from being modified.) - No Discrimination Against Persons or Groups + 5. No Discrimination Against Persons or Groups The license must not discriminate against any person or group of persons. - No Discrimination Against Fields of Endeavor + 6. No Discrimination Against Fields of Endeavor The license must not restrict anyone from making use @@@ -419,7 -418,7 +418,7 @@@ used in a business, or from being used for genetic research. - Distribution of License + 7. Distribution of License The rights attached to the program must apply to all @@@ -427,7 -426,7 +426,7 @@@ for execution of an additional license by those parties. - License Must Not Be Specific to Debian + 8. License Must Not Be Specific to Debian The rights attached to the program must not depend on @@@ -439,7 -438,7 +438,7 @@@ rights as those that are granted in conjunction with the Debian system. - License Must Not Contaminate Other Software + 9. License Must Not Contaminate Other Software The license must not place restrictions on other @@@ -448,7 -447,7 +447,7 @@@ that all other programs distributed on the same medium must be free software. - Example Licenses + 10. Example Licenses The "GPL," "BSD," and "Artistic" licenses are examples of @@@ -1726,14 -1725,17 +1725,17 @@@

It must start with the line #!/usr/bin/make -f, so that it can be invoked by saying its name rather than - invoking make explicitly. + invoking make explicitly. That is, invoking + either of make -f debian/rules args... + or ./debian/rules args... must result in + identical behavior.

Since an interactive debian/rules script makes it impossible to auto-compile that package and also makes it hard for other people to reproduce the same binary - package, all required targets MUST be + package, all required targets must be non-interactive. At a minimum, required targets are the ones called by dpkg-buildpackage, namely, clean, binary, binary-arch, @@@ -2690,7 -2692,7 +2692,7 @@@ Package: libc Priority

- This field represents how important that it is that the user + This field represents how important it is that the user have the package installed. See .

@@@ -2726,12 -2728,7 +2728,12 @@@ 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 @@@ -2744,14 -2741,13 +2746,14 @@@ 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.

@@@ -2792,24 -2788,6 +2794,24 @@@ 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) @@@ -2823,8 -2801,8 +2825,8 @@@

- See for information how to get the - architecture for the build process. + See for information on how to get + the architecture for the build process.

@@@ -2885,8 -2863,8 +2887,8 @@@

Thus only the first three components of the policy version are significant in the Standards-Version control - field, and so either these three components or the all - four components may be specified. + field, and so either these three components or all four + components may be specified. In the past, people specified the full version number in the Standards-Version field, for example "2.3.0.0". Since minor patch-level changes don't introduce new @@@ -3278,7 -3256,7 +3280,7 @@@ for the most recent version should be returned first, and entries should be separated by the representation of a blank line (the "title" line may also be followed by the - representation of blank line). + representation of a blank line).

@@@ -3394,7 -3372,7 +3396,7 @@@ Files no new original source archive is being distributed the .dsc must still contain the Files field entry for the original source archive - package-upstream-version.orig.tar.gz, + package_upstream-version.orig.tar.gz, but the .changes file should leave it out. In this case the original source archive on the distribution site must match exactly, byte-for-byte, the original @@@ -3737,7 -3715,7 +3739,7 @@@ If this works, then the old-version is "Installed", if not, the old version is in a - "Failed-Config" state. + "Half-Configured" state.
@@@ -3845,7 -3823,7 +3847,7 @@@ If this fails, the package is left in a "Half-Installed" state, which requires a reinstall. If it works, the packages is left in - a "Config Files" state. + a "Config-Files" state.
Otherwise (i.e., the package was completely purged): @@@ -3857,7 -3835,7 +3859,7 @@@ new-postrm abort-install If the error-unwind fails, the package is in a - "Half Installed" phase, and requires a + "Half-Installed" phase, and requires a reinstall. If the error unwind works, the package is in a not installed state. @@@ -3937,14 -3915,14 +3939,14 @@@ old-preinst abort-upgrade new-version - If this fails, the old version is left in an - "Half Installed" state. If it works, dpkg now + If this fails, the old version is left in a + "Half-Installed" state. If it works, dpkg now calls: new-postrm abort-upgrade old-version - If this fails, the old version is left in an - "Half Installed" state. If it works, dpkg now + If this fails, the old version is left in a + "Half-Installed" state. If it works, dpkg now calls: old-postinst abort-upgrade new-version @@@ -4103,7 -4081,7 +4105,7 @@@

- If this fails, the package is in a "Failed-Config" + If this fails, the package is in a "Half-Configured" state, or else it remains "Installed".

@@@ -4281,23 -4259,6 +4283,23 @@@ Build-Depends: foo [!i386] | bar [!amd6 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. +

@@@ -4456,12 -4417,12 +4458,12 @@@ be unpacked the pre-dependency can be satisfied if the depended-on package is either fully configured, or even if the depended-on - package(s) are only unpacked or half-configured, - provided that they have been configured correctly at - some point in the past (and not removed or partially - removed since). In this case, both the + package(s) are only unpacked or in the "Half-Configured" + state, provided that they have been configured + correctly at some point in the past (and not removed + or partially removed since). In this case, both the previously-configured and currently unpacked or - half-configured versions must satisfy any version + "Half-Configured" versions must satisfy any version clause in the Pre-Depends field.

@@@ -4518,7 -4479,7 +4520,7 @@@

A package will not be regarded as causing breakage merely because its configuration files are still installed; it must - be at least half-installed. + be at least "Half-Installed".

@@@ -4572,7 -4533,7 +4574,7 @@@

A package will not cause a conflict merely because its configuration files are still installed; it must be at least - half-installed. + "Half-Installed".

@@@ -5378,10 -5339,10 +5380,10 @@@ dpkg-shlibdeps debian/tmp/usr/bin/* deb

- If you are creating a udeb for use in the Debian Installer, you - will need to specify that dpkg-shlibdeps should use - the dependency line of type udeb by adding - -tudeb as option + If you are creating a udeb for use in the Debian Installer, + you will need to specify that dpkg-shlibdeps + should use the dependency line of type udeb by + adding the -tudeb option dh_shlibdeps from the debhelper suite will automatically add this option if it knows it is processing a udeb. @@@ -5680,6 -5641,15 +5682,15 @@@ libbar 1 bar1 (>= 1.0-1 symlinked there, is relaxed to a recommendation.

+ +

+ The following directories in the root filesystem are + additionally allowed: /sys and + /selinux. These directories + are used as mount points to mount virtual filesystems + to get access to kernel information. +

+

@@@ -5725,13 -5695,15 +5736,15 @@@

- Note, that this applies only to directories below - /usr/local, not in /usr/local. - Packages must not create sub-directories in the directory - /usr/local itself, except those listed in FHS, - section 4.5. However, you may create directories below - them as you wish. You must not remove any of the - directories listed in 4.5, even if you created them. + Note that this applies only to + directories below /usr/local, + not in /usr/local. Packages must + not create sub-directories in the + directory /usr/local itself, except those + listed in FHS, section 4.5. However, you may create + directories below them as you wish. You must not remove + any of the directories listed in 4.5, even if you created + them.

@@@ -5792,9 -5764,10 +5805,10 @@@ rmdir /usr/local/share/emacs 2>/dev/nul The system-wide mail directory

- The system-wide mail directory is /var/mail. This - directory is part of the base system and should not owned - by any particular mail agents. The use of the old + The system-wide mail directory + is /var/mail. This directory is part of the + base system and should not be owned by any particular mail + agents. The use of the old location /var/spool/mail is deprecated, even though the spool may still be physically located there.

@@@ -6579,13 -6552,48 +6593,48 @@@ Reloading description config anacron. Thus, you should only use this directory for jobs which may be skipped if the system is not running.)

+

+ Unlike crontab files described in the IEEE Std + 1003.1-2008 (POSIX.1) available from + , the files in + /etc/cron.d and the file + /etc/crontab have seven fields; namely: + + Minute [0,59] + Hour [0,23] + Day of the month [1,31] + Month of the year [1,12] + Day of the week ([0,6] with 0=Sunday) + Username + Command to be run + + Ranges of numbers are allowed. Ranges are two numbers + separated with a hyphen. The specified range is inclusive. + Lists are allowed. A list is a set of numbers (or ranges) + separated by commas. Step values can be used in conjunction + with ranges. +

- The scripts or crontab entries in these directories should + The scripts or crontab entries in these directories should check if all necessary programs are installed before they try to execute them. Otherwise, problems will arise when a package was removed but not purged since configuration files - are kept on the system in this situation.

+ are kept on the system in this situation. +

+ +

+ Any cron daemon must provide + /usr/bin/crontab and support normal + crontab entries as specified in POSIX. The daemon + must also support names for days and months, ranges, and + step values. It has to support /etc/crontab, + and correctly execute the scripts in + /etc/cron.d. The daemon must also correctly + execute scripts in + /etc/cron.{hourly,daily,weekly,monthly}. +

@@@ -7295,8 -7303,8 +7344,8 @@@ ln -fs ../sbin/sendmail debian/tmp/usr/ Device files

- Packages must not include device files in the package file - tree. + Packages must not include device files or named pipes in the + package file tree.

@@@ -7321,6 -7329,18 +7370,18 @@@ /dev/cu* devices should be changed to use /dev/ttyS*.

+ +

+ Named pipes needed by the package must be created in + the postinst script + It's better to use mkfifo rather + than mknod to create named pipes so that + automated checks for packages incorrectly creating device + files with mknod won't have false positives. + and removed in + the prerm or postrm script as + appropriate. +

@@@ -7936,27 -7956,6 +7997,27 @@@ don

+ + 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 @@@ -8669,9 -8668,9 +8730,9 @@@ name ["syshostname"]

Customization of programs' X resources may also be supported with the provision of a file with the same name - as that of the package placed in the - /etc/X11/Xresources/ directory, which must - registered as a conffile or handled as a + as that of the package placed in + the /etc/X11/Xresources/ directory, which + must be registered as a conffile or handled as a configuration file. Note that this mechanism is not the same as using app-defaults; app-defaults are tied to the client @@@ -9055,7 -9054,7 +9116,7 @@@ END-INFO-DIR-ENTR

Please note that this does not override the section on changelog files below, so the file - /usr/share/package/changelog.Debian.gz + /usr/share/doc/package/changelog.Debian.gz must refer to the changelog for the current version of package in question. In practice, this means that the sources of the target and the destination of the