[debhelper-devel] [debhelper] 02/02: dh_makeshlibs: In c12, avoid passing SONAME-less binaries to dpkg-gensymbols
Niels Thykier
nthykier at moszumanska.debian.org
Sun Dec 31 17:21:38 UTC 2017
This is an automated email from the git hooks/post-receive script.
nthykier pushed a commit to branch master
in repository debhelper.
commit 6f80b46a1f362f37a10555ae437fdaca1e2da1d7
Author: Niels Thykier <niels at thykier.net>
Date: Sun Dec 31 17:20:07 2017 +0000
dh_makeshlibs: In c12, avoid passing SONAME-less binaries to dpkg-gensymbols
Signed-off-by: Niels Thykier <niels at thykier.net>
---
debhelper.pod | 5 +++++
debian/changelog | 3 +++
dh_makeshlibs | 13 +++++++------
3 files changed, 15 insertions(+), 6 deletions(-)
diff --git a/debhelper.pod b/debhelper.pod
index e009f5a..fc236c2 100644
--- a/debhelper.pod
+++ b/debhelper.pod
@@ -769,6 +769,11 @@ commands appear to be invalid.
The B<dh_missing> tool will now default to B<--list-missing>.
+=item -
+
+The B<dh_makeshlibs> tool will now only pass libraries to L<dpkg-gensymbols(1)>
+if the ELF binary has a SONAME (containing ".so").
+
=back
=back
diff --git a/debian/changelog b/debian/changelog
index aab6432..7738662 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -24,6 +24,9 @@ debhelper (11.1) UNRELEASED; urgency=medium
generated shlibs file.
* dh_makeshlibs: Find all libraries with an unversioned SONAME
field (and not just the unversioned ones containing ".so").
+ * dh_makeshlibs: In compat 12, stop passing ELF binaries without
+ a SONAME to dpkg-gensymbols. Thanks to Steve Langasek for the
+ report. (Closes: #653640)
-- Niels Thykier <niels at thykier.net> Sun, 17 Dec 2017 07:59:18 +0000
diff --git a/dh_makeshlibs b/dh_makeshlibs
index 53b4c0a..81007cc 100755
--- a/dh_makeshlibs
+++ b/dh_makeshlibs
@@ -165,12 +165,12 @@ foreach my $package (@{$dh{DOPACKAGES}}) {
$exclude="! \\( $dh{EXCLUDE_FIND} \\) ";
}
open (FIND, "test -d $tmp && find $tmp -type f \\( -name '*.so' -or -name '*.so.*' \\) $exclude | LC_ALL=C sort |");
- while (<FIND>) {
+ while (my $lib_file = <FIND>) {
my ($library, $major);
- chomp;
- next if not is_so_or_exec_elf_file($_);
- push @lib_files, $_;
- my $ret = compat(10) ? `$objdump -p "$_"` : qx_cmd($objdump, '-p', $_);
+ chomp($lib_file);
+ next if not is_so_or_exec_elf_file($lib_file);
+ push(@lib_files, $lib_file) if compat(11);
+ my $ret = compat(10) ? `$objdump -p "$lib_file"` : qx_cmd($objdump, '-p', $lib_file);
if ($ret=~m/\s+SONAME\s+(.*)\.so\.(.*)/) {
# proper soname format
$library=$1;
@@ -182,7 +182,7 @@ foreach my $package (@{$dh{DOPACKAGES}}) {
$major=$2;
} elsif ($ret =~ m/\s+SONAME\s+(?:\S)/) {
$unversioned_so = 1;
- push(@lib_files, $_);
+ push(@lib_files, $lib_file);
}
if (defined($dh{M_PARAMS}) && $dh{M_PARAMS} ne '') {
@@ -216,6 +216,7 @@ foreach my $package (@{$dh{DOPACKAGES}}) {
if (defined($library) && defined($major) && defined($deps) &&
$library ne '' && $major ne '' && $deps ne '') {
$need_ldconfig=1;
+ push(@lib_files, $lib_file) if not compat(11);
# Prevent duplicate lines from entering the file.
my $line="$library $major $deps";
if (! $seen{$line}) {
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debhelper/debhelper.git
More information about the debhelper-devel
mailing list