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

lintian: r1249 - in trunk: checks data data/binaries data/shared-libs debian testset testset/libbaz/debian



Author: rra
Date: 2008-03-05 03:25:32 +0100 (Wed, 05 Mar 2008)
New Revision: 1249

Added:
   trunk/data/binaries/
   trunk/data/binaries/multiarch
Modified:
   trunk/checks/binaries
   trunk/data/shared-libs/ldconfig-dirs
   trunk/debian/changelog
   trunk/testset/libbaz/debian/control
   trunk/testset/libbaz/debian/rules
   trunk/testset/tags.libbaz
Log:
* checks/binaries:
  + [RA] Permit architecture: all packages to have binaries in the
    multiarch directories.  (Closes: #469301)
  + [RA] Allow and expect ldconfig, SONAMEs, and shlibs treatment of
    libraries in multiarch directories.
* data/binaries/multiarch:
  + [RA] New file listing multiarch binary directories.

Modified: trunk/checks/binaries
===================================================================
--- trunk/checks/binaries	2008-03-04 21:20:41 UTC (rev 1248)
+++ trunk/checks/binaries	2008-03-05 02:25:32 UTC (rev 1249)
@@ -170,9 +170,15 @@
     # binary or object file?
     next unless ($info =~ m/^[^,]*\bELF\b/) or ($info =~ m/\bcurrent ar archive\b/);
 
+    # Warn about Architecture: all packages that contain shared libraries, but
+    # only if those libraries aren't installed in a multiarch directory.  The
+    # package may be a support package for cross-compiles.
     if ($arch eq 'all') {
-	# package is `Architecture: all' but contains libs!?
-	tag "arch-independent-package-contains-binary-or-object", "$file";
+	my ($arch) = ($file =~ m,^\./(?:usr/)?lib/([^/]+)/,);
+	my $multiarch = Lintian::Data->new('binaries/multiarch');
+	unless ($arch and $multiarch->known($arch)) {
+	    tag "arch-independent-package-contains-binary-or-object", "$file";
+	}
     }
 
     # ELF?

Added: trunk/data/binaries/multiarch
===================================================================
--- trunk/data/binaries/multiarch	                        (rev 0)
+++ trunk/data/binaries/multiarch	2008-03-05 02:25:32 UTC (rev 1249)
@@ -0,0 +1,18 @@
+# Known multiarch directories.  Binaries under one of these directories
+# under /lib or /usr/lib are permitted in Architecture: all packages since
+# the package may be for multiarch support in a related architecture.
+#
+# See Bug#469301 and Bug#464796 for more details.
+
+# Regular Debian ports.
+arm-linux-gnu
+arm-linux-gnueabi
+i486-linux-gnu
+hppa-linux-gnu
+m68k-linux-gnu
+mips-linux-gnu
+mipsel-linux-gnu
+powerpc-linux-gnu
+s390-linux-gnu
+sparc-linux-gnu
+x86_64-linux-gnu

Modified: trunk/data/shared-libs/ldconfig-dirs
===================================================================
--- trunk/data/shared-libs/ldconfig-dirs	2008-03-04 21:20:41 UTC (rev 1248)
+++ trunk/data/shared-libs/ldconfig-dirs	2008-03-05 02:25:32 UTC (rev 1249)
@@ -23,9 +23,31 @@
 # This is now obsolete, but is still in the standard ld.so.conf.
 usr/X11R6/lib
 
-# We intentionally do not include the multiarch directories like
-# /lib/i486-linux-gnu since libraries installed there may be only for
-# cross-compilation and not intended for the host operating system.  To
-# determine whether they're for the host, we'd need to apply more complex
-# logic to map the architecture of the Debian package to the appropriate
-# multiarch directory name.
+# Multiarch directories.  Currently, these aren't used officially by the
+# project but ld.so looks in the ones native to the local platform.
+# Hopefully including the ones not native to the local platform won't
+# hurt.
+#
+# See Bug#469301 and Bug#464796 for more details.
+lib/arm-linux-gnu
+lib/arm-linux-gnueabi
+lib/i486-linux-gnu
+lib/hppa-linux-gnu
+lib/m68k-linux-gnu
+lib/mips-linux-gnu
+lib/mipsel-linux-gnu
+lib/powerpc-linux-gnu
+lib/s390-linux-gnu
+lib/sparc-linux-gnu
+lib/x86_64-linux-gnu
+usr/lib/arm-linux-gnu
+usr/lib/arm-linux-gnueabi
+usr/lib/i486-linux-gnu
+usr/lib/hppa-linux-gnu
+usr/lib/m68k-linux-gnu
+usr/lib/mips-linux-gnu
+usr/lib/mipsel-linux-gnu
+usr/lib/powerpc-linux-gnu
+usr/lib/s390-linux-gnu
+usr/lib/sparc-linux-gnu
+usr/lib/x86_64-linux-gnu

Modified: trunk/debian/changelog
===================================================================
--- trunk/debian/changelog	2008-03-04 21:20:41 UTC (rev 1248)
+++ trunk/debian/changelog	2008-03-05 02:25:32 UTC (rev 1249)
@@ -1,12 +1,19 @@
 lintian (1.23.47) UNRELEASED; urgency=low
 
+  * checks/binaries:
+    + [RA] Permit architecture: all packages to have binaries in the
+      multiarch directories.  (Closes: #469301)
   * checks/scripts:
     + [RA] Attempt to quash some Perl warnings.
   * checks/shared-libs:
     + [RA] Move the default ld.so search path into data.  Drop obsolete
       /usr/lib/libg++-dbg, /usr/X11R6/lib/Xaw3d, and libc5 compatibility
       directories in the process.
+    + [RA] Allow and expect ldconfig, SONAMEs, and shlibs treatment of
+      libraries in multiarch directories.
 
+  * data/binaries/multiarch:
+    + [RA] New file listing multiarch binary directories.
   * data/shared-libs/ldconfig-dirs:
     + [RA] New file listing directories searched by ld.so.
 

Modified: trunk/testset/libbaz/debian/control
===================================================================
--- trunk/testset/libbaz/debian/control	2008-03-04 21:20:41 UTC (rev 1248)
+++ trunk/testset/libbaz/debian/control	2008-03-05 02:25:32 UTC (rev 1249)
@@ -35,3 +35,9 @@
 Priority: optional
 Description: debugging package
  Regression test for lintian's handling of libraries
+
+Package: ia32-libbaz2
+Architecture: all
+Depends: ${shlibs:Depends}
+Description: multiarch package
+ Regression test for lintian's handling of libraries

Modified: trunk/testset/libbaz/debian/rules
===================================================================
--- trunk/testset/libbaz/debian/rules	2008-03-04 21:20:41 UTC (rev 1248)
+++ trunk/testset/libbaz/debian/rules	2008-03-05 02:25:32 UTC (rev 1249)
@@ -26,9 +26,15 @@
 	cp -a libbaz2.so.* debian/libbaz2/usr/lib
 	chmod a-x debian/libbaz2/usr/lib/*
 
+	# Also install in the multiarch path.
+	install -d debian/ia32-libbaz2/usr/lib/i486-linux-gnu
+	cp -a libbaz2.so.* debian/ia32-libbaz2/usr/lib/i486-linux-gnu
+	chmod a-x debian/ia32-libbaz2/usr/lib/i486-linux-gnu/*
+
 	# General stuff that is tested in other testsets:
-	dh_installdocs -plibbaz2 -plibbaz2-dev -plibbaz2-dbg
-	dh_compress -plibbaz2 -plibbaz2-dev -plibbaz2-dbg
+	dh_installdocs -plibbaz2 -plibbaz2-dev -plibbaz2-dbg -pia32-libbaz2
+	dh_installchangelogs -pia32-libbaz2
+	dh_compress -plibbaz2 -plibbaz2-dev -plibbaz2-dbg -pia32-libbaz2
 
 	# Mess up the libbaz2 changelog files to test the symlink handling.
 	ln -s /usr/share/doc/lintian/changelog.gz \
@@ -39,14 +45,16 @@
 
 	# Okay, if either line is omitted, it should be noted
 	dh_strip --dbg-package=libbaz2-dbg -plibbaz2 -plibbaz2-dev
-	dh_makeshlibs -plibbaz2 -plibbaz2-dev -plibbaz2-dbg
-	dh_shlibdeps -plibbaz2 -plibbaz2-dev -plibbaz2-dbg
+	dh_strip -pia32-libbaz2
+	dh_makeshlibs -plibbaz2 -plibbaz2-dev -plibbaz2-dbg -pia32-libbaz2
+	dh_shlibdeps -plibbaz2 -plibbaz2-dev -plibbaz2-dbg -pia32-libbaz2
 
 	# and again, regular packaging stuff
-	dh_installdeb -plibbaz2 -plibbaz2-dev -plibbaz2-dbg
+	dh_installdeb -plibbaz2 -plibbaz2-dev -plibbaz2-dbg -pia32-libbaz2
 	echo udeb: libbaz2 1.0 libbaz2 >> debian/libbaz2/DEBIAN/shlibs
-	dh_gencontrol -plibbaz2 -plibbaz2-dev -plibbaz2-dbg
-	dh_builddeb -plibbaz2 -plibbaz2-dev -plibbaz2-dbg
+	dh_gencontrol -plibbaz2 -plibbaz2-dev -plibbaz2-dbg -pia32-libbaz2
+	dh_md5sums -pia32-libbaz2
+	dh_builddeb -plibbaz2 -plibbaz2-dev -plibbaz2-dbg -pia32-libbaz2
 
 # and the incorrect one
 binary-arch: build binary-correct

Modified: trunk/testset/tags.libbaz
===================================================================
--- trunk/testset/tags.libbaz	2008-03-04 21:20:41 UTC (rev 1248)
+++ trunk/testset/tags.libbaz	2008-03-05 02:25:32 UTC (rev 1249)
@@ -32,6 +32,7 @@
 I: libbaz2-dev: no-md5sums-control-file
 I: libbaz2: no-md5sums-control-file
 N: 4 tags overridden (4 warnings)
+W: ia32-libbaz2: new-package-should-close-itp-bug
 W: libbaz source: ancient-standards-version 3.2.1 (current is 3.7.3)
 W: libbaz source: changelog-should-mention-nmu
 W: libbaz source: native-package-with-dash-version


Reply to: