X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=policy.sgml;h=5a8de36f71841cc9c03b1df5c6ca3f9521a99a66;hb=3de3b0bb699c0040c2f649730ba248e93bd55f7f;hp=9ad47d5dac518cf3052e5e39f0383d32fa1f5a60;hpb=6bdc982dafc8714fd06349b68e05c25b0cd38001;p=debian%2Fdebian-policy.git diff --git a/policy.sgml b/policy.sgml index 9ad47d5..5a8de36 100644 --- a/policy.sgml +++ b/policy.sgml @@ -258,7 +258,6 @@ - @@ -280,6 +279,14 @@ .

+ +

+ Finally, a specification for + machine-readable copyright files is maintained as part of + the debian-policy package using the same + procedure as the other policy documents. Use of this format is + optional. +

@@ -490,9 +497,9 @@ must not require or recommend a package outside of main for compilation or execution (thus, the - package must not declare a "Depends", "Recommends", or - "Build-Depends" relationship on a non-main - package), + package must not declare a "Pre-Depends", "Depends", + "Recommends", "Build-Depends", or "Build-Depends-Indep" + relationship on a non-main package), must not be so buggy that we refuse to support them, @@ -1944,7 +1951,7 @@

- A package may also provide both of the targets + A package may also provide one or both of the targets build-arch and build-indep. The build-arch target, if provided, should perform all the configuration and compilation required for @@ -1957,9 +1964,13 @@ architecture-independent binary packages (those packages for which the body of the Architecture field in debian/control is all). - The build target should depend on those of the - targets build-arch and build-indep that - are provided in the rules file. +

+ +

+ If build-arch or build-indep targets are + provided in the rules file, the build target + should either depend on those targets or take the same + actions as invoking those targets would perform. The intent of this split is so that binary-only builds need not install the dependencies required for the build-indep target. However, this is not @@ -2492,18 +2503,21 @@ endif

- Each paragraph consists of a series of data fields; each - field consists of the field name, followed by a colon and - then the data/value associated with that field. The field - name is composed of printable ASCII characters (i.e., - characters that have values between 33 and 126, inclusive) - except colon and must not with a begin with #. The - field ends at the end of the line or at the end of the - last continuation line (see below). Horizontal whitespace - (spaces and tabs) may occur immediately before or after the - value and is ignored there; it is conventional to put a - single space after the colon. For example, a field might - be: + Each paragraph consists of a series of data fields. Each field + consists of the field name followed by a colon and then the + data/value associated with that field. The field name is + composed of US-ASCII characters excluding control characters, + space, and colon (i.e., characters in the ranges 33-57 and + 59-126, inclusive). Field names must not begin with the comment + character, #. +

+ +

+ The field ends at the end of the line or at the end of the last + continuation line (see below). Horizontal whitespace (spaces + and tabs) may occur immediately before or after the value and is + ignored there; it is conventional to put a single space after + the colon. For example, a field might be: Package: libc6 @@ -2697,7 +2711,7 @@ Package: libc6

This file consists of a single paragraph, possibly surrounded by a PGP signature. The fields of that paragraph are listed below. - Their syntax is described above, in . + Their syntax is described above, in . Format (mandatory) @@ -3711,11 +3725,13 @@ Checksums-Sha256: DM-Upload-Allowed

- The most recent version of a package uploaded to unstable or - experimental must include the field DM-Upload-Allowed: - yes in the source section of its source control file for - the Debian archive to accept uploads signed with a key in the - Debian Maintainer keyring. See the General + Indicates that Debian Maintainers may upload this package to + the Debian archive. The only valid value is yes. If + the field DM-Upload-Allowed: yes is present in the + source section of the source control file of the most recent + version of a package in unstable or experimental, the Debian + archive will accept uploads of this package signed with a key + in the Debian Maintainer keyring. See the General Resolution for more details. @@ -4629,7 +4645,7 @@ Depends: libc6 (>= 2.2.1), exim | mail-transport-agent Relationships may be restricted to a certain set of architectures. This is indicated in brackets after each individual package name and the optional version specification. - The brackets enclose a list of Debian architecture names + The brackets enclose a non-empty list of Debian architecture names in the format described in , separated by whitespace. Exclamation marks may be prepended to each of the names. (It is not permitted for some names to be @@ -6162,11 +6178,11 @@ install -m644 debian/shlibs.package debian/package/DEBIAN/ File System Structure

- The location of all installed files and directories must - comply with the Filesystem Hierarchy Standard (FHS), - version 2.3, with the exceptions noted below, and except - where doing so would violate other terms of Debian - Policy. The following exceptions to the FHS apply: + The location of all files and directories must comply with the + Filesystem Hierarchy Standard (FHS), version 2.3, with the + exceptions noted below, and except where doing so would + violate other terms of Debian Policy. The following + exceptions to the FHS apply: @@ -6247,6 +6263,25 @@ install -m644 debian/shlibs.package debian/package/DEBIAN/ symlinked there, is relaxed to a recommendation.

+ +

+ The additional directory /run in the root + file system is allowed. /run + replaces /var/run, and the + subdirectory /run/lock + replaces /var/lock, with + the /var directories replaced by symlinks + for backwards compatibility. /run + and /run/lock must follow all of the + requirements in the FHS for /var/run + and /var/lock, respectively, such as file + naming conventions, file format requirements, or the + requirement that files be cleared during the boot + process. Files and directories residing + in /run should be stored on a temporary + file system. +

+

The following directories in the root filesystem are @@ -6389,6 +6424,29 @@ rmdir /usr/local/share/emacs 2>/dev/null || true though the spool may still be physically located there.

+ + + /run and /run/lock + +

+ The directory /run is cleared at boot, normally + by being a mount point for a temporary file system. Packages + therefore must not assume that any files or directories + under /run other than /run/lock + exist unless the package has arranged to create those files or + directories since the last reboot. Normally, this is done by + the package via an init script. See + for more information. +

+ +

+ Packages must not include files or directories + under /run, or under the + older /var/run and /var/lock paths. + The latter paths will normally be symlinks or other + redirections to /run for backwards compatibility. +

+
@@ -6763,15 +6821,14 @@ test -f program-executed-later-in-script || exit 0

- /var/run and /var/lock may be mounted - as temporary filesystems - For example, using the RAMRUN and RAMLOCK - options in /etc/default/rcS. - , so the init.d scripts must handle this - correctly. This will typically amount to creating any required - subdirectories dynamically when the init.d script - is run, rather than including them in the package and relying on - dpkg to create them. + Files and directories under /run, including ones + referred to via the compatibility paths /var/run + and /var/lock, are normally stored on a temporary + filesystem and are normally not persistent across a reboot. + The init.d scripts must handle this correctly. + This will typically mean creating any required subdirectories + dynamically when the init.d script is run. + See for more information.

@@ -7231,6 +7288,8 @@ Reloading description configuration...done.

+ Cron job file names +

The file name of a cron job file should normally match the name of the package from which it comes. @@ -7299,7 +7358,7 @@ Reloading description configuration...done. MIME (Multipurpose Internet Mail Extensions, RFCs 2045-2049) is a mechanism for encoding files and data streams and providing meta-information about them, in particular their - type (e.g. audio or video) and format (e.g. PNG, HTML, + type (e.g. audio or video) and format (e.g. PNG, HTML, MP3).

@@ -7316,11 +7375,25 @@ Reloading description configuration...done.

- The MIME support policy can be found in the mime-policy - files in the debian-policy package. - It is also available from the Debian web mirrors at - . + The mime-support package provides the + update-mime program which allows packages to + register programs that can show, compose, edit or print + MIME types. +

+ +

+ Packages containing such programs must register them + with update-mime as documented in . They should not depend + on, recommend, or suggest mime-support. Instead, + they should just put something like the following in the + postinst and postrm scripts: + + + if [ -x /usr/sbin/update-mime ]; then + update-mime + fi +

@@ -7904,10 +7977,12 @@ fname () {

You may wish to restrict your script to SUSv3 features plus the above set when possible so that it may use /bin/sh - as its interpreter. If your script works with dash - (originally called ash), it probably complies with - the above requirements, but if you are in doubt, use - /bin/bash. + as its interpreter. Checking your script + with checkbashisms from + the devscripts package or running your script + with posh may help uncover violations of the above + requirements. If in doubt whether a script complies with these + requirements, use /bin/bash.

@@ -9857,7 +9932,27 @@ END-INFO-DIR-ENTRY You should not use the copyright file as a general README file. If your package has such a file it should be installed in /usr/share/doc/package/README or - README.Debian or some other appropriate place.

+ README.Debian or some other appropriate place. +

+ + + Machine-readable copyright information + +

+ A specification for a standard, machine-readable format + for debian/copyright files is maintained as part + of the debian-policy package. This + document may be found in the copyright-format + files in the debian-policy package. It is + also available from the Debian web mirrors at + . +

+ +

+ Use of this format is optional. +

+
@@ -11313,7 +11408,7 @@ END-INFO-DIR-ENTRY dpkg-divert --package smailwrapper --remove --rename \ --divert /usr/sbin/smail.real /usr/sbin/smail fi - where 1.02-2 is the version at which the + where 1.0-2 is the version at which the diversion was first added to the package. The postrm should not remove the diversion on upgrades both because there's no reason to remove the diversion only to immediately re-add it and since the