315 lines
9.3 KiB
HTML
315 lines
9.3 KiB
HTML
|
||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||
<HTML><HEAD><TITLE>Man page of DH_MAKESHLIBS</TITLE>
|
||
</HEAD><BODY>
|
||
<H1>DH_MAKESHLIBS</H1>
|
||
Section: Debhelper (1)<BR>Updated: 2020-03-27<BR><A HREF="#index">Index</A>
|
||
<A HREF="/cgi-bin/man/man2html">Return to Main Contents</A><HR>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<A NAME="lbAB"> </A>
|
||
<H2>NAME</H2>
|
||
|
||
dh_makeshlibs - automatically create shlibs file and call dpkg-gensymbols
|
||
<A NAME="lbAC"> </A>
|
||
<H2>SYNOPSIS</H2>
|
||
|
||
|
||
|
||
<B>dh_makeshlibs</B> [<I>debhelper options</I>] [<B>-m</B><I>major</I>] [<B>-V</B><I>[dependencies]</I>] [<B>-n</B>] [<B>-X</B><I>item</I>] [<B>--</B> <I>params</I>]
|
||
<A NAME="lbAD"> </A>
|
||
<H2>DESCRIPTION</H2>
|
||
|
||
|
||
|
||
<B>dh_makeshlibs</B> is a debhelper program that automatically scans for shared
|
||
libraries, and generates a shlibs file for the libraries it finds.
|
||
<P>
|
||
|
||
It will also ensure that ldconfig is invoked during install and removal when
|
||
it finds shared libraries. Since debhelper 9.20151004, this is done via a
|
||
dpkg trigger. In older versions of debhelper, <B>dh_makeshlibs</B> would
|
||
generate a maintainer script for this purpose.
|
||
<P>
|
||
|
||
Since debhelper 12.3, <B>dh_makeshlibs</B> will by default add an additional
|
||
<I>udeb</I> line for udebs in the shlibs file, when the udeb has the same
|
||
name as the deb followed by a ``-udeb'' suffix (e.g. if the deb is called
|
||
``libfoo1'', then debhelper will auto-detect the udeb if it is named
|
||
``libfoo1-udeb''). Please use the <B>--add-udeb</B> and <B>--no-add-udeb</B> options
|
||
below when this auto-detection is insufficient.
|
||
<P>
|
||
|
||
If you previously used <B>--add-udeb</B> and is considering to migrate to
|
||
using the auto-detection new auto-detection feature in 12.3, then
|
||
please remember to test that the resulting <I>DEBIAN/shlibs</I> files are
|
||
as expected. There are some known corner cases, where the
|
||
auto-detection is insufficient. These include when the udeb contains
|
||
library files from multiple regular deb packages or when the packages
|
||
do not follow the expected naming convention.
|
||
<A NAME="lbAE"> </A>
|
||
<H2>FILES</H2>
|
||
|
||
|
||
|
||
<DL COMPACT>
|
||
<DT id="1">debian/<I>package</I>.shlibs<DD>
|
||
|
||
|
||
Installs this file, if present, into the package as DEBIAN/shlibs. If
|
||
omitted, debhelper will generate a shlibs file automatically if it
|
||
detects any libraries.
|
||
|
||
|
||
<P>
|
||
|
||
|
||
Note in compat levels 9 and earlier, this file was installed by
|
||
<B><A HREF="/cgi-bin/man/man2html?1+dh_installdeb">dh_installdeb</A></B>(1) rather than <B>dh_makeshlibs</B>.
|
||
<DT id="2">debian/<I>package</I>.symbols<DD>
|
||
|
||
|
||
|
||
<DT id="3">debian/<I>package</I>.symbols.<I>arch</I><DD>
|
||
|
||
|
||
|
||
These symbols files, if present, are passed to <B><A HREF="/cgi-bin/man/man2html?1+dpkg-gensymbols">dpkg-gensymbols</A></B>(1) to
|
||
be processed and installed. Use the <I>arch</I> specific names if you need
|
||
to provide different symbols files for different architectures.
|
||
</DL>
|
||
<A NAME="lbAF"> </A>
|
||
<H2>OPTIONS</H2>
|
||
|
||
|
||
|
||
<DL COMPACT>
|
||
<DT id="4"><B>-m</B><I>major</I>, <B>--major=</B><I>major</I><DD>
|
||
|
||
|
||
Instead of trying to guess the major number of the library with objdump,
|
||
use the major number specified after the -m parameter. This is much less
|
||
useful than it used to be, back in the bad old days when this program
|
||
looked at library filenames rather than using objdump.
|
||
<DT id="5"><B>-V</B>, <B>-V</B><I>dependencies</I><DD>
|
||
|
||
|
||
|
||
<DT id="6"><B>--version-info</B>, <B>--version-info=</B><I>dependencies</I><DD>
|
||
|
||
|
||
|
||
If a shlibs file is generated by this program, this option controls
|
||
what version will be used in the dependency relation.
|
||
|
||
|
||
<P>
|
||
|
||
|
||
In compat 12 and later, <B>dh_makeshlibs</B> defaults to <B>-VUpstream-Version</B>.
|
||
In compat 11 and earlier the default behaved like <B>-VNone</B>.
|
||
|
||
|
||
<P>
|
||
|
||
|
||
The <B>dh_makeshlibs</B> tool can generate dependencies in three variants:
|
||
<DL COMPACT><DT id="7"><DD>
|
||
<DL COMPACT>
|
||
<DT id="8"><B>-VUpstream-Version</B><DD>
|
||
|
||
|
||
The dependency will be "<I>packagename</I> <B>(></B>= <I>packageversion</I><B>)</B>".
|
||
Note that <I>Upstream-Version</I> is case-sensitive and must be written
|
||
exactly as shown here.
|
||
|
||
|
||
<P>
|
||
|
||
|
||
This is a conservative setting that always ensures that other packages'
|
||
shared library dependencies are at least as tight as they need to be
|
||
(unless the library is prone to changing <FONT SIZE="-1">ABI</FONT> without updating the
|
||
upstream version number).
|
||
|
||
|
||
<P>
|
||
|
||
|
||
The flip side is that packages might end up with dependencies that are
|
||
too tight in some cases (note a symbols file can mitigate this issue).
|
||
This is often of minor temporary inconvenience and usually a lot
|
||
better than the fall out caused by forgetting to bump the dependency
|
||
information.
|
||
|
||
|
||
<P>
|
||
|
||
|
||
This explicit form was added in debhelper/11.3. In previous versions,
|
||
a <B>-V</B> without any dependency information was used instead (and that
|
||
form still works)
|
||
<DT id="9"><B>-VNone</B><DD>
|
||
|
||
|
||
The dependency will be "<I>packagename</I>". Note that <I>None</I> is
|
||
case-sensitive and must be written exactly as shown here.
|
||
|
||
|
||
<P>
|
||
|
||
|
||
This form is generally unsafe with the only exception being if upstream
|
||
does not extend the <FONT SIZE="-1">ABI</FONT> in any way. However, most upstreams improve their
|
||
interfaces over time and packagers are recommended to use
|
||
<B>-VUpstream-Version</B> (or one of the other forms of <B>-V</B><I>dependencies</I>).
|
||
|
||
|
||
<P>
|
||
|
||
|
||
Alternatively, this may be sufficient if (and only if) the package uses
|
||
symbol versioning (see <B><A HREF="/cgi-bin/man/man2html?1+dpkg-gensymbols">dpkg-gensymbols</A></B>(1)) and does <I>not</I> build any
|
||
udeb packages. Note that symbols are not supported for udeb packages,
|
||
which solely relies on shlibs for dependency handling.
|
||
<DT id="10"><B>-V</B><I>package-relation</I><DD>
|
||
|
||
|
||
In this case, the value passed to <B>-V</B> will be used as a dependency
|
||
relation. The <I>package-relation</I> should generally be of the form
|
||
"<I>some-package-name</I> <B>(></B>= <I>some-package-version</I><B>)</B>". Remember
|
||
to include the package name.
|
||
|
||
|
||
<P>
|
||
|
||
|
||
Note that debhelper will use the value <I>as it is</I> with no sanity
|
||
checking or modification. In <I>rare special</I> cases, this is needed to
|
||
generate a dependency on a different package than the one containing
|
||
the library.
|
||
</DL>
|
||
</DL>
|
||
|
||
<DL COMPACT><DT id="11"><DD>
|
||
|
||
|
||
<P>
|
||
|
||
|
||
When choosing a value for this option, please keep mind that if the
|
||
package provides a symbols file, then that this is generally preferred over
|
||
the shlibs file for regular .deb packages. See <B><A HREF="/cgi-bin/man/man2html?1+dpkg-shlibdeps">dpkg-shlibdeps</A></B>(1)
|
||
for more information on this topic.
|
||
</DL>
|
||
|
||
<DT id="12"><B>-n</B>, <B>--no-scripts</B><DD>
|
||
|
||
|
||
Do not add the ``ldconfig'' trigger even if it seems like the package
|
||
might need it. The option is called <B>--no-scripts</B> for historical
|
||
reasons as <B>dh_makeshlibs</B> would previously generate maintainer
|
||
scripts that called <B>ldconfig</B>.
|
||
<DT id="13"><B>-X</B><I>item</I>, <B>--exclude=</B><I>item</I><DD>
|
||
|
||
|
||
Exclude files that contain <I>item</I> anywhere in their filename or directory
|
||
from being treated as shared libraries.
|
||
<DT id="14"><B>--add-udeb=</B><I>udeb</I><DD>
|
||
|
||
|
||
Create an additional line for udebs in the shlibs file and use <I>udeb</I> as the
|
||
package name for udebs to depend on instead of the regular library package.
|
||
|
||
|
||
<P>
|
||
|
||
|
||
This option is only useful for special cases such as when debhelper
|
||
cannot auto-detect package name of the udeb package, when the udeb
|
||
will contain libraries from multiple deb packages, or when the udeb
|
||
contains libraries <B>not</B> present in the deb package.
|
||
<DT id="15"><B>--no-add-udeb</B><DD>
|
||
|
||
|
||
Do not add any udeb lines to the shlibs file. This can be used to disable the
|
||
default auto-detection of udebs.
|
||
|
||
|
||
<P>
|
||
|
||
|
||
This may be useful in case you do not want a shlibs file at all for the udeb
|
||
because no package will depend on it. E.g. because adding a udeb package
|
||
for the library was ``overkill'' and the library is embedded in a different
|
||
udeb package.
|
||
<DT id="16"><B>--</B> <I>params</I><DD>
|
||
|
||
|
||
Pass <I>params</I> to <B><A HREF="/cgi-bin/man/man2html?1+dpkg-gensymbols">dpkg-gensymbols</A></B>(1).
|
||
</DL>
|
||
<A NAME="lbAG"> </A>
|
||
<H2>EXAMPLES</H2>
|
||
|
||
|
||
|
||
<DL COMPACT>
|
||
<DT id="17"><B>dh_makeshlibs -VNone</B><DD>
|
||
|
||
|
||
Assuming this is a package named <I>libfoobar1</I>, generates a shlibs file that
|
||
looks something like:
|
||
<BR> libfoobar 1 libfoobar1
|
||
<DT id="18"><B>dh_makeshlibs -VUpstream-Version</B><DD>
|
||
|
||
|
||
Assuming the current version of the package is 1.1-3, generates a shlibs
|
||
file that looks something like:
|
||
<BR> libfoobar 1 libfoobar1 (>= 1.1)
|
||
<DT id="19"><B>dh_makeshlibs -V 'libfoobar1 (>= 1.0)'</B><DD>
|
||
|
||
|
||
Generates a shlibs file that looks something like:
|
||
<BR> libfoobar 1 libfoobar1 (>= 1.0)
|
||
</DL>
|
||
<A NAME="lbAH"> </A>
|
||
<H2>SEE ALSO</H2>
|
||
|
||
|
||
|
||
<B><A HREF="/cgi-bin/man/man2html?7+debhelper">debhelper</A></B>(7)
|
||
<P>
|
||
|
||
This program is a part of debhelper.
|
||
<A NAME="lbAI"> </A>
|
||
<H2>AUTHOR</H2>
|
||
|
||
|
||
|
||
Joey Hess <<A HREF="mailto:joeyh@debian.org">joeyh@debian.org</A>>
|
||
<P>
|
||
|
||
<HR>
|
||
<A NAME="index"> </A><H2>Index</H2>
|
||
<DL>
|
||
<DT id="20"><A HREF="#lbAB">NAME</A><DD>
|
||
<DT id="21"><A HREF="#lbAC">SYNOPSIS</A><DD>
|
||
<DT id="22"><A HREF="#lbAD">DESCRIPTION</A><DD>
|
||
<DT id="23"><A HREF="#lbAE">FILES</A><DD>
|
||
<DT id="24"><A HREF="#lbAF">OPTIONS</A><DD>
|
||
<DT id="25"><A HREF="#lbAG">EXAMPLES</A><DD>
|
||
<DT id="26"><A HREF="#lbAH">SEE ALSO</A><DD>
|
||
<DT id="27"><A HREF="#lbAI">AUTHOR</A><DD>
|
||
</DL>
|
||
<HR>
|
||
This document was created by
|
||
<A HREF="/cgi-bin/man/man2html">man2html</A>,
|
||
using the manual pages.<BR>
|
||
Time: 00:05:10 GMT, March 31, 2021
|
||
</BODY>
|
||
</HTML>
|