]> git.donarmstrong.com Git - debian/debian-policy.git/blobdiff - policy.sgml
Clarification of the Format field in control files -- patch for #547272.
[debian/debian-policy.git] / policy.sgml
index bda2771a5871ee4f9796f65018e1b641945748e9..74f94e8c4665de20ad3cd09454f50943c70791b7 100644 (file)
                The <tt>build</tt> 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
@@ -2534,6 +2534,11 @@ Package: libc6
          (and version-dependent) information about a binary package.
        </p>
 
+       <p>
+         The structure of the Debian changes files is versionned, and
+         this document describes the format 1.8.
+       </p>
+
        <p>
          The fields in this file are:
 
@@ -2615,10 +2620,10 @@ Package: libc6
            <item><qref id="f-Version"><tt>Version</tt></qref> (mandatory)</item>
            <item><qref id="f-Distribution"><tt>Distribution</tt></qref> (mandatory)</item>
            <item><qref id="f-Urgency"><tt>Urgency</tt></qref> (recommended)</item>
-           <item><qref id="f-Maintainer"><tt>Maintainer</tt></qref> (mandatory)</item>
-           <item><qref id="f-Changed-By"><tt>Changed-By</tt></qref></item>
+           <item><qref id="f-Maintainer"><tt>Maintainer</tt></qref> (mandatory) <footnote>The meaning of that field changed in version 1.7.</footnote></item>
+           <item><qref id="f-Changed-By"><tt>Changed-By</tt></qref> <footnote>Introduced in format 1.7.</footnote></item>
            <item><qref id="f-Description"><tt>Description</tt></qref> (mandatory)</item>
-           <item><qref id="f-Closes"><tt>Closes</tt></qref></item>
+           <item><qref id="f-Closes"><tt>Closes</tt></qref> <footnote>Introduced in format 1.6.</footnote></item>
            <item><qref id="f-Changes"><tt>Changes</tt></qref> (mandatory)</item>
            <item><qref id="f-Checksums"><tt>Checksums-Sha1</tt>
                and <tt>Checksums-Sha256</tt></qref> (recommended)</item>
@@ -3027,9 +3032,10 @@ Package: libc6
                  It is optional; if it isn't present then the
                  <var>upstream_version</var> 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.
                </p>
 
                <p>
@@ -3258,13 +3264,25 @@ Package: libc6
          <heading><tt>Format</tt></heading>
 
          <p>
-           This field specifies a format revision for the file.
-           The most current format described in the Policy Manual
-           is version <strong>1.5</strong>.  The syntax of the
+           In <qref id="debianchangesfiles">changes</qref> files, this field
+           specifies a format revision for the file. 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 <ref id="f-Version">.
          </p>
+
+         <p>
+           In <qref id="debiansourcecontrolfiles"> Debian source control</qref>
+           files, this field specifies a format revision for the source package.
+           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
+           and that it can optionally be followed by a parenthesis with a name
+           <footnote>dpkg-source uses the major number and the content of the
+           parenthesis to decide which perl module to use to build or unpack
+           the source package. For instance, Dpkg::Source::Package::V1 for format
+           1.0 and Dpkg::Source::Package::V3::quilt for format 3.0 (quilt)
+           </footnote>.
+         <p>
        </sect1>
 
        <sect1 id="f-Urgency">
@@ -3525,6 +3543,26 @@ Checksums-Sha256:
          </p>
        </sect1>
 
+       <sect1 id="f-Checksums-Sha1">
+         <heading><tt>Checksums-Sha1</tt></heading>
+
+         <p>
+           This field is similar to the <qref id="f-Files">Files</qref>
+           field, except that it uses the Sha1 algorithm instead of MD5
+           for the checksums.
+         </p>
+       </sect1>
+
+       <sect1 id="f-Checksums-Sha256">
+         <heading><tt>Checksums-Sha256</tt></heading>
+
+         <p>
+           This field is similar to the <qref id="f-Files">Files</qref>
+           field, except that it uses the Sha1 algorithm instead of MD5
+           for the checksums.
+         </p>
+       </sect1>
+
       </sect>
 
       <sect>
@@ -4644,9 +4682,9 @@ Build-Depends: foo [linux-any], bar [any-i386], baz [!linux-any]
          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
-         broken package.  This use of <tt>Breaks</tt> will inform
-         higher-level package management tools that the broken package
-         must be upgraded before the new one.
+         package named in <tt>Breaks</tt>.  This use of <tt>Breaks</tt>
+         will inform higher-level package management tools that the
+         broken package must be upgraded before the new one.
        </p>
 
        <p>
@@ -4729,9 +4767,7 @@ Build-Depends: foo [linux-any], bar [any-i386], baz [!linux-any]
          <tt>Conflicts</tt> should be used
          <list>
            <item>when two packages provide the same file and will
-             continue to do so (but be aware that this is often an error
-             that should be fixed rather than using <tt>Conflicts</tt> --
-             see, for example, <ref id="binaries">),</item>
+             continue to do so,</item>
            <item>in conjunction with <tt>Provides</tt> when only one
              package providing a given virtual facility may be installed
              at a time (see <ref id="virtual">),</item>
@@ -4741,6 +4777,11 @@ Build-Depends: foo [linux-any], bar [any-i386], baz [!linux-any]
              that must prevent both packages from being unpacked at the
              same time, not just configured.</item>
          </list>
+         Be aware that adding <tt>Conflicts</tt> 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, <ref id="binaries">.
        </p>
 
        <p>
@@ -4806,13 +4847,12 @@ Provides: bar
          breakage).  In other words, if a version number is specified,
          this is a request to ignore all <tt>Provides</tt> for that
          package name and consider only real packages.  The package
-         manager will assume that a package which package which provides
-         that virtual package is not of the "right" version.
-         A <tt>Provides</tt> 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.<footnote>
+         manager will assume that a package providing that virtual
+         package is not of the "right" version.  A <tt>Provides</tt>
+         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.<footnote>
            It is possible that a future release of <prgn>dpkg</prgn> may
            add the ability to specify a version number for each virtual
            package it provides.  This feature is not yet present,
@@ -4862,10 +4902,10 @@ Provides: bar
            package and will be taken over by the new package.
            Normally, <tt>Breaks</tt> should be used in conjunction
            with <tt>Replaces</tt>.<footnote>
-             To see why <tt>Breaks</tt> is required in addition
-             to <tt>Provides</tt>, consider the
-             case of a file in the package <package>foo</package> being
-             taken over by the package <package>foo-data</package>.
+             To see why <tt>Breaks</tt> is normally needed in addition
+             to <tt>Replaces</tt>, consider the case of a file in the
+             package <package>foo</package> being taken over by the
+             package <package>foo-data</package>.
              <tt>Replaces</tt> will allow <package>foo-data</package> to
              be installed and take over that file.  However,
              without <tt>Breaks</tt>, nothing
@@ -4889,10 +4929,10 @@ Provides: bar
            <example compact="compact">
 Replaces: foo (&lt;&lt; 1.2-3)
 Breaks: foo (&lt;&lt; 1.2-3)
-           </example compact="compact">
+           </example>
            in its control file.  The new version of the
            package <package>foo</package> would normally have the field
-           <example>
+           <example compact="compact">
 Depends: foo-data (&gt;= 1.2-3)
            </example>
            (or possibly <tt>Recommends</tt> or even <tt>Suggests</tt> if
@@ -10201,23 +10241,23 @@ END-INFO-DIR-ENTRY
       </sect>
 
       <sect id="pkg-sourcetree">
-       <heading>The Debianised source tree</heading>
+       <heading>The Debian package source tree</heading>
 
        <p>
          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.
        </p>
 
        <p>
          The extra files created for Debian are in the subdirectory
-         <file>debian</file> of the top level of the Debianised source
-         tree.  They are described below.
+         <file>debian</file> of the top level of the Debian package
+         source tree. They are described below.
        </p>
 
        <sect1 id="pkg-debianrules">
@@ -10307,7 +10347,7 @@ END-INFO-DIR-ENTRY
            </item>
 
            <tag>
-             Debianisation diff -
+             Debian package diff -
              <file>
                <var>package</var>_<var>upstream_version-revision</var>.diff.gz
              </file>
@@ -10376,7 +10416,7 @@ END-INFO-DIR-ENTRY
          <item><p>Apply the diff using <tt>patch -p0</tt>.</p>
          </item>
          <item><p>Untar the tarfile again if you want a copy of the original
-             source code alongside the Debianised version.</p>
+             source code alongside the Debian version.</p>
          </item>
        </enumlist>
 
@@ -10410,10 +10450,10 @@ END-INFO-DIR-ENTRY
 
          <p>
            The source packaging tools manage the changes between the
-           original and Debianised source using <prgn>diff</prgn> and
+           original and Debian source using <prgn>diff</prgn> and
            <prgn>patch</prgn>.  Turning the original source tree as
-           included in the <file>.orig.tar.gz</file> into the debianised
-           source must not involve any changes which cannot be
+           included in the <file>.orig.tar.gz</file> into the Debian
+           package source must not involve any changes which cannot be
            handled by these tools.  Problematic changes which cause
            <prgn>dpkg-source</prgn> to halt with an error when
            building the source package are: