X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=policy.sgml;h=0f1dbf91d54478b958992a073e77e36e7ae83867;hb=f39fe9d4bc04304a4f7f561169892faa4a4f6c5e;hp=bc6bc529c0f5b11a58a52033e5035279a40e7ac8;hpb=458a5b9eb0f025de071fb109ea320bac910a822d;p=debian%2Fdebian-policy.git diff --git a/policy.sgml b/policy.sgml index bc6bc52..0f1dbf9 100644 --- a/policy.sgml +++ b/policy.sgml @@ -2,6 +2,8 @@ %versiondata; + + ]> @@ -13,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. @@ -48,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 @@ -66,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 @@ -90,11 +92,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 @@ -217,12 +218,13 @@ The actual editing is done by a group of maintainers that have no editorial powers. These are the current maintainers: - - Julian Gilbey - Branden Robinson - Josip Rodin - Manoj Srivastava - + + Russ Allbery + Bill Allombert + Andrew McMillan + Manoj Srivastava + Colin Watson +

@@ -256,7 +258,6 @@ - @@ -313,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 @@ -347,8 +348,7 @@

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

@@ -366,7 +366,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 +376,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 +404,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 +419,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 +427,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 +439,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 +448,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 @@ -464,6 +464,20 @@ The main archive area +

+ The main archive area comprises the Debian + distribution. Only the packages in this area are considered + part of the distribution. None of the packages in + the main archive area require software outside of + that area to function. Anyone may use, share, modify and + redistribute the packages in this archive area + freely + See for + more about what we mean by free software. + . +

+

Every package in main must comply with the DFSG (Debian Free Software Guidelines). @@ -473,11 +487,11 @@ In addition, the packages in main - must not require 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), + must not require or recommend a package outside + of main for compilation or execution (thus, the + 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, @@ -495,6 +509,13 @@ The contrib archive area +

+ The contrib archive area contains supplemental + packages intended to work with the Debian distribution, but + which require software outside of the distribution to either + build or function. +

+

Every package in contrib must comply with the DFSG.

@@ -513,7 +534,6 @@

-

Examples of packages which would be included in contrib are: @@ -535,6 +555,15 @@ The non-free archive area +

+ The non-free archive area contains supplemental + packages intended to work with the Debian distribution that do + not comply with the DFSG or have other problems that make + their distribution problematic. They may not comply with all + of the policy requirements in this manual due to restrictions + on modifications or other limitations. +

+

Packages must be placed in non-free if they are not compliant with the DFSG or are encumbered by patents @@ -570,8 +599,8 @@ Copyright considerations

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

@@ -679,18 +708,27 @@ list of sections. At present, they are: admin, cli-mono, comm, database, devel, debug, doc, editors, - electronics, embedded, fonts, - games, gnome, graphics, gnu-r, - gnustep, hamradio, haskell, - httpd, interpreters, java, kde, - kernel, libs, libdevel, lisp, - localization, mail, math, misc, + education, electronics, embedded, + fonts, games, gnome, graphics, + gnu-r, gnustep, hamradio, haskell, + httpd, interpreters, introspection, + java, kde, kernel, libs, + libdevel, lisp, localization, + mail, math, metapackages, misc, net, news, ocaml, oldlibs, otherosfs, perl, php, python, ruby, science, shells, sound, tex, text, utils, vcs, video, web, x11, xfce, - zope. + zope. The additional section debian-installer + contains special packages used by the installer and is not used + for normal Debian packages. +

+ +

+ For more information about the sections and their definitions, + see the .

@@ -787,12 +825,41 @@ 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.

+

+ A .deb package contains two sets of files: a set of files + to install on the system when the package is installed, and a set + of files that provide additional metadata about the package or + which are executed when the package is installed or removed. This + second set of files is called control information files. + Among those files are the package maintainer scripts + and control, the binary + package control file that contains the control fields for + the package. Other control information files + include the shlibs + file used to store shared library dependency information + and the conffiles file that lists the package's + configuration files (described in ). +

+ +

+ There is unfortunately a collision of terminology here between + control information files and files in the Debian control file + format. Throughout this document, a control file refers + to a file in the Debian control file format. These files are + documented in . Only files referred to + specifically as control information files are the files + included in the control information file member of + the .deb file format used by binary packages. Most + control information files are not in the Debian control file + format. +

+ The package name @@ -840,58 +907,69 @@

In general, Debian packages should use the same version - numbers as the upstream sources. -

- -

- However, in some cases where the upstream version number is - based on a date (e.g., a development "snapshot" release) the - package management system cannot handle these version - numbers without epochs. For example, dpkg will consider - "96May01" to be greater than "96Dec24". + numbers as the upstream sources. However, upstream version + numbers based on some date formats (sometimes used for + development or "snapshot" releases) will not be ordered + correctly by the package management software. For + example, dpkg will consider "96May01" to be + greater than "96Dec24".

To prevent having to use epochs for every new upstream - version, the date based portion of the version number - should be changed to the following format in such cases: - "19960501", "19961224". It is up to the maintainer whether - they want to bother the upstream maintainer to change - the version numbers upstream, too. -

- -

- Note that other version formats based on dates which are - parsed correctly by the package management system should - not be changed. + version, the date-based portion of any upstream version number + should be given in a way that sorts correctly: four-digit year + first, followed by a two-digit numeric month, followed by a + two-digit numeric date, possibly with punctuation between the + components.

- Native Debian packages (i.e., packages which have been - written especially for Debian) whose version numbers include - dates should always use the "YYYYMMDD" format. + Native Debian packages (i.e., packages which have been written + especially for Debian) whose version numbers include dates + should also follow these rules. If punctuation is desired + between the date components, remember that hyphen (-) + cannot be used in native package versions. Period + (.) is normally a good choice.

- + The maintainer of a package

- Every package must have a Debian 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 ensuring that - the package is placed in the appropriate distributions. -

- -

- The maintainer must be specified in the - Maintainer control field with their correct name - and a working email address. If one person maintains - several packages, they should try to avoid having - different forms of their name and email address in + 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 + area and included in Debian releases as appropriate for the + stability and utility of the package, and requesting removal of + the package from the Debian distribution if it is no longer + useful or maintainable. +

+ +

+ The maintainer must be specified in the Maintainer + control field with their correct name and a working email + address. The email address given in the Maintainer + control field must accept mail from those role accounts in + Debian used to send automated mails regarding the package. This + includes non-spam mail from the bug-tracking system, all mail + from the Debian archive maintenance software, and other role + accounts or automated processes that are commonly agreed on by + the project. + A sample implementation of such a whitelist written for the + Mailman mailing list management software is used for mailing + lists hosted by alioth.debian.org. + + If one person or team maintains several packages, they should + use the same form of their name and email address in the Maintainer fields of those packages.

@@ -901,15 +979,23 @@

- If the maintainer of a package quits from the Debian - project, "Debian QA Group" - packages@qa.debian.org takes over the - maintainer-ship of the package until someone else - volunteers for that task. These packages are called - orphaned packages. - The detailed procedure for doing this gracefully can - be found in the Debian Developer's Reference, - see . + If the maintainer of the package is a team of people with a + shared email address, the Uploaders control field must + be present and must contain at least one human with their + personal email address. See for the + syntax of that field. +

+ +

+ 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. + The detailed procedure for gracefully orphaning a package can + be found in the Debian Developer's Reference + (see ).

@@ -918,9 +1004,9 @@ The description of a package

- Every Debian package must have an extended description - stored in the appropriate field of the control record. - The technical information about the format of the + Every Debian package must have a Description control + field which contains a synopsis and extended description of the + package. Technical information about the format of the Description field is in .

@@ -1004,7 +1090,7 @@
- + Dependencies

@@ -1047,10 +1133,10 @@

- Sometimes, a package requires another package to be installed - and configured before it can be installed. In this - case, you must specify a Pre-Depends entry for - the package. + Sometimes, unpacking one package requires that another package + be first unpacked and configured. In this case, the + depending package must specify this dependency in + the Pre-Depends control field.

@@ -1111,7 +1197,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. @@ -1132,7 +1218,7 @@ must be available and usable on the system at all times, even when packages are in an unconfigured (but unpacked) state. Packages are tagged essential for a system using the - Essential control file field. The format of the + Essential control field. The format of the Essential control field is described in .

@@ -1203,9 +1289,11 @@

- You should not use dpkg-divert on a file - belonging to another package without consulting the - maintainer of that package first. + You should not use dpkg-divert on a file belonging + to another package without consulting the maintainer of that + package first. When adding or removing diversions, package + maintainer scripts must provide the --package flag + to dpkg-divert and must not use --local.

@@ -1250,17 +1338,16 @@

Packages which use the Debian Configuration Management - Specification may contain an additional - config script and a templates - file in their control archive - The control.tar.gz inside the .deb. - See . - . - The config script might be run before the - preinst script, and before the package is unpacked - or any of its dependencies or pre-dependencies are satisfied. - Therefore it must work using only the tools present in - essential packages. + Specification may contain the additional control information + files config + and templates. config is an + additional maintainer script used for package configuration, + and templates contains templates used for user + prompting. The config script might be run before + the preinst script and before the package is + unpacked or any of its dependencies or pre-dependencies are + satisfied. Therefore it must work using only the tools + present in essential packages. Debconf or another tool that implements the Debian Configuration Management Specification will also be installed, and any @@ -1603,19 +1690,55 @@ 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. -

- -

- The date must be in RFC822 format - This is generated by date -R. - ; it must include the time zone specified - numerically, with the time zone name or abbreviation - optionally present as a comment in parentheses. + 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. +

+ +

+ The date has the following format + This is the same as the format generated by date + -R. + (compatible and with the same semantics of + RFC 2822 and RFC 5322): + day-of-week, dd month yyyy hh:mm:ss +zzzz + where: + + + day-of week is one of: Mon, Tue, Wed, Thu, Fri, Sat, Sun + + + dd is a one- or two-digit day of the month (01-31) + + + month is one of: Jan, Feb, Mar, Apr, May, Jun, Jul, Aug, + Sep, Oct, Nov, Dec + + yyyy is the four-digit year (e.g. 2010) + hh is the two-digit hour (00-23) + mm is the two-digit minutes (00-59) + ss is the two-digit seconds (00-60) + + +zzzz or -zzzz is the the time zone offset from Coordinated + Universal Time (UTC). "+" indicates that the time is ahead + of (i.e., east of) UTC and "-" indicates that the time is + behind (i.e., west of) UTC. The first two digits indicate + the hour difference from UTC and the last two digits + indicate the number of additional minutes difference from + UTC. The last two digits must be in the range 00-59. + +

@@ -1639,11 +1762,11 @@ Copyright: debian/copyright

- Every package must be accompanied by a verbatim copy of - its copyright and distribution license in the file + Every package must be accompanied by a verbatim copy of its + copyright information and distribution license in the file /usr/share/doc/package/copyright (see for further details). Also see - for further considerations relayed + for further considerations related to copyrights for packages.

@@ -1726,32 +1849,38 @@

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. +

+ +

+ 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 configuration and compilation of the package. If a package has an interactive pre-build - configuration routine, the Debianized source package + configuration routine, the Debian 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 @@ -1817,21 +1946,28 @@ A package may also provide both of the targets build-arch and build-indep. The build-arch target, if provided, should - perform all the configuration and compilation required - for producing all architecture-dependant binary packages - (those packages for which the body of the - Architecture field in debian/control - is not all). - Similarly, the build-indep target, if - provided, should perform all the configuration and - compilation required for producing all - architecture-independent binary packages + perform all the configuration and compilation required for + producing all architecture-dependant binary packages (those packages for which the body of the - Architecture field in debian/control - is all). + Architecture field in debian/control is + not all). Similarly, the build-indep + target, if provided, should perform all the configuration + and compilation required for producing all + 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. + are provided in the rules file. + 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 + yet used in practice since dpkg-buildpackage + -B, and therefore the autobuilders, + invoke build rather than build-arch + due to the difficulties in determining whether the + optional build-arch target exists. +

@@ -1849,8 +1985,8 @@

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

@@ -1898,7 +2034,7 @@

- clean + clean (required)

This must undo any effects that the build @@ -1980,14 +2116,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) @@ -2011,8 +2154,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.

@@ -2148,16 +2291,16 @@ endif Variable substitutions: debian/substvars

- When dpkg-gencontrol, - dpkg-genchanges and dpkg-source - generate control files they perform variable substitutions - on their output just before writing it. Variable + When dpkg-gencontrol + generates binary package control + files (DEBIAN/control), it performs variable + substitutions on its output just before writing it. Variable substitutions have the form ${variable}. The optional file 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 also available. + option to the source packaging commands, and certain predefined + variables are also available.

@@ -2176,12 +2319,12 @@ endif Optional upstream source location: debian/watch

- This is an optional, recommended control file for the - uscan utility which defines how to automatically - scan ftp or http sites for newly available updates of the - package. This is used by and other Debian QA tools - to help with quality control and maintenance of the + This is an optional, recommended configuration file for the + uscan utility which defines how to automatically scan + ftp or http sites for newly available updates of the + package. This is used + by and other Debian QA + tools to help with quality control and maintenance of the distribution as a whole.

@@ -2336,19 +2479,26 @@ endif fields The paragraphs are also sometimes referred to as stanzas. . - The paragraphs are separated by blank lines. Some control + The paragraphs are separated by empty lines. Parsers may accept + lines consisting solely of spaces and tabs as paragraph + separators, but control files should use empty 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.) + refer to binary packages generated from the source.) The + ordering of the paragraphs in control files is significant.

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 (logical) line. Horizontal whitespace + 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 @@ -2361,30 +2511,75 @@ Package: libc6

- Many fields' values may span several lines; in this case - each continuation line must start with a space or a tab. - Any trailing spaces or tabs at the end of individual - lines of a field value are ignored. + A paragraph must not contain more than one instance of a + particular field name. +

+ +

+ There are three types of fields: + + simple + + The field, including its value, must be a single line. Folding + of the field is not permitted. This is the default field type + if the definition of the field does not specify a different + type. + + folded + + The value of a folded field is a logical line that may span + several lines. The lines after the first are called + continuation lines and must start with a space or a tab. + Whitespace, including any newlines, is not significant in the + field values of folded fields. + This folding method is similar to RFC 5322, allowing control + files that contain only one paragraph and no multiline fields + to be read by parsers written for RFC 5322. + + + multiline + + The value of a multiline field may comprise multiple continuation + lines. The first line of the value, the part on the same line as + the field name, often has special significance or may have to be + empty. Other lines are added following the same syntax as the + continuation lines of the folded fields. Whitespace, including newlines, + is significant in the values of multiline fields. + +

- In fields where it is specified that lines may not wrap, - only a single line of data is allowed and whitespace is not - significant in a field body. Whitespace must not appear + 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.

+

+ The presence and purpose of a field, and the syntax of its + value may differ between types of control files. +

+

Field names are not case-sensitive, but it is usual to capitalize the field names using mixed case as shown below. + Field values are case-sensitive unless the description of the + field says otherwise.

- Blank lines, or lines consisting only of spaces and tabs, - are not allowed within field values or between fields - that - would mean a new paragraph. + Paragraph separators (empty lines) and lines consisting only of + spaces and tabs are not allowed within field values or between + fields. Empty lines in field values are usually escaped by + representing them by a space followed by a dot. +

+ +

+ Lines starting with # without any preceding whitespace are comments + lines that are only permitted in source package control files + (debian/control). These comment lines are ignored, even + between two continuation lines. They do not end logical lines.

@@ -2415,6 +2610,7 @@ Package: libc6 Source (mandatory) Maintainer (mandatory) Uploaders + DM-Upload-Allowed Section (recommended) Priority (recommended) Build-Depends et al @@ -2442,17 +2638,15 @@ Package: libc6 The syntax and semantics of the fields are described below.

- -

These fields are used by dpkg-gencontrol to generate control files for binary packages (see below), by dpkg-genchanges to generate the - .changes file to accompany the upload, and by + .changes file to accompany the upload, and by dpkg-source when it creates the .dsc source control file as part of a source - archive. Many fields are permitted to span multiple lines in - debian/control but not in any other control + archive. Some fields are folded in debian/control, + but not in any other control file. These tools are responsible for removing the line breaks from such fields when using fields from debian/control to generate other control files. @@ -2465,16 +2659,6 @@ Package: libc6 when they generate output control files. See for details.

- -

- In addition to the control file syntax described above, this file may also contain - comment lines starting with # without any preceding - whitespace. All such lines are ignored, even in the middle of - continuation lines for a multiline field, and do not end a - multiline field. -

-
@@ -2482,7 +2666,8 @@ Package: libc6

The DEBIAN/control file contains the most vital - (and version-dependent) information about a binary package. + (and version-dependent) information about a binary package. It + consists of a single paragraph.

@@ -2509,28 +2694,30 @@ Package: libc6 Debian source control files -- .dsc

- This file contains a series of fields, identified and - separated just like the fields in the control file of - a binary package. The fields are listed below; their - syntax is described above, in . + 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 . Format (mandatory) Source (mandatory) + Binary + Architecture Version (mandatory) Maintainer (mandatory) Uploaders - Binary - Architecture - Build-Depends et al + DM-Upload-Allowed + Homepage Standards-Version (recommended) + Build-Depends et al + Checksums-Sha1 + and Checksums-Sha256 (recommended) Files (mandatory) - Homepage

- The source package control file is generated by + The Debian source control file is generated by dpkg-source when it builds the source archive, from other files in the source package, described above. When unpacking, it is checked against @@ -2544,12 +2731,19 @@ Package: libc6 Debian changes files -- .changes

- The .changes files are used by the Debian archive maintenance - software to process updates to packages. They contain one - paragraph which contains information from the - debian/control file and other data about the - source package gathered via debian/changelog - and debian/rules. + The .changes files are used by the Debian archive + maintenance software to process updates to packages. They + consist of a single paragraph, possibly surrounded by a PGP + signature. That paragraph contains information from the + debian/control file and other data about the + source package gathered via debian/changelog + and debian/rules. +

+ +

+ .changes files have a format version that is + incremented whenever the documented fields or their meaning + change. This document describes format &changesversion;.

@@ -2569,6 +2763,8 @@ Package: libc6 Description (mandatory) Closes Changes (mandatory) + Checksums-Sha1 + and Checksums-Sha256 (recommended) Files (mandatory)

@@ -2619,8 +2815,8 @@ Package: libc6

The package maintainer's name and email address. The name - should come first, then the email address inside angle - brackets <> (in RFC822 format). + must come first, then the email address inside angle + brackets <> (in RFC822 format).

@@ -2632,28 +2828,36 @@ Package: libc6 putting the name in round brackets and moving it to the end, and bringing the email address forward).

+ +

+ See for additional requirements and + information about package maintainers. +

Uploaders -

- List of the names and email addresses of co-maintainers of - the package, if any. If the package has other maintainers - beside the one named in the - Maintainer field, their - names and email addresses should be listed here. The - format is the same as that of the Maintainer tag, and - multiple entries should be comma separated. Currently, - this field is restricted to a single line of data. This - is an optional field. -

- Any parser that interprets the Uploaders field in - debian/control must permit it to span multiple - lines. Line breaks in an Uploaders field that spans multiple - lines are not significant and the semantics of the field are - the same as if the line breaks had not been present. + List of the names and email addresses of co-maintainers of the + package, if any. If the package has other maintainers besides + the one named in the Maintainer + field, their names and email addresses should be listed + here. The format of each entry is the same as that of the + Maintainer field, and multiple entries must be comma + separated. +

+ +

+ This is normally an optional field, but if + the Maintainer control field names a group of people + and a shared email address, the Uploaders field must + be present and must contain at least one human with their + personal email address. +

+ +

+ The Uploaders field in debian/control can be folded.

@@ -2661,9 +2865,10 @@ Package: libc6 Changed-By

- The name and email address of the person who changed the - said package. Usually the name of the maintainer. - All the rules for the Maintainer field apply here, too. + The name and email address of the person who prepared this + version of the package, usually a maintainer. The syntax is + the same as for the Maintainer + field.

@@ -2688,7 +2893,7 @@ Package: libc6 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 .

@@ -2723,82 +2928,114 @@ Package: libc6 Architecture field can include the following sets of values: - A unique single word identifying a Debian machine - architecture as described in . - all, which indicates an - architecture-independent package. - any, which indicates a package available - for building on any architecture. - source, which indicates a source package. + + A unique single word identifying a Debian machine + architecture as described in . + + + An architecture wildcard identifying a set of Debian + machine architectures, see . + any matches all Debian machine architectures + and is the most frequently used. + + + all, which indicates an + architecture-independent package. + + + source, which indicates a source package. +

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. + package, this field may contain the special + value all, the special architecture + wildcard any, or a list of specific and wildcard + architectures separated by spaces. If all + or any appears, that value must be the entire + contents of the field. Most packages will use + either all or any.

- In the source package control file .dsc, this - field may contain either the special value any or a - list of architectures separated by spaces. If a list is given, - it may include (or consist solely of) the special value - all. In other words, in .dsc files - unlike the debian/control, all may occur - in combination with specific architectures. The - Architecture field in the source package control file - .dsc is generally constructed from the - Architecture fields in the - debian/control in the source package. + Specifying a specific list of architectures indicates that the + source will build an architecture-dependent package only on + architectures included in the list. Specifying a list of + architecture wildcards indicates that the source will build an + architecture-dependent package on only those architectures + that match any of the specified architecture wildcards. + Specifying a list of architectures or architecture wildcards + other than any is for the minority of cases where a + program is not portable or is not useful on some + architectures. Where possible, the program should be made + portable instead.

- Specifying any indicates that the source package + In the Debian source control file .dsc, this + field contains a list of architectures and architecture + wildcards separated by spaces. When the list contains the + architecture wildcard any, the only other value + allowed in the list is all. +

+ +

+ The list may include (or consist solely of) the special + value all. In other words, in .dsc + files unlike the debian/control, all may + occur in combination with specific architectures. + The Architecture field in the Debian source control + file .dsc is generally constructed from + the Architecture fields in + the debian/control in the source package. +

+ +

+ Specifying only any indicates that the source package isn't dependent on any particular architecture and should compile fine on any one. The produced binary package(s) - will either be specific to whatever the current build - architecture is or will be architecture-independent. + will be specific to whatever the current build architecture is.

Specifying only all indicates that the source package - will only build architecture-independent packages. If this is - the case, all must be used rather than any; - any implies that the source package will build at - least one architecture-dependent package. + will only build architecture-independent packages.

- Specifying a list of architectures indicates that the source - will build an architecture-dependent package, and will only - work correctly on the listed architectures. If the source - package also builds at least one architecture-independent - package, all will also be included in the list. + Specifying any all indicates that the source package + isn't dependent on any particular architecture. The set of + produced binary packages will include at least one + architecture-dependant package and one architecture-independent + package. +

+ +

+ Specifying a list of architectures or architecture wildcards + indicates that the source will build an architecture-dependent + package, and will only work correctly on the listed or + matching architectures. 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) - currently being uploaded. This will be a list; if the - source for the package is also being uploaded, the special + field lists the architecture(s) of the package(s) currently + being uploaded. This will be a list; if the source for the + package is also being uploaded, the special entry source is also present. all will be present if any architecture-independent packages are being - uploaded. any may never occur in the - Architecture field in the .changes - file. + uploaded. Architecture wildcards such as any must + never occur in the Architecture field in + the .changes file.

- 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.

@@ -2808,7 +3045,7 @@ Package: libc6

This is a boolean field which may occur only in the control file of a binary package or in a per-package fields - paragraph of a main source control data file. + paragraph of a source package control file.

@@ -2859,8 +3096,8 @@ Package: libc6

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 @@ -2949,9 +3186,10 @@ Package: libc6 It is optional; if it isn't present then the 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 package, and so there is only one "debianisation" - of it and therefore no revision indication is required. + software was written specifically to be a Debian + package, where the Debian package source must always + be identical to the pristine source and therefore no + revision indication is required.

@@ -3027,10 +3265,12 @@ Package: libc6 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). + 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. +

@@ -3041,7 +3281,8 @@ Package: libc6 In a source or binary control file, the Description field contains a description of the binary package, consisting of two parts, the synopsis or the short description, and the - long description. The field's format is as follows: + long description. It is a multiline field with the following + format:

@@ -3061,6 +3302,7 @@ Package: libc6 Those starting with a single space are part of a paragraph. Successive lines of this form will be word-wrapped when displayed. The leading space will usually be stripped off. + The line must contain at least one non-whitespace character. @@ -3071,7 +3313,8 @@ Package: libc6 will be allowed to trail off to the right. None, one or two initial spaces may be deleted, but the number of spaces deleted from each line will be the same (so that you can have - indenting work correctly, for example). + indenting work correctly, for example). The line must + contain at least one non-whitespace character. @@ -3105,8 +3348,8 @@ Package: libc6 field contains a summary of the descriptions for the packages being uploaded. For this case, the first line of the field value (the part on the same line as Description:) is - always empty. The content of the field is expressed as - continuation lines, one line per package. Each line is + always empty. It is a multiline field, with one + line per package. Each line is indented by one space and contains the name of a binary package, a space, a hyphen (-), a space, and the short description line from that package. @@ -3162,7 +3405,9 @@ Package: libc6 Date

- This field includes the date the package was built or last edited. + This field includes the date the package was built or last + edited. It must be in the same format as the date + in a debian/changelog entry.

@@ -3176,12 +3421,30 @@ Package: libc6 Format

- This field specifies a format revision for the file. - The most current format described in the Policy Manual - is version 1.5. The syntax of the - format value is the same as that of a package version - number except that no epoch or Debian revision is allowed - - see . + In .changes + files, this field declares the format version of that file. + The syntax of the field value is the same as that of + a package version number except + that no epoch or Debian revision is allowed. The format + described in this document is &changesversion;. +

+ +

+ In .dsc + Debian source control files, this field declares the + format of the source package. The field value is used by + programs acting on a source package to interpret the list of + files in the source package and determine how to unpack it. + The syntax of the field value is a numeric major revision, a + period, a numeric minor revision, and then an optional subtype + after whitespace, which if specified is an alphanumeric word + in parentheses. The subtype is optional in the syntax but may + be mandatory for particular source format revisions. + + The source formats currently supported by the Debian archive + software are 1.0, 3.0 (native), + and 3.0 (quilt). +

@@ -3222,7 +3485,7 @@ Package: libc6 Changes

- This field contains the human-readable changes data, describing + This multiline field contains the human-readable changes data, describing the differences between the last version and the current one.

@@ -3252,7 +3515,7 @@ Package: libc6 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).

@@ -3260,7 +3523,7 @@ Package: libc6 Binary

- This field is a list of binary packages. Its syntax and + This folded field is a list of binary packages. Its syntax and meaning varies depending on the control file in which it appears.

@@ -3270,7 +3533,7 @@ Package: libc6 packages which a source package can produce, separated by commas A space after each comma is conventional. - . It may span multiple lines. The source package + . The source package does not necessarily produce all of these binary packages for every architecture. The source control file doesn't contain details of which architectures are appropriate for which of @@ -3280,7 +3543,7 @@ Package: libc6

When it appears in a .changes file, it lists the names of the binary packages being uploaded, separated by - whitespace (not commas). It may span multiple lines. + whitespace (not commas).

@@ -3368,7 +3631,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 @@ -3398,6 +3661,65 @@ Files:

+ + Checksums-Sha1 + and Checksums-Sha256 + +

+ These multiline fields contain a list of files with a checksum and size + for each one. Both Checksums-Sha1 + and Checksums-Sha256 have the same syntax and differ + only in the checksum algorithm used: SHA-1 + for Checksums-Sha1 and SHA-256 + for Checksums-Sha256. +

+ +

+ Checksums-Sha1 and Checksums-Sha256 are + multiline fields. The first line of the field value (the part + on the same line as Checksums-Sha1: + or Checksums-Sha256:) is always empty. The content + of the field is expressed as continuation lines, one line per + file. Each line consists of the checksum, a space, the file + size, a space, and the file name. For example (from + a .changes file): + +Checksums-Sha1: + 1f418afaa01464e63cc1ee8a66a05f0848bd155c 1276 example_1.0-1.dsc + a0ed1456fad61116f868b1855530dbe948e20f06 171602 example_1.0.orig.tar.gz + 5e86ecf0671e113b63388dac81dd8d00e00ef298 6137 example_1.0-1.debian.tar.gz + 71a0ff7da0faaf608481195f9cf30974b142c183 548402 example_1.0-1_i386.deb +Checksums-Sha256: + ac9d57254f7e835bed299926fd51bf6f534597cc3fcc52db01c4bffedae81272 1276 example_1.0-1.dsc + 0d123be7f51e61c4bf15e5c492b484054be7e90f3081608a5517007bfb1fd128 171602 example_1.0.orig.tar.gz + f54ae966a5f580571ae7d9ef5e1df0bd42d63e27cb505b27957351a495bc6288 6137 example_1.0-1.debian.tar.gz + 3bec05c03974fdecd11d020fc2e8250de8404867a8a2ce865160c250eb723664 548402 example_1.0-1_i386.deb + +

+ +

+ In the .dsc file, these fields should list all + files that make up the source package. In + the .changes file, these fields should list all + files being uploaded. The list of files in these fields + must match the list of files in the Files field. +

+
+ + + 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 + Resolution for more + details. +

+
@@ -3407,7 +3729,7 @@ Files: Additional user-defined fields may be added to the source package control file. Such fields will be ignored, and not copied to (for example) binary or - source package control files or upload control files. + Debian source control files or upload control files.

@@ -3424,7 +3746,7 @@ Files: field name after the hyphen will be used in the output file. Where the letter B is used the field will appear in binary package control files, where the - letter S is used in source package control + letter S is used in Debian source control files and where C is used in upload control (.changes) files.

@@ -3435,7 +3757,7 @@ Files: XBS-Comment: I stand between the candle and the star. - then the binary and source package control files will contain the + then the binary and Debian source control files will contain the field Comment: I stand between the candle and the star. @@ -3460,12 +3782,11 @@ Files:

- 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 start with the usual - #! convention. They should be readable and + These scripts are the control information + files preinst, postinst, prerm + and postrm. They must be proper executable files; + if they are scripts (which is recommended), they must start with + the usual #! convention. They should be readable and executable by anyone, and must not be world-writable.

@@ -3480,12 +3801,12 @@ Files: they exit with a zero status if everything went well.

-

- Additionally, packages interacting with users using - debconf in the postinst script should - install a config script in the control area, - see for details. -

+

+ Additionally, packages interacting with users + using debconf in the postinst script + should install a config script as a control + information file. See for details. +

When a package is upgraded a combination of the scripts from @@ -3497,7 +3818,7 @@ Files:

Broadly speaking the preinst is called before - (a particular version of) a package is installed, and the + (a particular version of) a package is unpacked, and the postinst afterwards; the prerm before (a version of) a package is removed and the postrm afterwards. @@ -3554,6 +3875,15 @@ Files: assume that program will handle falling back to noninteractive behavior.

+ +

+ For high-priority prompts without a reasonable default answer, + maintainer scripts may abort if there is no controlling + terminal. However, this situation should be avoided if at all + possible, since it prevents automated or unattended installs. + In most cases, users will consider this to be a bug in the + package. +

@@ -3572,111 +3902,200 @@ Files:

- - - new-preinst install - - - new-preinst install old-version - - - new-preinst upgrade old-version - - - old-preinst abort-upgrade - new-version - - + What follows is a summary of all the ways in which maintainer + scripts may be called along with what facilities those scripts + may rely on being available at that time. Script names preceded + by new- are the scripts from the new version of a + package being installed, upgraded to, or downgraded to. Script + names preceded by old- are the scripts from the old + version of a package that is being upgraded from or downgraded + from. +

- - - postinst configure - most-recently-configured-version - - - old-postinst abort-upgrade - new-version - - - conflictor's-postinst abort-remove - in-favour package - new-version - + The preinst script may be called in the following + ways: + + new-preinst install + new-preinst install + old-version + new-preinst upgrade + old-version - postinst abort-remove + The package will not yet be unpacked, so + the preinst script cannot rely on any files + included in its package. Only essential packages and + pre-dependencies (Pre-Depends) may be assumed to be + available. Pre-dependencies will have been configured at + least once, but at the time the preinst is + called they may only be in an unpacked or "Half-Configured" + state if a previous version of the pre-dependency was + completely configured and has not been removed since then. + + old-preinst abort-upgrade + new-version - deconfigured's-postinst - abort-deconfigure in-favour - failed-install-package version - [removing conflicting-package - version] + Called during error handling of an upgrade that failed after + unpacking the new package because the postrm + upgrade action failed. The unpacked files may be + partly from the new version or partly missing, so the script + cannot rely on files included in the package. Package + dependencies may not be available. Pre-dependencies will be + at least unpacked following the same rules as above, except + they may be only "Half-Installed" if an upgrade of the + pre-dependency failed. + This can happen if the new version of the package no + longer pre-depends on a package that had been partially + upgraded. + - + +

- - - prerm remove - - - old-prerm upgrade - new-version - - - new-prerm failed-upgrade - old-version - + The postinst script may be called in the following + ways: + + postinst configure + most-recently-configured-version - conflictor's-prerm remove - in-favour package - new-version + The files contained in the package will be unpacked. All + package dependencies will at least be unpacked. If there + are no circular dependencies involved, all package + dependencies will be configured. For behavior in the case + of circular dependencies, see the discussion + in . + + old-postinst abort-upgrade + new-version + conflictor's-postinst abort-remove + in-favour package + new-version + postinst abort-remove + deconfigured's-postinst + abort-deconfigure in-favour + failed-install-package version + [removing conflicting-package + version] - deconfigured's-prerm deconfigure - in-favour package-being-installed - version [removing - conflicting-package - version] + The files contained in the package will be unpacked. All + package dependencies will at least be "Half-Installed" and + will have previously been configured and not removed. + However, dependencies may not be configured or even fully + unpacked in some error situations. + For example, suppose packages foo and bar are installed + with foo depending on bar. If an upgrade of bar were + started and then aborted, and then an attempt to remove + foo failed because its prerm script failed, + foo's postinst abort-remove would be called with + bar only "Half-Installed". + + The postinst should still attempt any actions + for which its dependencies are required, since they will + normally be available, but consider the correct error + handling approach if those actions fail. Aborting + the postinst action if commands or facilities + from the package dependencies are not available is often the + best approach. - + +

- - - postrm remove - - - postrm purge - - - old-postrm upgrade - new-version - + The prerm script may be called in the following + ways: + + prerm remove + old-prerm + upgradenew-version + conflictor's-prerm remove + in-favour package + new-version + deconfigured's-prerm deconfigure + in-favour package-being-installed + version [removing + conflicting-package version] - new-postrm failed-upgrade - old-version + The package whose prerm is being called will be + at least "Half-Installed". All package dependencies will at + least be "Half-Installed" and will have previously been + configured and not removed. If there was no error, all + dependencies will at least be unpacked, but these actions + may be called in various error states where dependencies are + only "Half-Installed" due to a partial upgrade. + + new-prerm failed-upgrade + old-version - new-postrm abort-install + Called during error handling when prerm upgrade + fails. The new package will not yet be unpacked, and all + the same constraints as for preinst upgrade apply. + +

+ +

+ The postrm script may be called in the following + ways: + + postrm remove + postrm purge + old-postrm upgrade + new-version + disappearer's-postrm disappear + overwriter overwriter-version - new-postrm abort-install - old-version + The postrm script is called after the package's + files have been removed or replaced. The package + whose postrm is being called may have + previously been deconfigured and only be unpacked, at which + point subsequent package changes do not consider its + dependencies. Therefore, all postrm actions + may only rely on essential packages and must gracefully skip + any actions that require the package's dependencies if those + dependencies are unavailable. + This is often done by checking whether the command or + facility the postrm intends to call is + available before calling it. For example: + +if [ "$1" = purge ] && [ -e /usr/share/debconf/confmodule ]; then + . /usr/share/debconf/confmodule + db_purge +fi + + in postrm purges the debconf + configuration for the package + if debconf is installed. + + + new-postrm failed-upgrade + old-version - new-postrm abort-upgrade - old-version + Called when the old postrm upgrade action fails. + The new package will be unpacked, but only essential + packages and pre-dependencies can be relied on. + Pre-dependencies will either be configured or will be + "Unpacked" or "Half-Configured" but previously had been + configured and was never removed. + + new-postrm abort-install + new-postrm abort-install + old-version + new-postrm abort-upgrade + old-version - disappearer's-postrm disappear - overwriter - overwriter-version + Called before unpacking the new package as part of the + error handling of preinst failures. May assume + the same state as preinst can assume. - +

- +
Details of unpack phase of installation or upgrade @@ -3713,7 +4132,7 @@ Files: If this works, then the old-version is "Installed", if not, the old version is in a - "Failed-Config" state. + "Half-Configured" state. @@ -3821,7 +4240,7 @@ Files: 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): @@ -3833,7 +4252,7 @@ Files: 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. @@ -3878,7 +4297,7 @@ Files: 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 + is unpacked which overwrites a file from another package, and is then removed again. Part of the problem is due to what is arguably a bug in dpkg. @@ -3913,14 +4332,14 @@ Files: 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 @@ -4014,7 +4433,7 @@ Files: If there was a conflicting package we go and do the removal actions (described below), starting with the removal of the conflicting package's files (any that - are also in the package being installed have already + are also in the package being unpacked have already been removed from the conflicting package's file list, and so do not get removed now). @@ -4079,7 +4498,7 @@ Files:

- 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".

@@ -4152,7 +4571,7 @@ Files: In the Depends, Recommends, Suggests, Pre-Depends, Build-Depends and Build-Depends-Indep - control file fields of the package, which declare + control 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 (pipe) symbols |. In such a case, @@ -4185,13 +4604,13 @@ Files: specification subject to the rules in , and must appear where it's necessary to disambiguate; it is not otherwise significant. All of the - relationship fields may span multiple lines. For + relationship fields can only be folded in source package control files. 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 also conventional to put a single space after each comma, on either side of each vertical bar, and before - each open parenthesis. When wrapping a relationship field, it + each open parenthesis. When opening a continuation line in a relationship field, it is conventional to do so after a comma and before the space following that comma.

