]> git.donarmstrong.com Git - debian/debian-policy.git/commitdiff
Merge branch 'master' into bug504880-rra
authorRuss Allbery <rra@debian.org>
Thu, 1 Jul 2010 17:36:02 +0000 (10:36 -0700)
committerRuss Allbery <rra@debian.org>
Thu, 1 Jul 2010 17:36:02 +0000 (10:36 -0700)
debian/changelog
policy.sgml
upgrading-checklist.sgml

index fedb536ff12febb436ce79a92ddaea729b0bbdaf..5ccc464912f83f6f4b0c74ffdac3c2414538453f 100644 (file)
@@ -6,6 +6,11 @@ debian-policy (3.9.1.0) UNRELEASED; urgency=low
     Seconded: Damyan Ivanov <dmn@debian.org>
     Seconded: Giacomo A. Catenazzi <cate@debian.org>
     Closes: #436105
+  * Policy: Libtool *.la files should generally not be installed
+    Wording: Russ Allbery <rra@debian.org>
+    Seconded: Julien Cristau <jcristau@debian.org>
+    Seconded: Cyril Brulebois <kibi@debian.org>
+    Closes: #561413
   * Set the version of the Perl Policy to match the version of the Policy
     package.
   * Explain the Perl module package naming policy more explicitly and
index 2f4c935114069618e46cfe099d534486ca64d611..7e54dda6d570f31a275e5985c9b3d77f466080a2 100644 (file)
@@ -7371,40 +7371,58 @@ strip --strip-unneeded <var>your-lib</var>
        </p>
 
        <p>
-         An ever increasing number of packages are using
-         <prgn>libtool</prgn> to do their linking.  The latest GNU
-         libtools (>= 1.3a) can take advantage of the metadata in the
-         installed <prgn>libtool</prgn> archive files (<file>*.la</file>
-         files).  The main advantage of <prgn>libtool</prgn>'s
-         <file>.la</file> files is that it allows <prgn>libtool</prgn> to
-         store and subsequently access metadata with respect to the
-         libraries it builds.  <prgn>libtool</prgn> will search for
-         those files, which contain a lot of useful information about
-         a library (such as library dependency information for static
-         linking).  Also, they're <em>essential</em> for programs
-         using <tt>libltdl</tt>.<footnote>
-             Although <prgn>libtool</prgn> is fully capable of
-             linking against shared libraries which don't have
-             <tt>.la</tt> files, as it is a mere shell script it can
-             add considerably to the build time of a
-             <prgn>libtool</prgn>-using package if that shell script
-             has to derive all this information from first principles
-             for each library every time it is linked.  With the
-             advent of <prgn>libtool</prgn> version 1.4 (and to a
-             lesser extent <prgn>libtool</prgn> version 1.3), the
-             <file>.la</file> files also store information about
-             inter-library dependencies which cannot necessarily be
-             derived after the <file>.la</file> file is deleted.
+         Packages that use <prgn>libtool</prgn> to create and install
+         their shared libraries install a file containing additional
+         metadata (ending in <file>.la</file>) alongside the library.
+         For public libraries intended for use by other packages, these
+         files normally should not be included in the Debian package,
+         since the information they include is not necessary to link with
+         the shared library on Debian and can add unnecessary additional
+         dependencies to other programs or libraries.<footnote>
+           These files store, among other things, all libraries on which
+           that shared library depends.  Unfortunately, if
+           the <file>.la</file> file is present and contains that
+           dependency information, using <prgn>libtool</prgn> when
+           linking against that library will cause the resulting program
+           or library to be linked against those dependencies as well,
+           even if this is unnecessary.  This can create unneeded
+           dependencies on shared library packages that would otherwise
+           be hidden behind the library ABI, and can make library
+           transitions to new SONAMEs unnecessarily complicated and
+           difficult to manage.
          </footnote>
+         If the <file>.la</file> file is required for that library (if,
+         for instance, it's loaded via <tt>libltdl</tt> in a way that
+         requires that meta-information), the <tt>dependency_libs</tt>
+         setting in the <file>.la</file> file should normally be set to
+         the empty string.  If the shared library development package has
+         historically included the <file>.la</file>, it must be retained
+         in the development package (with <tt>dependency_libs</tt>
+         emptied) until all libraries that depend on it have removed or
+         emptied <tt>dependency_libs</tt> in their <file>.la</file>
+         files to prevent linking with those other libraries
+         using <prgn>libtool</prgn> from failing.
+       </p>
+
+       <p>
+         If the <file>.la</file> must be included, it should be included
+         in the development (<tt>-dev</tt>) package, unless the library
+         will be loaded by <prgn>libtool</prgn>'s <tt>libltdl</tt>
+         library.  If it is intended for use with <tt>libltdl</tt>,
+         the <file>.la</file> files must go in the run-time library
+         package.
        </p>
 
        <p>
-         Packages that use <prgn>libtool</prgn> to create shared
-         libraries should include the <file>.la</file> files in the
-         <tt>-dev</tt> package, unless the package relies on
-         <tt>libtool</tt>'s <tt>libltdl</tt> library, in which case
-         the <tt>.la</tt> files must go in the run-time library
-         package.
+         These requirements for handling of <file>.la</file> files do not
+         apply to loadable modules or libraries not installed in
+         directories searched by default by the dynamic linker.  Packages
+         installing loadable modules will frequently need to install
+         the <file>.la</file> files alongside the modules so that they
+         can be loaded by <tt>libltdl</tt>.  <tt>dependency_libs</tt>
+         does not need to be modified for libraries or modules that are
+         not installed in directories searched by the dynamic linker by
+         default and not intended for use by other packages.
        </p>
 
        <p>
index fabc1cbab3eb84f2d068fe3e9335283da5ef681e..1cccf596bb22e53196b9379a2f25e044bdbf907f 100644 (file)
@@ -40,6 +40,15 @@ picking your way through this list.
 Not yet released.
 
 </p><p><taglist>
+<tag>10.2</tag>
+  <item>Libtool <file>.la</file> files should not be installed for public
+  libraries.  If they're required (for <tt>libltdl</tt>, for instance),
+  the <tt>dependency_libs</tt> setting should be emptied.  Library
+  packages historically including <file>.la</file> files must continue to
+  include them (with <tt>dependency_libs</tt> emptied) until all libraries
+  that depend on that library have removed or emptied
+  their <file>.la</file> files.
+  </item>
 <tag>12.5</tag>
   <item>The GPL version 1 is now included in common-licenses and should be
   referenced from there instead of included in the <file>copyright</file>