|
|
@@ -1,4 +1,4 @@
|
|
|
-.TH dpkg\-shlibdeps 1 "2007-06-12" "Debian Project" "dpkg utilities"
|
|
|
+.TH dpkg\-shlibdeps 1 "2007-07-16" "Debian Project" "dpkg utilities"
|
|
|
.SH NAME
|
|
|
dpkg\-shlibdeps \- generate shared library substvar dependencies
|
|
|
.
|
|
|
@@ -21,18 +21,76 @@ where
|
|
|
is a dependency field name. Any other variables starting
|
|
|
.I shlibs:
|
|
|
are removed from the file.
|
|
|
+.P
|
|
|
.B dpkg\-shlibdeps
|
|
|
-will read shared library dependency information from
|
|
|
-.BR debian/shlibs.local ,
|
|
|
-.BR /etc/dpkg/shlibs.override ,
|
|
|
-the
|
|
|
-.B shlibs
|
|
|
-control area file of the package containing the file which
|
|
|
-.B objdump
|
|
|
-reports as satisfying the library dependency, or
|
|
|
-.BR /etc/dpkg/shlibs.default .
|
|
|
-The first match will be used.
|
|
|
-.
|
|
|
+has two possible sources of information to generate dependency
|
|
|
+information. Either
|
|
|
+.I symbols
|
|
|
+files or
|
|
|
+.I shlibs
|
|
|
+files. For each binary that
|
|
|
+.B dpkg\-shlibdeps
|
|
|
+analyzes, it finds out the list of libraries that it's linked with.
|
|
|
+Then, for each library, it looks up either the
|
|
|
+.I symbols
|
|
|
+file, or the
|
|
|
+.I shlibs
|
|
|
+file (if the former doesn't exist). Both files are supposed to be provided
|
|
|
+by the library package and should thus be available as
|
|
|
+/var/lib/dpkg/info/\fIpackage\fR.\fIsymbols\fR
|
|
|
+or /var/lib/dpkg/info/\fIpackage\fR.\fIshlibs\fR. The package name is
|
|
|
+identified in two steps: find the library file on the system (looking in
|
|
|
+the same directories that \fBld.so\fR would use), then use
|
|
|
+.BI "dpkg -S " library\-file
|
|
|
+to lookup the package providing the library.
|
|
|
+.SS Symbols files
|
|
|
+Symbols files contain finer-grained dependency information by providing
|
|
|
+the minimum dependency for each symbol that the library exports. The
|
|
|
+script tries to find a symbols file associated to a library package
|
|
|
+in the following places (first match is used):
|
|
|
+.IP debian/*/DEBIAN/symbols
|
|
|
+Shared library information generated by the current build process that also invoked
|
|
|
+.BR dpkg\-shlibdeps .
|
|
|
+They are generated by
|
|
|
+.BR dpkg\-gensymbols (1).
|
|
|
+.IP /etc/dpkg/symbols/\fIpackage\fR.symbols.\fIarch\fR
|
|
|
+.IP /etc/dpkg/symbols/\fIpackage\fR.symbols
|
|
|
+Per-system overriding shared library dependency information.
|
|
|
+\fIarch\fR is the architecture of the current system (obtained by
|
|
|
+.BR "dpkg-architecture -qDEB_HOST_ARCH" ).
|
|
|
+.IP \fIadmindir\fR/info/\fIpackage\fR.symbols
|
|
|
+Package-provided shared library dependency information.
|
|
|
+Unless overriden, \fIadmindir\fR is /var/lib/dpkg.
|
|
|
+.P
|
|
|
+While scanning the symbols used by all binaries,
|
|
|
+.B dpkg\-shlibdeps
|
|
|
+remembers the (biggest) minimal version needed for each library. At the end
|
|
|
+of the process, it is able to write out the minimal dependency for every
|
|
|
+library used (provided that the information of the \fIsymbols\fR files are
|
|
|
+accurate).
|
|
|
+.SS Shlibs files
|
|
|
+Shlibs files associate directly a library to a dependency (without looking
|
|
|
+at the symbols). It's thus often stronger than really needed but very safe
|
|
|
+and easy to handle.
|
|
|
+.P
|
|
|
+The dependencies for a library are looked up in several places. The first
|
|
|
+file providing informations for the library of interest is used:
|
|
|
+.IP debian/shlibs.local
|
|
|
+Package-local overriding shared library dependency information.
|
|
|
+.IP /etc/dpkg/shlibs.override
|
|
|
+Per-system overriding shared library dependency information.
|
|
|
+.IP debian/*/DEBIAN/shlibs
|
|
|
+Shared library information generated by the current build process that also invoked
|
|
|
+.BR dpkg\-shlibdeps .
|
|
|
+.IP \fIadmindir\fR/info/\fIpackage\fR.shlibs
|
|
|
+Package-provided shared library dependency information.
|
|
|
+Unless overriden, \fIadmindir\fR is /var/lib/dpkg.
|
|
|
+.IP /etc/dpkg/shlibs.default
|
|
|
+Per-system default shared library dependency information.
|
|
|
+.P
|
|
|
+The extracted dependencies are then directly used (except if they are
|
|
|
+filtered out because they have been identified as duplicate, or as weaker
|
|
|
+than another dependency).
|
|
|
.SH OPTIONS
|
|
|
.B dpkg\-shlibdeps
|
|
|
interprets non-option arguments as executable names, just as if they'd
|
|
|
@@ -103,6 +161,11 @@ Write substitution variables in
|
|
|
the default is
|
|
|
.BR debian/substvars .
|
|
|
.TP
|
|
|
+.BI \-v
|
|
|
+Enable verbose mode. Numerous messages are displayed to explain what
|
|
|
+.B dpkg\-shlibdeps
|
|
|
+does.
|
|
|
+.TP
|
|
|
.BI \-\-admindir= dir
|
|
|
Change the location of the \fBdpkg\fR database. The default location is
|
|
|
\fI/var/lib/dpkg\fP.
|
|
|
@@ -113,24 +176,46 @@ Show the usage message and exit.
|
|
|
.BR \-\-version
|
|
|
Show the version and exit.
|
|
|
.
|
|
|
-.SH FILES
|
|
|
+.SH WARNINGS
|
|
|
+Since
|
|
|
+.B dpkg\-shlibdeps
|
|
|
+analyzes the set of symbols used by each binary of the generated package,
|
|
|
+it is able to emit warnings in several cases. They inform you of things
|
|
|
+that can be improved in the package. In most cases, those improvements
|
|
|
+concern the upstream sources directly. By order of decreasing importance,
|
|
|
+here are the various warnings that you can encounter:
|
|
|
.TP
|
|
|
-.B debian/shlibs.local
|
|
|
-Package-local overriding shared library dependency information.
|
|
|
+.BI symbol " sym" " used by " binary " found in none of the libraries."
|
|
|
+The indicated symbol has not been found in the libraries linked with the
|
|
|
+binary. The \fIbinary\fR is most likely a library and it needs to be linked
|
|
|
+with an additional library during the build process (option \fB-l\fR\fIlibrary\fR
|
|
|
+of the linker).
|
|
|
.TP
|
|
|
-.B /etc/dpkg/shlibs.override
|
|
|
-Per-system overriding shared library dependency information.
|
|
|
-.TP
|
|
|
-.B /etc/dpkg/shlibs.default
|
|
|
-Per-system default shared library dependency information.
|
|
|
-.
|
|
|
+.IB binary " shouldn't be linked with " library " (it uses none of its symbols)."
|
|
|
+The \fIbinary\fR is linked to a library that it doesn't need. It's not a
|
|
|
+problem but some small performance improvements in binary load time
|
|
|
+can be obtained by not linking this library to this binary.
|
|
|
+
|
|
|
+Furthermore, in some cases, this will lead to a non-versionned dependency
|
|
|
+on the library that could have been avoided if the binary was only linked
|
|
|
+against the library that it really uses. The exception to this rule is
|
|
|
+when several binaries are linked against the same set of libraries but
|
|
|
+each binary only uses a subset of those. You will have warnings on
|
|
|
+individual binaries, but the set of libraries needed at the package level
|
|
|
+is the same whether you fix the binaries or not.
|
|
|
.SH "SEE ALSO"
|
|
|
-.BR deb\-shlibs (5).
|
|
|
+.BR deb\-shlibs (5),
|
|
|
+.BR deb\-symbols (5),
|
|
|
+.BR dpkg-gensymbols (1).
|
|
|
.
|
|
|
.SH AUTHORS
|
|
|
Copyright (C) 1995-1996 Ian Jackson
|
|
|
.br
|
|
|
Copyright (C) 2000 Wichert Akkerman
|
|
|
+.br
|
|
|
+Copyright (C) 2006 Frank Lichtenheld
|
|
|
+.br
|
|
|
+Copyright (C) 2007 Raphaël Hertzog
|
|
|
.sp
|
|
|
This is free software; see the GNU General Public Licence version 2 or later
|
|
|
for copying conditions. There is NO WARRANTY.
|