Bug#727683: Updated patch
This is an updated patch that changes objdump_info() in
Lintian::Collect::Binary instead of checks/binaries.pm, so that
everything that uses $objdump->{RPATH} will benefit from the change.
--
|8]
>From 60f978fcfcc8f3477b22453479ab005061d3d84f Mon Sep 17 00:00:00 2001
From: Gergely Nagy <algernon@balabit.hu>
Date: Fri, 25 Oct 2013 13:24:19 +0200
Subject: [PATCH] L::C::Binary: Add support for multi-component RPATHs
The RPATH setting works similar to PATH, and supports multiple
components, separated by a colon. As such, Lintian should be able to
handle those, and split the RPATH into components before making any
checks on those.
This patch does just that, and adds a test case to trigger the original
issue too.
Signed-off-by: Gergely Nagy <algernon@balabit.hu>
---
debian/changelog | 2 ++
lib/Lintian/Collect/Binary.pm | 2 +-
t/tests/binaries-general/debian/Makefile | 3 +++
3 files changed, 6 insertions(+), 1 deletion(-)
diff --git a/debian/changelog b/debian/changelog
index d58061a..2628e7c 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -20,6 +20,8 @@ lintian (2.5.20) UNRELEASED; urgency=low
* lib/Lintian/Check.pm:
+ [RG] Detect a few more spelling mistakes by removing some
suffixes before looking them up in the list of spelling mistakes.
+ * lib/Lintian/Collect/Binary.pm:
+ + [GN] Add support for multi-component RPATHs. (Closes: #727683)
-- Niels Thykier <niels@thykier.net> Thu, 26 Sep 2013 09:35:27 +0200
diff --git a/lib/Lintian/Collect/Binary.pm b/lib/Lintian/Collect/Binary.pm
index a4e2b5b..022eb9b 100644
--- a/lib/Lintian/Collect/Binary.pm
+++ b/lib/Lintian/Collect/Binary.pm
@@ -393,7 +393,7 @@ sub objdump_info {
# Here we just need RPATH and NEEDS, so ignore the rest for now
my ($header, $val) = split m/\s++/, $data;
if ($header eq 'RPATH') {
- $info{$header}->{$val} = 1;
+ map {$info{$header}->{$_} = 1;} split m/:/, $val;
} elsif ($header eq 'NEEDED' or $header eq 'SONAME') {
push @{ $info{$header} }, $val;
} elsif ($header eq 'TEXTREL') {
diff --git a/t/tests/binaries-general/debian/Makefile b/t/tests/binaries-general/debian/Makefile
index ac5bd0f..5f0f442 100644
--- a/t/tests/binaries-general/debian/Makefile
+++ b/t/tests/binaries-general/debian/Makefile
@@ -10,6 +10,8 @@ all:
$(COMPILE) -o basiclibrpath basic.c -Wl,--rpath,/usr/lib
# non-special rpath shipped in the package
$(COMPILE) -o basicshippedrpath basic.c -Wl,--rpath,/usr/share/foo
+ # special rpath shipped in the package, multiple paths
+ $(COMPILE) -o basicshippedrpathmore basic.c -Wl,--rpath,/usr/lib/binaries-general:/usr/lib/binaries-general/bar
# static version of basic for debugging checks
$(COMPILE) -static -o basic.static basic.c
# version with debug
@@ -27,6 +29,7 @@ install:
strip -s $(DESTDIR)/usr/lib/debug/usr/share/foo/basic
install -m 755 -c basiclibrpath $(DESTDIR)/usr/lib/foo/basiclibrpath
install -m 755 -c basicshippedrpath $(DESTDIR)/usr/lib/foo/basicshippedrpath
+ install -m 744 -c basicshippedrpathmore $(DESTDIR)/usr/lib/foo/basicshippedrpathmore
objcopy --only-keep-debug basic $(DESTDIR)/usr/lib/debug/basic
install -d "$(DESTDIR)/usr/lib/debug/.build-id/"`$(GETBUILDID) -s basicdebug`
install -m 755 -c basicdebug $(DESTDIR)/usr/share/foo/basicdebug
--
1.8.4.rc3
Reply to: