X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=policy.sgml;h=b61ab26140fc17f3735e0e085a67af520c6e4cb5;hb=de8e6ddc94be9d04836d7d1f68d1429978d14bfd;hp=d56ca683552161c051dd1bbddb61484411b9f722;hpb=f577569227a2dd099c4e20efc868df618cbc64a0;p=debian%2Fdebian-policy.git diff --git a/policy.sgml b/policy.sgml index d56ca68..b61ab26 100644 --- a/policy.sgml +++ b/policy.sgml @@ -15,7 +15,7 @@ This manual describes the policy requirements for the Debian - GNU/Linux distribution. This includes the structure and + distribution. This includes the structure and contents of the Debian archive and several design issues of the operating system, as well as technical requirements that each package must satisfy to be included in the distribution. @@ -50,7 +50,7 @@

A copy of the GNU General Public License is available as - /usr/share/common-licenses/GPL in the Debian GNU/Linux + /usr/share/common-licenses/GPL in the Debian distribution or on the World Wide Web at . You can also @@ -68,7 +68,7 @@ Scope

This manual describes the policy requirements for the Debian - GNU/Linux distribution. This includes the structure and + distribution. This includes the structure and contents of the Debian archive and several design issues of the operating system, as well as technical requirements that each package must satisfy to be included in the @@ -314,7 +314,7 @@ The Debian Archive

- The Debian GNU/Linux system is maintained and distributed as a + The Debian system is maintained and distributed as a collection of packages. Since there are so many of them (currently well over 15000), they are split into sections and given priorities to simplify @@ -348,8 +348,7 @@

- The main archive area forms the Debian GNU/Linux - distribution. + The main archive area forms the Debian distribution.

@@ -796,7 +795,7 @@ Binary packages

- The Debian GNU/Linux distribution is based on the Debian + The Debian distribution is based on the Debian package management system, called dpkg. Thus, all packages in the Debian distribution must be provided in the .deb file format. @@ -911,10 +910,11 @@ The maintainer of a package

- Every package must have a maintainer. The maintainer may be one - person or a group of people reachable from a common email - address, such as a mailing list. The maintainer is responsible - for maintaining the Debian packaging files, evaluating and + Every package must have a maintainer, except for orphaned + packages as described below. The maintainer may be one person + or a group of people reachable from a common email address, such + as a mailing list. The maintainer is responsible for + maintaining the Debian packaging files, evaluating and responding appropriately to reported bugs, uploading new versions of the package (either directly or through a sponsor), ensuring that the package is placed in the appropriate archive @@ -957,14 +957,16 @@

- If the maintainer of a package no longer has time or desire to - maintain a package, it should be orphaned according to the - procedure described in the Debian Developer's Reference - (see ). The maintainer then - becomes Debian QA Group <packages@qa.debian.org>. + An orphaned package is one with no current maintainer. Orphaned + packages should have their Maintainer control field set + to Debian QA Group <packages@qa.debian.org>. These packages are considered maintained by the Debian project as a whole until someone else volunteers to take over - maintenance. + maintenance. + The detailed procedure for gracefully orphaning a package can + be found in the Debian Developer's Reference + (see ). +

@@ -1165,7 +1167,7 @@

The base system is a minimum subset of the Debian - GNU/Linux system that is installed before everything else + system that is installed before everything else on a new system. Only very few packages are allowed to form part of the base system, in order to keep the required disk usage very small. @@ -1658,11 +1660,20 @@ The maintainer name and email address used in the changelog should be the details of the person uploading this version. They are not necessarily those of the - usual package maintainer. The information here will be - copied to the Changed-By field in the - .changes file (see ), - and then later used to send an acknowledgement when the - upload has been installed. + usual package maintainer. + If the developer uploading the package is not one of the usual + maintainers of the package (as listed in + the Maintainer + or Uploaders control + fields of the package), the first line of the changelog is + conventionally used to explain why a non-maintainer is + uploading the package. The Debian Developer's Reference + (see ) documents the conventions + used. + The information here will be copied to the Changed-By + field in the .changes file + (see ), and then later used to send an + acknowledgement when the upload has been installed.

@@ -1814,23 +1825,26 @@ identical behavior.

+

+ The following targets are required and must be implemented + by debian/rules: clean, binary, + binary-arch, binary-indep, and build. + These are the targets called by dpkg-buildpackage. +

+

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 - non-interactive. At a minimum, required targets are the - ones called by dpkg-buildpackage, namely, - clean, binary, binary-arch, - binary-indep, and build. It also follows - that any target that these targets depend on must also be + 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 non-interactive. It also follows that + any target that these targets depend on must also be non-interactive.

- The targets are as follows (required unless stated otherwise): + The targets are as follows: - build + build (required)

The build target should perform all the @@ -1941,8 +1955,8 @@

- binary, binary-arch, - binary-indep + binary (required), binary-arch + (required), binary-indep (required)

@@ -1990,7 +2004,7 @@

- clean + clean (required)

This must undo any effects that the build @@ -2072,14 +2086,21 @@

The architectures we build on and build for are determined - by make variables using the utility - dpkg-architecture. - You can determine the - Debian architecture and the GNU style architecture - specification string for the build machine (the machine type - we are building on) as well as for the host machine (the - machine type we are building for). Here is a list of - supported make variables: + by make variables using the + utility dpkg-architecture. + You can determine the Debian architecture and the GNU style + architecture specification string for the build architecture as + well as for the host architecture. The build architecture is + the architecture on which debian/rules is run and + the package build is performed. The host architecture is the + architecture on which the resulting package will be installed + and run. These are normally the same, but may be different in + the case of cross-compilation (building packages for one + architecture on machines of a different architecture). +

+ +

+ Here is a list of supported make variables: DEB_*_ARCH (the Debian architecture) @@ -2103,8 +2124,8 @@ DEB_*_GNU_TYPE) where * is either BUILD for specification of - the build machine or HOST for specification of the - host machine. + the build architecture or HOST for specification of the + host architecture.

@@ -7603,7 +7624,19 @@ fname () { must be supported and must set the value of c to delta. - + + The XSI extension to kill allowing kill + -signal, where signal is either + the name of a signal or one of the numeric signals listed in + the XSI extension (0, 1, 2, 3, 6, 9, 14, and 15), must be + supported if kill is implemented as a shell + built-in. + + The XSI extension to trap allowing numeric + signals must be supported. In addition to the signal + numbers listed in the extension, which are the same as for + kill above, 13 (SIGPIPE) must be allowed. + If a shell script requires non-SUSv3 features from the shell interpreter other than those listed above, the appropriate shell @@ -7915,22 +7948,6 @@ ln -fs ../sbin/sendmail debian/tmp/usr/bin/runq Sharing configuration files -

- Packages which specify the same file as a - conffile must be tagged as conflicting - with each other. (This is an instance of the general rule - about not sharing files. Note that neither alternatives - nor diversions are likely to be appropriate in this case; - in particular, dpkg does not handle diverted - conffiles well.) -

- -

- The maintainer scripts must not alter a conffile - of any package, including the one the scripts - belong to. -

-

If two or more packages use the same configuration file and it is reasonable for both to be installed at the same @@ -7980,6 +7997,34 @@ ln -fs ../sbin/sendmail debian/tmp/usr/bin/runq and which manages the shared configuration files. (The sgml-base package is a good example.)

+ +

+ If the configuration file cannot be shared as described above, + the packages must be marked as conflicting with each other. + Two packages that specify the same file as + a conffile must conflict. This is an instance of the + general rule about not sharing files. Neither alternatives + nor diversions are likely to be appropriate in this case; in + particular, dpkg does not handle diverted + conffiles well. +

+ +

+ When two packages both declare the same conffile, they + may see left-over configuration files from each other even + though they conflict with each other. If a user removes + (without purging) one of the packages and installs the other, + the new package will take over the conffile from the + old package. If the file was modified by the user, it will be + treated the same as any other locally + modified conffile during an upgrade. +

+ +

+ The maintainer scripts must not alter a conffile + of any package, including the one the scripts + belong to. +

@@ -8044,11 +8089,13 @@ ln -fs ../sbin/sendmail debian/tmp/usr/bin/runq

- Log files must be rotated occasionally so that they don't - grow indefinitely; the best way to do this is to drop a log - rotation configuration file into the directory - /etc/logrotate.d and use the facilities provided by - logrotate. + Log files must be rotated occasionally so that they don't grow + indefinitely. The best way to do this is to install a log + rotation configuration file in the + directory /etc/logrotate.d, normally + named /etc/logrotate.d/package, and use + the facilities provided by logrotate. +

The traditional approach to log files has been to set up ad hoc log rotation schemes using simple shell @@ -8073,17 +8120,20 @@ ln -fs ../sbin/sendmail debian/tmp/usr/bin/runq section="8">): /var/log/foo/*.log { -rotate 12 -weekly -compress -postrotate -/etc/init.d/foo force-reload -endscript + rotate 12 + weekly + compress + missingok + postrotate + start-stop-daemon -K -p /var/run/foo.pid -s HUP -x /usr/sbin/foo -q + endscript } This rotates all files under /var/log/foo, saves 12 - compressed generations, and forces the daemon to reload its - configuration information after the log rotation. + compressed generations, and tells the daemon to reopen its log + files after the log rotation. It skips this log rotation + (via missingok) if no such log file is present, which + avoids errors if the package is removed but not purged.

@@ -8136,6 +8186,12 @@ endscript

+

+ Control information files should be owned by root:root + and either mode 644 (for most files) or mode 755 (for + executables such as maintainer + scripts). +

Setuid and setgid executables should be mode 4755 or 2755 @@ -9517,8 +9573,7 @@ END-INFO-DIR-ENTRY

Packages in the contrib or non-free archive areas should state in the copyright file that the package is not - part of the Debian GNU/Linux distribution and briefly explain - why. + part of the Debian distribution and briefly explain why.

@@ -9689,9 +9744,8 @@ END-INFO-DIR-ENTRY dpkg is a suite of programs for creating binary package files and installing and removing them on Unix systems. - dpkg is targeted primarily at Debian - GNU/Linux, but may work on or be ported to other - systems. + dpkg is targeted primarily at Debian, but may + work on or be ported to other systems.