]> git.donarmstrong.com Git - debian/debian-policy.git/blobdiff - policy.sgml
Field names may not contain spaces
[debian/debian-policy.git] / policy.sgml
index 78c39053986e5758f036b0017680d84e862ce274..465a1293b8b03dfe74e046d8dcb74c0af3ef2292 100644 (file)
          <tt><url name="/doc/developers-reference/"
                id="http://www.debian.org/doc/developers-reference/"></tt>.
        </p>
+
+       <p>
+         Finally, a <qref id="copyrightformat">specification for
+         machine-readable copyright files</qref> is maintained as part of
+         the <package>debian-policy</package> package using the same
+         procedure as the other policy documents.  Use of this format is
+         optional.
+       </p>
       </sect>
 
       <sect id="definitions">
              <item>
                  must not require or recommend a package outside
                  of <em>main</em> for compilation or execution (thus, the
-                 package must not declare a "Depends", "Recommends", or
-                 "Build-Depends" relationship on a non-<em>main</em>
-                 package),
+                 package must not declare a "Pre-Depends", "Depends",
+                 "Recommends", "Build-Depends", or "Build-Depends-Indep"
+                 relationship on a non-<em>main</em> package),
              </item>
              <item>
                  must not be so buggy that we refuse to support them,
@@ -2491,18 +2499,21 @@ endif
        </p>
 
        <p>
-         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.  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
-         be:
+         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.  The field name is
+         composed of US-ASCII characters excluding control characters,
+         space, and colon (i.e., characters in the ranges 33-57 and
+         59-126, inclusive).  Field names must not begin with the comment
+         character, <tt>#</tt>.
+       </p>
+
+       <p>
+         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 be:
          <example compact="compact">
 Package: libc6
          </example>
@@ -2696,7 +2707,7 @@ Package: libc6
        <p>
          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 <ref id="pkg-controlfields">.
+         Their syntax is described above, in <ref id="controlsyntax">.
 
        <list compact="compact">
          <item><qref id="f-Format"><tt>Format</tt></qref> (mandatory)</item>
@@ -4628,7 +4639,7 @@ Depends: libc6 (>= 2.2.1), exim | mail-transport-agent
          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 list of Debian architecture names
+         The brackets enclose a non-empty list of Debian architecture names
          in the format described in <ref id="arch-spec">,
          separated by whitespace.  Exclamation marks may be prepended to
          each of the names.  (It is not permitted for some names to be
@@ -6161,11 +6172,11 @@ install -m644 debian/shlibs.<var>package</var> debian/<var>package</var>/DEBIAN/
          <heading>File System Structure</heading>
 
          <p>
-           The location of all installed files and directories must
-           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:
+           The location of all files and directories must 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>
@@ -6266,13 +6277,13 @@ install -m644 debian/shlibs.<var>package</var> debian/<var>package</var>/DEBIAN/
                </p>
              </item>
               <item>
-               <p>
-                 The following directories in the root filesystem are
-                 additionally allowed: <file>/sys</file> and
-                 <file>/selinux</file>. <footnote>These directories
-                 are used as mount points to mount virtual filesystems
-                 to get access to kernel information.</footnote>
-               </p>
+                <p>
+                  The following directories in the root filesystem are
+                  additionally allowed: <file>/sys</file> and
+                  <file>/selinux</file>. <footnote>These directories
+                  are used as mount points to mount virtual filesystems
+                  to get access to kernel information.</footnote>
+                </p>
               </item>
              <item>
                <p>
@@ -6424,16 +6435,10 @@ rmdir /usr/local/share/emacs 2>/dev/null || true
 
          <p>
            Packages must not include files or directories
-           under <file>/run</file>, or under the <file>/var/run</file>
-           or <file>/var/lock</file> paths that are replaced with
-           symlinks or bind mounts to <file>/run</file> for backwards
-           compatibility.
-         </p>
-
-         <p>
-           Packages should use <file>/run</file> in preference
-           to <file>/var/run</file> and <file>/run/lock</file> in
-           preference to <file>/var/lock</file>.
+           under <file>/run</file>, or under the
+           older <file>/var/run</file> and <file>/var/lock</file> paths.
+           The latter paths will normally be symlinks or other
+           redirections to <file>/run</file> for backwards compatibility.
          </p>
        </sect1>
       </sect>
@@ -7966,10 +7971,12 @@ fname () {
        <p>
          You may wish to restrict your script to SUSv3 features plus the
          above set when possible so that it may use <file>/bin/sh</file>
-         as its interpreter. If your script works with <prgn>dash</prgn>
-         (originally called <prgn>ash</prgn>), it probably complies with
-         the above requirements, but if you are in doubt, use
-         <file>/bin/bash</file>.
+         as its interpreter.  Checking your script
+         with <prgn>checkbashisms</prgn> from
+         the <package>devscripts</package> package or running your script
+         with <prgn>posh</prgn> may help uncover violations of the above
+         requirements.  If in doubt whether a script complies with these
+         requirements, use <file>/bin/bash</file>.
        </p>
 
        <p>
@@ -9919,7 +9926,27 @@ END-INFO-DIR-ENTRY
          You should not use the copyright file as a general <file>README</file>
          file.  If your package has such a file it should be
          installed in <file>/usr/share/doc/<var>package</var>/README</file> or
-         <file>README.Debian</file> or some other appropriate place.</p>
+         <file>README.Debian</file> or some other appropriate place.
+       </p>
+
+       <sect1 id="copyrightformat">
+         <heading>Machine-readable copyright information</heading>
+
+         <p>
+           A specification for a standard, machine-readable format
+           for <file>debian/copyright</file> files is maintained as part
+           of the <package>debian-policy</package> package.  This
+           document may be found in the <file>copyright-format</file>
+           files in the <package>debian-policy</package> package.  It is
+           also available from the Debian web mirrors at
+           <tt><url name="/doc/packaging-manuals/copyright-format/1.0/"
+                    id="http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/"></tt>.
+         </p>
+
+         <p>
+           Use of this format is optional.
+         </p>
+       </sect1>
       </sect>
 
       <sect>
@@ -11375,7 +11402,7 @@ END-INFO-DIR-ENTRY
      dpkg-divert --package smailwrapper --remove --rename \
         --divert /usr/sbin/smail.real /usr/sbin/smail
   fi
-       </example> where <tt>1.02-2</tt> is the version at which the
+       </example> where <tt>1.0-2</tt> is the version at which the
        diversion was first added to the package.  The postrm should not
        remove the diversion on upgrades both because there's no reason to
        remove the diversion only to immediately re-add it and since the