Hi Niels, On Sat, Apr 09, 2011 at 02:36:17PM +0200, Niels Thykier wrote: > I thought I would bring a little update on the progress on Lintian > 2.5.0~rc3. I have CC'ed Steve Langasek and Vincent Fourmond because I > last I heard from you, you were working on patches for bugs I am > considering for the 2.5.0~rc3 release (and I was not sure if you were > subscribed).
> Status/summery > ============== > Since my last update [LU], I have fixed #618587 (armhf support), #621667 > (Add S-V 3.9.2), #621658 (add/use --dump-logs in tests[1]), > #621681 (disable pkgbinarymangler during tests[2]) and #621667 (add > spelling mistakes/corrections). I also fixed the uninitialized variable > errors mentioned in #621006. > > On my TODO list I still have the merge of infra-513663 into master > (scheduled for Tuesday), inclusion of more java checks (#600829, waiting > for tests) and some multi-arch related checks (bug/patch no yet, waiting > for vorlon). I may also include #620120 (confusion about dash > essentialness) in 2.5.0~rc3. Sorry for the delays getting this to you. The attached patches take care of the most critical multiarch checks. Along the way I found that data/binaries/multiarch was being used to incorrectly suppress warnings about files forbidden by policy, so the first patch removes this wrong file; and that data/files/triplets is already used for per-architecture filesystem paths, so I've updated this to use the final multiarch paths based on DEB_HOST_MULTIARCH instead of DEB_HOST_GNU_TYPE (second patch). The third patch in the series adds the new check for multiarch-support, the one we need in place to make sure developers aren't breaking the world as they upload libraries. I strongly believe this should be an archive check, fwiw. The fourth patch fixes up the test suite for binaries-multiarch - since i486-linux-gnu is no longer treated as a multiarch directory (because it isn't), the test case fails to trigger the error. We may want an additional test case later to warn about /usr/lib/i486-linux-gnu in general, but that's a lower priority. I'm sorry to say I haven't included a test suite change yet to go with patch #3. I'll work on that, but can't promise when I'll have it done. -- Steve Langasek Give me a lever long enough and a Free OS Debian Developer to set it on, and I can move the world. Ubuntu Developer http://www.debian.org/ slanga...@ubuntu.com vor...@debian.org
From 0ec0dea6f448387b35b097d91ced04cbda0e266e Mon Sep 17 00:00:00 2001 From: Steve Langasek <steve.langa...@linaro.org> Date: Mon, 18 Apr 2011 01:07:14 -0700 Subject: [PATCH 1/4] Drop wrong checks for multiarch directories Architecture: all packages and packages of a different architecture are not allowed to install libraries to the multiarch directories. Drop these wrong exclusions. --- checks/binaries | 20 ++++---------------- data/binaries/multiarch | 18 ------------------ debian/changelog | 4 ++++ 3 files changed, 8 insertions(+), 34 deletions(-) delete mode 100644 data/binaries/multiarch diff --git a/checks/binaries b/checks/binaries index eda994a..626934d 100644 --- a/checks/binaries +++ b/checks/binaries @@ -115,8 +115,6 @@ our %EMBEDDED_LIBRARIES = ( 'libpcap' => qr'(?:pcap_activate: The "any" device isn\'t supported|corrupted frame on kernel ring mac offset)', ); -our $MULTIARCH; - sub run { my $pkg = shift; @@ -239,16 +237,9 @@ foreach my $file (@{$info->sorted_file_info}) { # binary or object file? next unless ($fileinfo =~ m/^[^,]*\bELF\b/) or ($fileinfo =~ 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. + # Warn about Architecture: all packages that contain shared libraries. if ($arch eq 'all') { - my ($arch_path) = ($file =~ m,^(?:usr/)?lib/([^/]+)/,); - $MULTIARCH = Lintian::Data->new('binaries/multiarch') - unless defined($MULTIARCH); - unless ($arch_path and $MULTIARCH->known($arch_path)) { - tag 'arch-independent-package-contains-binary-or-object', $file; - } + tag 'arch-independent-package-contains-binary-or-object', $file; } # ELF? @@ -263,7 +254,7 @@ foreach my $file (@{$info->sorted_file_info}) { } if ($arch ne 'all' and $fileinfo !~ m/$ARCH_REGEX{$arch}/) { - if ($file =~ m,(?:^|/)lib(\d{2})/, or $file =~ m,^emul/ia(\d{2}),) { + if ($file =~ m,(?:^|/)lib(\d{2})/, or $file =~ m,^emul/ia(\d{2}),) { tag 'binary-from-other-architecture', $file unless ($fileinfo =~ m/$ARCH_REGEX{$1}/); } elsif ($arch eq 'amd64' and $fileinfo =~ m/$ARCH_REGEX{i386}/) { @@ -273,10 +264,7 @@ foreach my $file (@{$info->sorted_file_info}) { and $file =~ m,^lib/modules/,) { # Allow amd64 kernel modules to be installed on i386. } else { - $MULTIARCH = Lintian::Data->new('binaries/multiarch') - unless defined($MULTIARCH); - tag 'binary-from-other-architecture', $file - unless (grep { $file =~ m,/\Q$_\E/, } $MULTIARCH->all); + tag 'binary-from-other-architecture', $file; } } diff --git a/data/binaries/multiarch b/data/binaries/multiarch deleted file mode 100644 index 0efa0fd..0000000 --- a/data/binaries/multiarch +++ /dev/null @@ -1,18 +0,0 @@ -# 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 diff --git a/debian/changelog b/debian/changelog index ad2c9e7..b0adc1c 100644 --- a/debian/changelog +++ b/debian/changelog @@ -3,11 +3,15 @@ lintian (2.5.0~rc3) UNRELEASED; urgency=low * checks/binaries: + [NT] Accepted patch from Loïc Minier to support the armhf architecture. (Closes: #618587) + + [SRL] Drop wrong checks for multiarch directories. Multiarch + directories are only allowed in packages of the given architecture. * data/fields/architectures: + [NT] Updated to include armhf. * data/files/triplets: + [NT] Updated to include armhf triplet. + * data/binaries/multiarch: + + [SRL] Drop. -- Niels Thykier <ni...@thykier.net> Thu, 07 Apr 2011 19:00:59 +0200 -- 1.7.4.1
From e34acb5652b30bf7268c79473ce97934d5c5deab Mon Sep 17 00:00:00 2001 From: Steve Langasek <steve.langa...@linaro.org> Date: Tue, 19 Apr 2011 13:05:11 -0700 Subject: [PATCH 2/4] Refresh data/files/triplets with the multiarch triplets --- data/files/triplets | 28 ++++++++++++++-------------- debian/changelog | 5 +++++ private/refresh-archs | 2 +- 3 files changed, 20 insertions(+), 15 deletions(-) diff --git a/data/files/triplets b/data/files/triplets index 39d573f..b5e8fd2 100644 --- a/data/files/triplets +++ b/data/files/triplets @@ -1,6 +1,6 @@ # List of "triplet architecture" relationships as provided by # dpkg-architecture -# Last updated: 2011-04-07 +# Last updated: 2011-04-19 # With: Debian dpkg-architecture version 1.16.0.1. alpha-darwin darwin-alpha @@ -67,19 +67,19 @@ hppa-netbsd netbsd-hppa hppa-openbsd openbsd-hppa hppa-solaris solaris-hppa hppa-uclinux-uclibc uclinux-hppa -i486-darwin darwin-i386 -i486-freebsd freebsd-i386 -i486-gnu hurd-i386 -i486-kfreebsd-gnu kfreebsd-i386 -i486-knetbsd-gnu knetbsd-i386 -i486-kopensolaris-gnu kopensolaris-i386 -i486-linux-gnu i386 -i486-linux-gnulp lpia -i486-linux-uclibc uclibc-linux-i386 -i486-netbsd netbsd-i386 -i486-openbsd openbsd-i386 -i486-solaris solaris-i386 -i486-uclinux-uclibc uclinux-i386 +i386-darwin darwin-i386 +i386-freebsd freebsd-i386 +i386-gnu hurd-i386 +i386-kfreebsd-gnu kfreebsd-i386 +i386-knetbsd-gnu knetbsd-i386 +i386-kopensolaris-gnu kopensolaris-i386 +i386-linux-gnu i386 +i386-linux-gnulp lpia +i386-linux-uclibc uclibc-linux-i386 +i386-netbsd netbsd-i386 +i386-openbsd openbsd-i386 +i386-solaris solaris-i386 +i386-uclinux-uclibc uclinux-i386 ia64-darwin darwin-ia64 ia64-freebsd freebsd-ia64 ia64-gnu hurd-ia64 diff --git a/debian/changelog b/debian/changelog index b0adc1c..e04e80f 100644 --- a/debian/changelog +++ b/debian/changelog @@ -6,10 +6,15 @@ lintian (2.5.0~rc3) UNRELEASED; urgency=low + [SRL] Drop wrong checks for multiarch directories. Multiarch directories are only allowed in packages of the given architecture. + * private/refresh-archs: + + [SRL] update to output directory mappings based on DEB_HOST_MULTIARCH + instead of DEB_HOST_GNU_TYPE. + * data/fields/architectures: + [NT] Updated to include armhf. * data/files/triplets: + [NT] Updated to include armhf triplet. + + [SRL] refresh with the final approved multiarch paths. * data/binaries/multiarch: + [SRL] Drop. diff --git a/private/refresh-archs b/private/refresh-archs index 7f13922..a07457c 100755 --- a/private/refresh-archs +++ b/private/refresh-archs @@ -60,7 +60,7 @@ 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_GNU_TYPE 2>/dev/null)" + triplet="$(dpkg-architecture -a"$arch" -qDEB_HOST_MULTIARCH 2>/dev/null)" printf "%s %s\n" "$triplet" "$arch" done } | sort >> "$f" -- 1.7.4.1
From d7aa087deace7de76a600f47041a9133c376d072 Mon Sep 17 00:00:00 2001 From: Steve Langasek <steve.langa...@linaro.org> Date: Tue, 19 Apr 2011 14:04:29 -0700 Subject: [PATCH 3/4] Add missing-pre-dependency-on-multiarch-support check --- checks/files | 10 ++++++++++ checks/files.desc | 9 +++++++++ debian/changelog | 5 +++++ 3 files changed, 24 insertions(+), 0 deletions(-) diff --git a/checks/files b/checks/files index a540c21..d5e4be4 100644 --- a/checks/files +++ b/checks/files @@ -712,6 +712,16 @@ foreach my $file (@{$info->sorted_index}) { } } + if ($file =~ m,^(?:usr/)lib/([^/]+)/lib[^/]+(-\d[^/]*\.so|\.so\.[^/]+)$, && $pkg !~ /^libc[0-9]/) { + my $subdir = $1; + $TRIPLETS = Lintian::Data->new('files/triplets', '\s+') + unless defined($TRIPLETS); + if ($TRIPLETS->known($subdir) && $info->field('architecture') eq $TRIPLETS->value($subdir)) { + my $dep = Lintian::Relation->new($info->field('pre-depends')//''); + tag 'missing-pre-dependency-on-multiarch-support' unless ($dep->implies('multiarch-support')); + } + } + # ---------------- .pyc/.pyo (compiled python files) # skip any file installed inside a __pycache__ directory # - we have a separate check for that directory. diff --git a/checks/files.desc b/checks/files.desc index d434336..cd7b95b 100644 --- a/checks/files.desc +++ b/checks/files.desc @@ -1251,3 +1251,12 @@ Info: The package appears to ship a gzip compressed objects.inv file If using debhelper (<< 8.1.0), you may need to use the -X option to dh_compress. Newer versions of debhelper handle this correctly by default. + +Tag: missing-pre-dependency-on-multiarch-support +Severity: serious +Certainty: certain +Info: Your package ships a library in one of the multiarch lib directories, + /lib/<triplet> and /usr/lib/<triplet>, but does not declare a + pre-dependency on multiarch-support. Packages installing to these + paths must Pre-Depend: multiarch-support to ensure the library can be + found by the dynamic linker at every point during an upgrade. diff --git a/debian/changelog b/debian/changelog index e04e80f..2326ea9 100644 --- a/debian/changelog +++ b/debian/changelog @@ -6,6 +6,11 @@ lintian (2.5.0~rc3) UNRELEASED; urgency=low + [SRL] Drop wrong checks for multiarch directories. Multiarch directories are only allowed in packages of the given architecture. + * checks/files: + + [SRL] New tag missing-pre-dependency-on-multiarch-support, + Severity: serious, to warn when a package installs libraries to the + multiarch directory without taking care of upgrades. + * private/refresh-archs: + [SRL] update to output directory mappings based on DEB_HOST_MULTIARCH instead of DEB_HOST_GNU_TYPE. -- 1.7.4.1
From 0645595eb1da8ba62f5765f9153b786abac68099 Mon Sep 17 00:00:00 2001 From: Steve Langasek <steve.langa...@linaro.org> Date: Tue, 19 Apr 2011 14:46:40 -0700 Subject: [PATCH 4/4] t/tests/binaries-multiarch: update for DEB_HOST_MULTIARCH. --- debian/changelog | 2 ++ t/tests/binaries-multiarch/debian/Makefile | 6 +++--- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/debian/changelog b/debian/changelog index 2326ea9..802eec2 100644 --- a/debian/changelog +++ b/debian/changelog @@ -23,6 +23,8 @@ lintian (2.5.0~rc3) UNRELEASED; urgency=low * data/binaries/multiarch: + [SRL] Drop. + * t/tests/binaries-multiarch: update for DEB_HOST_MULTIARCH. + -- Niels Thykier <ni...@thykier.net> Thu, 07 Apr 2011 19:00:59 +0200 lintian (2.5.0~rc2) unstable; urgency=low diff --git a/t/tests/binaries-multiarch/debian/Makefile b/t/tests/binaries-multiarch/debian/Makefile index 61aab6a..ea0a4e8 100644 --- a/t/tests/binaries-multiarch/debian/Makefile +++ b/t/tests/binaries-multiarch/debian/Makefile @@ -1,10 +1,10 @@ -TRIPLETT = $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE) +TRIPLETT = $(shell dpkg-architecture -qDEB_HOST_MULTIARCH) -ifeq (i486-linux-gnu,$(TRIPLETT)) +ifeq (i386-linux-gnu,$(TRIPLETT)) WRONG_TRIPLETT = x86_64-linux-gnu else - WRONG_TRIPLETT = i486-linux-gnu + WRONG_TRIPLETT = i386-linux-gnu endif all: -- 1.7.4.1
signature.asc
Description: Digital signature