<name>Maintainer: Manoj Srivastava </name>
<email>srivasta@debian.org</email>
</author>
+ <author>
+ <name>Maintainer: Julian Gilbey </name>
+ <email>J.D.Gilbey@qmw.ac.uk</email>
+ </author>
<author>
<name>Maintainer: The Debian Policy group </name>
<email>debian-policy@lists.debian.org</email>
<abstract>
This manual describes the technical aspects of creating Debian
- binary and source packages. It also documents the interface
- between <prgn>dselect</prgn> and its access method scripts.
- It does not deal with the Debian Project policy requirements,
- and it assumes familiarity with <prgn>dpkg</prgn>'s functions
- from the system administrator's perspective. This
- package itself is maintained by a group of maintainers
- that have no editorial powers. At the moment, the list of
- maintainers is:
+ binary and source packages. It does not deal with the Debian
+ Project policy requirements, and it assumes familiarity with
+ <prgn>dpkg</prgn>'s functions from the system administrator's
+ perspective. This package itself is maintained by a group of
+ maintainers that have no editorial powers. At the moment, the
+ list of maintainers is:
<enumlist>
<item>
<p>Michael Alan Dorman <email>mdorman@debian.org</email></p>
<item>
<p>Philip Hands <email>phil@hands.com</email></p>
</item>
+ <item>
+ <p>Julian Gilbey <email>J.D.Gilbey@qmw.ac.uk</email></p>
+ </item>
<item>
<p>Manoj Srivastava <email>srivasta@debian.org</email></p>
</item>
</footnote>
</p>
</sect>
-
+ </chapt>
+
<chapt id="sourcepkg">
<heading>Source packages</heading>
</p>
<p>
- Its arguments are executables
+ Its arguments are executables and libraries
<footnote>
<p>
They may be specified either in the locations in the
</p>
<p>
- If some of the executable(s) shared libraries should only
+ If some of the found shared libraries should only
warrant a <tt>Recommends</tt> or <tt>Suggests</tt>, or if
some warrant a <tt>Pre-Depends</tt>, this can be achieved
by using the <tt>-d<var>dependency-field</var></tt> option
(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
the value from a <tt>.deb</tt> file if they have no other
information; a value listed in a <tt>Packages</tt> file
will always take precedence. By default
- <prgn>dpkg-genchanges</prgn> does not include the section
+ <prgn>dpkg-gencontrol</prgn> does not include the section
and priority in the control file of a binary package - use
the <tt>-isp</tt>, <tt>-is</tt> or <tt>-ip</tt> options to
achieve this effect.</p>
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;
<p>
If you need to compare version numbers in a script, you may use
<tt>dpkg --compare-versions ...</tt>. Type <tt>dpkg
- --help</tt> --> --for details on arguments.
+ --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>
<footnote>
<p>
Part of the problem is due to what is arguably a
- bug in <prgn>dpkg</prgn> .
+ bug in <prgn>dpkg</prgn>.
</p>
</footnote>
</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>
This is used to declare that one package may be more
useful with one or more others. Using this field
tells the packaging system and the user that the
- listed packages are be related to this one and can
+ listed packages are related to this one and can
perhaps enhance its usefulness, but that installing
this one without them is perfectly reasonable.
</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>
<p>
- If one package is to be installed, the other must be removed first -
- if the package being installed is marked as replacing (<ref
- id="replaces">) the one on the system, or the one on the system is
- marked as deselected, or both packages are marked
- <tt>Essential</tt>, then <prgn>dpkg</prgn> will
- automatically remove the package which is causing the
- conflict, otherwise it will halt the installation of the new
- package with an error.
+ If one package is to be installed, the other must be removed
+ first - if the package being installed is marked as
+ replacing (<ref id="replaces">) the one on the system, or
+ the one on the system is marked as deselected, or both
+ packages are marked <tt>Essential</tt>, then
+ <prgn>dpkg</prgn> 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 specifically doesn't work when the installed
+ package is <tt>Essential</tt>, but the new package is not.
</p>
<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>
supposing that a <prgn>smailwrapper</prgn> package wishes to
install a wrapper around <tt>/usr/sbin/smail</tt>:
<example>
- if [ install = "$1" ]; then
+ if [ install = "$1" -o upgrade = "$1" ]; then
dpkg-divert --package smailwrapper --add --rename \
--divert /usr/sbin/smail.real /usr/sbin/smail
fi
<tt>libgdbm.so.1.7.3</tt>. This is needed so that
<prgn>ld.so</prgn> can find the library in between the time
<prgn>dpkg</prgn> installs it and <prgn>ldconfig</prgn> is run
- in the <prgn>postinst</prgn> script. Futhermore, and <em>this
- is very important</em>, the library must be placed before the
- symlink pointing to it in the <tt>.deb</tt> file. This is so
- that by the time <prgn>dpkg</prgn> comes to install the
- symlink (overwriting the previous symlink pointing at an older
- version of the library) the new shared library is already in
- place. Currently the way to ensure the ordering is done
- 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 <prgn>postinst</prgn> script. Futhermore, older
+ versions of the package management system required the library
+ must be placed before the symlink pointing to it in the
+ <tt>.deb</tt> file. This is so that by the time
+ <prgn>dpkg</prgn> comes to install the symlink (overwriting
+ the previous symlink pointing at an older version of the
+ library) the new shared library is already in place.
+ Unfortunately, this was not not always possible, since it
+ highly depends on the behaviour of the filesystem. Some
+ filesystems (such as reisefs) will reorder the files so it
+ doesn't matter in what order you create them. In newer
+ versions of <prgn>dpkg</prgn>, this is handled automatically.
</p>
<!--
<sect1><heading><em>How</em> does <prgn>dpkg-shlibdeps</prgn>
work?
</heading>
-
<p>
- <prgn>dpkg-shlibdeps</prgn> calls <prgn>ldd</prgn> to
- determine the shared libraries used by the compiled
- binaries passed through its command line.
+ <prgn>dpkg-shlibdeps</prgn> calls <prgn>objdump</prgn> to
+ determine the shared libraries directly
+ <footnote> a binary <tt>foo</tt> directly use a library
+ <tt>libbar</tt> if it is linked with that library. Other
+ libraries that are needed by <tt>libbar</tt> are linked
+ indirectly to <tt>foo</tt>, and the dynamic linker will load
+ the automatically when it loads <tt>libbar</tt>.
+ </footnote> used by the compiled binaries and libraries
+ passed through its command line.
</p>
<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>
</book>
</debiandoc>
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-