]> git.donarmstrong.com Git - debian/debian-policy.git/blobdiff - policy.sgml
Merge branch 'master' into bug519941-rra
[debian/debian-policy.git] / policy.sgml
index b92be60864bcab12d9b28f96b05a25194762b7a9..7a0b088996e5562a67fb0349a31de7ec2f14080b 100644 (file)
          Copyright © 1996,1997,1998 Ian Jackson
          and Christian Schwarz.
        </copyrightsummary>
+       <p>
+         These are the copyright dates of the original Policy manual.
+         Since then, this manual has been updated by many others.  No
+         comprehensive collection of copyright notices for subsequent
+         work exists.
+       </p>
+
        <p>
          This manual is free software; you may redistribute it and/or
          modify it under the terms of the GNU General Public License
        <p>
          The Debian archive maintainers provide the authoritative
          list of sections.  At present, they are:
-         <em>admin</em>, <em>comm</em>,
-         <em>devel</em>, <em>doc</em>,
-         <em>editors</em>, <em>electronics</em>, <em>embedded</em>,
-         <em>games</em>, <em>gnome</em>, <em>graphics</em>,
-         <em>hamradio</em>, <em>interpreters</em>, <em>kde</em>,
-         <em>libs</em>, <em>libdevel</em>, <em>mail</em>,
-         <em>math</em>, <em>misc</em>, <em>net</em>, <em>news</em>,
-         <em>oldlibs</em>,
-         <em>otherosfs</em>, <em>perl</em>, <em>python</em>,
-         <em>science</em>, <em>shells</em>,
-         <em>sound</em>, <em>tex</em>, <em>text</em>,
-         <em>utils</em>, <em>web</em>, <em>x11</em>.
+         <em>admin</em>, <em>cli-mono</em>, <em>comm</em>, <em>database</em>,
+         <em>devel</em>, <em>debug</em>, <em>doc</em>, <em>editors</em>,
+         <em>electronics</em>, <em>embedded</em>, <em>fonts</em>,
+         <em>games</em>, <em>gnome</em>, <em>graphics</em>, <em>gnu-r</em>,
+         <em>gnustep</em>, <em>hamradio</em>, <em>haskell</em>,
+         <em>httpd</em>, <em>interpreters</em>, <em>java</em>, <em>kde</em>,
+         <em>kernel</em>, <em>libs</em>, <em>libdevel</em>, <em>lisp</em>,
+         <em>localization</em>, <em>mail</em>, <em>math</em>, <em>misc</em>,
+         <em>net</em>, <em>news</em>, <em>ocaml</em>, <em>oldlibs</em>,
+         <em>otherosfs</em>, <em>perl</em>, <em>php</em>, <em>python</em>,
+         <em>ruby</em>, <em>science</em>, <em>shells</em>, <em>sound</em>,
+         <em>tex</em>, <em>text</em>, <em>utils</em>, <em>vcs</em>,
+         <em>video</em>, <em>web</em>, <em>x11</em>, <em>xfce</em>,
+         <em>zope</em>.
        </p>
       </sect>
 
          <heading>Prompting in maintainer scripts</heading>
          <p>
            Package maintainer scripts may prompt the user if
-           necessary. Prompting should be done by communicating
+           necessary. Prompting must be done by communicating
            through a program, such as <prgn>debconf</prgn>, which
            conforms to the Debian Configuration Management
-           Specification, version 2 or higher.  Prompting the user by
-           other means, such as by hand<footnote>
-                From the Jargon file: by hand 2. By extension,
-                writing code which does something in an explicit or
-                low-level way for which a presupplied library
-                (<em>debconf, in this instance</em>) routine ought
-                to have been available.
-            </footnote>, is now deprecated.
+           Specification, version 2 or higher.
+         </p>
+
+         <p>
+           Packages which are essential, or which are dependencies of
+           essential packages, may fall back on another prompting method
+           if no such interface is available when they are executed.
          </p>
 
          <p>
            <item>
                <tt>DEB_*_ARCH</tt> (the Debian architecture)
            </item>
+           <item>
+               <tt>DEB_*_ARCH_CPU</tt> (the Debian CPU name)
+           </item>
+           <item>
+               <tt>DEB_*_ARCH_OS</tt> (the Debian System name)
+           </item>
            <item>
                <tt>DEB_*_GNU_TYPE</tt> (the GNU style architecture
                specification string)
          It is important to understand that the <tt>DEB_*_ARCH</tt>
          string only determines which Debian architecture we are
          building on or for. It should not be used to get the CPU
