[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#363133: [PROPOSAL] Document support of package types in shlibs files



Package: debian-policy
Version: 3.6.2.2
Severity: wishlist

With version 1.13.12, dpkg-dev gained support for different package types 
in shlibs files. This was necessary to make it possible to automatically 
generate correct dependencies for udebs (as used by Debian Installer).
For background, see http://bugs.debian.org/345475.

The attached patch to the current section 8.6 that covers shlibs documents 
this new feature.

Basically, an shlibs file can now contain two lines for a single library:
libz 1 zlib1g (>= 1:1.2.1)
udeb: libz 1 zlib1g-udeb (>= 1:1.2.1)

If the -t<type> option is added to dpkg-shlibdeps, it will look first for 
a line starting with <type>: and, if not found, fall back to the "normal" 
line. The only <type> currently in use is "udeb".

In the debhelper (>= 5.0.22) suite, both dh_makeshlibs and dh_shlibdeps 
have support for package types in shlibs files.

A majority of library packages that have a udeb and udebs using them has 
already been adapted to use the new feature. See [1] for an overview.

[1] http://wiki.debian.org/DebianInstaller/LibraryUdebs
--- policy.sgml.orig	2006-04-17 01:54:04.000000000 +0200
+++ policy.sgml	2006-04-17 02:05:19.416457719 +0200
@@ -4866,6 +4866,19 @@
 	</p>
 
 	<p>
+	  If you are creating a udeb for use in Debian Installer, you will
+	  need to specify that <prgn>dpkg-shlibdeps</prgn> should use the
+	  dependency line of type <tt>udeb</tt> by adding <tt>-tudeb</tt>
+	  as option<footnote>
+	      <prgn>dh_shlibdeps</prgn> from the <tt>debhelper</tt> suite
+	      will automatically add this option if it knows it is
+	      processing a udeb.
+	  </footnote>. If there is no dependency line of type <tt>udeb</tt>
+	  in the <file>shlibs</file> file, <prgn>dpkg-shlibdeps</prgn> will
+	  fall back to the regular dependency line.
+	</p>
+
+	<p>
 	  For more details on dpkg-shlibdeps, please see
 	  <ref id="pkg-dpkg-shlibdeps"> and
 	  <manref name="dpkg-shlibdeps" section="1">.
@@ -4880,7 +4893,7 @@
 	  beginning with <tt>#</tt> are considered to be comments and
 	  are ignored.  Each line is of the form:
 	  <example compact="compact">
-<var>library-name</var> <var>soname-version-number</var> <var>dependencies ...</var>
+<var>[type:]</var> <var>library-name</var> <var>soname-version-number</var> <var>dependencies ...</var>
 	  </example>
 	</p>
 
@@ -4891,6 +4904,12 @@
 	</p>
 
 	<p>
+	  <var>type:</var> is an optional element that indicates the type
+	  of package for which the line is valid. The only type currently
+	  in use is <tt>udeb</tt>. The colon after the type is required.
+	</p>
+
+	<p>
 	  <var>library-name</var> is the name of the shared library,
 	  in this case <tt>libz</tt>.  (This must match the name part
 	  of the soname, see below.)
@@ -4932,6 +4951,14 @@
 	  the dynamic linker about using older shared libraries with
 	  newer binaries.
 	</p>
+
+	<p>
+	  As zlib1g also provides a udeb containing the shared library,
+	  there would also be a second line:
+	  <example compact="compact">
+udeb: libz 1 zlib1g (>= 1:1.1.3)
+	  </example>
+	</p>
       </sect1>
 
       <sect1>
@@ -4956,7 +4983,10 @@
 	  <file>debian/rules</file> without using a <file>debian/shlibs</file>
 	  file at all,<footnote>
 	      This is what <prgn>dh_makeshlibs</prgn> in the
-	      <tt>debhelper</tt> suite does.
+	      <tt>debhelper</tt> suite does. If your package also has a udeb
+	      that provides a shared library, <prgn>dh_makeshlibs</prgn> can
+	      automatically generate the <tt>udeb:</tt> lines if you specify
+	      the name of the udeb with the <tt>--add-udeb</tt> option.
 	  </footnote>
 	  since the <file>debian/shlibs</file> file itself is ignored by
 	  <prgn>dpkg-shlibdeps</prgn>.

Attachment: pgpob9roGPcll.pgp
Description: PGP signature


Reply to: