The branch, master has been updated
via b0d0578a1a0d1287646e77739eead20841cf9a54 (commit)
via 99687e6a476ab05476ac2041e0b95bdeefb86f78 (commit)
via 45cc1441b376a3cf34b55256b9bda73472171fab (commit)
via 5d139acefcc19b15ae81fcf2b746e258b14d5a71 (commit)
from f6b8ae3915b55aa34af5e588c7c72058bb6769ea (commit)
- Shortlog ------------------------------------------------------------
b0d0578 dpkg-gensymbols: override the check level with an environment variable
99687e6 dpkg-shlibdeps(1): expand manual page with explanations concerning
failures
45cc144 dpkg-shlibdeps: do not fail if it can't find unversioned libraries
5d139ac dpkg-shlibdeps: Always try the realpath of the lib as fallback to
identify the associated package
Summary of changes:
ChangeLog | 33 ++++++++++++++++++++++++
debian/changelog | 9 ++++++
man/dpkg-gensymbols.1 | 3 ++
man/dpkg-shlibdeps.1 | 60 ++++++++++++++++++++++++++++++++++++++++++++
scripts/dpkg-gensymbols.pl | 4 +++
scripts/dpkg-shlibdeps.pl | 38 ++++++++++++++++++++-------
6 files changed, 137 insertions(+), 10 deletions(-)
-----------------------------------------------------------------------
Details of changes:
commit b0d0578a1a0d1287646e77739eead20841cf9a54
Author: Raphael Hertzog <[EMAIL PROTECTED]>
Date: Wed Nov 28 15:44:32 2007 +0100
dpkg-gensymbols: override the check level with an environment variable
* scripts/dpkg-gensymbols.pl: The environment variable
DPKG_GENSYMBOLS_CHECK_LEVEL can override the level of checks made by
dpkg-gensymbols. This offers the possibility to unofficial ports to ignore
errors due to symbols files that do not correspond.
diff --git a/ChangeLog b/ChangeLog
index 68c6d4a..a6f5935 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,12 @@
2007-11-28 Raphael Hertzog <[EMAIL PROTECTED]>
+ * scripts/dpkg-gensymbols.pl: The environment variable
+ DPKG_GENSYMBOLS_CHECK_LEVEL can override the level of checks made
+ by dpkg-gensymbols. This offers the possibility to unofficial
+ ports to ignore errors due to symbols files that do not correspond.
+
+2007-11-28 Raphael Hertzog <[EMAIL PROTECTED]>
+
* scripts/dpkg-shlibdeps.pl: Harmonize a failure message.
* man/dpkg-shlibdeps.1: Provide explanations concerning the two
failures that dpkg-shlibdeps might generate. This is needed so
diff --git a/debian/changelog b/debian/changelog
index 124bd75..b7036b7 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -11,6 +11,8 @@ dpkg (1.14.12) UNRELEASED; urgency=low
a warning instead.
* Expand the dpkg-shlibdeps manual page with explanations concerning
failures.
+ * The environment variable DPKG_GENSYMBOLS_CHECK_LEVEL can be used to force
+ dpkg-gensymbols to use a precise level of checks. Closes: #452022
-- Guillem Jover <[EMAIL PROTECTED]> Sat, 24 Nov 2007 07:38:13 +0200
diff --git a/man/dpkg-gensymbols.1 b/man/dpkg-gensymbols.1
index ddae589..cc33389 100644
--- a/man/dpkg-gensymbols.1
+++ b/man/dpkg-gensymbols.1
@@ -139,6 +139,9 @@ Level 0 disables all checks. Level 1 fails if some symbols
have
disappeared. Level 2 fails if some new symbols have been introduced.
Level 3 fails if some libraries have disappeared. Level 4 fails if some
libraries have been introduced.
+
+This value can be overriden by the environment variable
+DPKG_GENSYMBOLS_CHECK_LEVEL.
.TP
.BI \-d
Enable debug mode. Numerous messages are displayed to explain what
diff --git a/scripts/dpkg-gensymbols.pl b/scripts/dpkg-gensymbols.pl
index 787eabe..77d11d2 100755
--- a/scripts/dpkg-gensymbols.pl
+++ b/scripts/dpkg-gensymbols.pl
@@ -109,6 +109,10 @@ while (@ARGV) {
}
}
+if (exists $ENV{DPKG_GENSYMBOLS_CHECK_LEVEL}) {
+ $compare = $ENV{DPKG_GENSYMBOLS_CHECK_LEVEL};
+}
+
if (not defined($sourceversion)) {
parsechangelog($changelogfile);
$sourceversion = $fi{"L Version"};
commit 99687e6a476ab05476ac2041e0b95bdeefb86f78
Author: Raphael Hertzog <[EMAIL PROTECTED]>
Date: Wed Nov 28 14:58:55 2007 +0100
dpkg-shlibdeps(1): expand manual page with explanations concerning failures
* scripts/dpkg-shlibdeps.pl: Harmonize a failure message.
* man/dpkg-shlibdeps.1: Provide explanations concerning the two
failures that dpkg-shlibdeps might generate. This is needed so
that maintainers have an idea of what to do to fix the problems.
diff --git a/ChangeLog b/ChangeLog
index 0f190ad..68c6d4a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,12 @@
2007-11-28 Raphael Hertzog <[EMAIL PROTECTED]>
+ * scripts/dpkg-shlibdeps.pl: Harmonize a failure message.
+ * man/dpkg-shlibdeps.1: Provide explanations concerning the two
+ failures that dpkg-shlibdeps might generate. This is needed so
+ that maintainers have an idea of what to do to fix the problems.
+
+2007-11-28 Raphael Hertzog <[EMAIL PROTECTED]>
+
* scripts/dpkg-shlibdeps.pl: Do not fail if it
can't find unversioned libraries, just output a warning.
Consequently skip the check on symbols when some libs were not
diff --git a/debian/changelog b/debian/changelog
index bd5e498..124bd75 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -9,6 +9,8 @@ dpkg (1.14.12) UNRELEASED; urgency=low
* dpkg-shlibdeps doesn't fail any more if it can't find unversioned
libraries on the presumption that they are just private libraries. Outputs
a warning instead.
+ * Expand the dpkg-shlibdeps manual page with explanations concerning
+ failures.
-- Guillem Jover <[EMAIL PROTECTED]> Sat, 24 Nov 2007 07:38:13 +0200
diff --git a/man/dpkg-shlibdeps.1 b/man/dpkg-shlibdeps.1
index 68bf831..f02d203 100644
--- a/man/dpkg-shlibdeps.1
+++ b/man/dpkg-shlibdeps.1
@@ -216,6 +216,66 @@ 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 ERRORS
+.B dpkg\-shlibdeps
+will fail if it can't find a public library used by a binary or if this
+library has no associated dependency information (either shlibs file or
+symbols file). A public library has a SONAME and is versioned
+(libsomething.so.\fIX\fR). A private library (like a plugin) should not
+have a SONAME and doesn't need to be versioned.
+.TP
+.BI "couldn't find library " library\-soname " needed by " binary " (its RPATH
is '" rpath "')"
+The \fIbinary\fR uses a library called \fIlibrary\-soname\fR but
+.B dpkg\-shlibdeps
+has been unable to find the library.
+.B dpkg\-shlibdeps
+creates a list of directories to check as following: directories listed in
+the RPATH of the binary, directories listed in /etc/ld.so.conf,
+directories listed in the LD_LIBRARY_PATH environment variable, and
+standard public directories (/lib, /usr/lib, /lib32, /usr/lib32, /lib64,
+/usr/lib64). Then it checks those directories in the package's build tree
+of the binary being analyzed, in other packages's build tree that contains
+a DEBIAN/shlibs file and finally in the root directory. If the library is
+not found in any of those directories, then you get this error.
+
+If the library not found is in a private directory of the same package,
+then you want to add the directory to LD_LIBRARY_PATH. If it's in another
+binary package being built, you want to make sure that the shlibs file of
+this package is already created and that LD_LIBRARY_PATH contains the
+appropriate directory if it also is in a private directory.
+.TP
+.BI "no dependency information found for " library\-file " (used by " binary
")."
+The library needed by \fIbinary\fR has been found by
+.B dpkg\-shlibdeps
+in \fIlibrary\-file\fR but
+.B dpkg\-shlibdeps
+has been unable to find any dependency information for that library. To
+find out the dependency, it has tried to map the library to a Debian
+package with the help of
+.BI "dpkg -S " library\-file\fR.
+Then it checked the corresponding shlibs and symbols files in
+/var/lib/dpkg/info/, and in the various package's build trees
+(debian/*/DEBIAN/).
+
+This failure can be caused by a bad or missing shlibs or symbols file
+in the package of the library. It might also happen if the library is
+built within the same source package and if the shlibs files has not yet
+been created (in which case you must fix debian/rules to create
+the shlibs before calling \fBdpkg\-shlibdeps\fR). Bad RPATH can also
+lead to the library being found under a non-canonical name (example:
+/usr/lib/gcc/i486-linux-gnu/4.2.3/../../../../lib/libssl.so.9.8 instead of
+/usr/lib/libssl.so.0.9.8) that's not associated to any package,
+.B dpkg\-shlibdeps
+tries to work around this by trying to fallback on a canonical name (using
+.BR realpath (3))
+but it might not always work. It's always best to clean up the RPATH
+of the binary to avoid problems.
+
+Calling
+.B dpkg\-shlibdeps
+in verbose mode (-v) will provide much more information about where it
+tried to find the dependency information. This might be useful if you
+don't understand why it's giving you this error.
.SH "SEE ALSO"
.BR deb\-shlibs (5),
.BR deb\-symbols (5),
diff --git a/scripts/dpkg-shlibdeps.pl b/scripts/dpkg-shlibdeps.pl
index ce2caf4..ad88e7e 100755
--- a/scripts/dpkg-shlibdeps.pl
+++ b/scripts/dpkg-shlibdeps.pl
@@ -185,7 +185,7 @@ foreach my $file (keys %exec) {
$ignore++ unless scalar(split_soname($soname));
# 3/ when we have been asked to do so
$ignore++ if $ignore_missing_info;
- failure(_g("No dependency information found for %s " .
+ failure(_g("no dependency information found for %s " .
"(used by %s)."), $lib, $file)
unless $ignore;
}
commit 45cc1441b376a3cf34b55256b9bda73472171fab
Author: Raphael Hertzog <[EMAIL PROTECTED]>
Date: Sun Nov 25 15:54:20 2007 +0000
dpkg-shlibdeps: do not fail if it can't find unversioned libraries
Skip the check on symbols when some libs were not found because one
can not be sure that the symbols was not provided by the missing
library. Also improve the corresponding error message which is
downgraded to a warning for unversioned libraries.
diff --git a/ChangeLog b/ChangeLog
index 6760adc..0f190ad 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,13 @@
2007-11-28 Raphael Hertzog <[EMAIL PROTECTED]>
+ * scripts/dpkg-shlibdeps.pl: Do not fail if it
+ can't find unversioned libraries, just output a warning.
+ Consequently skip the check on symbols when some libs were not
+ found because one can not be sure that the symbols was not
+ provided by the missing library.
+
+2007-11-28 Raphael Hertzog <[EMAIL PROTECTED]>
+
* scripts/dpkg-shlibdeps.pl (find_packages): Make sure to always
return [''] for a miss in the 'dpkg -S' query.
* scripts/dpkg-shlibdeps.pl: Always try the realpath($lib) as
diff --git a/debian/changelog b/debian/changelog
index 8ef98fb..bd5e498 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -6,6 +6,9 @@ dpkg (1.14.12) UNRELEASED; urgency=low
* Dpkg::Shlibs::find_library() now returns canonicalized paths.
* dpkg-shlibdeps always tries the realpath() of a lib as fallback when
trying to identify the package of a lib (and not only for symlinks).
+ * dpkg-shlibdeps doesn't fail any more if it can't find unversioned
+ libraries on the presumption that they are just private libraries. Outputs
+ a warning instead.
-- Guillem Jover <[EMAIL PROTECTED]> Sat, 24 Nov 2007 07:38:13 +0200
diff --git a/scripts/dpkg-shlibdeps.pl b/scripts/dpkg-shlibdeps.pl
index 420afaf..ce2caf4 100755
--- a/scripts/dpkg-shlibdeps.pl
+++ b/scripts/dpkg-shlibdeps.pl
@@ -97,11 +97,22 @@ foreach my $file (keys %exec) {
# Load symbols files for all needed libraries (identified by SONAME)
my %libfiles;
my %altlibfiles;
+ my %soname_notfound;
foreach my $soname (@sonames) {
my $lib = my_find_library($soname, $obj->{RPATH}, $obj->{format},
$file);
- failure(_g("couldn't find library %s (note: only packages with " .
- "'shlibs' files are looked into)."), $soname)
- unless defined($lib);
+ unless (defined $lib) {
+ $soname_notfound{$soname} = 1;
+ my $msg = _g("couldn't find library %s needed by %s (its RPATH is
'%s').\n" .
+ "Note: libraries are not searched in other binary
packages " .
+ "that do not have any shlibs file.\nTo help
dpkg-shlibdeps " .
+ "find private libraries, you might need to set
LD_LIBRARY_PATH.");
+ if (scalar(split_soname($soname))) {
+ failure($msg, $soname, $file, join(":", @{$obj->{RPATH}}));
+ } else {
+ warning($msg, $soname, $file, join(":", @{$obj->{RPATH}}));
+ }
+ next;
+ }
$libfiles{$lib} = $soname;
my $reallib = realpath($lib);
if ($reallib ne $lib) {
@@ -187,6 +198,9 @@ foreach my $file (keys %exec) {
my %used_sonames = map { $_ => 0 } @sonames;
my $nb_warnings = 0;
my $nb_skipped_warnings = 0;
+ # Disable warnings about missing symbols when we have not been able to
+ # find all libs
+ my $disable_warnings = scalar(keys(%soname_notfound));
foreach my $sym ($obj->get_undefined_dynamic_symbols()) {
my $name = $sym->{name};
if ($sym->{version}) {
@@ -214,6 +228,7 @@ foreach my $file (keys %exec) {
} else {
my $syminfo = $dumplibs_wo_symfile->locate_symbol($name);
if (not defined($syminfo)) {
+ next if $disable_warnings;
# Complain about missing symbols only for executables
# and public libraries
if ($obj->is_executable() or $obj->is_public_library()) {
@@ -239,7 +254,7 @@ foreach my $file (keys %exec) {
"them all)."), $nb_skipped_warnings) if $nb_skipped_warnings;
# Warn about un-NEEDED libraries
foreach my $soname (@sonames) {
- unless ($used_sonames{$soname}) {
+ unless ($soname_notfound{$soname} or $used_sonames{$soname}) {
warning(_g("%s shouldn't be linked with %s (it uses none of its " .
"symbols)."), $file, $soname);
}
commit 5d139acefcc19b15ae81fcf2b746e258b14d5a71
Author: Raphael Hertzog <[EMAIL PROTECTED]>
Date: Wed Nov 28 10:33:53 2007 +0100
dpkg-shlibdeps: Always try the realpath of the lib as fallback to identify
the associated package
* scripts/dpkg-shlibdeps.pl (find_packages): Make sure to always
return [''] for a miss in the 'dpkg -S' query.
* scripts/dpkg-shlibdeps.pl: Always try the realpath($lib) as
fallback to identify the package (even if it's not a symlink)
because due to broken RPATH we might get library filenames such as
"/usr/lib/gcc/i486-linux-gnu/4.2.3/../../../../lib/libssl.so.9.8"
which is not a symlink and which can still be simplified to
"/usr/lib/libssl.so.9.8" with realpath().
diff --git a/ChangeLog b/ChangeLog
index 4c02b38..6760adc 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,14 @@
+2007-11-28 Raphael Hertzog <[EMAIL PROTECTED]>
+
+ * scripts/dpkg-shlibdeps.pl (find_packages): Make sure to always
+ return [''] for a miss in the 'dpkg -S' query.
+ * scripts/dpkg-shlibdeps.pl: Always try the realpath($lib) as
+ fallback to identify the package (even if it's not a symlink)
+ because due to broken RPATH we might get library filenames such as
+ "/usr/lib/gcc/i486-linux-gnu/4.2.3/../../../../lib/libssl.so.9.8"
+ which is not a symlink and which can still be simplified to
+ "/usr/lib/libssl.so.9.8" with realpath().
+
2007-11-25 Raphael Hertzog <[EMAIL PROTECTED]>
* scripts/Dpkg/Shlibs.pm (find_library): Canonicalize paths before
diff --git a/debian/changelog b/debian/changelog
index 87c3292..8ef98fb 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -4,6 +4,8 @@ dpkg (1.14.12) UNRELEASED; urgency=low
* Add -I<file> option to dpkg-gensymbols to force the usage of a specific
symbols file.
* Dpkg::Shlibs::find_library() now returns canonicalized paths.
+ * dpkg-shlibdeps always tries the realpath() of a lib as fallback when
+ trying to identify the package of a lib (and not only for symlinks).
-- Guillem Jover <[EMAIL PROTECTED]> Sat, 24 Nov 2007 07:38:13 +0200
diff --git a/scripts/dpkg-shlibdeps.pl b/scripts/dpkg-shlibdeps.pl
index 1fe4b7a..420afaf 100755
--- a/scripts/dpkg-shlibdeps.pl
+++ b/scripts/dpkg-shlibdeps.pl
@@ -103,8 +103,9 @@ foreach my $file (keys %exec) {
"'shlibs' files are looked into)."), $soname)
unless defined($lib);
$libfiles{$lib} = $soname;
- if (-l $lib) {
- $altlibfiles{realpath($lib)} = $soname;
+ my $reallib = realpath($lib);
+ if ($reallib ne $lib) {
+ $altlibfiles{$reallib} = $soname;
}
print "Library $soname found in $lib\n" if $debug;
}
@@ -114,15 +115,16 @@ foreach my $file (keys %exec) {
my @soname_wo_symfile;
foreach my $lib (keys %libfiles) {
my $soname = $libfiles{$lib};
- if (not exists $file2pkg->{$lib} and -l $lib) {
- # If the lib found is an unpackaged symlink, we try a fallback
+ if (not scalar(grep { $_ ne '' } @{$file2pkg->{$lib}})) {
+ # The path of the library as calculated is not the
+ # official path of a packaged file, try to fallback on
# on the realpath() first, maybe this one is part of a package
my $reallib = realpath($lib);
if (exists $file2pkg->{$reallib}) {
$file2pkg->{$lib} = $file2pkg->{$reallib};
}
}
- if (not exists $file2pkg->{$lib}) {
+ if (not scalar(grep { $_ ne '' } @{$file2pkg->{$lib}})) {
# If the library is really not available in an installed package,
# it's because it's in the process of being built
# Empty package name will lead to consideration of symbols
@@ -529,6 +531,7 @@ sub find_packages {
} else {
push @files, $_;
$cached_pkgmatch{$_} = [""]; # placeholder to cache misses too.
+ $pkgmatch->{$_} = [""]; # might be replaced later on
}
}
return $pkgmatch unless scalar(@files);
--
dpkg's main repository
--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]