-         or system information; the GNU style variables should be
-         used for that.
+         or system information; the <tt>DEB_*_ARCH_CPU</tt> and
+         <tt>DEB_*_ARCH_OS</tt> variables should be used for that.
+         GNU style variables should generally only be used with upstream
+         build systems.
        </p>
 
        <sect1 id="debianrules-options">
@@ -2587,6 +2603,14 @@ Package: libc6
            package control file when the source package has the same
            name and version as the binary package.
          </p>
+
+         <p>
+           Package names must consist only of lower case letters
+           (<tt>a-z</tt>), digits (<tt>0-9</tt>), plus (<tt>+</tt>)
+           and minus (<tt>-</tt>) signs, and periods (<tt>.</tt>).
+           They must be at least two characters long and must start
+           with an alphanumeric character.
+         </p>
        </sect1>
 
        <sect1 id="f-Maintainer">
@@ -2701,7 +2725,7 @@ Package: libc6
            values:
            <list>
                <item>A unique single word identifying a Debian machine
-                     architecture, see <ref id="arch-spec">.
+                     architecture as described in <ref id="arch-spec">.
                <item><tt>all</tt>, which indicates an
                      architecture-independent package.
                <item><tt>any</tt>, which indicates a package available
@@ -2712,31 +2736,53 @@ Package: libc6
 
          <p>
            In the main <file>debian/control</file> file in the source
-           package, or in the source package control file
-           <file>.dsc</file>, one may specify a list of architectures
-           separated by spaces, or the special values <tt>any</tt> or
-           <tt>all</tt>.
+           package, this field may contain the special value
+           <tt>any</tt>, the special value <tt>all</tt>, or a list of
+           architectures separated by spaces.  If <tt>any</tt> or
+           <tt>all</tt> appear, they must be the entire contents of the
+           field.  Most packages will use either <tt>any</tt> or
+           <tt>all</tt>.  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.
+         </p>
+
+         <p>
+           In the source package control file <file>.dsc</file>, this
+           field may contain either the special value <tt>any</tt> or a
+           list of architectures separated by spaces. If a list is given,
+           it may include (or consist solely of) the special value
+           <tt>all</tt>.  In other words, in <file>.dsc</file> files
+           unlike the <file>debian/control</file>, <tt>all</tt> may occur
+           in combination with specific architectures.  The
+           <tt>Architecture</tt> field in the source package control file
+           <file>.dsc</file> is generally constructed from the
+           <tt>Architecture</tt> fields in the
+           <file>debian/control</file> in the source package.
          </p>
 
          <p>
            Specifying <tt>any</tt> 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 be specific to whatever the current build architecture
-           is.<footnote>
-               This is the most often used setting, and is recommended
-               for new packages that aren't <tt>Architecture: all</tt>.
-           </footnote>
+           will either be specific to whatever the current build
+           architecture is or will be architecture-independent.
+         </p>
+
+         <p>
+           Specifying only <tt>all</tt> indicates that the source package
+           will only build architecture-independent packages.  If this is
+           the case, <tt>all</tt> must be used rather than <tt>any</tt>;
+           <tt>any</tt> implies that the source package will build at
+           least one architecture-dependent package.
          </p>
 
          <p>
            Specifying a list of architectures indicates that the source
            will build an architecture-dependent package, and will only
-           work correctly on the listed architectures.<footnote>
-               This is a setting used for a minority of cases where the
-               program is not portable. Generally, it should not be used
-               for new packages.
-           </footnote>
+           work correctly on the listed architectures.  If the source
+           package also builds at least one architecture-independent
+           package, <tt>all</tt> will also be included in the list.
          </p>
 
          <p>
@@ -2744,7 +2790,11 @@ Package: libc6
            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 <tt>source</tt> is also present.
+           entry <tt>source</tt> is also present.  <tt>all</tt> will be
+           present if any architecture-independent packages are being
+           uploaded.  <tt>any</tt> may never occur in the
+           <tt>Architecture</tt> field in the <file>.changes</file>
+           file.
          </p>
 
          <p>
@@ -3075,7 +3125,7 @@ Package: libc6
            distribution(s) where this version of the package should
            be installed.  Valid distributions are determined by the
            archive maintainers.<footnote>
-             Current distribution names in the Debian archive used in
+             Example distribution names in the Debian archive used in
              <file>.changes</file> files are:
                <taglist compact="compact">
                  <tag><em>unstable</em></tag>
@@ -3096,43 +3146,13 @@ Package: libc6
                    try, but are not ready to be a part of the other parts
                    of the Debian distribution tree.
                  </item>
-
-                 <tag><em>stable-proposed-updates</em></tag>
-                 <item>
-                   Once a distribution of Debian GNU/Linux is released,
-                   it is declared <em>stable</em> and only security fixes
-                   and other major bug fixes are allowed.  Proposed
-                   non-security updates for <em>stable</em> are uploaded
-                   using this distribution value after getting approval
-                   from the stable release managers.
-                 </item>
-
-                 <tag><em>testing-proposed-updates</em></tag>
-                 <item>
-                   The <em>testing</em> distribution normally receives
-                   its packages via the <em>unstable</em> distribution
-                   after a short time lag.  However sometimes, such as
-                   during release freezes before a new stable release or
-                   when a problem in the <em>testing</em> distribution
-                   requires fixing before the <em>unstable</em> version
-                   can migrate, direct updates to a package in
-                   <em>testing</em> are useful.  This distribution value
-                   is used for those exceptions, after approval from the
-                   release managers.
-                 </item>
                </taglist>
 
                <p>
-                 Security fixes for the <em>stable</em> or
-                 <em>testing</em> distributions are handled via a
-                 separate upload queue and special
-                 <em>stable-security</em> and <em>testing-security<em>
-                 distribution values.
-               </p>
-
-               <p>
-                 More information is available in the Debian Developer's
-                 Reference, section "The Debian archive".
+                 Others are used for updating stable releases or for
+                 security uploads.  More information is available in the
+                 Debian Developer's Reference, section "The Debian
+                 archive".
                </p>
            </footnote>
            The Debian archive software only supports listing a single
@@ -3271,15 +3291,17 @@ Package: libc6
          <heading><tt>Installed-Size</tt></heading>
 
          <p>
-           This field appears in the control files of binary
-           packages, and in the <file>Packages</file> files.  It gives
-           the total amount of disk space required to install the
-           named package.
+           This field appears in the control files of binary packages,
+           and in the <file>Packages</file> files.  It gives an
+           estimation the total amount of disk space required to install
+           the named package.  Actual installed size may vary based on
+           block size, file system properties, or actions taken by
+           package maintainer scripts.
          </p>
 
          <p>
-           The disk space is represented in kilobytes as a simple
-           decimal number.
+           The disk space is given as the integer value of the estimated
+           installed size in bytes, divided by 1024 and rounded up.
          </p>
        </sect1>
 
@@ -4239,6 +4261,9 @@ Build-Depends: foo [!i386] | bar [!amd64]
           This is done using the <tt>Depends</tt>, <tt>Pre-Depends</tt>,
           <tt>Recommends</tt>, <tt>Suggests</tt>, <tt>Enhances</tt>,
           <tt>Breaks</tt> and <tt>Conflicts</tt> control file fields.
+          <tt>Breaks</tt> is described in <ref id="breaks">, and
+          <tt>Conflicts</tt> is described in <ref id="conflicts">.  The
+          rest are described below.
         </p>
 
        <p>
@@ -4426,12 +4451,6 @@ Build-Depends: foo [!i386] | bar [!amd64]
       <sect id="breaks">
        <heading>Packages which break other packages - <tt>Breaks</tt></heading>
 
-       <p>
-         Using <tt>Breaks</tt> may cause problems for upgrades from older
-         versions of Debian and should not be used until the stable
-         release of Debian supports <tt>Breaks</tt>.
-       </p>
-
        <p>
          When one binary package declares that it breaks another,
          <prgn>dpkg</prgn> will refuse to allow the package which
@@ -4516,8 +4535,7 @@ Build-Depends: foo [!i386] | bar [!amd64]
          <prgn>dpkg</prgn> 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,
-         <tt>Breaks</tt> may be used (once <tt>Breaks</tt> is supported
-         by the stable release of Debian).
+         <tt>Breaks</tt> may be used.
        </p>
       </sect>
 
@@ -5518,23 +5536,16 @@ libbar 1 bar1 (>= 1.0-1)
 
 
        <sect1 id="fhs">
-         <heading>File system Structure</heading>
+         <heading>File System Structure</heading>
 
          <p>
            The location of all installed files and directories must
-           comply with the File system Hierarchy Standard (FHS),
+           comply with the Filesystem Hierarchy Standard (FHS),
            version 2.3, with the exceptions noted below, and except
            where doing so would violate other terms of Debian
            Policy.  The following exceptions to the FHS apply:
 
             <enumlist>
-              <item>
-                <p>
-                  Legacy XFree86 servers are permitted to retain the
-                  configuration file location 
-                  <file>/etc/X11/XF86Config-4</file>.
-                </p>
-              </item>
               <item>
                 <p>
                   The optional rules related to user specific
@@ -5696,12 +5707,6 @@ rmdir /usr/local/share/emacs 2>/dev/null || true
            by any particular mail agents.  The use of the old
            location <file>/var/spool/mail</file> is deprecated, even
            though the spool may still be physically located there.
-           To maintain partial upgrade compatibility for systems
-           which have <file>/var/spool/mail</file> as their physical mail
-           spool, packages using <file>/var/mail</file> must depend on
-           either <package>libc6</package> (&gt;= 2.1.3-13), or on
-           <package>base-files</package> (&gt;= 2.2.0), or on later
-           versions of either one of these packages.
          </p>
        </sect1>
       </sect>
@@ -6977,17 +6982,6 @@ strip --strip-unneeded <var>your-lib</var>
          </footnote>
        </p>
 
-       <p>
-         Packages containing shared libraries that may be linked to
-         by other packages' binaries, but which for some
-         <em>compelling</em> reason can not be installed in
-         <file>/usr/lib</file> directory, may install the shared library
-         files in subdirectories of the <file>/usr/lib</file> directory,
-         in which case they should arrange to add that directory in
-         <file>/etc/ld.so.conf</file> in the package's post-installation
-         script, and remove it in the package's post-removal script.
-       </p>
-
        <p>
          An ever increasing number of packages are using
          <prgn>libtool</prgn> to do their linking.  The latest GNU
@@ -8418,11 +8412,6 @@ name ["<var>syshostname</var>"]:
                  </list>
              </item>
 
-             <item>
-                 Speedo fonts must be placed in
-                 <file>/usr/share/fonts/X11/Speedo/</file>.
-             </item>
-
              <item>
                  Type 1 fonts must be placed in
                  <file>/usr/share/fonts/X11/Type1/</file>.  If font
@@ -8434,9 +8423,9 @@ name ["<var>syshostname</var>"]:
                  Subdirectories of <file>/usr/share/fonts/X11/</file>
                  other than those listed above must be neither
                  created nor used.  (The <file>PEX</file>, <file>CID</file>,
-                 and <file>cyrillic</file> directories are excepted for
-                 historical reasons, but installation of files into
-                 these directories remains discouraged.)
+                 <file>Speedo</file>, and <file>cyrillic</file> directories
+                 are excepted for historical reasons, but installation of
+                 files into these directories remains discouraged.)
              </item>
 
              <item>
@@ -9041,8 +9030,8 @@ install-info --quiet --remove /usr/share/info/foobar.info
        <p>
          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 (version 1.2) should refer to the corresponding
+         (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 <file>/usr/share/common-licenses</file>,<footnote>
            <p>
              In particular,
@@ -9053,8 +9042,9 @@ install-info --quiet --remove /usr/share/info/foobar.info
               <file>/usr/share/common-licenses/GPL-3</file>,
               <file>/usr/share/common-licenses/LGPL-2</file>,
               <file>/usr/share/common-licenses/LGPL-2.1</file>,
-              <file>/usr/share/common-licenses/LGPL-3</file>, and
-              <file>/usr/share/common-licenses/GFDL-1.2</file>
+              <file>/usr/share/common-licenses/LGPL-3</file>,
+              <file>/usr/share/common-licenses/GFDL-1.2</file>, and
+              <file>/usr/share/common-licenses/GFDL-1.3</file>
               respectively.
             </p>
           </footnote> rather than quoting them in the copyright