[SCM] Debian package checker branch, master, updated. 2.5.0-48-g7b15d89
The following commit has been merged in the master branch:
commit 7b15d89fbe91170cdf62e4d8428a03c3d30fbb21
Author: Niels Thykier <niels@thykier.net>
Date: Sun Jun 12 12:01:48 2011 +0200
Improved handling of shared libs in public multiarch dirs
Renamed i486-linux-gnu to i386-linux-gnu in
data/shared-libs/ldconfig-dirs and made checks/binaries consider
SO in multiarch dirs for public libraries.
diff --git a/checks/binaries b/checks/binaries
index 270be49..7f1fa74 100644
--- a/checks/binaries
+++ b/checks/binaries
@@ -118,6 +118,8 @@ our %EMBEDDED_LIBRARIES = (
'libtheora' => qr'Xiph.Org libtheora ',
);
+our $MULTIARCH_DIRS = Lintian::Data->new('binaries/multiarch-dirs', '\s+');
+
sub run {
my $pkg = shift;
@@ -126,6 +128,7 @@ my $info = shift;
my $proc = shift;
my $arch;
+my $madir;
my $dynsyms = 0;
my $needs_libc = '';
my $needs_libc_file;
@@ -178,17 +181,19 @@ foreach my $file (sort keys %{$info->objdump_info}) {
# positives with plugins like Apache modules, which may have their own SONAMEs
# but which don't matter for the purposes of this check. Also filter out
# nsswitch modules
+$madir = $MULTIARCH_DIRS->value($arch);
sub lib_soname_path {
- my (@paths) = @_;
+ my ($dir, @paths) = @_;
foreach my $path (@paths) {
next if $path =~ m%^(?:\.?/)?lib/libnss_[^.]+\.so(?:\.[0-9]+)$%;
return 1 if $path =~ m%^(?:\.?/)?lib/[^/]+$%;
return 1 if $path =~ m%^(?:\.?/)?usr/lib/[^/]+$%;
return 1 if $path =~ m%^(?:\.?/)?usr/X11R6/lib/[^/]+$%;
+ return 1 if defined $dir && $path =~ m%(?:\.?/)?usr/lib/$dir/[^/]++$%;
}
return 0;
}
-my @sonames = sort grep { lib_soname_path (@{$SONAME{$_}}) } keys %SONAME;
+my @sonames = sort grep { lib_soname_path($madir, @{$SONAME{$_}}) } keys %SONAME;
# try to identify transition strings
my $base_pkg = $pkg;
diff --git a/data/binaries/multiarch-dirs b/data/binaries/multiarch-dirs
new file mode 100644
index 0000000..7cad9bc
--- /dev/null
+++ b/data/binaries/multiarch-dirs
@@ -0,0 +1,275 @@
+# List of "triplet architecture" relationships as provided by
+# dpkg-architecture - arch -> dir mapping
+# Last updated: 2011-06-12
+# With: Debian dpkg-architecture version 1.16.0.3.
+
+alpha alpha-linux-gnu
+amd64 x86_64-linux-gnu
+arm arm-linux-gnu
+armeb armeb-linux-gnu
+armel arm-linux-gnueabi
+armhf arm-linux-gnueabihf
+avr32 avr32-linux-gnu
+darwin-alpha alpha-darwin
+darwin-amd64 x86_64-darwin
+darwin-arm arm-darwin
+darwin-armeb armeb-darwin
+darwin-avr32 avr32-darwin
+darwin-hppa hppa-darwin
+darwin-i386 i386-darwin
+darwin-ia64 ia64-darwin
+darwin-m32r m32r-darwin
+darwin-m68k m68k-darwin
+darwin-mips mips-darwin
+darwin-mipsel mipsel-darwin
+darwin-powerpc powerpc-darwin
+darwin-ppc64 powerpc64-darwin
+darwin-s390 s390-darwin
+darwin-s390x s390x-darwin
+darwin-sh3 sh3-darwin
+darwin-sh3eb sh3eb-darwin
+darwin-sh4 sh4-darwin
+darwin-sh4eb sh4eb-darwin
+darwin-sparc sparc-darwin
+darwin-sparc64 sparc64-darwin
+freebsd-alpha alpha-freebsd
+freebsd-amd64 x86_64-freebsd
+freebsd-arm arm-freebsd
+freebsd-armeb armeb-freebsd
+freebsd-avr32 avr32-freebsd
+freebsd-hppa hppa-freebsd
+freebsd-i386 i386-freebsd
+freebsd-ia64 ia64-freebsd
+freebsd-m32r m32r-freebsd
+freebsd-m68k m68k-freebsd
+freebsd-mips mips-freebsd
+freebsd-mipsel mipsel-freebsd
+freebsd-powerpc powerpc-freebsd
+freebsd-ppc64 powerpc64-freebsd
+freebsd-s390 s390-freebsd
+freebsd-s390x s390x-freebsd
+freebsd-sh3 sh3-freebsd
+freebsd-sh3eb sh3eb-freebsd
+freebsd-sh4 sh4-freebsd
+freebsd-sh4eb sh4eb-freebsd
+freebsd-sparc sparc-freebsd
+freebsd-sparc64 sparc64-freebsd
+hppa hppa-linux-gnu
+hurd-alpha alpha-gnu
+hurd-amd64 x86_64-gnu
+hurd-arm arm-gnu
+hurd-armeb armeb-gnu
+hurd-avr32 avr32-gnu
+hurd-hppa hppa-gnu
+hurd-i386 i386-gnu
+hurd-ia64 ia64-gnu
+hurd-m32r m32r-gnu
+hurd-m68k m68k-gnu
+hurd-mips mips-gnu
+hurd-mipsel mipsel-gnu
+hurd-powerpc powerpc-gnu
+hurd-ppc64 powerpc64-gnu
+hurd-s390 s390-gnu
+hurd-s390x s390x-gnu
+hurd-sh3 sh3-gnu
+hurd-sh3eb sh3eb-gnu
+hurd-sh4 sh4-gnu
+hurd-sh4eb sh4eb-gnu
+hurd-sparc sparc-gnu
+hurd-sparc64 sparc64-gnu
+i386 i386-linux-gnu
+ia64 ia64-linux-gnu
+kfreebsd-alpha alpha-kfreebsd-gnu
+kfreebsd-amd64 x86_64-kfreebsd-gnu
+kfreebsd-arm arm-kfreebsd-gnu
+kfreebsd-armeb armeb-kfreebsd-gnu
+kfreebsd-avr32 avr32-kfreebsd-gnu
+kfreebsd-hppa hppa-kfreebsd-gnu
+kfreebsd-i386 i386-kfreebsd-gnu
+kfreebsd-ia64 ia64-kfreebsd-gnu
+kfreebsd-m32r m32r-kfreebsd-gnu
+kfreebsd-m68k m68k-kfreebsd-gnu
+kfreebsd-mips mips-kfreebsd-gnu
+kfreebsd-mipsel mipsel-kfreebsd-gnu
+kfreebsd-powerpc powerpc-kfreebsd-gnu
+kfreebsd-ppc64 powerpc64-kfreebsd-gnu
+kfreebsd-s390 s390-kfreebsd-gnu
+kfreebsd-s390x s390x-kfreebsd-gnu
+kfreebsd-sh3 sh3-kfreebsd-gnu
+kfreebsd-sh3eb sh3eb-kfreebsd-gnu
+kfreebsd-sh4 sh4-kfreebsd-gnu
+kfreebsd-sh4eb sh4eb-kfreebsd-gnu
+kfreebsd-sparc sparc-kfreebsd-gnu
+kfreebsd-sparc64 sparc64-kfreebsd-gnu
+knetbsd-alpha alpha-knetbsd-gnu
+knetbsd-amd64 x86_64-knetbsd-gnu
+knetbsd-arm arm-knetbsd-gnu
+knetbsd-armeb armeb-knetbsd-gnu
+knetbsd-avr32 avr32-knetbsd-gnu
+knetbsd-hppa hppa-knetbsd-gnu
+knetbsd-i386 i386-knetbsd-gnu
+knetbsd-ia64 ia64-knetbsd-gnu
+knetbsd-m32r m32r-knetbsd-gnu
+knetbsd-m68k m68k-knetbsd-gnu
+knetbsd-mips mips-knetbsd-gnu
+knetbsd-mipsel mipsel-knetbsd-gnu
+knetbsd-powerpc powerpc-knetbsd-gnu
+knetbsd-ppc64 powerpc64-knetbsd-gnu
+knetbsd-s390 s390-knetbsd-gnu
+knetbsd-s390x s390x-knetbsd-gnu
+knetbsd-sh3 sh3-knetbsd-gnu
+knetbsd-sh3eb sh3eb-knetbsd-gnu
+knetbsd-sh4 sh4-knetbsd-gnu
+knetbsd-sh4eb sh4eb-knetbsd-gnu
+knetbsd-sparc sparc-knetbsd-gnu
+knetbsd-sparc64 sparc64-knetbsd-gnu
+kopensolaris-alpha alpha-kopensolaris-gnu
+kopensolaris-amd64 x86_64-kopensolaris-gnu
+kopensolaris-arm arm-kopensolaris-gnu
+kopensolaris-armeb armeb-kopensolaris-gnu
+kopensolaris-avr32 avr32-kopensolaris-gnu
+kopensolaris-hppa hppa-kopensolaris-gnu
+kopensolaris-i386 i386-kopensolaris-gnu
+kopensolaris-ia64 ia64-kopensolaris-gnu
+kopensolaris-m32r m32r-kopensolaris-gnu
+kopensolaris-m68k m68k-kopensolaris-gnu
+kopensolaris-mips mips-kopensolaris-gnu
+kopensolaris-mipsel mipsel-kopensolaris-gnu
+kopensolaris-powerpc powerpc-kopensolaris-gnu
+kopensolaris-ppc64 powerpc64-kopensolaris-gnu
+kopensolaris-s390 s390-kopensolaris-gnu
+kopensolaris-s390x s390x-kopensolaris-gnu
+kopensolaris-sh3 sh3-kopensolaris-gnu
+kopensolaris-sh3eb sh3eb-kopensolaris-gnu
+kopensolaris-sh4 sh4-kopensolaris-gnu
+kopensolaris-sh4eb sh4eb-kopensolaris-gnu
+kopensolaris-sparc sparc-kopensolaris-gnu
+kopensolaris-sparc64 sparc64-kopensolaris-gnu
+lpia i386-linux-gnulp
+m32r m32r-linux-gnu
+m68k m68k-linux-gnu
+mips mips-linux-gnu
+mipsel mipsel-linux-gnu
+netbsd-alpha alpha-netbsd
+netbsd-amd64 x86_64-netbsd
+netbsd-arm arm-netbsd
+netbsd-armeb armeb-netbsd
+netbsd-avr32 avr32-netbsd
+netbsd-hppa hppa-netbsd
+netbsd-i386 i386-netbsd
+netbsd-ia64 ia64-netbsd
+netbsd-m32r m32r-netbsd
+netbsd-m68k m68k-netbsd
+netbsd-mips mips-netbsd
+netbsd-mipsel mipsel-netbsd
+netbsd-powerpc powerpc-netbsd
+netbsd-ppc64 powerpc64-netbsd
+netbsd-s390 s390-netbsd
+netbsd-s390x s390x-netbsd
+netbsd-sh3 sh3-netbsd
+netbsd-sh3eb sh3eb-netbsd
+netbsd-sh4 sh4-netbsd
+netbsd-sh4eb sh4eb-netbsd
+netbsd-sparc sparc-netbsd
+netbsd-sparc64 sparc64-netbsd
+openbsd-alpha alpha-openbsd
+openbsd-amd64 x86_64-openbsd
+openbsd-arm arm-openbsd
+openbsd-armeb armeb-openbsd
+openbsd-avr32 avr32-openbsd
+openbsd-hppa hppa-openbsd
+openbsd-i386 i386-openbsd
+openbsd-ia64 ia64-openbsd
+openbsd-m32r m32r-openbsd
+openbsd-m68k m68k-openbsd
+openbsd-mips mips-openbsd
+openbsd-mipsel mipsel-openbsd
+openbsd-powerpc powerpc-openbsd
+openbsd-ppc64 powerpc64-openbsd
+openbsd-s390 s390-openbsd
+openbsd-s390x s390x-openbsd
+openbsd-sh3 sh3-openbsd
+openbsd-sh3eb sh3eb-openbsd
+openbsd-sh4 sh4-openbsd
+openbsd-sh4eb sh4eb-openbsd
+openbsd-sparc sparc-openbsd
+openbsd-sparc64 sparc64-openbsd
+powerpc powerpc-linux-gnu
+powerpcspe powerpc-linux-gnuspe
+ppc64 powerpc64-linux-gnu
+s390 s390-linux-gnu
+s390x s390x-linux-gnu
+sh3 sh3-linux-gnu
+sh3eb sh3eb-linux-gnu
+sh4 sh4-linux-gnu
+sh4eb sh4eb-linux-gnu
+solaris-alpha alpha-solaris
+solaris-amd64 x86_64-solaris
+solaris-arm arm-solaris
+solaris-armeb armeb-solaris
+solaris-avr32 avr32-solaris
+solaris-hppa hppa-solaris
+solaris-i386 i386-solaris
+solaris-ia64 ia64-solaris
+solaris-m32r m32r-solaris
+solaris-m68k m68k-solaris
+solaris-mips mips-solaris
+solaris-mipsel mipsel-solaris
+solaris-powerpc powerpc-solaris
+solaris-ppc64 powerpc64-solaris
+solaris-s390 s390-solaris
+solaris-s390x s390x-solaris
+solaris-sh3 sh3-solaris
+solaris-sh3eb sh3eb-solaris
+solaris-sh4 sh4-solaris
+solaris-sh4eb sh4eb-solaris
+solaris-sparc sparc-solaris
+solaris-sparc64 sparc64-solaris
+sparc sparc-linux-gnu
+sparc64 sparc64-linux-gnu
+uclibc-linux-alpha alpha-linux-uclibc
+uclibc-linux-amd64 x86_64-linux-uclibc
+uclibc-linux-arm arm-linux-uclibc
+uclibc-linux-armeb armeb-linux-uclibc
+uclibc-linux-armel arm-linux-uclibceabi
+uclibc-linux-avr32 avr32-linux-uclibc
+uclibc-linux-hppa hppa-linux-uclibc
+uclibc-linux-i386 i386-linux-uclibc
+uclibc-linux-ia64 ia64-linux-uclibc
+uclibc-linux-m32r m32r-linux-uclibc
+uclibc-linux-m68k m68k-linux-uclibc
+uclibc-linux-mips mips-linux-uclibc
+uclibc-linux-mipsel mipsel-linux-uclibc
+uclibc-linux-powerpc powerpc-linux-uclibc
+uclibc-linux-ppc64 powerpc64-linux-uclibc
+uclibc-linux-s390 s390-linux-uclibc
+uclibc-linux-s390x s390x-linux-uclibc
+uclibc-linux-sh3 sh3-linux-uclibc
+uclibc-linux-sh3eb sh3eb-linux-uclibc
+uclibc-linux-sh4 sh4-linux-uclibc
+uclibc-linux-sh4eb sh4eb-linux-uclibc
+uclibc-linux-sparc sparc-linux-uclibc
+uclibc-linux-sparc64 sparc64-linux-uclibc
+uclinux-alpha alpha-uclinux-uclibc
+uclinux-amd64 x86_64-uclinux-uclibc
+uclinux-arm arm-uclinux-uclibc
+uclinux-armeb armeb-uclinux-uclibc
+uclinux-armel arm-uclinux-uclibceabi
+uclinux-avr32 avr32-uclinux-uclibc
+uclinux-hppa hppa-uclinux-uclibc
+uclinux-i386 i386-uclinux-uclibc
+uclinux-ia64 ia64-uclinux-uclibc
+uclinux-m32r m32r-uclinux-uclibc
+uclinux-m68k m68k-uclinux-uclibc
+uclinux-mips mips-uclinux-uclibc
+uclinux-mipsel mipsel-uclinux-uclibc
+uclinux-powerpc powerpc-uclinux-uclibc
+uclinux-ppc64 powerpc64-uclinux-uclibc
+uclinux-s390 s390-uclinux-uclibc
+uclinux-s390x s390x-uclinux-uclibc
+uclinux-sh3 sh3-uclinux-uclibc
+uclinux-sh3eb sh3eb-uclinux-uclibc
+uclinux-sh4 sh4-uclinux-uclibc
+uclinux-sh4eb sh4eb-uclinux-uclibc
+uclinux-sparc sparc-uclinux-uclibc
+uclinux-sparc64 sparc64-uclinux-uclibc
diff --git a/data/shared-libs/ldconfig-dirs b/data/shared-libs/ldconfig-dirs
index 7f251a6..65121e9 100644
--- a/data/shared-libs/ldconfig-dirs
+++ b/data/shared-libs/ldconfig-dirs
@@ -27,7 +27,7 @@ usr/X11R6/lib
# See Bug#469301 and Bug#464796 for more details.
lib/arm-linux-gnu
lib/arm-linux-gnueabi
-lib/i486-linux-gnu
+lib/i386-linux-gnu
lib/hppa-linux-gnu
lib/m68k-linux-gnu
lib/mips-linux-gnu
@@ -38,7 +38,7 @@ 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/i386-linux-gnu
usr/lib/hppa-linux-gnu
usr/lib/m68k-linux-gnu
usr/lib/mips-linux-gnu
diff --git a/debian/changelog b/debian/changelog
index 540ef18..ec76239 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -14,6 +14,8 @@ lintian (2.5.1) UNRELEASED; urgency=low
* checks/binaries:
+ [NT] Applied patch from Paul Wise to detect binaries embeddeding
glee, glew and libtheora. (Closes: #629288)
+ + [NT] Also consider multiarch dirs when looking for public shared
+ libraries. (Closes: #630164)
* checks/debhelper{,.desc}:
+ [NT] Recognise that dh_python and dh_pycentral are now obsolete.
(Closes: #496902, #541978)
@@ -75,10 +77,15 @@ lintian (2.5.1) UNRELEASED; urgency=low
instead of dpkg-source, if the latter is not present.
(Closes: #626476)
+ * data/binaries/multiarch-dirs:
+ + [NT] New file - maps architectures to multiarch dirs.
* data/fields/{perl-provides,virtual-packages}:
+ [NT] Refreshed. (Closes: #627082, #627431)
* data/output/ftp-master-*:
+ [NT] Refreshed.
+ * data/shared-libs/ldconfig-dirs:
+ + [NT] Updated ldconfig path for i386 multiarch paths. Thanks to
+ Raphaël Hertzog for the reminder.
* data/spelling/corrections-multiword:
+ [CW] Remove the "requires to" correction; it has too many common
false positives, especially involving relative clauses.
diff --git a/private/refresh-archs b/private/refresh-archs
index a07457c..fe6e8cb 100755
--- a/private/refresh-archs
+++ b/private/refresh-archs
@@ -66,3 +66,24 @@ done
} | sort >> "$f"
mv "$f" "$1"/files/triplets
+
+### Multiarch dirs ###
+
+f="$(mktemp)"
+
+cat > "$f" <<EOF
+# List of "Multiarch dirs" relationships as provided by
+# dpkg-architecture - arch -> dir mapping
+# Last updated: $(date -u +'%Y-%m-%d')
+# With: $dpkg_version
+
+EOF
+
+{ # run this in a subshell to avoid multiple fd redirections
+for arch in $(dpkg-architecture -L); do
+ triplet="$(dpkg-architecture -a"$arch" -qDEB_HOST_MULTIARCH 2>/dev/null)"
+ printf "%s %s\n" "$arch" "$triplet"
+done
+} | sort >> "$f"
+
+mv "$f" "$1"/binaries/multiarch-dirs
diff --git a/t/tests/binaries-multiarch/debian/Makefile b/t/tests/binaries-multiarch-missing-pre-deps/debian/Makefile
similarity index 64%
copy from t/tests/binaries-multiarch/debian/Makefile
copy to t/tests/binaries-multiarch-missing-pre-deps/debian/Makefile
index 0b95b0e..a34620f 100644
--- a/t/tests/binaries-multiarch/debian/Makefile
+++ b/t/tests/binaries-multiarch-missing-pre-deps/debian/Makefile
@@ -7,10 +7,8 @@ ARCH=$(shell dpkg-architecture -qDEB_HOST_ARCH)
ifeq (i386,$(ARCH))
TRIPLETT = i386-linux-gnu
- WRONG_TRIPLETT = x86_64-linux-gnu
else
TRIPLETT = x86_64-linux-gnu
- WRONG_TRIPLETT = i386-linux-gnu
endif
@@ -18,12 +16,9 @@ all:
gcc -fPIC -shared -Wl,-z,defs -Wl,-soname,libbasic.so.2 -o libbasic.so.2 basic.c
install:
- # install it once under the correct triplet directory
+ # install it under the correct triplet directory
install -d $(DESTDIR)/usr/lib/$(TRIPLETT)
install -m 644 -c -s libbasic.so.2 $(DESTDIR)/usr/lib/$(TRIPLETT)/libbasic.so.2
- # and one more time under the wrong triplet directory
- install -d $(DESTDIR)/usr/lib/$(WRONG_TRIPLETT)
- install -m 644 -c -s libbasic.so.2 $(DESTDIR)/usr/lib/$(WRONG_TRIPLETT)/libbasic.so.2
clean distclean:
rm -f libbasic.so.2
diff --git a/t/tests/binaries-multiarch/debian/basic.c b/t/tests/binaries-multiarch-missing-pre-deps/debian/basic.c
similarity index 100%
copy from t/tests/binaries-multiarch/debian/basic.c
copy to t/tests/binaries-multiarch-missing-pre-deps/debian/basic.c
diff --git a/t/tests/files-python-modules/debian/debian/control.in b/t/tests/binaries-multiarch-missing-pre-deps/debian/debian/control.in
similarity index 79%
copy from t/tests/files-python-modules/debian/debian/control.in
copy to t/tests/binaries-multiarch-missing-pre-deps/debian/debian/control.in
index 1b72861..a3c6506 100644
--- a/t/tests/files-python-modules/debian/debian/control.in
+++ b/t/tests/binaries-multiarch-missing-pre-deps/debian/debian/control.in
@@ -1,15 +1,16 @@
Source: {$srcpkg}
Priority: extra
-Section: python
+Section: libs
Maintainer: {$author}
Standards-Version: {$standards_version}
Build-Depends: debhelper (>= 7.0.50~)
-Package: python-foo
-Architecture: all
-Depends: $\{misc:Depends\},
+Package: libbasic2
+Architecture: any
+Depends: $\{misc:Depends\}, $\{shlibs:Depends\}
Description: {$description}
This is a test package designed to exercise some feature or tag of
Lintian. It is part of the Lintian test suite and may do very odd
things. It should not be installed like a regular package. It may
be an empty package.
+
diff --git a/t/tests/binaries-multiarch-missing-pre-deps/debian/debian/libbasic2.symbols b/t/tests/binaries-multiarch-missing-pre-deps/debian/debian/libbasic2.symbols
new file mode 100644
index 0000000..c2b8fb3
--- /dev/null
+++ b/t/tests/binaries-multiarch-missing-pre-deps/debian/debian/libbasic2.symbols
@@ -0,0 +1,2 @@
+libbasic.so.2 libbasic2 #MINVER#
+ lib_interface@Base 1.0
diff --git a/t/tests/binaries-multiarch-missing-pre-deps/debian/debian/rules b/t/tests/binaries-multiarch-missing-pre-deps/debian/debian/rules
new file mode 100644
index 0000000..810606c
--- /dev/null
+++ b/t/tests/binaries-multiarch-missing-pre-deps/debian/debian/rules
@@ -0,0 +1,21 @@
+#!/usr/bin/make -f
+
+# Since dpkg in stable (Squeeze) does not support MULTIARCH we cannot use
+# dpkg-architecture -qDEB_HOST_MULTIARCH
+# Therefore this test is hardcoded to x86 and amd64
+
+ARCH=$(shell dpkg-architecture -qDEB_HOST_ARCH)
+
+ifeq (i386,$(ARCH))
+ TRIPLETT = i386-linux-gnu
+else
+ TRIPLETT = x86_64-linux-gnu
+endif
+
+%:
+ dh $@
+
+override_dh_makeshlibs:
+ # dpkg-dev uses ld.so.conf so if we do not pass the lib directly
+ # this will fail on all x86 machines without with libc6 < 2.13-5
+ dh_makeshlibs -- -edebian/libbasic2/usr/lib/$(TRIPLETT)/libbasic.so.2
diff --git a/t/tests/binaries-multiarch/desc b/t/tests/binaries-multiarch-missing-pre-deps/desc
similarity index 71%
copy from t/tests/binaries-multiarch/desc
copy to t/tests/binaries-multiarch-missing-pre-deps/desc
index 8074827..14e746d 100644
--- a/t/tests/binaries-multiarch/desc
+++ b/t/tests/binaries-multiarch-missing-pre-deps/desc
@@ -1,8 +1,7 @@
-Testname: binaries-multiarch
+Testname: binaries-multiarch-missing-pre-deps
Sequence: 6000
Version: 1.0
Description: Multiarch-related tests but not multiarch itself
Architecture: i386 amd64
Test-For:
- triplet-dir-and-architecture-mismatch
missing-pre-dependency-on-multiarch-support
diff --git a/t/tests/binaries-multiarch-missing-pre-deps/tags b/t/tests/binaries-multiarch-missing-pre-deps/tags
new file mode 100644
index 0000000..a28866b
--- /dev/null
+++ b/t/tests/binaries-multiarch-missing-pre-deps/tags
@@ -0,0 +1 @@
+E: libbasic2: missing-pre-dependency-on-multiarch-support
diff --git a/t/tests/binaries-multiarch/debian/Makefile b/t/tests/binaries-multiarch-wrong-dir/debian/Makefile
similarity index 67%
copy from t/tests/binaries-multiarch/debian/Makefile
copy to t/tests/binaries-multiarch-wrong-dir/debian/Makefile
index 0b95b0e..69df51a 100644
--- a/t/tests/binaries-multiarch/debian/Makefile
+++ b/t/tests/binaries-multiarch-wrong-dir/debian/Makefile
@@ -6,10 +6,8 @@
ARCH=$(shell dpkg-architecture -qDEB_HOST_ARCH)
ifeq (i386,$(ARCH))
- TRIPLETT = i386-linux-gnu
WRONG_TRIPLETT = x86_64-linux-gnu
else
- TRIPLETT = x86_64-linux-gnu
WRONG_TRIPLETT = i386-linux-gnu
endif
@@ -18,10 +16,7 @@ all:
gcc -fPIC -shared -Wl,-z,defs -Wl,-soname,libbasic.so.2 -o libbasic.so.2 basic.c
install:
- # install it once under the correct triplet directory
- install -d $(DESTDIR)/usr/lib/$(TRIPLETT)
- install -m 644 -c -s libbasic.so.2 $(DESTDIR)/usr/lib/$(TRIPLETT)/libbasic.so.2
- # and one more time under the wrong triplet directory
+ # Install it once under the wrong dir
install -d $(DESTDIR)/usr/lib/$(WRONG_TRIPLETT)
install -m 644 -c -s libbasic.so.2 $(DESTDIR)/usr/lib/$(WRONG_TRIPLETT)/libbasic.so.2
diff --git a/t/tests/binaries-multiarch/debian/basic.c b/t/tests/binaries-multiarch-wrong-dir/debian/basic.c
similarity index 100%
copy from t/tests/binaries-multiarch/debian/basic.c
copy to t/tests/binaries-multiarch-wrong-dir/debian/basic.c
diff --git a/t/tests/binaries-multiarch/desc b/t/tests/binaries-multiarch-wrong-dir/desc
similarity index 68%
copy from t/tests/binaries-multiarch/desc
copy to t/tests/binaries-multiarch-wrong-dir/desc
index 8074827..c803102 100644
--- a/t/tests/binaries-multiarch/desc
+++ b/t/tests/binaries-multiarch-wrong-dir/desc
@@ -1,8 +1,7 @@
-Testname: binaries-multiarch
+Testname: binaries-multiarch-wrong-dir
Sequence: 6000
Version: 1.0
Description: Multiarch-related tests but not multiarch itself
Architecture: i386 amd64
Test-For:
triplet-dir-and-architecture-mismatch
- missing-pre-dependency-on-multiarch-support
diff --git a/t/tests/binaries-multiarch/post_test b/t/tests/binaries-multiarch-wrong-dir/post_test
similarity index 100%
copy from t/tests/binaries-multiarch/post_test
copy to t/tests/binaries-multiarch-wrong-dir/post_test
diff --git a/t/tests/binaries-multiarch-wrong-dir/tags b/t/tests/binaries-multiarch-wrong-dir/tags
new file mode 100644
index 0000000..8ed00c0
--- /dev/null
+++ b/t/tests/binaries-multiarch-wrong-dir/tags
@@ -0,0 +1,2 @@
+E: binaries-multiarch-wrong-dir: triplet-dir-and-architecture-mismatch usr/lib/x86_64-linux-gnu/ is for amd64
+I: binaries-multiarch-wrong-dir: no-symbols-control-file usr/lib/x86_64-linux-gnu/libbasic.so.2
diff --git a/t/tests/binaries-multiarch/debian/Makefile b/t/tests/binaries-multiarch/debian/Makefile
index 0b95b0e..a34620f 100644
--- a/t/tests/binaries-multiarch/debian/Makefile
+++ b/t/tests/binaries-multiarch/debian/Makefile
@@ -7,10 +7,8 @@ ARCH=$(shell dpkg-architecture -qDEB_HOST_ARCH)
ifeq (i386,$(ARCH))
TRIPLETT = i386-linux-gnu
- WRONG_TRIPLETT = x86_64-linux-gnu
else
TRIPLETT = x86_64-linux-gnu
- WRONG_TRIPLETT = i386-linux-gnu
endif
@@ -18,12 +16,9 @@ all:
gcc -fPIC -shared -Wl,-z,defs -Wl,-soname,libbasic.so.2 -o libbasic.so.2 basic.c
install:
- # install it once under the correct triplet directory
+ # install it under the correct triplet directory
install -d $(DESTDIR)/usr/lib/$(TRIPLETT)
install -m 644 -c -s libbasic.so.2 $(DESTDIR)/usr/lib/$(TRIPLETT)/libbasic.so.2
- # and one more time under the wrong triplet directory
- install -d $(DESTDIR)/usr/lib/$(WRONG_TRIPLETT)
- install -m 644 -c -s libbasic.so.2 $(DESTDIR)/usr/lib/$(WRONG_TRIPLETT)/libbasic.so.2
clean distclean:
rm -f libbasic.so.2
diff --git a/t/tests/spelling-package-name/debian/debian/control.in b/t/tests/binaries-multiarch/debian/debian/control.in
similarity index 54%
copy from t/tests/spelling-package-name/debian/debian/control.in
copy to t/tests/binaries-multiarch/debian/debian/control.in
index d42604a..28b4016 100644
--- a/t/tests/spelling-package-name/debian/debian/control.in
+++ b/t/tests/binaries-multiarch/debian/debian/control.in
@@ -1,19 +1,21 @@
Source: {$srcpkg}
Priority: extra
-Section: devel
+Section: libs
Maintainer: {$author}
Standards-Version: {$standards_version}
Build-Depends: debhelper (>= 7.0.50~)
-Package: nam
-Architecture: all
-Depends: $\{misc:Depends\},
+Package: libbasic2
+Architecture: any
+Pre-Depends: $\{misc:Pre-Depends\}, multiarch-support
+Depends: $\{misc:Depends\}, $\{shlibs:Depends\}
Description: {$description}
- This is a test to see if the spell checker realizes that nam is
- not a spelling mistake, but the name of the package.
- .
This is a test package designed to exercise some feature or tag of
Lintian. It is part of the Lintian test suite and may do very odd
things. It should not be installed like a regular package. It may
be an empty package.
+ .
+ Note there is an explicitly pre-depends on multiarch-support, since
+ older versions of debhelper might not use it yet. dpkg-dev will
+ remove the duplicate entry (if any).
diff --git a/t/tests/binaries-multiarch/debian/debian/libbasic2.symbols b/t/tests/binaries-multiarch/debian/debian/libbasic2.symbols
new file mode 100644
index 0000000..c2b8fb3
--- /dev/null
+++ b/t/tests/binaries-multiarch/debian/debian/libbasic2.symbols
@@ -0,0 +1,2 @@
+libbasic.so.2 libbasic2 #MINVER#
+ lib_interface@Base 1.0
diff --git a/t/tests/binaries-multiarch/debian/debian/rules b/t/tests/binaries-multiarch/debian/debian/rules
new file mode 100644
index 0000000..810606c
--- /dev/null
+++ b/t/tests/binaries-multiarch/debian/debian/rules
@@ -0,0 +1,21 @@
+#!/usr/bin/make -f
+
+# Since dpkg in stable (Squeeze) does not support MULTIARCH we cannot use
+# dpkg-architecture -qDEB_HOST_MULTIARCH
+# Therefore this test is hardcoded to x86 and amd64
+
+ARCH=$(shell dpkg-architecture -qDEB_HOST_ARCH)
+
+ifeq (i386,$(ARCH))
+ TRIPLETT = i386-linux-gnu
+else
+ TRIPLETT = x86_64-linux-gnu
+endif
+
+%:
+ dh $@
+
+override_dh_makeshlibs:
+ # dpkg-dev uses ld.so.conf so if we do not pass the lib directly
+ # this will fail on all x86 machines without with libc6 < 2.13-5
+ dh_makeshlibs -- -edebian/libbasic2/usr/lib/$(TRIPLETT)/libbasic.so.2
diff --git a/t/tests/binaries-multiarch/desc b/t/tests/binaries-multiarch/desc
index 8074827..d4622f7 100644
--- a/t/tests/binaries-multiarch/desc
+++ b/t/tests/binaries-multiarch/desc
@@ -1,8 +1,8 @@
Testname: binaries-multiarch
Sequence: 6000
Version: 1.0
-Description: Multiarch-related tests but not multiarch itself
+Description: Test of a correct multiarch package
Architecture: i386 amd64
-Test-For:
+Test-Against:
triplet-dir-and-architecture-mismatch
missing-pre-dependency-on-multiarch-support
diff --git a/t/tests/binaries-multiarch/tags b/t/tests/binaries-multiarch/tags
index c9803c7..e69de29 100644
--- a/t/tests/binaries-multiarch/tags
+++ b/t/tests/binaries-multiarch/tags
@@ -1,3 +0,0 @@
-E: binaries-multiarch: missing-pre-dependency-on-multiarch-support
-E: binaries-multiarch: triplet-dir-and-architecture-mismatch usr/lib/x86_64-linux-gnu/ is for amd64
-I: binaries-multiarch: no-symbols-control-file usr/lib/x86_64-linux-gnu/libbasic.so.2
--
Debian package checker
Reply to: