]> git.donarmstrong.com Git - debian/debian-policy.git/blobdiff - packaging.sgml
Julian's versions
[debian/debian-policy.git] / packaging.sgml
index c7d0153e9bbd3fa4c9738963c62dce493f5f4f72..00a4cb97f8df3035df6c53173e0353c5462f21f3 100644 (file)
                  (classification, mandatory)
                </p>
              </item>
+               <item>
+                 <p>
+                   <qref id="relationships"><tt>Build-Depends</tt> et
+                     al.</qref> (source package interrelationships)
+                 </p>
+               </item>
              <item>
                <p>
                  <qref id="f-Standards-Version"><tt>Standards-Version</tt></qref>
              <item>
                <p>
                  <qref id="relationships"><tt>Depends</tt> et
-                 al.</qref> (package interrelationships)
+                  al.</qref> (binary package interrelationships)
                </p>
              </item>
            </list>
                  <item>
                    <p><qref id="f-Architecture"><tt>Architecture</tt></qref></p>
                  </item>
+                  <item>
+                     <p>
+                       <qref id="relationships"><tt>Build-Depends</tt> et
+                         al.</qref> (source package interrelationships)
+                     </p>
+                  </item>
                  <item>
                    <p>
                      <qref id="f-Standards-Version"><tt>Standards-Version</tt></qref></p>
 
        <p>       
          Field names are not case-sensitive, but it is usual to
-         capitalise the fields using mixed case as shown below.
+         capitalise the field names using mixed case as shown below.
        </p>
 
        <p>       
            <footnote>
              <p>
                The characters <tt>@</tt> <tt>:</tt> <tt>=</tt>
-               <tt>t</tt>t> <tt>_</tt> (at, colon, equals, percent
+               <tt>%</tt> <tt>_</tt> (at, colon, equals, percent
                and underscore) used to be legal and are still
                accepted when found in a package file, but may not be
                used in new packages
                been <em>frozen</em> for a month of testing.  Once the
                distribution is <em>stable</em> only major bug fixes
                are allowed. When changes are made to this
-               distribution, the minor version number is increased
-               (for example: 1.2 becomes 1.2.1 then 1.2.2, etc).
+               distribution, the release number is increased
+               (for example: 1.2r1 becomes 1.2r2 then 1.2r3, etc).
              </p>
            </item>
                
 
            <p>       
              The <var>upstream-version</var> may contain only
-             alphanumerics and the characters <tt>+</tt> <tt>.</tt>
+             alphanumerics and the characters <tt>.</tt> <tt>+</tt>
              <tt>-</tt> <tt>:</tt> (full stop, plus, hyphen, colon)
              and should start with a digit.  If there is no
              <var>debian-revision</var> then hyphens are not allowed;
        <tt>dpkg --compare-versions ...</tt>. Type <tt>dpkg
        --help</tt> --> --for details on arguments.
       </p>
+
+      <sect>
+       <heading>Version numbers based on dates</heading>
+       <p>
+         In general, Debian packages should use the same version
+         numbers as the upstream sources.</p>
+
+       <p>
+         However, in some cases where the upstream version number is
+         based on a date (e.g., a development `snapshot' release)
+         dpkg cannot handle these version numbers currently, without
+         epochs. For example, dpkg will consider `96May01' to be
+         greater than `96Dec24'.</p>
+
+       <p>
+         To prevent having to use epochs for every new upstream
+         version, the version number should be changed to the
+         following format in such cases: `19960501', `19961224'. It
+         is up to the maintainer whether he/she wants to bother the
+         upstream maintainer to change the version numbers upstream,
+         too.</p>
+
+       <p>
+         Note, that other version formats based on dates which are
+         parsed correctly by dpkg should <em>not</em> be changed.</p>
+
+       <p>
+         Native Debian packages (i.e., packages which have been
+         written especially for Debian) whose version numbers include
+         dates should always use the `YYYYMMDD' format.</p>
+      </sect>
     </chapt>
       
     <chapt id="maintainerscripts"><heading>Package maintainer scripts
            <item>
              <p>
                <var>disappearer's-postrm</var> <tt>disappear</tt>
-               <var>r>overwrit</var>r>
-               <var>new-version</var></p></item>
+               <var>overwriter</var>
+               <var>overwriter-version</var></p></item>
          </list>
        </p>
        
        <tt>Replaces</tt> control file fields.
       </p>
 
+      <p>
+        Source packages may declare relationships to binary packages,
+        saying that they require certain binary packages being
+        installed or absent at the time of building the package.
+      </p>
+        
+      <p>
+        This is done using the <tt>Build-Depends</tt>,
+        <tt>Build-Depends-Indep</tt>, <tt>Build-Conflicts</tt>, and
+        <tt>Build-Conflicts-Indep</tt> control file fields.
+      </p>
+
       <sect id="depsyntax"><heading>Syntax of relationship fields
        </heading>
 
          package names separated by commas.
        </p>
 
-       <p>       
-         In <tt>Depends</tt>, <tt>Recommends</tt>, <tt>Suggests</tt>
-         and <tt>Pre-Depends</tt> (the fields which declare
-         dependencies of the package in which they occur on other
-         packages) these package names may also be lists of
-         alternative package names, separated by vertical bar symbols
-         <tt>|</tt> (pipe symbols).
+        <p>
+          In <tt>Depends</tt>, <tt>Recommends</tt>, <tt>Suggests</tt>,
+          <tt>Pre-Depends</tt>, <tt>Build-Depends</tt> and
+          <tt>Build-Depends-Indep</tt>(the fields which declare
+          dependencies of the package in which they occur on other
+          packages) these package names may also be lists of
+          alternative package names, separated by vertical bar symbols
+          <tt>|</tt> (pipe symbols).
        </p>
 
        <p>       
   Depends: libc5 (>= 5.2.18-4), mime-support, csh | tcsh
          </example>
        </p>
+        <p>
+          All fields that specify build-time relationships
+         (<tt>Build-Depends</tt>, <tt>Build-Depends-Indep</tt>,
+         <tt>Build-Conflicts</tt> and <tt>Build-Conflicts-Indep</tt>)
+         may be restricted to a certain set of architectures.  This
+         is done in brackets after each individual package name and
+         the optional version specification.  The brackets enclose a
+         list of Debian architecture names separated by whitespace.
+         An exclamation mark may be prepended to each name. If the
+         current Debian host architecture is not in this list and
+         there are no exclamation marks in the list, or it is in the
+         list with a prepended exclamation mark, the package name and
+         the associated version specification are ignored completely
+         for the purposes of defining the relationships.
+         </p>
+         <p>
+           For example:
+           <example>
+   Source: glibc
+   Build-Depends-Indep: texinfo
+   Build-Depends: kernel-headers-2.2.10 [!hurd-i386],
+                  hurd-dev [hurd-i386], gnumach-dev [hurd-i386]
+           </example>
+         </p> 
       </sect>
-
-      <sect><heading>Dependencies - <tt>Depends</tt>, <tt>Recommends</tt>,
-         <tt>Suggests</tt>, <tt>Pre-Depends</tt>
+  
+      <sect>
+        <heading>Binary Dependencies - <tt>Depends</tt>,
+          <tt>Recommends</tt>, <tt>Suggests</tt>, <tt>Pre-Depends</tt>
        </heading>
 
        <p>       
        </p>
       </sect1>
 
-      <sect id="conflicts"><heading>Alternative packages -
+      <sect id="conflicts"><heading>Alternative binary packages -
          <tt>Conflicts</tt> and <tt>Replaces</tt>
        </heading>
 
        <p>       
-         When one package declares a conflict with another
+          When one binary package declares a conflict with another
          <prgn>dpkg</prgn> will refuse to allow them to be installed
          on the system at the same time.
        </p>
       <sect id="virtual"><heading>Virtual packages - <tt>Provides</tt>
        </heading>
 
-       <p>       
-         As well as the names of actual (`concrete') packages, the
-         package relationship fields <tt>Depends</tt>,
-         <tt>Recommends</tt>, <tt>Suggests</tt> and
-         <tt>Conflicts</tt> may mention virtual packages.
+        <p> 
+           As well as the names of actual (`concrete') packages, the
+           package relationship fields <tt>Depends</tt>,
+           <tt>Build-Depends</tt>, <tt>Build-Depends-Indep</tt>,
+           <tt>Recommends</tt>, <tt>Suggests</tt>, <tt>Conflicts</tt>,
+           <tt>Build-Conflicts</tt> and <tt>Build-Conflicts-Indep</tt> may
+           mention virtual packages.
        </p>
 
        <p>       
          lightweight standalone info browser.
        </p>
       </sect>
-    </chapt>
       
+  
+      <sect><heading>Relationships between source and binary packages -
+              <tt>Build-Depends</tt>, <tt>Build-Depends-Indep</tt>,
+              <tt>Build-Conflicts</tt>, <tt>Build-Conflicts-Indep</tt>
+           </heading>
+
+        <p>
+          A source package may declare a dependency or a conflict on a
+          binary package.  This is done with the control file fields
+          <tt>Build-Depends</tt>, <tt>Build-Depends-Indep</tt>,
+          <tt>Build-Conflicts</tt>, and <tt>Build-Conflicts-Indep</tt>.  Their
+          semantics is that the dependencies and conflicts they define
+          must be satisfied (as defined earlier for binary packages),
+          when one of the targets in <tt>debian/rules</tt> that the
+          particular field applies to is invoked.
+
+        <taglist>
+          <tag><tt>Build-Depends</tt>, <tt>Build-Conflicts</tt></tag>
+          <item>
+            <p>
+              The <tt>Build-Depends</tt> and <tt>Build-Conflicts</tt> fields apply
+              to the targets
+              <tt>build</tt>, <tt>binary</tt>, <tt>binary-arch</tt>
+              and <tt>binary-indep</tt>.
+            </p>
+          </item>
+          <tag><tt>Build-Depends-Indep</tt>, <tt>Build-Conflicts-Indep</tt></tag>
+          <item>
+            <p>
+              The <tt>Build-Depends-Indep</tt> and
+              <tt>Build-Conflicts-Indep</tt> fields apply to the
+              targets <tt>binary</tt> and <tt>binary-indep</tt>.
+            </p>
+          </item>
+        </taglist>
+
+      </p>
+
+    </sect>
+
+
+   </chapt>
     <chapt id="conffiles"><heading>Configuration file handling
       </heading>
 
        properly is to install the library in the appropriate
        <tt>debian/tmp/.../lib</tt> directory before creating the
        symlink, by putting the commands in the <tt>debian/rules</tt>
-       in the appropriate order.
+       in the appropriate order.  Whether this has been done
+       correctly can be checked by performing an <tt>ls -f</tt>.
       </p>
 
        <!--
          <p>       
            This file is intended only as a <em>temporary</em> fix if
            your binaries depend on a library which doesn't provide
-           its own <tt>/var/lib/dpkg/*.shlibs</tt> file yet.
+           its own <tt>/var/lib/dpkg/info/*.shlibs</tt> file yet.
          </p>
 
          <p>