@@ -4206,21 +4625,25 @@ Depends: libc6 (>= 2.2.1), exim | mail-transport-agent

- All fields that specify build-time relationships + 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 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 + prepended with exclamation marks while others aren't.) +

+ +

+ For build relationship fields (Build-Depends, Build-Depends-Indep, - Build-Conflicts and Build-Conflicts-Indep) - 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 separated by whitespace. - Exclamation marks may be prepended to each of the names. - (It is not permitted for some names to be prepended with - exclamation marks while others aren't.) 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. + Build-Conflicts and Build-Conflicts-Indep), 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.

@@ -4236,6 +4659,29 @@ Build-Depends: kernel-headers-2.2.10 [!hurd-i386], gnumach-dev only on hurd-i386.

+

+ For binary relationship fields, the architecture restriction + syntax is only supported in the source package control + file debian/control. When the corresponding binary + package control file is generated, the relationship will either + be omitted or included without the architecture restriction + based on the architecture of the binary package. This means + that architecture restrictions must not be used in binary + relationship fields for architecture-independent packages + (Architecture: all). +

+ +

+ For example: + +Depends: foo [i386], bar [amd64] + + becomes Depends: foo when the package is built on + the i386 architecture, Depends: bar when the + package is built on the amd64 architecture, and omitted + entirely in binary packages built on all other architectures. +

+

If the architecture-restricted dependency is part of a set of alternatives using |, that alternative is ignored @@ -4249,6 +4695,22 @@ Build-Depends: foo [!i386] | bar [!amd64] bar on all other architectures.

+

+ Relationships may also be restricted to a certain set of + architectures using architecture wildcards in the format + described in . 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 any architecture + using a kernel other than Linux. +

+

Note that the binary package relationship fields such as Depends appear in one of the binary package @@ -4275,7 +4737,7 @@ Build-Depends: foo [!i386] | bar [!amd64]

This is done using the Depends, Pre-Depends, Recommends, Suggests, Enhances, - Breaks and Conflicts control file fields. + Breaks and Conflicts control fields. Breaks is described in , and Conflicts is described in . The rest are described below. @@ -4313,31 +4775,40 @@ Build-Depends: foo [!i386] | bar [!amd64]

- For this reason packages in an installation run are usually - all unpacked first and all configured later; this gives - later versions of packages with dependencies on later - versions of other packages the opportunity to have their - dependencies satisfied. + Since Depends only places requirements on the order in + which packages are configured, packages in an installation run + are usually all unpacked first and all configured later. + + This approach makes dependency resolution easier. If two + packages A and B are being upgraded, the installed package A + depends on exactly the installed package B, and the new + package A depends on exactly the new package B (a common + situation when upgrading shared libraries and their + corresponding development packages), satisfying the + dependencies at every stage of the upgrade would be + impossible. This relaxed restriction means that both new + packages can be unpacked together and then configured in their + dependency order. +

-

- In case of circular dependencies, since installation or - removal order honoring the dependency order can't be - established, dependency loops are broken at some point - (based on rules below), and some packages may not be able to - rely on their dependencies being present when being - installed or removed, depending on which side of the break - of the circular dependency loop they happen to be on. If one - of the packages in the loop has no postinst script, then the - cycle will be broken at that package, so as to ensure that - all postinst scripts run with the dependencies properly - configured if this is possible. Otherwise the breaking point - is arbitrary. -

-

- The Depends field thus allows package maintainers - to impose an order in which packages should be configured. + If there is a circular dependency among packages being installed + or removed, installation or removal order honoring the + dependency order is impossible, requiring the dependency loop be + broken at some point and the dependency requirements violated + for at least one package. Packages involved in circular + dependencies may not be able to rely on their dependencies being + configured before they themselves are configured, depending on + which side of the break of the circular dependency loop they + happen to be on. If one of the packages in the loop has + no postinst script, then the cycle will be broken + at that package; this ensures that all postinst + scripts are run with their dependencies properly configured if + this is possible. Otherwise the breaking point is arbitrary. + Packages should therefore avoid circular dependencies where + possible, particularly if they have postinst + scripts.

@@ -4349,7 +4820,8 @@ Build-Depends: foo [!i386] | bar [!amd64] 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. + configured (unless there is a circular dependency as + described above).

@@ -4361,12 +4833,31 @@ Build-Depends: foo [!i386] | bar [!amd64]

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. + postinst or prerm scripts + require the depended-on package to be unpacked or + configured in order to run. In the case of postinst + configure, the depended-on packages will be unpacked + and configured first. (If both packages are involved in a + dependency loop, this might not work as expected; see the + explanation a few paragraphs back.) In the case + of prerm or other postinst + actions, the package dependencies will normally be at + least unpacked, but they may be only "Half-Installed" if a + previous upgrade of the dependency failed. +

+ +

+ Finally, the Depends field should be used if the + depended-on package is needed by the postrm + script to fully clean up after the package removal. There + is no guarantee that package dependencies will be + available when postrm is run, but the + depended-on package is more likely to be available if the + package declares a dependency (particularly in the case + of postrm remove). The postrm + script must gracefully skip actions that require a + dependency if that dependency isn't available. +

Recommends @@ -4415,21 +4906,31 @@ Build-Depends: foo [!i386] | bar [!amd64] 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.

- 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. + When the package declaring a pre-dependency is about to + be configured, the pre-dependency will be treated + as a normal Depends. It will be considered + satisfied only if the depended-on package has been + correctly configured. However, unlike + with Depends, Pre-Depends does not + permit circular dependencies to be broken. If a circular + dependency is encountered while attempting to honor + Pre-Depends, the installation will be aborted. +

+ +

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

@@ -4440,10 +4941,10 @@ Build-Depends: foo [!i386] | bar [!amd64]

- Pre-Depends are also required if the - preinst script depends on the named - package. It is best to avoid this situation if - possible. + You should not specify a Pre-Depends entry for a + package before this has been discussed on the + debian-devel mailing list and a consensus about + doing that has been reached. See .

@@ -4469,7 +4970,7 @@ Build-Depends: foo [!i386] | bar [!amd64]

When one binary package declares that it breaks another, dpkg will refuse to allow the package which - declares Breaks be installed unless the broken + declares Breaks to be unpacked unless the broken package is deconfigured first, and it will refuse to allow the broken package to be reconfigured.

@@ -4477,7 +4978,7 @@ Build-Depends: foo [!i386] | bar [!amd64]

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".

@@ -4490,17 +4991,29 @@ Build-Depends: foo [!i386] | bar [!amd64]

Normally a Breaks entry will have an "earlier than" version clause; such a Breaks is introduced in the - version of an (implicit or explicit) dependency which - violates an assumption or reveals a bug in earlier versions - of the broken package. This use of Breaks will - inform higher-level package management tools that broken - package must be upgraded before the new one. + version of an (implicit or explicit) dependency which violates + an assumption or reveals a bug in earlier versions of the broken + package, or which takes over a file from earlier versions of the + package named in Breaks. This use of Breaks + will inform higher-level package management tools that the + broken package must be upgraded before the new one.

If the breaking package also overwrites some files from the - older package, it should use Replaces (not - Conflicts) to ensure this goes smoothly. + older package, it should use Replaces to ensure this + goes smoothly. See for a full discussion + of taking over files from other packages, including how to + use Breaks in those cases. +

+ +

+ Many of the cases where Breaks should be used were + previously handled with Conflicts + because Breaks did not yet exist. + Many Conflicts fields should now be Breaks. + See for more information about the + differences.

@@ -4508,30 +5021,33 @@ Build-Depends: foo [!i386] | bar [!amd64] Conflicting binary packages - Conflicts

- When one binary package declares a conflict with another - using a Conflicts field, dpkg will - refuse to allow them to be installed on the system at the - same time. + When one binary package declares a conflict with another using + a Conflicts field, dpkg will refuse to + allow them to be unpacked on the system at the same time. This + is a stronger restriction than Breaks, which prevents + the broken package from being configured while the breaking + package is in the "Unpacked" state but allows both packages to + be unpacked 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 (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 is specifically designed to produce an error when - the installed package is Essential, but the new - package is not. + If one package is to be unpacked, the other must be removed + first. If the package being unpacked is marked as replacing + (see , but note that Breaks should + normally be used in this case) 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 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 - half-installed. + "Half-Installed".

@@ -4545,12 +5061,61 @@ Build-Depends: foo [!i386] | bar [!amd64]

- A Conflicts entry should almost never have an - "earlier than" version clause. This would prevent - dpkg from upgrading or installing the package - which declared such a conflict until the upgrade or removal - of the conflicted-with package had been completed. Instead, - Breaks may be used. + Normally, Breaks should be used instead + of Conflicts since Conflicts imposes a + stronger restriction on the ordering of package installation or + upgrade and can make it more difficult for the package manager + to find a correct solution to an upgrade or installation + problem. Breaks should be used + + when moving a file from one package to another (see + ), + when splitting a package (a special case of the previous + one), or + when the breaking package exposes a bug in or interacts + badly with particular versions of the broken + package. + + Conflicts should be used + + when two packages provide the same file and will + continue to do so, + in conjunction with Provides when only one + package providing a given virtual facility may be unpacked + at a time (see ), + in other cases where one must prevent simultaneous + installation of two packages for reasons that are ongoing + (not fixed in a later version of one of the packages) or + that must prevent both packages from being unpacked at the + same time, not just configured. + + Be aware that adding Conflicts is normally not the best + solution when two packages provide the same files. Depending on + the reason for that conflict, using alternatives or renaming the + files is often a better approach. See, for + example, . +

+ +

+ Neither Breaks nor Conflicts should be used + unless two packages cannot be installed at the same time or + installing them both causes one of them to be broken or + unusable. Having similar functionality or performing the same + tasks as another package is not sufficient reason to + declare Breaks or Conflicts with that package. +

+ +

+ A Conflicts entry may have an "earlier than" version + clause if the reason for the conflict is corrected in a later + version of one of the packages. However, normally the presence + of an "earlier than" version clause is a sign + that Breaks should have been used instead. An "earlier + than" version clause in Conflicts + prevents dpkg from upgrading or installing the + package which declares such a conflict until the upgrade or + removal of the conflicted-with package has been completed, which + is a strong restriction.

@@ -4569,11 +5134,10 @@ Build-Depends: foo [!i386] | bar [!amd64]

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 - everywhere the virtual package name appears. (See also ) + Provides control field of another package. The effect + is as if the package(s) which provide a particular virtual + package name had been listed by name everywhere the virtual + package name appears. (See also )

@@ -4597,59 +5161,103 @@ Provides: bar

- If a relationship field has a version number attached - then only real packages will be considered to see whether - the relationship is satisfied (or the prohibition violated, - for a conflict or breakage) - it is assumed that a real - package which provides the virtual package is not of the - "right" version. So, a Provides field may not - contain version numbers, and the version number of the - concrete package which provides a particular virtual package - will not be looked at when considering a dependency on or - conflict with the virtual package name. + If a relationship field has a version number attached, only real + packages will be considered to see whether the relationship is + satisfied (or the prohibition violated, for a conflict or + breakage). In other words, if a version number is specified, + this is a request to ignore all Provides for that + package name and consider only real packages. The package + manager will assume that a package providing that virtual + package is not of the "right" version. A Provides + field may not contain version numbers, and the version number of + the concrete package which provides a particular virtual package + will not be considered when considering a dependency on or + conflict with the virtual package name. + It is possible that a future release of dpkg may + add the ability to specify a version number for each virtual + package it provides. This feature is not yet present, + however, and is expected to be used only infrequently. +

- It is likely that the ability will be added in a future - release of dpkg to specify a version number for - each virtual package it provides. This feature is not yet - present, however, and is expected to be used only - infrequently. + To specify which of a set of real packages should be the default + to satisfy a particular dependency on a virtual package, list + the real package as an alternative before the virtual one.

- 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. + If the virtual package represents a facility that can only be + provided by one real package at a time, such as + the mail-transport-agent virtual package that + requires installation of a binary that would conflict with all + other providers of that virtual package (see + ), all packages providing that + virtual package should also declare a conflict with it + using Conflicts. This will ensure that at most one + provider of that virtual package is unpacked or installed at a + time.

- Overwriting files and replacing packages - Replaces

Packages can declare in their control file that they should - overwrite files in certain other packages, or completely - replace other packages. The Replaces control file - field has these two distinct purposes. + overwrite files in certain other packages, or completely replace + other packages. The Replaces control field has these + two distinct purposes.

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. + It is usually an error for a package to contain files which + are on the system in another 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 and will be taken over by the new package. + Normally, Breaks should be used in conjunction + with Replaces. + To see why Breaks is normally needed in addition + to Replaces, consider the case of a file in the + package foo being taken over by the + package foo-data. + Replaces will allow foo-data to + be installed and take over that file. However, + without Breaks, nothing + requires foo to be upgraded to a newer + version that knows it does not include that file and instead + depends on foo-data. Nothing would + prevent the new foo-data package from + being installed and then removed, removing the file that it + took over from foo. After that + operation, the package manager would think the system was in + a consistent state, but the foo package + would be missing one of its files. +

- 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. + For example, if a package foo is split + into foo and foo-data + starting at version 1.2-3, foo-data would + have the fields + +Replaces: foo (<< 1.2-3) +Breaks: foo (<< 1.2-3) + + in its control file. The new version of the + package foo would normally have the field + +Depends: foo-data (>= 1.2-3) + + (or possibly Recommends or even Suggests if + the files moved into foo-data are not + required for normal operation).

@@ -4664,40 +5272,35 @@ Provides: bar special argument to allow the package to do any final cleanup required. See . -

- Replaces is a one way relationship -- you have to - install the replacing package after the replaced - package. -

+ Replaces is a one way relationship. You have to install + the replacing package after the replaced package.

For this usage of Replaces, virtual packages (see ) are not considered when looking at a - Replaces field - the packages declared as being + Replaces field. The packages declared as being replaced must be mentioned by their real names.

- 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. + This usage of Replaces only takes effect when both + packages are at least partially on the system at once. It is + not relevant if the packages conflict unless the conflict has + been overridden.

-
Replacing whole packages, forcing their removal

- Secondly, Replaces allows the packaging system to + Second, 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 usages of this field do not interfere with - each other. + conflict (see ). This usage only takes + effect when the two packages do conflict, so that the + two usages of this field do not interfere with each other.

@@ -4710,8 +5313,9 @@ Provides: mail-transport-agent Conflicts: mail-transport-agent Replaces: mail-transport-agent - ensuring that only one MTA can be installed at any one - time. + ensuring that only one MTA can be unpacked at any one + time. See for more information about this + example. @@ -4730,7 +5334,7 @@ Replaces: mail-transport-agent

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

@@ -4742,58 +5346,44 @@ Replaces: mail-transport-agent 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: -

- If you make "build-arch" or "binary-arch", you need - Build-Depends. If you make "build-indep" or - "binary-indep", you need Build-Depends and - Build-Depends-Indep. If you make "build" or "binary", - you need both. -

There is no Build-Depends-Arch; this role is essentially - met with Build-Depends. Anyone building the - build-indep and binary-indep targets - is basically assumed to be building the whole package - anyway and so installs all build dependencies. The - autobuilders use dpkg-buildpackage -B, which - calls build (not build-arch, since it - does not yet know how to check for its existence) and - binary-arch. + met with Build-Depends. Anyone building the + build-indep and binary-indep targets is + assumed to be building the whole package, and therefore + installation of all build dependencies is required.

- The purpose of the original split, I recall, was so that - the autobuilders wouldn't need to install extra packages - needed only for the binary-indep targets. But without a - build-arch/build-indep split, this didn't work, since - most of the work is done in the build target, not in the - binary target. + The autobuilders use dpkg-buildpackage -B, which + calls build, not build-arch since it does + not yet know how to check for its existence, and + binary-arch. The purpose of the original split + between Build-Depends and + Build-Depends-Indep was so that the autobuilders + wouldn't need to install extra packages needed only for the + binary-indep targets. But without a build-arch/build-indep + split, this didn't work, since most of the work is done in + the build target, not in the binary target.

- - Build-Depends, Build-Conflicts + clean, build-arch, and + binary-arch - The Build-Depends and - Build-Conflicts fields must be satisfied when - any of the following targets is invoked: - build, clean, binary, - binary-arch, build-arch, - build-indep and binary-indep. + Only the Build-Depends and Build-Conflicts + fields must be satisfied when these targets are invoked. - Build-Depends-Indep, - Build-Conflicts-Indep + build, build-indep, binary, + and binary-indep - The Build-Depends-Indep and - Build-Conflicts-Indep fields must be - satisfied when any of the following targets is - invoked: build, build-indep, - binary and binary-indep. + The Build-Depends, Build-Conflicts, + Build-Depends-Indep, and + Build-Conflicts-Indep fields must be satisfied when + these targets are invoked.

-
- @@ -4808,55 +5398,134 @@ Replaces: mail-transport-agent

- Packages involving shared libraries should be split up into - several binary packages. This section mostly deals with how - this separation is to be accomplished; rules for files within - the shared library packages are in instead. + This section deals only with public shared libraries: shared + libraries that are placed in directories searched by the dynamic + linker by default or which are intended to be linked against + normally and possibly used by other, independent packages. Shared + libraries that are internal to a particular package or that are + only loaded as dynamic modules are not covered by this section and + are not subject to its requirements.

- - Run-time shared libraries +

+ A shared library is identified by the SONAME attribute + stored in its dynamic section. When a binary is linked against a + shared library, the SONAME of the shared library is + recorded in the binary's NEEDED section so that the + dynamic linker knows that library must be loaded at runtime. The + shared library file's full name (which usually contains additional + version information not needed in the SONAME) is + therefore normally not referenced directly. Instead, the shared + library is loaded by its SONAME, which exists on the file + system as a symlink pointing to the full name of the shared + library. This symlink must be provided by the + package. describes how to do this. + + This is a convention of shared library versioning, but not a + requirement. Some libraries use the SONAME as the full + library file name instead and therefore do not need a symlink. + Most, however, encode additional information about + backwards-compatible revisions as a minor version number in the + file name. The SONAME itself only changes when + binaries linked with the earlier version of the shared library + may no longer work, but the filename may change with each + release of the library. See for + more information. + +

- The run-time shared library needs to be placed in a package - whose name changes whenever the shared object version - changes. -

- Since it is common place to install several versions of a - package that just provides shared libraries, it is a - good idea that the library package should not - contain any extraneous non-versioned files, unless they - happen to be in versioned directories.

- - The most common mechanism is to place it in a package - called - librarynamesoversion, - where soversion is the version number - in the soname of the shared library - The soname is the shared object name: it's the thing - that has to match exactly between building an executable - and running it for the dynamic linker to be able run the - program. For example, if the soname of the library is - libfoo.so.6, the library package would be - called libfoo6. - . - Alternatively, if it would be confusing to directly append - soversion to libraryname (e.g. because - libraryname itself ends in a number), you may use - libraryname-soversion and - libraryname-soversion-dev - instead. + When linking a binary or another shared library against a shared + library, the SONAME for that shared library is not yet + known. Instead, the shared library is found by looking for a file + matching the library name with .so appended. This file + exists on the file system as a symlink pointing to the shared + library.

- If you have several shared libraries built from the same - source tree you may lump them all together into a single - shared library package, provided that you change all of - their sonames at once (so that you don't get filename - clashes if you try to install different versions of the - combined shared libraries package). + Shared libraries are normally split into several binary packages. + The SONAME symlink is installed by the runtime shared + library package, and the bare .so symlink is installed in + the development package since it's only used when linking binaries + or shared libraries. However, there are some exceptions for + unusual shared libraries or for shared libraries that are also + loaded as dynamic modules by other programs.

+

+ This section is primarily concerned with how the separation of + shared libraries into multiple packages should be done and how + dependencies on and between shared library binary packages are + managed in Debian. should be read in + conjunction with this section and contains additional rules for + the files contained in the shared library packages. +

+ + + Run-time shared libraries + +

+ The run-time shared library must be placed in a package + whose name changes whenever the SONAME of the shared + library changes. This allows several versions of the shared + library to be installed at the same time, allowing installation + of the new version of the shared library without immediately + breaking binaries that depend on the old version. Normally, the + run-time shared library and its SONAME symlink should + be placed in a package named + librarynamesoversion, + where soversion is the version number in + the SONAME of the shared library. + See for detailed information on how to + determine this version. Alternatively, if it would be confusing + to directly append soversion + to libraryname (if, for example, libraryname + itself ends in a number), you should use + libraryname-soversion + instead. +

+ +

+ If you have several shared libraries built from the same source + tree, you may lump them all together into a single shared + library package provided that all of their SONAMEs will + always change together. Be aware that this is not normally the + case, and if the SONAMEs do not change together, + upgrading such a merged shared library package will be + unnecessarily difficult because of file conflicts with the old + version of the package. When in doubt, always split shared + library packages so that each binary package installs a single + shared library. +

+ +

+ Every time the shared library ABI changes in a way that may + break binaries linked against older versions of the shared + library, the SONAME of the library and the + corresponding name for the binary package containing the runtime + shared library should change. Normally, this means + the SONAME should change any time an interface is + removed from the shared library or the signature of an interface + (the number of parameters or the types of parameters that it + takes, for example) is changed. This practice is vital to + allowing clean upgrades from older versions of the package and + clean transitions between the old ABI and new ABI without having + to upgrade every affected package simultaneously. +

+ +

+ The SONAME and binary package name need not, and indeed + normally should not, change if new interfaces are added but none + are removed or changed, since this will not break binaries + linked against the old shared library. Correct versioning of + dependencies on the newer shared library by binaries that use + the new interfaces is handled via + the shlibs + system or via symbols files (see + ). +

+

The package should install the shared libraries under their normal names. For example, the libgdbm3 @@ -4876,10 +5545,11 @@ Replaces: mail-transport-agent

- The run-time library package should include the symbolic link that - ldconfig would create for the shared libraries. - For example, the libgdbm3 package should include - a symbolic link from /usr/lib/libgdbm.so.3 to + The run-time library package should include the symbolic link for + the SONAME that ldconfig would create for + the shared libraries. For example, + the libgdbm3 package should include a symbolic + link from /usr/lib/libgdbm.so.3 to libgdbm.so.3.0.0. This is needed so that the dynamic linker (for example ld.so or ld-linux.so.*) can find the library between the @@ -4914,12 +5584,9 @@ Replaces: mail-transport-agent library directories of the dynamic linker (which are currently /usr/lib and /lib) or a directory that is listed in /etc/ld.so.conf - These are currently - - /usr/local/lib - /usr/lib/libc5-compat - /lib/libc5-compat - + These are currently /usr/local/lib plus + directories under /lib and /usr/lib + matching the multiarch triplet for the system architecture. must use ldconfig to update the shared library system. @@ -4942,7 +5609,7 @@ Replaces: mail-transport-agent

During install or upgrade, the preinst is called before - the new files are installed, so calling "ldconfig" is + the new files are unpacked, so calling "ldconfig" is pointless. The preinst of an existing package can also be called if an upgrade fails. However, this happens during the critical time when a shared libs may exist on-disk @@ -5065,11 +5732,20 @@ Replaces: mail-transport-agent Development files

- The development files associated to a shared library need to be - placed in a package called - librarynamesoversion-dev, + If there are development files associated with a shared library, + the source package needs to generate a binary development package + named librarynamesoversion-dev, or if you prefer only to support one development version at a - time, libraryname-dev. + time, libraryname-dev. Installing + the development package must result in installation of all the + development files necessary for compiling programs against that + shared library. + This wording allows the development files to be split into + several packages, such as a separate architecture-independent + libraryname-headers, provided that + the development package depends on all the required additional + packages. +

@@ -5078,7 +5754,7 @@ Replaces: mail-transport-agent ) to ensure that the user only installs one development version at a time (as different development versions are likely to have the same header files in them, which would cause a - filename clash if both were installed). + filename clash if both were unpacked).

@@ -5090,6 +5766,14 @@ Replaces: mail-transport-agent (ld) when compiling packages, as it will only look for libgdbm.so when compiling dynamically.

+ +

+ If the package provides Ada Library Information + (*.ali) files for use with GNAT, these files must be + installed read-only (mode 0444) so that GNAT will not attempt to + recompile them. This overrides the normal file mode requirements + given in . +

@@ -5128,59 +5812,49 @@ Replaces: mail-transport-agent

- Thus, when a package is built which contains any shared - libraries, it must provide a shlibs file for other - packages to use, and when a package is built which contains - any shared libraries or compiled binaries, it must run + When a package is built which contains any shared libraries, it + must provide a shlibs file for other packages to + use. When a package is built which contains any shared + libraries or compiled binaries, it must run dpkg-shlibdeps on these to determine the libraries used and hence the dependencies needed by this package.

- In the past, the shared libraries linked to were - determined by calling ldd, but now - objdump is used to do this. The only - change this makes to package building is that - dpkg-shlibdeps must also be run on shared - libraries, whereas in the past this was unnecessary. - The rest of this footnote explains the advantage that - this method gives. + dpkg-shlibdeps will use a program + like objdump or readelf to find + the libraries directly needed by the binaries or shared + libraries in the package.

We say that a binary foo directly uses a library libbar if it is explicitly linked - with that library (that is, it uses the flag - -lbar during the linking stage). Other + with that library (that is, the library is listed in the ELF + NEEDED attribute, caused by adding -lbar + to the link line when the binary is created). Other libraries that are needed by libbar are linked indirectly to foo, and the dynamic linker will load them automatically when it loads - libbar. A package should depend on - the libraries it directly uses, and the dependencies for - those libraries should automatically pull in the other - libraries. -

- -

- Unfortunately, the ldd program shows both - the directly and indirectly used libraries, meaning that - the dependencies determined included both direct and - indirect dependencies. The use of objdump - avoids this problem by determining only the directly - used libraries. + libbar. A package should depend on the libraries + it directly uses, but not the libraries it indirectly uses. + The dependencies for those libraries will automatically pull + in the other libraries.

A good example of where this helps is the following. We could update libimlib with a new version that - supports a new graphics format called dgf (but retaining - the same major version number). If we used the old - ldd method, every package that uses - libimlib would need to be recompiled so it - would also depend on libdgf or it wouldn't run - due to missing symbols. However with the new system, - packages using libimlib can rely on - libimlib itself having the dependency on - libdgf and so they would not need rebuilding. + supports a new graphics format called dgf (but retaining the + same major version number) and depends on libdgf. + If we used ldd to add dependencies for every + library directly or indirectly linked with a binary, every + package that uses libimlib would need to be + recompiled so it would also depend on libdgf or it + wouldn't run due to missing symbols. Since dependencies are + only added based on ELF NEEDED attribute, packages + using libimlib can rely on libimlib itself + having the dependency on libdgf and so they would + not need rebuilding.

@@ -5210,8 +5884,13 @@ Replaces: mail-transport-agent

debian/shlibs.local

- This lists overrides for this package. Its use is - described below (see ). + This lists overrides for this package. This file should + normally not be used, but may be needed temporarily in + unusual situations to work around bugs in other packages, + or in unusual cases where the normally declared dependency + information in the installed shlibs file for + a library cannot be used. This file overrides information + obtained from any other source.

@@ -5229,38 +5908,34 @@ Replaces: mail-transport-agent

DEBIAN/shlibs files in the "build directory"

- When packages are being built, any - debian/shlibs files are copied into the - control file area of the temporary build directory and - given the name shlibs. These files give - details of any shared libraries included in the - package. - An example may help here. Let us say that the - source package foo generates two binary - packages, libfoo2 and - foo-runtime. When building the binary - packages, the two packages are created in the - directories debian/libfoo2 and - debian/foo-runtime respectively. - (debian/tmp could be used instead of one - of these.) Since libfoo2 provides the - libfoo shared library, it will require a - shlibs file, which will be installed in - debian/libfoo2/DEBIAN/shlibs, eventually - to become - /var/lib/dpkg/info/libfoo2.shlibs. Then - when dpkg-shlibdeps is run on the - executable - debian/foo-runtime/usr/bin/foo-prog, it - will examine the - debian/libfoo2/DEBIAN/shlibs file to - determine whether foo-prog's library - dependencies are satisfied by any of the libraries - provided by libfoo2. For this reason, - dpkg-shlibdeps must only be run once - all of the individual binary packages' - shlibs files have been installed into the - build directory. + When packages are being built, + any debian/shlibs files are copied into the + control information file area of the temporary build + directory and given the name shlibs. These + files give details of any shared libraries included in the + same package. + An example may help here. Let us say that the source + package foo generates two binary + packages, libfoo2 and foo-runtime. + When building the binary packages, the two packages are + created in the directories debian/libfoo2 + and debian/foo-runtime respectively. + (debian/tmp could be used instead of one of + these.) Since libfoo2 provides the + libfoo shared library, it will require a + shlibs file, which will be installed in + debian/libfoo2/DEBIAN/shlibs, eventually to + become /var/lib/dpkg/info/libfoo2.shlibs. + When dpkg-shlibdeps is run on the + executable debian/foo-runtime/usr/bin/foo-prog, + it will examine + the debian/libfoo2/DEBIAN/shlibs file to + determine whether foo-prog's library + dependencies are satisfied by any of the libraries + provided by libfoo2. For this reason, + dpkg-shlibdeps must only be run once all of + the individual binary packages' shlibs files + have been installed into the build directory.

@@ -5306,10 +5981,9 @@ dpkg-shlibdeps debian/tmp/usr/bin/* debian/tmp/usr/sbin/* \ Otherwise, you will need to explicitly list the compiled binaries and libraries. - If you are using debhelper, the - dh_shlibdeps program will do this work for - you. It will also correctly handle multi-binary - packages. + If you are using debhelper, the + dh_shlibdeps program will do this work for you. + It will also correctly handle multi-binary packages.

@@ -5321,13 +5995,6 @@ dpkg-shlibdeps debian/tmp/usr/bin/* debian/tmp/usr/sbin/* \ field in the control file for this to work.

-

- If dpkg-shlibdeps doesn't complain, you're - done. If it does complain you might need to create your own - debian/shlibs.local file, as explained below (see - ). -

-

If you have multiple binary packages, you will need to call dpkg-shlibdeps on each one which contains @@ -5337,20 +6004,21 @@ dpkg-shlibdeps debian/tmp/usr/bin/* debian/tmp/usr/sbin/* \

- 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 - dh_shlibdeps from the debhelper suite - will automatically add this option if it knows it is - processing a udeb. - . If there is no dependency line of type udeb - in the shlibs file, dpkg-shlibdeps will - fall back to the regular dependency line. + 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. + . If there is no dependency line of + type udeb in the shlibs + file, dpkg-shlibdeps will fall back to the regular + dependency line.

- For more details on dpkg-shlibdeps, please see + For more details on dpkg-shlibdeps, please see and .

@@ -5394,13 +6062,17 @@ dpkg-shlibdeps debian/tmp/usr/bin/* debian/tmp/usr/sbin/* \ usually of the form name.so.major-version, in our example, libz.so.1. - This can be determined using the command - + This can be determined using the command + objdump -p /usr/lib/libz.so.1.1.3 | grep SONAME - + The version part is the part which comes after - .so., so in our case, it is 1. + .so., so in our case, it is 1. The soname may + instead be of the form + name-major-version.so, such + as libdb-4.8.so, in which case the name would + be libdb and the version would be 4.8.

@@ -5442,7 +6114,8 @@ udeb: libz 1 zlib1g-udeb (>= 1:1.1.3) It is usual to call this file debian/shlibs (but if you have multiple binary packages, you might want to call it debian/shlibs.package instead). Then - let debian/rules install it in the control area: + let debian/rules install it in the control + information file area: install -m644 debian/shlibs debian/tmp/DEBIAN @@ -5451,14 +6124,15 @@ install -m644 debian/shlibs debian/tmp/DEBIAN install -m644 debian/shlibs.package debian/package/DEBIAN/shlibs An alternative way of doing this is to create the - shlibs file in the control area directly from - debian/rules without using a debian/shlibs - file at all, - This is what dh_makeshlibs in the - debhelper suite does. If your package also has a udeb - that provides a shared library, dh_makeshlibs can - automatically generate the udeb: lines if you specify - the name of the udeb with the --add-udeb option. + shlibs file in the control information file area + directly from debian/rules without using + a debian/shlibs file at all, + This is what dh_makeshlibs in + the debhelper suite does. If your package + also has a udeb that provides a shared + library, dh_makeshlibs can automatically generate + the udeb: lines if you specify the name of the udeb + with the --add-udeb option. since the debian/shlibs file itself is ignored by dpkg-shlibdeps. @@ -5473,74 +6147,7 @@ install -m644 debian/shlibs.package debian/package/DEBIAN/ packages.

- - - Writing the debian/shlibs.local file - -

- This file is intended only as a temporary fix if - your binaries or libraries depend on a library whose package - does not yet provide a correct shlibs file. -

- -

- We will assume that you are trying to package a binary - foo. When you try running - dpkg-shlibdeps you get the following error - message (-O displays the dependency information on - stdout instead of writing it to - debian/substvars, and the lines have been wrapped - for ease of reading): - -$ dpkg-shlibdeps -O debian/tmp/usr/bin/foo -dpkg-shlibdeps: warning: unable to find dependency - information for shared library libbar (soname 1, - path /usr/lib/libbar.so.1, dependency field Depends) -shlibs:Depends=libc6 (>= 2.2.2-2) - - You can then run ldd on the binary to find the - full location of the library concerned: - -$ ldd foo -libbar.so.1 => /usr/lib/libbar.so.1 (0x4001e000) -libc.so.6 => /lib/libc.so.6 (0x40032000) -/lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x40000000) - - So the foo binary depends on the - libbar shared library, but no package seems to - provide a *.shlibs file handling - libbar.so.1 in /var/lib/dpkg/info/. Let's - determine the package responsible: - -$ dpkg -S /usr/lib/libbar.so.1 -bar1: /usr/lib/libbar.so.1 -$ dpkg -s bar1 | grep Version -Version: 1.0-1 - - This tells us that the bar1 package, version 1.0-1, - is the one we are using. Now we can file a bug against the - bar1 package and create our own - debian/shlibs.local to locally fix the problem. - Including the following line into your - debian/shlibs.local file: - -libbar 1 bar1 (>= 1.0-1) - - should allow the package build to work. -

- -

- As soon as the maintainer of bar1 provides a - correct shlibs file, you should remove this line - from your debian/shlibs.local file. (You should - probably also then have a versioned Build-Depends - on bar1 to help ensure that others do not have the - same problem building your package.) -

-
-
- @@ -5582,6 +6189,40 @@ libbar 1 bar1 (>= 1.0-1) for 64 bit binaries is removed.

+ +

+ The requirement for object files, internal binaries, and + libraries, including libc.so.*, to be located + directly under /lib{,32} and + /usr/lib{,32} is amended, permitting files + to instead be installed to + /lib/triplet and + /usr/lib/triplet, where + triplet is the value returned by + dpkg-architecture -qDEB_HOST_MULTIARCH for the + architecture of the package. Packages may not + install files to any triplet path other + than the one matching the architecture of that package; + for instance, an Architecture: amd64 package + containing 32-bit x86 libraries may not install these + libraries to /usr/lib/i386-linux-gnu. + + This is necessary in order to reserve the directories for + use in cross-installation of library packages from other + architectures, as part of the planned deployment of + multiarch. + +

+

+ Applications may also use a single subdirectory under + /usr/lib/triplet. +

+

+ The execution time linker/loader, ld*, must still be made + available in the existing location under /lib or /lib64 + since this is part of the ELF ABI for the architecture. +

+

The requirement that @@ -5605,9 +6246,30 @@ 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. +

+
+ +

+ On GNU/Hurd systems, the following additional + directories are allowed in the root + filesystem: /hurd + and /servers. + These directories are used to store translators and as + a set of standard names for mount points, + respectively. + +

+
-

+

The version of this document referred here can be found in the debian-policy package or on = 1.0-1)

- 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.

@@ -5672,12 +6336,11 @@ libbar 1 bar1 (>= 1.0-1) For example, the emacsen-common package could contain something like -if [ ! -e /usr/local/share/emacs ] -then - if mkdir /usr/local/share/emacs 2>/dev/null - then - chown root:staff /usr/local/share/emacs - chmod 2775 /usr/local/share/emacs +if [ ! -e /usr/local/share/emacs ]; then + if mkdir /usr/local/share/emacs 2>/dev/null; then + if chown root:staff /usr/local/share/emacs; then + chmod 2775 /usr/local/share/emacs || true + fi fi fi @@ -5717,9 +6380,10 @@ rmdir /usr/local/share/emacs 2>/dev/null || true 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.

@@ -5801,7 +6465,7 @@ rmdir /usr/local/share/emacs 2>/dev/null || true

- 1000-29999: + 1000-59999:

Dynamically allocated user accounts. By default @@ -5812,11 +6476,6 @@ rmdir /usr/local/share/emacs 2>/dev/null || true

- 30000-59999: - -

Reserved.

-
- 60000-64999:

@@ -5963,7 +6622,7 @@ rmdir /usr/local/share/emacs 2>/dev/null || true

- + Writing the scripts

@@ -6013,6 +6672,23 @@ rmdir /usr/local/share/emacs 2>/dev/null || true option.

+

+ Be careful of using set -e in init.d + scripts. Writing correct init.d scripts requires + accepting various error exit statuses when daemons are already + running or already stopped without aborting + the init.d script, and common init.d + function libraries are not safe to call with set -e + in effect + /lib/lsb/init-functions, which assists in writing + LSB-compliant init scripts, may fail if set -e is + in effect and echoing status messages to the console fails, + for example. + . For init.d scripts, it's often easier + to not use set -e and instead check the result of + each command separately. +

+

If a service reloads its configuration automatically (as in the case of cron, for example), the @@ -6463,18 +7139,20 @@ Reloading description configuration...done.

- + Cron jobs

Packages must not modify the configuration file /etc/crontab, and they must not modify the files in - /var/spool/cron/crontabs.

+ /var/spool/cron/crontabs. +

- If a package wants to install a job that has to be executed - via cron, it should place a file with the name of the - package in one or more of the following directories: + If a package wants to install a job that has to be executed via + cron, it should place a file named as specified + in into one or more of the following + directories: /etc/cron.hourly /etc/cron.daily @@ -6484,7 +7162,8 @@ Reloading description configuration...done. As these directory names imply, the files within them are executed on an hourly, daily, weekly, or monthly basis, respectively. The exact times are listed in - /etc/crontab.

+ /etc/crontab. +

All files installed in any of these directories must be @@ -6495,22 +7174,84 @@ Reloading description configuration...done.

If a certain job has to be executed at some other frequency or - at a specific time, the package should install a file - /etc/cron.d/package. This file uses the - same syntax as /etc/crontab and is processed by - cron automatically. The file must also be + at a specific time, the package should install a file in + /etc/cron.d with a name as specified + in . 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 /etc/cron.d directory are not handled by anacron. Thus, you should only use this directory for jobs which may be skipped if the system is not - running.)

+ 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}. +

+ + + Cron job file names + +

+ The file name of a cron job file should normally match the + name of the package from which it comes. +

+ +

+ If a package supplies multiple cron job files files in the + same directory, the file names should all start with the name + of the package (possibly modified as described below) followed + by a hyphen (-) and a suitable suffix. +

+ +

+ A cron job file name must not include any period or plus + characters (. or +) characters as this will + cause cron to ignore the file. Underscores (_) + should be used instead of . and + + characters. +

+
@@ -6559,7 +7300,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).

@@ -6576,11 +7317,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 +

@@ -6786,9 +7541,8 @@ exec /usr/lib/foo/foo "$@" package that provides online documentation (other than just manual pages) to register these documents with doc-base by installing a - doc-base control file via the - doc-base control file in + /usr/share/doc-base/.

Please refer to the documentation that comes with the @@ -6803,7 +7557,7 @@ exec /usr/lib/foo/foo "$@" Files - + Binaries

@@ -6938,10 +7692,10 @@ INSTALL = install -s # (or use strip on the files in debian/tmp) for C files) will need to be compiled twice, for the normal case.

+

- You must specify the gcc option -D_REENTRANT - when building a library (either static or shared) to make - the library compatible with LinuxThreads. + Libraries should be built with threading support and to be + thread-safe if the library supports this.

@@ -6998,40 +7752,58 @@ strip --strip-unneeded your-lib

- An ever increasing number of packages are using - libtool to do their linking. The latest GNU - libtools (>= 1.3a) can take advantage of the metadata in the - installed libtool archive files (*.la - files). The main advantage of libtool's - .la files is that it allows libtool to - store and subsequently access metadata with respect to the - libraries it builds. libtool will search for - those files, which contain a lot of useful information about - a library (such as library dependency information for static - linking). Also, they're essential for programs - using libltdl. - Although libtool is fully capable of - linking against shared libraries which don't have - .la files, as it is a mere shell script it can - add considerably to the build time of a - libtool-using package if that shell script - has to derive all this information from first principles - for each library every time it is linked. With the - advent of libtool version 1.4 (and to a - lesser extent libtool version 1.3), the - .la files also store information about - inter-library dependencies which cannot necessarily be - derived after the .la file is deleted. + Packages that use libtool to create and install + their shared libraries install a file containing additional + metadata (ending in .la) alongside the library. + For public libraries intended for use by other packages, these + files normally should not be included in the Debian package, + since the information they include is not necessary to link with + the shared library on Debian and can add unnecessary additional + dependencies to other programs or libraries. + These files store, among other things, all libraries on which + that shared library depends. Unfortunately, if + the .la file is present and contains that + dependency information, using libtool when + linking against that library will cause the resulting program + or library to be linked against those dependencies as well, + even if this is unnecessary. This can create unneeded + dependencies on shared library packages that would otherwise + be hidden behind the library ABI, and can make library + transitions to new SONAMEs unnecessarily complicated and + difficult to manage. + If the .la file is required for that library (if, + for instance, it's loaded via libltdl in a way that + requires that meta-information), the dependency_libs + setting in the .la file should normally be set to + the empty string. If the shared library development package has + historically included the .la, it must be retained + in the development package (with dependency_libs + emptied) until all libraries that depend on it have removed or + emptied dependency_libs in their .la + files to prevent linking with those other libraries + using libtool from failing. +

+ +

+ If the .la must be included, it should be included + in the development (-dev) package, unless the library + will be loaded by libtool's libltdl + library. If it is intended for use with libltdl, + the .la files must go in the run-time library + package.

- Packages that use libtool to create shared - libraries should include the .la files in the - -dev package, unless the package relies on - libtool's libltdl library, in which case - the .la files must go in the run-time library - package. + These requirements for handling of .la files do not + apply to loadable modules or libraries not installed in + directories searched by default by the dynamic linker. Packages + installing loadable modules will frequently need to install + the .la files alongside the modules so that they + can be loaded by libltdl. dependency_libs + does not need to be modified for libraries or modules that are + not installed in directories searched by the dynamic linker by + default and not intended for use by other packages.

@@ -7075,13 +7847,19 @@ strip --strip-unneeded your-lib language currently used to implement it.

- Shell scripts (sh and bash) - should almost certainly start with set -e so that - errors are detected. Every script should use - set -e or check the exit status of every - command. + Shell scripts (sh and bash) other than + init.d scripts should almost certainly start + with set -e so that errors are detected. + init.d scripts are something of a special case, due + to how frequently they need to call commands that are allowed to + fail, and it may instead be easier to check the exit status of + commands directly. See for more + information about writing init.d scripts. +

+

+ Every script should use set -e or check the exit status + of every command.

-

Scripts may assume that /bin/sh implements the SUSv3 Shell Command Language @@ -7116,7 +7894,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 @@ -7171,11 +7961,23 @@ fname () { Symbolic links

- In general, symbolic links within a top-level directory - should be relative, and symbolic links pointing from one - top-level directory into another should be absolute. (A - top-level directory is a sub-directory of the root - directory /.) + In general, symbolic links within a top-level directory should + be relative, and symbolic links pointing from one top-level + directory to or into another should be absolute. (A top-level + directory is a sub-directory of the root + directory /.) For example, a symbolic link + from /usr/lib/foo to /usr/share/bar + should be relative (../share/bar), but a symbolic + link from /var/run to /run should be + absolute. + This is necessary to allow top-level directories to be + symlinks. If linking /var/run + to /run were done with the relative symbolic + link ../run, but /var were a + symbolic link to /srv/disk1, the symbolic link + would point to /srv/run rather than the intended + target. +

@@ -7220,8 +8022,8 @@ ln -fs ../sbin/sendmail debian/tmp/usr/bin/runq 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.

@@ -7246,6 +8048,18 @@ ln -fs ../sbin/sendmail debian/tmp/usr/bin/runq /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. +

@@ -7330,6 +8144,8 @@ ln -fs ../sbin/sendmail debian/tmp/usr/bin/runq package is purged. + Obsolete configuration files without local changes may be + removed by the package during upgrade.

@@ -7414,22 +8230,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 @@ -7479,6 +8279,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. +

@@ -7543,11 +8371,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 @@ -7572,17 +8402,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.

@@ -7594,7 +8427,7 @@ endscript

- + Permissions and owners

@@ -7635,6 +8468,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 @@ -7663,15 +8502,12 @@ endscript security policy by changing the permissions on a binary: they can do this by using dpkg-statoverride, as described below. - Ordinary files installed by dpkg (as - opposed to conffiles and other similar objects) - normally have their permissions reset to the distributed - permissions when the package is reinstalled. However, - the use of dpkg-statoverride overrides this - default behavior. If you use this method, you should - remember to describe dpkg-statoverride in - the package documentation; being a relatively new - addition to Debian, it is probably not yet well-known. + Ordinary files installed by dpkg (as + opposed to conffiles and other similar objects) + normally have their permissions reset to the distributed + permissions when the package is reinstalled. However, + the use of dpkg-statoverride overrides this + default behavior. Another method you should consider is to create a group for people allowed to use the program(s) and make any setuid @@ -7803,51 +8639,10 @@ done

If a program needs to specify an architecture specification - string in some place, it should select one of the - strings provided by dpkg-architecture -L. The - strings are in the format - os-arch, though the OS part - is sometimes elided, as when the OS is Linux. -

Currently, the strings are: - i386 ia64 alpha amd64 armeb arm hppa m32r m68k mips - mipsel powerpc ppc64 s390 s390x sh3 sh3eb sh4 sh4eb - sparc darwin-i386 darwin-ia64 darwin-alpha darwin-amd64 - darwin-armeb darwin-arm darwin-hppa darwin-m32r - darwin-m68k darwin-mips darwin-mipsel darwin-powerpc - darwin-ppc64 darwin-s390 darwin-s390x darwin-sh3 - darwin-sh3eb darwin-sh4 darwin-sh4eb darwin-sparc - freebsd-i386 freebsd-ia64 freebsd-alpha freebsd-amd64 - freebsd-armeb freebsd-arm freebsd-hppa freebsd-m32r - freebsd-m68k freebsd-mips freebsd-mipsel freebsd-powerpc - freebsd-ppc64 freebsd-s390 freebsd-s390x freebsd-sh3 - freebsd-sh3eb freebsd-sh4 freebsd-sh4eb freebsd-sparc - kfreebsd-i386 kfreebsd-ia64 kfreebsd-alpha - kfreebsd-amd64 kfreebsd-armeb kfreebsd-arm kfreebsd-hppa - kfreebsd-m32r kfreebsd-m68k kfreebsd-mips - kfreebsd-mipsel kfreebsd-powerpc kfreebsd-ppc64 - kfreebsd-s390 kfreebsd-s390x kfreebsd-sh3 kfreebsd-sh3eb - kfreebsd-sh4 kfreebsd-sh4eb kfreebsd-sparc knetbsd-i386 - knetbsd-ia64 knetbsd-alpha knetbsd-amd64 knetbsd-armeb - knetbsd-arm knetbsd-hppa knetbsd-m32r knetbsd-m68k - knetbsd-mips knetbsd-mipsel knetbsd-powerpc - knetbsd-ppc64 knetbsd-s390 knetbsd-s390x knetbsd-sh3 - knetbsd-sh3eb knetbsd-sh4 knetbsd-sh4eb knetbsd-sparc - netbsd-i386 netbsd-ia64 netbsd-alpha netbsd-amd64 - netbsd-armeb netbsd-arm netbsd-hppa netbsd-m32r - netbsd-m68k netbsd-mips netbsd-mipsel netbsd-powerpc - netbsd-ppc64 netbsd-s390 netbsd-s390x netbsd-sh3 - netbsd-sh3eb netbsd-sh4 netbsd-sh4eb netbsd-sparc - openbsd-i386 openbsd-ia64 openbsd-alpha openbsd-amd64 - openbsd-armeb openbsd-arm openbsd-hppa openbsd-m32r - openbsd-m68k openbsd-mips openbsd-mipsel openbsd-powerpc - openbsd-ppc64 openbsd-s390 openbsd-s390x openbsd-sh3 - openbsd-sh3eb openbsd-sh4 openbsd-sh4eb openbsd-sparc - hurd-i386 hurd-ia64 hurd-alpha hurd-amd64 hurd-armeb - hurd-arm hurd-hppa hurd-m32r hurd-m68k hurd-mips - hurd-mipsel hurd-powerpc hurd-ppc64 hurd-s390 hurd-s390x - hurd-sh3 hurd-sh3eb hurd-sh4 hurd-sh4eb hurd-sparc -

- + string in some place, it should select one of the strings + provided by dpkg-architecture -L. The strings are in + the format os-arch, though the OS + part is sometimes elided, as when the OS is Linux.

@@ -7859,6 +8654,27 @@ done arch-unknown-linux, since the unknown does not look very good.

+ + + Architecture wildcards + +

+ A package may specify an architecture wildcard. Architecture + wildcards are in the format any (which matches every + architecture), os-any, or + 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), with the first component of + the triplet representing the libc and ABI in use, and then + does matching against those triplets. However, such + triplets are an internal implementation detail that should + not be used by packages directly. The libc and ABI portion + is handled internally by the package system based on + the os and cpu. + +

+
@@ -7944,10 +8760,14 @@ done

These two files are managed through the dpkg - "alternatives" mechanism. Thus every package providing an - editor or pager must call the - update-alternatives script to register these - programs. + "alternatives" mechanism. Every package providing an editor or + pager must call the update-alternatives script to + register as an alternative for /usr/bin/editor + or /usr/bin/pager as appropriate. The alternative + should have a slave alternative + for /usr/share/man/man1/editor.1.gz + or /usr/share/man/man1/pager.1.gz pointing to the + corresponding manual page.

@@ -7956,10 +8776,10 @@ done use /usr/bin/sensible-editor and /usr/bin/sensible-pager as the editor or pager program respectively. These are two scripts provided in the - Debian base system that check the EDITOR and PAGER variables - and launch the appropriate program, and fall back to - /usr/bin/editor and /usr/bin/pager if the - variable is not set. + sensible-utils package that check the EDITOR + and PAGER variables and launch the appropriate program, and fall + back to /usr/bin/editor + and /usr/bin/pager if the variable is not set.

@@ -7996,11 +8816,13 @@ done /usr/lib/cgi-bin/cgi-bin-name - and should be referred to as + or a subdirectory of that directory, and should be + referred to as http://localhost/cgi-bin/cgi-bin-name - + (possibly with a subdirectory name + before cgi-bin-name). @@ -8156,8 +8978,7 @@ http://localhost/doc/package/filename this so programs should not fail if newaliases cannot be found. Note that because of this, all MTA packages must have Provides, Conflicts and - Replaces: mail-transport-agent control file - fields. + Replaces: mail-transport-agent control fields.

@@ -8266,8 +9087,9 @@ name ["syshostname"]:

Packages that provide an X server that, directly or indirectly, communicates with real input and display - hardware should declare in their control data that they - provide the virtual package xserver. + hardware should declare in their Provides control + field that they provide the virtual + package xserver. This implements current practice, and provides an actual policy for usage of the xserver virtual package which appears in the virtual packages @@ -8285,12 +9107,14 @@ name ["syshostname"]:

Packages that provide a terminal emulator for the X Window - System which meet the criteria listed below should declare - in their control data that they provide the virtual - package x-terminal-emulator. They should also - register themselves as an alternative for + System which meet the criteria listed below should declare in + their Provides control field that they provide the + virtual package x-terminal-emulator. They should + also register themselves as an alternative for /usr/bin/x-terminal-emulator, with a priority of - 20. + 20. That alternative should have a slave alternative + for /usr/share/man/man1/x-terminal-emulator.1.gz + pointing to the corresponding manual page.

@@ -8331,9 +9155,9 @@ name ["syshostname"]:

Packages that provide a window manager should declare in - their control data that they provide the virtual package - x-window-manager. They should also register - themselves as an alternative for + their Provides control field that they provide the + virtual package x-window-manager. They should also + register themselves as an alternative for /usr/bin/x-window-manager, with a priority calculated as follows: @@ -8354,9 +9178,9 @@ name ["syshostname"]: If the window manager complies with , - written by the , add 40 points. @@ -8367,6 +9191,9 @@ name ["syshostname"]: configuration, add 10 points; otherwise add none. + That alternative should have a slave alternative + for /usr/share/man/man1/x-window-manager.1.gz + pointing to the corresponding manual page.

@@ -8506,8 +9333,8 @@ name ["syshostname"]: Font packages must declare a dependency on - xfonts-utils in their control - data. + xfonts-utils in their Depends + or Pre-Depends control field. @@ -8573,9 +9400,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 @@ -8621,41 +9448,6 @@ name ["syshostname"]: policy (such as for ).

- - - The OSF/Motif and OpenMotif libraries - -

- Programs that require the non-DFSG-compliant OSF/Motif or - OpenMotif libraries - OSF/Motif and OpenMotif are collectively referred to as - "Motif" in this policy document. - - should be compiled against and tested with LessTif (a free - re-implementation of Motif) instead. If the maintainer - judges that the program or programs do not work - sufficiently well with LessTif to be distributed and - supported, but do so when compiled against Motif, then two - versions of the package should be created; one linked - statically against Motif and with -smotif - appended to the package name, and one linked dynamically - against Motif and with -dmotif appended to the - package name. -

- -

- Both Motif-linked versions are dependent - upon non-DFSG-compliant software and thus cannot be - uploaded to the main distribution; if the - software is itself DFSG-compliant it may be uploaded to - the contrib distribution. While known existing - versions of Motif permit unlimited redistribution of - binaries linked against the library (whether statically or - dynamically), it is the package maintainer's - responsibility to determine whether this is permitted by - the license of the copy of Motif in their possession. -

-
@@ -8768,13 +9560,13 @@ name ["syshostname"]: maintainer of the package is allowed to write this bug report themselves, if they so desire). Do not close the bug report until a proper man page is available. - It is not very hard to write a man page. See the + It is not very hard to write a man page. See the , - , the examples - created by debmake or dh_make, - the helper programs help2man, or the - directory /usr/share/doc/man-db/examples. + , the examples created + by dh_make, the helper + program help2man, or the + directory /usr/share/doc/man-db/examples.

@@ -8869,7 +9661,11 @@ name ["syshostname"]: scripts. This is no longer necessary. The installation system now uses dpkg triggers. - This file must not be included in packages. + This file must not be included in packages. Packages containing + info documents should depend on dpkg (>= 1.15.4) | + install-info to ensure that the directory file is properly + rebuilt during partial upgrades from Debian 5.0 (lenny) and + earlier.

@@ -8955,7 +9751,7 @@ END-INFO-DIR-ENTRY

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 @@ -9009,23 +9805,21 @@ END-INFO-DIR-ENTRY

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

In addition, the copyright file must say where the upstream - sources (if any) were obtained. It should name the original - authors of the package and the Debian maintainer(s) who were - involved with its creation. + sources (if any) were obtained, and should name the original + authors.

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.

@@ -9038,22 +9832,22 @@ END-INFO-DIR-ENTRY /usr/share/doc/package may be a symbolic link to another directory in /usr/share/doc only if the two packages both come from the same source and the - first package Depends on the second. These rules are - important because copyrights must be extractable by + first package Depends on the second. These rules are important + because copyright files must be extractable by mechanical means.

- Packages distributed under the UCB BSD license, the Apache - license (version 2.0), the Artistic license, the GNU GPL - (version 2 or 3), the GNU LGPL (versions 2, 2.1, or 3), and the - GNU FDL (versions 1.2 or 1.3) should refer to the corresponding - files under /usr/share/common-licenses, + Packages distributed under the Apache license (version 2.0), the + Artistic license, the GNU GPL (versions 1, 2, or 3), the GNU + LGPL (versions 2, 2.1, or 3), and the GNU FDL (versions 1.2 or + 1.3) should refer to the corresponding files + under /usr/share/common-licenses,

In particular, - /usr/share/common-licenses/BSD, /usr/share/common-licenses/Apache-2.0, /usr/share/common-licenses/Artistic, + /usr/share/common-licenses/GPL-1, /usr/share/common-licenses/GPL-2, /usr/share/common-licenses/GPL-3, /usr/share/common-licenses/LGPL-2, @@ -9061,7 +9855,14 @@ END-INFO-DIR-ENTRY /usr/share/common-licenses/LGPL-3, /usr/share/common-licenses/GFDL-1.2, and /usr/share/common-licenses/GFDL-1.3 - respectively. + respectively. The University of California BSD license is + also included in base-files as + /usr/share/common-licenses/BSD, but given the + brevity of this license, its specificity to code whose + copyright is held by the Regents of the University of + California, and the frequency of minor wording changes, its + text should be included in the copyright file rather than + referencing this file.

rather than quoting them in the copyright file. @@ -9189,9 +9990,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.

@@ -9236,13 +10036,10 @@ END-INFO-DIR-ENTRY

- The Debian version of the FSF's GNU hello program is provided - as an example for people wishing to create Debian - packages. The Debian debmake package is - recommended as a very helpful tool in creating and maintaining - Debian packages. However, while the tools and examples are - helpful, they do not replace the need to read and follow the - Policy and Programmer's Manual.

+ The Debian version of the FSF's GNU hello program is provided as + an example for people wishing to create Debian packages. However, + while the examples are helpful, they do not replace the need to + read and follow the Policy and Programmer's Manual.

@@ -9316,7 +10113,7 @@ END-INFO-DIR-ENTRY

The DEBIAN directory will not appear in the file system archive of the package, and so won't be installed - by dpkg when the package is installed. + by dpkg when the package is unpacked.

@@ -9364,13 +10161,13 @@ END-INFO-DIR-ENTRY

It is possible to put other files in the package control - area, but this is not generally a good idea (though they - will largely be ignored). + information file area, but this is not generally a good idea + (though they will largely be ignored).

- Here is a brief list of the control info files supported by - dpkg and a summary of what they're used for. + Here is a brief list of the control information files supported + by dpkg and a summary of what they're used for.

@@ -9862,23 +10659,23 @@ END-INFO-DIR-ENTRY - The Debianised source tree + The Debian package source tree

The source archive scheme described later is intended to - allow a Debianised source tree with some associated control - information to be reproduced and transported easily. The - Debianised source tree is a version of the original program - with certain files added for the benefit of the - Debianisation process, and with any other changes required + allow a Debian package source tree with some associated + control information to be reproduced and transported easily. + The Debian package source tree is a version of the original + program with certain files added for the benefit of the + packaging process, and with any other changes required made to the rest of the source code and installation scripts.

The extra files created for Debian are in the subdirectory - debian of the top level of the Debianised source - tree. They are described below. + debian of the top level of the Debian package + source tree. They are described below.

@@ -9889,120 +10686,6 @@ END-INFO-DIR-ENTRY

- - - debian/changelog - -

- See . -

- - Defining alternative changelog formats - - -

- It is possible to use a different format to the standard - one, by providing a parser for the format you wish to - use. -

- -

- In order to have dpkg-parsechangelog run your - parser, you must include a line within the last 40 lines - of your file matching the Perl regular expression: - \schangelog-format:\s+([0-9a-z]+)\W The part in - parentheses should be the name of the format. For - example, you might say: - - @@@ changelog-format: joebloggs @@@ - - Changelog format names are non-empty strings of alphanumerics. -

- -

- If such a line exists then dpkg-parsechangelog - will look for the parser as - /usr/lib/dpkg/parsechangelog/format-name - or - /usr/local/lib/dpkg/parsechangelog/format-name; - it is an error for it not to find it, or for it not to - be an executable program. The default changelog format - is dpkg, and a parser for it is provided with - the dpkg package. -

- -

- The parser will be invoked with the changelog open on - standard input at the start of the file. It should read - the file (it may seek if it wishes) to determine the - information required and return the parsed information - to standard output in the form of a series of control - fields in the standard format. By default it should - return information about only the most recent version in - the changelog; it should accept a - -vversion option to return changes - information from all versions present strictly - after version, and it should then be an - error for version not to be present in the - changelog. -

- -

- The fields are: - - Source - Version (mandatory) - Distribution (mandatory) - Urgency (mandatory) - Maintainer (mandatory) - Date - Changes (mandatory) - -

- -

- If several versions are being returned (due to the use - of -v), the urgency value should be of the - highest urgency code listed at the start of any of the - versions requested followed by the concatenated - (space-separated) comments from all the versions - requested; the maintainer, version, distribution and - date should always be from the most recent version. -

- -

- For the format of the Changes field see - . -

- -

- If the changelog format which is being parsed always or - almost always leaves a blank line between individual - change notes these blank lines should be stripped out, - so as to make the resulting output compact. -

- -

- If the changelog format does not contain date or package - name information this information should be omitted from - the output. The parser should not attempt to synthesize - it or find it from other sources. -

- -

- If the changelog does not have the expected format the - parser should exit with a nonzero exit status, rather - than trying to muddle through and possibly generating - incorrect output. -

- -

- A changelog parser may not interact with the user at - all. -

-
-
- debian/substvars and variable substitutions @@ -10082,7 +10765,7 @@ END-INFO-DIR-ENTRY - Debianisation diff - + Debian package diff - package_upstream_version-revision.diff.gz @@ -10151,7 +10834,7 @@ END-INFO-DIR-ENTRY

Apply the diff using patch -p0.

Untar the tarfile again if you want a copy of the original - source code alongside the Debianised version.

+ source code alongside the Debian version.

@@ -10185,10 +10868,10 @@ END-INFO-DIR-ENTRY

The source packaging tools manage the changes between the - original and Debianised source using diff and + original and Debian source using diff and patch. Turning the original source tree as - included in the .orig.tar.gz into the debianised - source must not involve any changes which cannot be + included in the .orig.tar.gz into the Debian + package source must not involve any changes which cannot be handled by these tools. Problematic changes which cause dpkg-source to halt with an error when building the source package are: @@ -10355,7 +11038,7 @@ END-INFO-DIR-ENTRY Package_Revision The Debian revision part of the package version was - at one point in a separate control file field. This + at one point in a separate control field. This field went through several names. @@ -10412,7 +11095,7 @@ END-INFO-DIR-ENTRY

- A package may contain a control area file called + A package may contain a control information file called conffiles. This file should be a list of filenames of configuration files needing automatic handling, separated by newlines. The filenames should be absolute pathnames, @@ -10666,4 +11349,4 @@ END-INFO-DIR-ENTRY - +