[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

[SCM] Debian package checker branch, master, updated. 2.2.10-94-gfad65a1



The following commit has been merged in the master branch:
commit fad65a16c8a1327b09bf48cf6150b81404a7c1dc
Author: Adam D. Barratt <adam@adam-barratt.org.uk>
Date:   Tue Jun 9 22:46:28 2009 +0100

    Exclude (/usr)?/lib from the "shipped in package" rpath target exemption
    
    * checks/binaries:
      + [ADB] When checking for binaries which define rpaths, don't exclude
        rpaths of /lib and /usr/lib, even if the directory is shipped by the
        package.  (Closes: #532508)

diff --git a/checks/binaries b/checks/binaries
index dd5210b..3dd7476 100644
--- a/checks/binaries
+++ b/checks/binaries
@@ -257,7 +257,7 @@ foreach my $file (sort keys %{$info->file_info}) {
 	foreach my $rpath (map {File::Spec->canonpath($_)} keys %{$objdump->{RPATH}}) {
 	    next if $rpath =~ m,^/usr/lib/(?:games/)?\Q$pkg\E(?:/|\z),;
 	    next if $rpath =~ m,^\$ORIGIN$,;
-	    next if $directories{$rpath};
+	    next if $directories{$rpath} and $rpath !~ m,^(?:/usr)?/lib/?\z,;
 	    tag "binary-or-shlib-defines-rpath", "$file $rpath";
 	}
     }
diff --git a/debian/changelog b/debian/changelog
index 9cd791e..794c0f7 100755
--- a/debian/changelog
+++ b/debian/changelog
@@ -19,6 +19,9 @@ lintian (2.2.11) UNRELEASED; urgency=low
     + [ADB] Don't consider an 64-bit kernel module shipped in a binary
       package for the corresponding 32-bit architecture to be "from other
       architecture".  (Closes: #532013)
+    + [ADB] When checking for binaries which define rpaths, don't exclude
+      rpaths of /lib and /usr/lib, even if the directory is shipped by the
+      package.  (Closes: #532508)
   * checks/control-file{,.desc}:
     + [ADB] Refer to main, contrib and non-free as archive areas rather
       than categories.
diff --git a/t/tests/binaries-general/debian/Makefile b/t/tests/binaries-general/debian/Makefile
index 344b2db..98ecb6b 100644
--- a/t/tests/binaries-general/debian/Makefile
+++ b/t/tests/binaries-general/debian/Makefile
@@ -1,5 +1,10 @@
 all:
+	# rpath not matching any of the exceptions to the rpath checks
 	gcc -o basic basic.c -pg -Wl,--rpath,/usr/local/lib
+	# rpath shipped in the package, but one of {/usr}?/lib
+	gcc -o basiclibrpath basic.c -ph -Wl,--rpath,/usr/lib
+	# non-special rpath shipped in the package
+	gcc -o basicshippedrpath basic.c -ph -Wl,--rpath,/usr/share/foo
 
 install:
 	install -d $(DESTDIR)/usr/share/foo/
@@ -7,6 +12,9 @@ install:
 	install -d $(DESTDIR)/usr/lib/debug/usr/share/foo/
 	objcopy --only-keep-debug basic $(DESTDIR)/usr/lib/debug/usr/share/foo/basic
 	strip -s $(DESTDIR)/usr/lib/debug/usr/share/foo/basic
+	install -d $(DESTDIR)/usr/lib/foo/
+	install -m 755 -c basiclibrpath $(DESTDIR)/usr/lib/foo/basiclibrpath
+	install -m 755 -c basicshippedrpath $(DESTDIR)/usr/lib/foo/basicshippedrpath
 
 clean distclean:
 	rm -f basic
diff --git a/t/tests/binaries-general/tags b/t/tests/binaries-general/tags
index b553878..a471e53 100644
--- a/t/tests/binaries-general/tags
+++ b/t/tests/binaries-general/tags
@@ -1,5 +1,6 @@
 E: binaries-general: arch-dependent-file-in-usr-share ./usr/share/foo/basic
 E: binaries-general: library-in-debug-or-profile-should-not-be-stripped ./usr/lib/debug/usr/share/foo/basic
 W: binaries-general: binary-compiled-with-profiling-enabled ./usr/share/foo/basic
+W: binaries-general: binary-or-shlib-defines-rpath ./usr/lib/foo/basiclibrpath /usr/lib
 W: binaries-general: binary-or-shlib-defines-rpath ./usr/share/foo/basic /usr/local/lib
 W: binaries-general: debug-package-should-be-named-dbg usr/lib/debug/usr/

-- 
Debian package checker


Reply to: