X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=policy.sgml;h=d5edf52667d2135c8870be08a6336e4a02941ae0;hb=2ae3e536615ebb3615f395d39a615b1d84e0b90a;hp=795974ed26cd05e83ec22183e5388062427b99b3;hpb=d92ace86279772065fbafda4e452e92322c51332;p=debian%2Fdebian-policy.git diff --git a/policy.sgml b/policy.sgml index 795974e..d5edf52 100644 --- a/policy.sgml +++ b/policy.sgml @@ -51,12 +51,6 @@ that have no editorial powers. At the moment, the list of maintainers is: - -

Michael Alan Dorman mdorman@debian.org

-
- -

Philip Hands phil@hands.com

-

Julian Gilbey jdg@debian.org

@@ -92,9 +86,9 @@ /usr/share/common-licenses/GPL in the Debian GNU/Linux distribution or on the World Wide Web at . You can also obtain it by writing to the - Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. + name="The GNU General Public Licence">. You can also + obtain it by writing to the Free Software Foundation, Inc., + 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.

@@ -138,7 +132,7 @@ interfaces not changing, and the package management software authors need to ensure compatibility with these interface - definitions. (Control file and and changelog file + definitions. (Control file and changelog file formats are examples.)

@@ -170,7 +164,7 @@ may, and the adjectives required, recommended and optional, are used to distinguish the significance of the various guidelines in - this policy document. Packages that do not conform the the + this policy document. Packages that do not conform to the guidelines denoted by must (or required) will generally not be considered acceptable for the Debian distribution. Non-conformance with guidelines denoted by @@ -584,7 +578,7 @@

Every package must be accompanied by a verbatim copy of its copyright and distribution license in the file - /usr/share/doc/<package-name>/copyright + /usr/share/doc/<package>/copyright (see for further details).

@@ -679,13 +673,13 @@

- subsection if the package is in the + subsection if the package is in the main section,

- section/subsection if the package is in + section/subsection if the package is in the contrib or non-free section, and

@@ -770,8 +764,8 @@

These packages provide a reasonably small but not too - limited character-mode system. This is what will - install by default if the user doesn't select anything + limited character-mode system. This is what will be + installed by default if the user doesn't select anything else. It doesn't include many large applications, but it does include Emacs (this is more of a piece of infrastructure than an application) and a reasonable @@ -1187,7 +1181,7 @@ Source packages - + Standards conformance

@@ -1464,29 +1458,40 @@

Many of the tools in the package management suite manipulate - data in a common format, known as control files. Binary and - source packages have control data as do the .changes - files which control the installation of uploaded files, and - dpkg's internal databases are in a similar + data represented in a common format, known as control + data. The data is often stored in control + files. Binary and source packages have control files, + and the .changes files which control the installation + of uploaded files are also in control file format. + Dpkg's internal databases are in a similar format.

- Syntax of control files + Syntax of control files

- A file consists of one or more paragraphs of fields. The - paragraphs are separated by blank lines. Some control files - only allow one paragraph; others allow several, in which - case each paragraph often refers to a different package. + A control file consists of one or more paragraphs of fields. + The paragraphs are separated by blank lines. Some control + files allow only one paragraph; others allow several, in + which case each paragraph usually refers to a different + package. (For example, in source packages, the first + paragraph refers to the source package, and later paragraphs + refer to binary packages generated from the source.)

- Each paragraph is a series of fields and values; each field - consists of a name, followed by a colon and the value. It - ends at the end of the line. 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. + 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. It ends at + the end of the line. 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 + + the field name is Package and the field value + libc6.

@@ -1499,9 +1504,9 @@

Except where otherwise stated only a single line of data is allowed and whitespace is not significant in a field body. - Whitespace may never appear inside names (of packages, - architectures, files or anything else), version numbers or - in between the characters of multi-character version + Whitespace must not appear inside names (of packages, + architectures, files or anything else) or version numbers, + or between the characters of multi-character version relationships.

@@ -1516,21 +1521,12 @@ would mean a new paragraph.

-

- It is important to note that there are several fields which - are optional as far as dpkg and the related - tools are concerned, but which must appear in every Debian - package, or whose omission may cause problems. When writing - the control files for Debian packages you must read - the Debian policy manual in conjunction with the details - below and the list of fields for the particular file.

List of fields

This list here is not supposed to be exhaustive. Most fields - are dealt with elsewhere in this document and in the - packaging manual. + are dealt with elsewhere in this document.

Package @@ -1543,10 +1539,10 @@

They must be at least two characters long and must start - with an alphanumeric character. The use of lowercase - package names is strongly recommended unless the package - you're building (or referring to, in other fields) is - already using uppercase.

+ with an alphanumeric character and not be all digits. The + use of lowercase package names is strongly recommended + unless the package you're building (or referring to, in + other fields) is already using uppercase.

Version @@ -1569,12 +1565,9 @@ complies. This is updated manually when editing the source package to conform to newer standards; it can sometimes be used to tell when a package needs attention. + Its format is described above; see + .

- -

- Its format is the same as that of a version number except - that no epoch or Debian revision is allowed - see .

@@ -1585,23 +1578,21 @@ In a .changes file or parsed changelog output this contains the (space-separated) name(s) of the distribution(s) where this version of the package should - be or was installed. Distribution names follow the rules - for package names. (See ). -

- -

+ be installed. Valid distributions are determined by the + archive maintainers. - Current distribution values are: + Current distribution names are: stable

This is the current `released' version of Debian - GNU/Linux. Once the - distribution is stable only major bug fixes - are allowed. When changes are made to this - distribution, the release number is increased - (for example: 1.2r1 becomes 1.2r2 then 1.2r3, etc). + GNU/Linux. Once the distribution is + stable only security fixes and other + major bug fixes are allowed. When changes are + made to this distribution, the release number is + increased (for example: 2.2r1 becomes 2.2r2 then + 2.2r3, etc).

@@ -1617,71 +1608,51 @@

+ testing + +

+ This distribution value refers to the + testing part of the Debian distribution + tree. It receives its packages from the + unstable distribution after a short time lag to + ensure that there are no major issues with the + unstable packages. It is less prone to breakage + than unstable, but still risky. It is not + possible to upload packages directly to + testing. +

+
+ frozen

- From time to time, the unstable + From time to time, the frozen distribution enters a state of `code-freeze' in anticipation of release as a stable version. During this period of testing only fixes for existing or newly-discovered bugs will - be allowed. + be allowed. The exact details of this stage are + determined by the Release Manager.

experimental

- The packages with this distribution value are deemed - by their maintainers to be high risk. Oftentimes they - represent early beta or developmental packages from - various sources that the maintainers want people to - try, but are not ready to be a part of the other parts - of the Debian distribution tree. Download at your own + The packages with this distribution value are + deemed by their maintainers to be high + risk. Oftentimes they represent early beta or + developmental packages from various sources that + the maintainers want people to try, but are not + ready to be a part of the other parts of the + Debian distribution tree. Download at your own risk.

- There are several sections in each - distribution. Currently, these sections are: - - - main - -

- The packages in this section are those in the - main Debian distribution. They are all free - (according to the Debian free software - guidelines) and meet any other criteria for - inclusion described in this manual.

-
- - contrib - -

- The packages in this section do not meet the - criteria for inclusion in the main Debian - distribution as defined by this manual, but are - otherwise free, as defined by the Debian free - software guidelines.

-
- - non-free - -

- Packages in non-free do not meet the - criteria of free software, as defined by the - Debian free software guidelines. Again, use your - best judgment in downloading from this - Distribution.

-
-
You should list all distributions that - the package should be installed into. Except in unusual - circumstances, installations to stable should also - go into frozen (if it exists) and - unstable. Likewise, installations into - frozen should also go into unstable. + You should list all distributions that the + package should be installed into.

@@ -1690,11 +1661,11 @@ - Version numbering + Version numbering

- Every package has a version number, in its Version - control file field. + Every package has a version number recorded in its + Version control file field.

@@ -1709,7 +1680,7 @@

The version number format is: - &lsqbepoch:]upstream-version[-debian-revision] + &lsqbepoch:]upstream_version[-debian_revision]

@@ -1721,7 +1692,7 @@

This is a single (generally small) unsigned integer. It may be omitted, in which case zero is assumed. If it is - omitted then the upstream-version may not + omitted then the upstream_version may not contain any colons.

@@ -1733,81 +1704,81 @@ - upstream-version + upstream_version

- This is the main part of the version. It is usually the - version number of the original (`upstream') package from - which the .deb file has been made, if this is - applicable. Usually this will be in the same format as - that specified by the upstream author(s); however, it - may need to be reformatted to fit into the package - management system's format and comparison scheme. + This is the main part of the version number. It is + usually the version number of the original (`upstream') + package from which the .deb file has been made, + if this is applicable. Usually this will be in the same + format as that specified by the upstream author(s); + however, it may need to be reformatted to fit into the + package management system's format and comparison + scheme.

The comparison behavior of the package management system - with respect to the upstream-version is - described below. The upstream-version + with respect to the upstream_version is + described below. The upstream_version portion of the version number is mandatory.

- The upstream-version may contain only - alphanumerics and the characters . + - - : (full stop, plus, hyphen, colon) - and should start with a digit. If there is no - debian-revision then hyphens are not allowed; + The upstream_version may contain only + alphanumerics + +

Alphanumerics are A-Za-z0-9 only.

+ + and the characters . + - + : (full stop, plus, hyphen, colon) and should + start with a digit. If there is no + debian_revision then hyphens are not allowed; if there is no epoch then colons are not allowed.

- debian-revision + debian_revision

- This part of the version represents the version of the - modifications that were made to the package to make it a - Debian binary package. It is in the same format as the - upstream-version and is compared in the same - way. + This part of the version number specifies the version of + the Debian package based on the upstream version. It + may contain only alphanumerics and the characters + + and . (plus and full stop) and is + compared in the same way as the + upstream_version is.

It is optional; if it isn't present then the - upstream-version may not contain a hyphen. + upstream_version may not contain a hyphen. This format represents the case where a piece of software was written specifically to be turned into a - Debian binary package, and so there is only one - `debianization' of it and therefore no revision - indication is required. + Debian package, and so there is only one `debianization' + of it and therefore no revision indication is required.

It is conventional to restart the - debian-revision at 1 each time the - upstream-version is increased. -

- -

- The package management system will break the - upstream-version and - debian-revision apart at the last hyphen in - the string. The absence of a debian-revision - compares earlier than the presence of one (but note that - the debian-revision is the least significant - part of the version number). + debian_revision at 1 each time the + upstream_version is increased.

- The debian-revision may contain only - alphanumerics and the characters + and - . (plus and full stop). + The package management system will break the version + number apart at the last hyphen in the string (if there + is one) to determine the upstream_version and + debian_revision. The absence of a + debian_revision compares earlier than the + presence of one (but note that the + debian_revision is the least significant part + of the version number).

- The upstream-version and debian-revision + The upstream_version and debian_revision parts are compared by the package management system using the same algorithm:

@@ -1836,21 +1807,22 @@

- These two steps are repeated (chopping initial non-digit - strings and initial digit strings off from the start) until a + These two steps (comparing and removing initial non-digit + strings and initial digit strings) are repeated until a difference is found or both strings are exhausted.

Note that the purpose of epochs is to allow us to leave behind mistakes in version numbering, and to cope with situations - where the version numbering changes. It is not there - to cope with version numbers containing strings of letters - which the package management system cannot interpret (such as - ALPHA or pre-), or with silly orderings (the - author of this manual has heard of a package whose versions - went 1.1, 1.2, 1.3, 1, - 2.1, 2.2, 2 and so forth). + where the version numbering scheme changes. It is + not intended to cope with version numbers containing + strings of letters which the package management system cannot + interpret (such as ALPHA or pre-), or with + silly orderings (the author of this manual has heard of a + package whose versions went 1.1, 1.2, + 1.3, 1, 2.1, 2.2, + 2 and so forth).

@@ -1881,7 +1853,7 @@ too.

- Note, that other version formats based on dates which are + Note that other version formats based on dates which are parsed correctly by the package management system should not be changed.

@@ -1896,10 +1868,9 @@ Time Stamps

- Maintainers are encouraged to preserve the modification - times of the upstream source files in a package, as far as - is reasonably possible. Even though this is optional, this - is still a good idea. + Maintainers should preserve the modification times of the + upstream source files in a package, as far as is reasonably + possible.

The rationale is that there is some information conveyed @@ -1914,12 +1885,12 @@ debian/rules - the - main building script + main building script

This file must be an executable makefile, and contains the package-specific recipes for compiling the package and - building binary package(s) out of the source. + building binary package(s) from the source.

@@ -1932,7 +1903,7 @@ 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, @@ -1942,17 +1913,21 @@

- The targets which must be present are: + The required and optional targets are as follows: build

- This should perform all non-interactive - configuration and compilation of the package. If a - package has an interactive pre-build configuration - routine, the Debianised source package should be - built after this has taken place, so that it can be - built without rerunning the configuration. + This should perform all non-interactive configuration + and compilation of the package. If a package has an + interactive pre-build configuration routine, the + Debianized source package must either be built after + this has taken place (so that the binary package can + be built without rerunning the configuration) or the + configuration routine modified to become + non-interactive. (The latter is preferable if there + are architecture-specific features detected by the + configuration routine.)

@@ -1975,19 +1950,35 @@

- The build target may need to run - clean first - see below. + The build target may need to run the + clean target first - see below.

- When a package has a configuration routine that - takes a long time, or when the makefiles are poorly - designed, or when build needs to run - clean first, it is a good idea to + When a package has a configuration and build routine + which takes a long time, or when the makefiles are + poorly designed, or when build needs to + run clean first, it is a good idea to touch build when the build process is complete. This will ensure that if debian/rules - build is run again it will not rebuild the - whole program. + build is run again it will not rebuild the whole + program. + +

+ Another common way to do this is for build + to depend on build-stamp and to do + nothing else, and for the build-stamp + target to do the building and to touch + build-stamp on completion. This is + especially useful if the build routine creates a + file or directory called build; in such a + case, build will need to be listed as + a phony target (i.e., as a dependency of the + .PHONY target). See the documentation of + make for more information on phony + targets. +

+

@@ -1997,11 +1988,11 @@

The binary target must be all that is - necessary for the user to build the binary - package. All these targets are required to be - non-interactive. It is split into two parts: - binary-arch builds the packages' output - files which are specific to a particular + necessary for the user to build the binary package(s) + produced from this source package. All of these + targets are required to be non-interactive. It is + split into two parts: binary-arch builds + the binary packages which are specific to a particular architecture, and binary-indep builds those which are not.

@@ -2014,7 +2005,7 @@

- Both binary-* targets should depend on + Each binary-* target should depend on the build target, above, so that the package is built if it has not been already. It should then create the relevant binary package(s), @@ -2025,17 +2016,24 @@

- If one of the binary-* targets has - nothing to do (this will be always be the case if - the source generates only a single binary package, - whether architecture-dependent or not) it - must still exist, and must always - succeed. + Both the binary-arch and + binary-indep targets must exist. + If one of them has nothing to do (which will always be + the case if the source generates only a single binary + package, whether architecture-dependent or not), it + must still exist and must always succeed.

The binary targets must be invoked as root. + +

+ The fakeroot package often allows one + to build a package correctly even without being + root. +

+

@@ -2043,19 +2041,18 @@

- This must undo any effects that the - build and binary targets - may have had, except that it should leave alone any - output files created in the parent directory by a - run of binary. This target must be - non-interactive. + This must undo any effects that the build + and binary targets may have had, except + that it should leave alone any output files created in + the parent directory by a run of a binary + target. This target must be non-interactive.

- If a build file is touched at the end - of the build target, as suggested - above, it should be removed as the first thing that - clean does, so that running + If a build file is touched at the end of + the build target, as suggested above, it + should be removed as the first action that + clean performs, so that running build again after an interrupted clean doesn't think that everything is already done. @@ -2098,8 +2095,8 @@

The build, binary and - clean targets must be invoked with a current - directory of the package's top-level directory. + clean targets must be invoked with the current + directory being the package's top-level directory.

@@ -2110,11 +2107,14 @@

- The architecture we build on and build for is determined by - make variables via dpkg-architecture. You can get the Debian - architecture and the GNU style architecture specification - string for the build machine as well as the host - machine. Here is a list of supported make variables: + 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:

DEB_*_ARCH (the Debian architecture)

@@ -2124,25 +2124,23 @@ specification string)

-

DEB_*_GNU_CPU (the CPU part of DEB_*_GNU_TYPE)

+

DEB_*_GNU_CPU (the CPU part of + DEB_*_GNU_TYPE)

DEB_*_GNU_SYSTEM (the System part of - DEB_*_GNU_TYPE)

+ DEB_*_GNU_TYPE)

-

- -

where * is either BUILD for specification of - the build machine or HOST for specification of the machine - we build for. + the build machine or HOST for specification of the + host machine.

Backward compatibility can be provided in the rules file by setting the needed variables to suitable default - values, please refer to the documentation of - dpkg-architecture for details. + values; please refer to the documentation of + dpkg-architecture for details.

@@ -2165,8 +2163,9 @@ Though there is nothing stopping an author who is also the Debian maintainer from using it for all their changes, it will have to be renamed if the Debian and - upstream maintainers become different - people. + upstream maintainers become different people. In such a + case, however, it might be better to maintain the + package as a non-native package.

.

@@ -2180,13 +2179,13 @@

That format is a series of entries like this: - package (version) distribution(s); urgency=urgency +package (version) distribution(s); urgency=urgency - * change details - more change details - * even more change details + * change details + more change details + * even more change details - -- maintainer name and email address date + -- maintainer name and email address date

@@ -2211,6 +2210,16 @@ dpkg changelog format (though there is currently only one useful keyword, urgency). + +

+ Usual urgency values are low, medium, + high and critical. They have an + effect on how quickly a package will be considered for + inclusion into the testing distribution, and + give an indication of the importance of any fixes + included in this upload. +

+

@@ -2223,13 +2232,31 @@

- The maintainer name and email address need not - necessarily be those of the usual package maintainer. - They should be the details of the person doing - this version. The information here will be - copied to the .changes file, and then later used - to send an acknowledgement when the upload has been - installed. + If this upload resolves bugs recorded in the Bug Tracking + System (BTS), they may be automatically closed on the + inclusion of this package into the Debian archive by + including the string: closes: Bug#nnnnn + in the change details. + +

+ To be precise, the string should match the following + Perl regular expression: + /closes:\s*(?:bug)?\#?\s?\d+(?:,\s*(?:bug)?\#?\s?\d+)*/i + Then all of the bug numbers listed will be closed by the + archive maintenance script (katie), or in + the case of an NMU, marked as fixed. +

+ +

+ +

+ 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, and then later used to send an + acknowledgement when the upload has been installed.

@@ -2241,7 +2268,7 @@

; it should include the time zone specified numerically, with the time zone name or abbreviation - optionally present as a comment. + optionally present as a comment in parentheses.

@@ -2272,21 +2299,22 @@

When dpkg-gencontrol, dpkg-genchanges and dpkg-source - generate control files they do variable substitutions on - their output just before writing it. Variable + generate control files they perform variable substitutions + on their output just before writing it. Variable substitutions have the form ${variable-name}. The optional file - debian/substvars contains variable substitutions - to be used; variables can also be set directly from + debian/substvars contains variable substitutions to + be used; variables can also be set directly from debian/rules using the -V option to the - source packaging commands, and certain predefined - variables are available. + source packaging commands, and certain predefined variables + are also available.

- The is usually generated and modified dynamically by - debian/rules targets; in this case it must be - removed by the clean target. + The debian/substvars file is usually generated and + modified dynamically by debian/rules targets; in + this case it must be removed by the clean + target.

@@ -2325,11 +2353,12 @@

- dpkg-gencontrol adds an entry to this file - for the .deb file that will be created by - dpkg-deb from the control file that it - generates, so for most packages all that needs to be done - with this file is to delete it in clean. + When dpkg-gencontrol is run for a binary + package, it adds an entry to debian/files for the + .deb file that will be created when dpkg-deb + --build is run for that binary package. So for most + packages all that needs to be done with this file is to + delete it in the clean target.

@@ -2352,8 +2381,6 @@ packages, but only when extracting them.

- -

Hard links may be permitted at some point in the future, but would require a fair amount of @@ -2461,10 +2488,10 @@

- These scripts should be the files preinst, + These scripts are the files preinst, postinst, prerm and postrm in the control area of the package. They must be proper executable - files; if they are scripts (which is recommended) they must + files; if they are scripts (which is recommended), they must start with the usual #! convention. They should be readable and executable by anyone, and not world-writable.

@@ -2481,22 +2508,12 @@ well.

-

- It is necessary for the error recovery procedures that the - scripts be idempotent: i.e., invoking the same script several - times in the same situation should do no harm. If the first - call failed, or aborted half way through for some reason, - the second call should merely do the things that were left - undone the first time, if any, and exit with a success - status. -

-

When a package is upgraded a combination of the scripts from - the old and new packages is called in amongst the other - steps of the upgrade procedure. If your scripts are going - to be at all complicated you need to be aware of this, and - may need to check the arguments to your scripts. + the old and new packages is called during the upgrade + procedure. If your scripts are going to be at all + complicated you need to be aware of this, and may need to + check the arguments to your scripts.

@@ -2507,39 +2524,47 @@ postrm afterwards.

-

Programs called from maintainer scripts should not - normally have a path prepended to them. Before installation - is started the package management system checks to see if - the programs ldconfig, +

+ Programs called from maintainer scripts should not normally + have a path prepended to them. Before installation is + started, the package management system checks to see if the + programs ldconfig, start-stop-daemon, install-info, and update-rc.d can be found via the PATH environment variable. Those programs, and any - other program that one would expect to on the PATH, - should thus be invoked without an absolute + other program that one would expect to be on the + PATH, should thus be invoked without an absolute pathname. Maintainer scripts should also not reset the - PATH, though they might choose to modify it by pre- - or appending package-specific directories. These + PATH, though they might choose to modify it by + prepending or appending package-specific directories. These considerations really apply to all shell scripts.

+ Maintainer scripts Idempotency

- It is very important to make maintainer scripts - idempotent. - + It is necessary for the error recovery procedures that the + scripts be idempotent. This means that if it is run + successfully, and then it is called again, it doesn't bomb + out or cause any harm, but just ensures that everything is + the way it ought to be. If the first call failed, or + aborted half way through for some reason, the second call + should merely do the things that were left undone the first + time, if any, and exit with a success status if everything + is OK. +

- That means that if it runs successfully or fails - and then you call it again it doesn't bomb out, - but just ensures that everything is the way it - ought to be. + This is so that if an error occurs, the user interrupts + dpkg or some other unforeseen circumstance + happens you don't leave the user with a badly-broken + package when dpkg attempts to repeat the + action.

- This is so that if an error occurs, the - user interrupts dpkg or some other - unforeseen circumstance happens you don't leave the - user with a badly-broken package. +

+ Controlling terminal for maintainer scripts @@ -2597,7 +2622,7 @@

old-postinst abort-upgrade - new version

+ new-version

conflictor's-postinst abort-remove @@ -2689,10 +2714,11 @@ The procedure on installation/upgrade/overwrite/disappear (i.e., when running dpkg --unpack, or the unpack stage of dpkg --install) is as follows. In each - case if an error occurs the actions are, in general, run - backwards - this means that the maintainer scripts are run - with different arguments in reverse order. These are the - `error unwind' calls listed below. + case, if a major error occurs (unless listed below) the + actions are, in general, run backwards - this means that the + maintainer scripts are run with different arguments in + reverse order. These are the `error unwind' calls listed + below. @@ -2783,7 +2809,7 @@ new-preinst install - Error unwind versions, respectively: + Error unwind actions, respectively: new-postrm abort-upgrade old-version new-postrm abort-install old-version @@ -2800,19 +2826,22 @@ The new package's files are unpacked, overwriting any that may be on the system already, for example any from the old version of the same package or from - another package (backups of the old files are left - around, and if anything goes wrong the package + another package. Backups of the old files are kept + temporarily, and if anything goes wrong the package management system will attempt to put them back as - part of the error unwind). + part of the error unwind.

It is an error for a package to contains files which are on the system in another package, unless Replaces is used (see ). - Currently the --force-overwrite flag is +

@@ -2827,7 +2856,7 @@

Packages which overwrite each other's files produce - behavior which though deterministic is hard for the + behavior which, though deterministic, is hard for the system administrator to understand. It can easily lead to `missing' programs if, for example, a package is installed which overwrites a file from another @@ -2841,7 +2870,7 @@

- A directory will never be replaced by a symbolic links + A directory will never be replaced by a symbolic link to a directory or vice versa; instead, the existing state (symlink or not) will be left alone and dpkg will follow the symlink if there is @@ -2895,7 +2924,7 @@

Any packages all of whose files have been overwritten during the installation, and which aren't required for dependencies, are considered to have been removed. - For each such package, + For each such package

dpkg calls: @@ -2942,12 +2971,17 @@

The new package's status is now sane, and recorded as - `unpacked'. Here is another point of no return - if - the conflicting package's removal fails we do not - unwind the rest of the installation; the conflicting - package is left in a half-removed limbo. + `unpacked'. +

+ +

+ Here is another point of no return - if the + conflicting package's removal fails we do not unwind + the rest of the installation; the conflicting package + is left in a half-removed limbo.

+

If there was a conflicting package we go and do the @@ -2967,7 +3001,7 @@

When we configure a package (this happens with dpkg --install, or with --configure), we first - update the conffiles and then call: + update any conffiles and then call: postinst configure most-recently-configured-version @@ -3001,7 +3035,7 @@

- The package's files are removed (except conffiles). + The package's files are removed (except conffiles).

@@ -3010,15 +3044,17 @@

-

All the maintainer scripts except the postrm are removed. +

+ All the maintainer scripts except the postrm + are removed.

If we aren't purging the package we stop here. Note - that packages which have no postrm and no conffiles - are automatically purged when removed, as there is no - difference except for the dpkg - status.

+ that packages which have no postrm and no + conffiles are automatically purged when + removed, as there is no difference except for the + dpkg status.

@@ -3036,13 +3072,14 @@ No attempt is made to unwind after errors during - removal.

+ removal. +

Declaring relationships between - packages + packages

Packages can declare in their control file that they have @@ -3054,9 +3091,10 @@

- This is done using the Depends, Recommends, - Suggests, Enhances, Conflicts, - Provides and Replaces control file fields. + This is done using the Depends, Pre-Depends, + Recommends, Suggests, Enhances, + Conflicts, Provides and Replaces + control file fields.

@@ -3067,7 +3105,7 @@

This is done using the Build-Depends, - Build-Depends-Indep, Build-Conflicts, and + Build-Depends-Indep, Build-Conflicts and Build-Conflicts-Indep control file fields.

@@ -3086,18 +3124,17 @@ control file fields of the package, which declare dependencies on other packages, the package names listed may also include lists of alternative package names, separated - by vertical bar symbols | (pipe symbols). In such - a case, the presence of any one of the alternative packages - is installed, that part of the dependency is considered to - be satisfied. + by vertical bar (pipe) symbols |. In such a case, + if any one of the alternative packages is installed, that + part of the dependency is considered to be satisfied.

- All the fields except Provides may restrict their - applicability to particular versions of each named package. - This is done in parentheses after each individual package - name; the parentheses should contain a relation from the - list below followed by a version number, in the format + All of the fields except for Provides may restrict + their applicability to particular versions of each named + package. This is done in parentheses after each individual + package name; the parentheses should contain a relation from + the list below followed by a version number, in the format described in .

@@ -3105,8 +3142,8 @@ The relations allowed are <<, <=, =, >= and >> for strictly earlier, earlier or equal, exactly equal, later or - equal and strictly later, respectively. The forms - < and > were used to mean + equal and strictly later, respectively. The deprecated + forms < and > were used to mean earlier/later or equal, rather than strictly earlier/later, so they should not appear in new packages (though dpkg still supports them). @@ -3114,22 +3151,23 @@

Whitespace may appear at any point in the version - specification, and must appear where it's necessary to + specification subject to the rules in , and must appear where it's necessary to disambiguate; it is not otherwise significant. For consistency and in case of future changes to dpkg it is recommended that a single space be used after a version relationship and before a version - number; it is usual also to put a single space after each - comma, on either side of each vertical bar, and before each - open parenthesis. + number; it is also conventional to put a single space after + each comma, on either side of each vertical bar, and before + each open parenthesis.

- For example: + For example, a list of dependencies might appear as: - Package: metamail - Version: 2.7-3 - Depends: libc5 (>= 5.2.18-4), mime-support, csh | tcsh + Package: mutt + Version: 1.3.17-1 + Depends: libc6 (>= 2.2.1), exim | mail-transport-agent

@@ -3138,15 +3176,17 @@ (Build-Depends, Build-Depends-Indep, Build-Conflicts and Build-Conflicts-Indep) may be restricted to a certain set of architectures. This - is done in brackets after each individual package name and + is indicated in brackets after each individual package name and the optional version specification. The brackets enclose a list of Debian architecture names separated by whitespace. - An exclamation mark may be prepended to each name. If the - current Debian host architecture is not in this list and - there are no exclamation marks in the list, or it is in the - list with a prepended exclamation mark, the package name and - the associated version specification are ignored completely - for the purposes of defining the relationships. + Exclamation marks may be prepended to each of the names. + (It is not permitted for some names to be prepended with + exclamation marks and others not.) If the current Debian + host architecture is not in this list and there are no + exclamation marks in the list, or it is in the list with a + prepended exclamation mark, the package name and the + associated version specification are ignored completely for + the purposes of defining the relationships.

@@ -3173,17 +3213,22 @@

- All but Pre-Depends and Conflicts - (discussed below) take effect only when a package - is to be configured. They do not prevent a package being on - the system in an unconfigured state while its dependencies - are unsatisfied, and it is possible to replace a package - whose dependencies are satisfied and which is properly - installed with a different version whose dependencies are - not and cannot be satisfied; when this is done the depending - package will be left unconfigured (since attempts to - configure it will give errors) and will not function - properly. + A Depends field takes effect only when a + package is to be configured. It does not prevent a package + being on the system in an unconfigured state while its + dependencies are unsatisfied, and it is possible to replace + a package whose dependencies are satisfied and which is + properly installed with a different version whose + dependencies are not and cannot be satisfied; when this is + done the depending package will be left unconfigured (since + attempts to configure it will give errors) and will not + function properly. If it is necessary, a + Pre-Depends field can be used, which has a partial + effect even when a package is being unpacked, as explained + in detail below. (The other three dependency fields, + Recommends, Suggests and + Enhances, are only used by the various front-ends + to dpkg such as dselect.)

@@ -3195,20 +3240,37 @@

- Thus Depends allows package maintainers to impose - an order in which packages should be configured. + The Depends field thus allows package maintainers + to impose an order in which packages should be configured. +

+ +

+ The meaning of the five dependency fields is as follows: Depends -

This declares an absolute dependency. +

+ This declares an absolute dependency. A package will + not be configured unless all of the packages listed in + its Depends field have been correctly + configured.

The Depends field should be used if the depended-on package is required for the depending package to provide a significant amount of - functionality.

+ functionality. +

+

+ The Depends field should also be used if the + postinst, prerm or + postrm scripts require the package to be + present in order to run. Note, however, that the + postrm cannot rely on any non-essential + packages to be present during the purge + phase. Recommends @@ -3253,35 +3315,43 @@ also forces dpkg to complete installation of the packages named before even starting the installation of the package which declares the - Pre-dependency. + pre-dependency, as follows:

- Pre-Depends should be used sparingly, - preferably only by packages whose premature upgrade or - installation would hamper the ability of the system to - continue with any upgrade that might be in progress. + When a package declaring a pre-dependency is about to + 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 + previously-configured and currently unpacked or + half-configured versions must satisfy any version + clause in the Pre-Depends field.

- When the package declaring it is being configured, a - Pre-Dependency will be considered satisfied - only if the depending package has been correctly - configured, just as if an ordinary Depends - had been used. + When the package declaring a pre-dependency is about + to be configured, the pre-dependency will be + treated as a normal Depends, that is, it will + be considered satisfied only if the depended-on + package has been correctly configured.

- However, when a package declaring a Pre-dependency is - being unpacked the predependency can be satisfied 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 previously-configured and currently unpacked - or half-configured versions must satisfy any version - clause in the Pre-Depends field. + Pre-Depends should be used sparingly, + preferably only by packages whose premature upgrade or + installation would hamper the ability of the system to + continue with any upgrade that might be in progress.

+ +

+ Pre-Depends are also required if the + preinst script depends on the named + package. It is best to avoid this situation if + possible.

@@ -3299,30 +3369,30 @@

- Alternative binary packages - - Conflicts and Replaces - + Conflicting binary packages - + Conflicts

When one binary package declares a conflict with another - dpkg will refuse to allow them to be installed - on the system at the same time. + using a Conflicts field, dpkg will + refuse to allow them to be installed on the system at the + same time.

If one package is to be installed, the other must be removed first - if the package being installed is marked as - replacing () the one on the system, or - the one on the system is marked as deselected, or both + replacing (see ) the one on the system, + or the one on the system is marked as deselected, or both packages are marked Essential, then dpkg will automatically remove the package which is causing the conflict, otherwise it will halt the - installation of the new package with an error. This - mechanism specifically doesn't work when the installed - package is Essential, but the new package is not. + installation of the new package with an error. This + mechanism is specifically designed to produce an error when + the installed package is Essential, but the new + package is not.

-

A package will not cause a conflict merely because its configuration files are still installed; it must be at least @@ -3336,7 +3406,7 @@ prevent their installation, and allows a package to conflict with others providing a replacement for it. You use this feature when you want the package in question to be the only - package providing something. + package providing some feature.

@@ -3354,14 +3424,15 @@

As well as the names of actual (`concrete') packages, the package relationship fields Depends, + Recommends, Suggests, Enhances, + Pre-Depends, Conflicts, Build-Depends, Build-Depends-Indep, - Recommends, Suggests, Conflicts, - Build-Conflicts and Build-Conflicts-Indep may - mention virtual packages. + Build-Conflicts and Build-Conflicts-Indep + may mention `virtual packages'.

- A virtual package is one which appears in the + A virtual package is one which appears in the Provides control file field of another package. The effect is as if the package(s) which provide a particular virtual package name had been listed by name @@ -3375,16 +3446,18 @@ packages which provide it. This is so that, for example, supposing we have - Package: vm - Depends: emacs + Package: foo + Depends: bar - and someone else releases an xemacs package they can say + and someone else releases an enhanced version of the + bar package (for example, a non-US variant), they + can say: - Package: xemacs - Provides: emacs - and all will work in the interim (until a purely - virtual package name is decided on and the emacs - and vm packages are changed to use it). + Package: bar-plus + Provides: bar + + and the bar-plus package will now also satisfy the + dependency for the foo package.

@@ -3409,87 +3482,101 @@

- If you want to specify which of a set of real packages should be the - default to satisfy a particular dependency on a virtual package, you - should list the real package as an alternative before the virtual. + If you want to specify which of a set of real packages + should be the default to satisfy a particular dependency on + a virtual package, you should list the real package as an + alternative before the virtual one.

- Replaces - overwriting - files and replacing packages - + Overwriting files and replacing + packages - Replaces

- The Replaces control file field has two purposes, - which come into play in different situations. + The Replaces control file field has two distinct + purposes, which come into play in different situations.

-

- Virtual packages () are not considered - when looking at a Replaces field - the packages - declared as being replaced must be mentioned by their real - names. -

- - Overwriting files in other packages - + Overwriting files in other packages

Firstly, as mentioned before, it is usually an error for a package to contain files which are on the system in - another package, though currently the - --force-overwrite flag is enabled by default, - downgrading the error to a warning, + another package.

- If the overwriting package declares that it replaces the - one containing the file being overwritten then - dpkg will proceed, and replace the file from - the old package with that from the new. The file will no - longer be listed as `owned' by the old package. + However, if the overwriting package declares that it + Replaces the one containing the file being + overwritten, then dpkg will replace the file + from the old package with that from the new. The file + will no longer be listed as `owned' by the old package.

If a package is completely replaced in this way, so that dpkg does not know of any files it still - contains, it is considered to have disappeared. It will + contains, it is considered to have `disappeared'. It will be marked as not wanted on the system (selected for - removal) and not installed. Any conffiles details noted - in the package will be ignored, as they will have been - taken over by the replacing package(s). The package's - postrm script will be run to allow the - package to do any final cleanup required. See . + removal) and not installed. Any conffiles + details noted for the package will be ignored, as they + will have been taken over by the overwriting package. The + package's postrm script will be run with a + special argument to allow the package to do any final + cleanup required. See . +

+ +

+ If an installed package, foo say, declares that + it replaces another, bar, and an attempt is made + to install bar, dpkg will discard + files in the bar package which would overwrite + those already present in foo. This is so that + you can install an older version of a package without + problems.

- In the future dpkg will discard files which - would overwrite those from an already installed package - which declares that it replaces the package being - installed. This is so that you can install an older - version of a package without problems. + For this usage of Replaces, virtual packages (see + ) are not considered when looking at a + Replaces field - the packages declared as being + replaced must be mentioned by their real names.

- This usage of Replaces only takes effect when - both packages are at least partially on the system at - once, so that it can only happen if they do not conflict - or if the conflict has been overridden.

+ Furthermore, this usage of Replaces only takes + effect when both packages are at least partially on the + system at once, so that it can only happen if they do not + conflict or if the conflict has been overridden. +

+
Replacing whole packages, forcing their - removal - + removal

Secondly, Replaces allows the packaging system to resolve which package should be removed when there is a conflict - see . This usage only takes effect when the two packages do conflict, - so that the two effects do not interfere with each other. + so that the two usages of this field do not interfere with + each other.

+ +

+ In this situation, the package declared as being replaced + can be a virtual package, so for example, all mail + transport agents (MTAs) would have the following fields in + their control files: + +Provides: mail-transport-agent +Conflicts: mail-transport-agent +Replaces: mail-transport-agent + + ensuring that only one MTA can be installed at any one + time. @@ -3500,21 +3587,22 @@

A source package may declare a dependency or a conflict on a - binary package. This is done with the control file fields - Build-Depends, Build-Depends-Indep, - Build-Conflicts, and - Build-Conflicts-Indep. Their semantics are that - the dependencies and conflicts they define must be satisfied - (as defined earlier for binary packages), when one of the - targets in debian/rules that the particular field - applies to is invoked. + binary package, indicating which packages are required to be + present on the system in order to build the binary packages + from the source package. This is done with the control file + fields Build-Depends, Build-Depends-Indep, + Build-Conflicts and Build-Conflicts-Indep. + The dependencies and conflicts they define must be satisfied + (as defined earlier for binary packages) in order to invoke + the targets in debian/rules, as follows: Build-Depends, Build-Conflicts

The Build-Depends and - Build-Conflicts fields apply to the targets + Build-Conflicts fields must be satisfied when + any of the following targets is invoked: build, binary, binary-arch and binary-indep.

@@ -3523,8 +3611,9 @@

The Build-Depends-Indep and - Build-Conflicts-Indep fields apply to the - targets binary and binary-indep. + Build-Conflicts-Indep fields must be + satisfied when any of the following targets is + invoked: binary and binary-indep.

@@ -3539,104 +3628,91 @@

- dpkg can do a certain amount of automatic - handling of package configuration files. -

- -

- Whether this mechanism is appropriate depends on a number of - factors, but basically there are two approaches to any - particular configuration file. + This chapter has been superseded by .

-

- The easy method is to ship a best-effort configuration in the - package, and use dpkg's conffile mechanism to - handle updates. If the user is unlikely to want to edit the - file, but you need them to be able to without losing their - changes, and a new package with a changed version of the file - is only released infrequently, this is a good approach. -

-

- The hard method is to build the configuration file from - scratch in the postinst script, and to take the - responsibility for fixing any mistakes made in earlier - versions of the package automatically. This will be - appropriate if the file is likely to need to be different on - each system. -

- - - Shared libraries - + Shared libraries

Packages containing shared libraries must be constructed with a little care to make sure that the shared library is always available. This is especially important for packages whose - shared libraries are vitally important, such as the libc. + shared libraries are vitally important, such as the C library + (currently libc6).

- Firstly, your package should install the shared libraries - under their normal names. For example, the - libgdbm1 package should install - libgdbm.so.1.7.3 as + Firstly, the package should install the shared libraries under + their normal names. For example, the libgdbmg1 + package should install libgdbm.so.1.7.3 as /usr/lib/libgdbm.so.1.7.3. The files should not be - renamed or re-linked by any prerm or postrm scripts; - dpkg will take care of renaming things safely - without affecting running programs, and attempts to interfere - with this are likely to lead to problems. + renamed or re-linked by any prerm or + postrm scripts; dpkg will take care + of renaming things safely without affecting running programs, + and attempts to interfere with this are likely to lead to + problems.

- Secondly, your package should include the symlink that + Secondly, the package should include the symbolic link that ldconfig would create for the shared libraries. - For example, the libgdbm1 package should include - a symlink from /usr/lib/libgdbm.so.1 to - libgdbm.so.1.7.3. This is needed so that - ld.so can find the library in between the time - dpkg installs it and ldconfig is run - in the postinst script. Furthermore, older - versions of the package management system required the library - must be placed before the symlink pointing to it in the - .deb file. This is so that by the time - dpkg comes to install the symlink (overwriting - the previous symlink pointing at an older version of the - library) the new shared library is already in place. - Unfortunately, this was not not always possible, since it - highly depends on the behavior of the file system. Some - file systems (such as reiserfs) will reorder the files so it - doesn't matter in what order you create them. Starting with - release 1.7.0 dpkg will reorder the - files itself when building a package. + For example, the libgdbmg1 package should include + a symbolic link from /usr/lib/libgdbm.so.1 to + libgdbm.so.1.7.3. This is needed so that the dynamic + linker (for example ld.so or + ld-linux.so.*) can find the library between the + time that dpkg installs it and the time that + ldconfig is run in the postinst + script. + +

+ The package management system requires the library to be + placed before the symbolic link pointing to it in the + .deb file. This is so that when + dpkg comes to install the symlink + (overwriting the previous symlink pointing at an older + version of the library), the new shared library is already + in place. In the past, this was achieved by creating the + library in the temporary packaging directory before + creating the symlink. Unfortunately, this was not always + effective, since the building of the tar file in the + .deb depended on the behavior of the underlying + file system. Some file systems (such as reiserfs) reorder + the files so that the order of creation is forgotten. + Starting with release 1.7.0, dpkg + will reorder the files itself as necessary when building a + package. Thus it is no longer important to concern + oneself with the order of file creation. +

+

- Thirdly, the development package should contain a symlink for - the shared library without a version number. For example, the - libgdbm1-dev package should include a symlink from - /usr/lib/libgdm.so to libgdm.so.1.7.3. This - symlink is needed by ld when compiling packages - as it will only look for libgdm.so and - libgdm.a when compiling dynamically or statically, - respectively. + Thirdly, the associated development package should contain a + symlink for the shared library without a version number. For + example, the libgdbmg1-dev package should include a + symlink from /usr/lib/libgdbm.so to + libgdbm.so.1.7.3. This symlink is needed by the + linker (ld) when compiling packages, as it will + only look for libgdbm.so when compiling dynamically.

- Any package installing shared libraries in a directory that's listed - in /etc/ld.so.conf or in one of the default library - directories of ld.so (currently, these are /usr/lib - and /lib) must call ldconfig in its postinst - script if and only if the first argument is `configure'. However, it - is important not to call ldconfig in the postrm or preinst - scripts in the case where the package is being upgraded (see ), as ldconfig will see the temporary names - that dpkg uses for the files while it is - installing them and will make the shared library links point - to them, just before dpkg continues the - installation and removes the links! + Any package installing shared libraries in a directory that is + listed in /etc/ld.so.conf or in one of the default + library directories of the dynamic linker (currently, these + are /usr/lib and /lib) must call + ldconfig in its postinst script if + and only if the first argument is `configure'. However, it is + important not to call ldconfig in the postrm or + preinst scripts in the case where the package is being + upgraded (see ), as + ldconfig will see the temporary names that + dpkg uses for the files while it is installing + them and will make the shared library links point to them, + just before dpkg continues the installation and + removes the links!

The shlibs File Format @@ -3726,7 +3802,7 @@

It used to do this by calling ldd, but it - now calls objdump to to this. This + now calls objdump to do this. This requires a couple of changes in the way that packages are built.

@@ -4012,8 +4088,27 @@ permissions 2775 (group-writable and set-group-id) and be owned by root.staff.

+ + 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 + location /var/spool/mail is deprecated, even + though the spool may still be physically located there. + To maintain partial upgrade compatibility for systems + which have /var/spool/mail as their physical mail + spool, packages using /var/mail must depend on + either libc6 (>= 2.1.3-13), or on + base-files (>= 2.2.0), or on later + versions of either one of these packages. +

+
+
+ + Users and groups @@ -4540,7 +4635,7 @@

If a certain job has to be executed more frequently than daily, the package should install a file - /etc/cron.d/package-name. This file uses + /etc/cron.d/package. This file uses the same syntax as /etc/crontab and is processed by cron automatically. The file must also be treated as a configuration file. (Note, that entries in the @@ -5231,10 +5326,11 @@

You should follow the directions in the Debian Packaging - Manual for putting the shared library in its package, - and you must include a shlibs control area - file with details of the dependencies for packages which - use the library.

+ Manual (or other documentation of the Debian + packaging tools) for putting the shared library in its + package, and you must include a shlibs control area + file with details of the dependencies for packages which use + the library.

Shared libraries should not be installed @@ -5496,8 +5592,9 @@ upgrading conffiles.

+

-

+

The other way to do it is via the maintainer scripts. In this case, the configuration file must not be listed as a conffile and must not be part of the package @@ -5521,17 +5618,20 @@ have to do any configuration other than that done (semi-)automatically by the postinst script.

-

- A common practice is to create a script called - package-configure and have the - package's postinst call it if and only if the - configuration file does not already exist. In certain - cases it is useful for there to be an example or template - file which the maintainer scripts use. Such files should - be in /usr/share/doc if they are examples or - /usr/lib if they are templates, and should be - perfectly ordinary dpkg-handled files - (not conffiles).

+

+ A common practice is to create a script called + package-configure and have the + package's postinst call it if and only if the + configuration file does not already exist. In certain + cases it is useful for there to be an example or template + file which the maintainer scripts use. Such files should + be in /usr/share/<package> or + /usr/lib/<package> with a symbolic link + from /usr/share/doc/<package>/examples + if they are examples, and should be + perfectly ordinary dpkg-handled files + (not conffiles). +

These two styles of configuration file handling must @@ -5803,7 +5903,7 @@ - + Customized programs @@ -5993,7 +6093,7 @@

- + Mail transport, delivery and user agents

@@ -6005,10 +6105,14 @@ serious brain damage!

- The mail spool is /var/spool/mail and the interface + The mail spool is /var/mail and the interface to send a mail message is /usr/sbin/sendmail (as - per the FHS). The mail spool is part of the base system - and not part of the MTA package.

+ per the FHS). On older systems, the mail spool may be + physically located in /var/spool/mail, but all access to the + mail spool should be via the /var/mail symlink. The mail + spool is part of the base system and not part of the MTA + package. +

All Debian MUAs, MTAs, MDAs and other mailbox accessing @@ -6211,7 +6315,7 @@ BDF fonts should be converted to PCF fonts with the bdftopcf utility (available in the - xutils package, gzipped, and + xutils package), gzipped, and placed in a directory that corresponds to their resolution: @@ -6411,6 +6515,17 @@

+ + Perl programs and modules +

+ Perl programs and modules should follow the current Perl + policy as defined in the file found on + ftp.debian.org in + /debian/doc/package-developer/perl-policy.txt.gz + or your local mirror. In addition, it is included in the + debian-policy package. +

+
Emacs lisp programs @@ -6677,7 +6792,7 @@

Every package must be accompanied by a verbatim copy of its copyright and distribution license in the file - /usr/share/doc/<package-name>/copyright. This file must + /usr/share/doc/<package>/copyright. This file must neither be compressed nor be a symbolic link.

@@ -6695,7 +6810,7 @@

- /usr/share/doc/<package-name> may be a symbolic link to a + /usr/share/doc/<package> may be a symbolic link to a directory in /usr/share/doc only if two packages both come from the same source and the first package has a "Depends" relationship on the second. These rules are important