lintian: r574 - in trunk: checks collection debian testset testset/debug testset/debug/debian
Author: rra
Date: 2006-03-12 04:33:35 +0100 (Sun, 12 Mar 2006)
New Revision: 574
Added:
trunk/testset/debug/
trunk/testset/debug/debian/
trunk/testset/debug/debian/changelog
trunk/testset/debug/debian/control
trunk/testset/debug/debian/copyright
trunk/testset/debug/debian/rules
trunk/testset/debug/hello.c
trunk/testset/debug/libhello.c
trunk/testset/debug/libhello.h
trunk/testset/tags.debug
Modified:
trunk/checks/binaries
trunk/checks/binaries.desc
trunk/collection/objdump-info
trunk/debian/changelog
Log:
* checks/binaries{.desc,}:
+ [RA] Add a check for the new "Invalid operation" error from
objdump -T. Skip shared-lib-without-dependency-information for
files in /usr/lib/debug.
* collection/objdump-info:
+ [RA] Pass "Invalid operation" errors from objdump -T on to the check
scripts instead of failing. (Closes: #249435)
Modified: trunk/checks/binaries
===================================================================
--- trunk/checks/binaries 2006-03-12 03:18:20 UTC (rev 573)
+++ trunk/checks/binaries 2006-03-12 03:33:35 UTC (rev 574)
@@ -106,6 +106,8 @@
fail("file format not recognized for $1\nif you are checking non-i386 binaries, you'll need to install binutils-multiarch\n");
} elsif (m/^objdump: \.(.*?): Packed with UPX$/) {
tag "binary-file-compressed-with-upx", "$1";
+ } elsif (m/^objdump: \.(.*?): Invalid operation$/) {
+ tag "binary-with-bad-dynamic-table", "$file" unless $file =~ m%^\./usr/lib/debug/%;
} elsif (m/CXXABI/) {
$CXXABI{$file} = 1;
}
@@ -219,7 +221,7 @@
my %libc5_binary;
my @needed;
if (!exists($NEEDED{$file}) && !defined($NEEDED{$file})) {
- if ($info =~ m/shared object/o) {
+ if ($info =~ m/shared object/o && $file !~ m#^\./usr/lib/debug/#) {
tag "shared-lib-without-dependency-information", "$file";
} else {
# Some exceptions: files in /boot, /usr/lib/debug/*, named *-static or
Modified: trunk/checks/binaries.desc
===================================================================
--- trunk/checks/binaries.desc 2006-03-12 03:18:20 UTC (rev 573)
+++ trunk/checks/binaries.desc 2006-03-12 03:33:35 UTC (rev 574)
@@ -139,3 +139,9 @@
.
$ objdump -p /path/to/libfoo-bar.so.1.2.3 | sed -n -e's/^[[:space:]]*SONAME[[:space:]]*//p' | sed -e's/\([0-9]\)\.so\./\1-/; s/\.so\.//'
Ref: Library Packaging guide 5
+
+Tag: binary-with-bad-dynamic-table
+Type: error
+Info: This appears to be an ELF file but objdump -T cannot parse it.
+ If it is external debugging symbols for another file, it should be
+ installed under /usr/lib/debug.
Modified: trunk/collection/objdump-info
===================================================================
--- trunk/collection/objdump-info 2006-03-12 03:18:20 UTC (rev 573)
+++ trunk/collection/objdump-info 2006-03-12 03:33:35 UTC (rev 574)
@@ -46,7 +46,19 @@
if head $bin | grep -q 'packed.*with.*UPX'; then
echo "objdump: $bin: Packed with UPX" >> ../objdump-info
else
- objdump --headers --private-headers -T $bin >> ../objdump-info 2>&1
+ if objdump --headers --private-headers -T $bin >> ../objdump-info 2>&1 ; then
+ # everything is ok
+ :
+ else
+ # If the objdump error is "Invalid operation", we handle it later
+ # in the check script, since this is the expected output (for now)
+ # on detached debugging information in /usr/lib/debug.
+ if objdump -T $bin 2>&1 | grep -q 'Invalid operation$' ; then
+ :
+ else
+ exit 1
+ fi
+ fi
fi
done
Modified: trunk/debian/changelog
===================================================================
--- trunk/debian/changelog 2006-03-12 03:18:20 UTC (rev 573)
+++ trunk/debian/changelog 2006-03-12 03:33:35 UTC (rev 574)
@@ -1,5 +1,9 @@
lintian (1.23.16) UNRELEASED; urgency=low
+ * checks/binaries{.desc,}:
+ + [RA] Add a check for the new "Invalid operation" error from
+ objdump -T. Skip shared-lib-without-dependency-information for
+ files in /usr/lib/debug.
* checks/changelog-file:
+ [FL] Add line number to output of wrong-bug-number-in-closes.
Inspired by #349761 from Steinar H. Gunderson.
@@ -55,6 +59,10 @@
+ [RA] Avoid Perl uninitialized value warnings when given output that
looks like lintian messages without tags. (Closes: #352606)
+ * collection/objdump-info:
+ + [RA] Pass "Invalid operation" errors from objdump -T on to the check
+ scripts instead of failing. (Closes: #249435)
+
* testset/runtests:
+ [RA] Filter out dpkg-source warnings about unsigned source packages.
Added: trunk/testset/debug/debian/changelog
===================================================================
--- trunk/testset/debug/debian/changelog 2006-03-12 03:18:20 UTC (rev 573)
+++ trunk/testset/debug/debian/changelog 2006-03-12 03:33:35 UTC (rev 574)
@@ -0,0 +1,6 @@
+debug (1.0) unstable; urgency=low
+
+ * Initial version.
+
+ -- Russ Allbery <rra@debian.org> Sat, 4 Mar 2006 21:31:06 -0800
+
Added: trunk/testset/debug/debian/control
===================================================================
--- trunk/testset/debug/debian/control 2006-03-12 03:18:20 UTC (rev 573)
+++ trunk/testset/debug/debian/control 2006-03-12 03:33:35 UTC (rev 574)
@@ -0,0 +1,34 @@
+Source: debug
+Section: utils
+Priority: optional
+Maintainer: Russ Allbery <rra@debian.org>
+Build-Depends: debhelper (>= 5.0.0)
+Standards-Version: 3.6.2
+
+Package: hello
+Architecture: any
+Depends: ${shlibs:Depends}, ${misc:Depends}
+Description: Test for external debugging information
+ lintian regression test for external debugging file handling.
+
+Package: hello-dbg
+Priority: extra
+Architecture: any
+Depends: hello (= ${Source-Version}), ${shlibs:Depends}, ${misc:Depends}
+Description: Test for external debugging information
+ lintian regression test for external debugging file handling.
+
+Package: libhello0
+Section: libs
+Architecture: any
+Depends: ${shlibs:Depends}, ${misc:Depends}
+Description: Test for external debugging information
+ lintian regression test for external debugging file handling.
+
+Package: libhello0-dbg
+Section: libdevel
+Priority: extra
+Architecture: any
+Depends: libhello (= ${Source-Version}), ${shlibs:Depends}, ${misc:Depends}
+Description: Test for external debugging information
+ lintian regression test for external debugging file handling.
Added: trunk/testset/debug/debian/copyright
===================================================================
--- trunk/testset/debug/debian/copyright 2006-03-12 03:18:20 UTC (rev 573)
+++ trunk/testset/debug/debian/copyright 2006-03-12 03:33:35 UTC (rev 574)
@@ -0,0 +1 @@
+Written Sat, 04 Mar 2006 21:30:01 -0800 by Russ Allbery <rra@debian.org>.
Added: trunk/testset/debug/debian/rules
===================================================================
--- trunk/testset/debug/debian/rules 2006-03-12 03:18:20 UTC (rev 573)
+++ trunk/testset/debug/debian/rules 2006-03-12 03:33:35 UTC (rev 574)
@@ -0,0 +1,62 @@
+#!/usr/bin/make -f
+# Sample debian/rules that uses debhelper.
+# This file is public domain software, originally written by Joey Hess.
+
+export DH_COMPAT := 5
+
+build: build-stamp
+build-stamp:
+ dh_testdir
+ gcc -D_REENTRANT -fPIC -c libhello.c
+ gcc -o libhello.so.0.0 -shared -Wl,-soname,libhello.so.0 libhello.o
+ ln -s libhello.so.0.0 libhello.so
+ gcc -o hello hello.c -L. -lhello
+ touch build-stamp
+
+clean:
+ dh_testdir
+ dh_testroot
+ rm -f build-stamp *.o libhello.so.0.0
+ dh_clean
+
+install: build-stamp
+ dh_testdir
+ dh_testroot
+ dh_clean -k
+ install -D hello $(CURDIR)/debian/hello/usr/bin/hello
+ install -D libhello.so.0.0 \
+ $(CURDIR)/debian/libhello0/usr/lib/libhello.so.0.0
+ ln -s libhello.so.0.0 \
+ $(CURDIR)/debian/libhello0/usr/lib/libhello.so.0
+
+# Build architecture-dependent files here.
+export DH_OPTIONS
+binary-arch: DH_OPTIONS=-a
+binary-arch: build-stamp install
+ dh_testdir
+ dh_testroot
+ dh_installchangelogs
+ dh_installdocs
+ DH_OPTIONS= dh_strip -phello --dbg-package=hello-dbg
+ DH_OPTIONS= dh_strip -plibhello0 --dbg-package=libhello0-dbg
+
+ # Now break a few things. Copy the debugging data into places it
+ # shouldn't be.
+ cp $(CURDIR)/debian/hello-dbg/usr/lib/debug/usr/bin/hello \
+ $(CURDIR)/debian/hello/usr/bin/hello.dbg
+ cp $(CURDIR)/debian/libhello0-dbg/usr/lib/debug/usr/lib/libhello.so.0.0 \
+ $(CURDIR)/debian/libhello0-dbg/usr/lib/libhello.so.dbg
+
+ dh_link
+ dh_compress
+ dh_fixperms
+ dh_makeshlibs
+ dh_installdeb
+ dh_shlibdeps
+ dh_gencontrol
+ dh_md5sums
+ dh_builddeb
+
+binary-indep:
+binary: binary-indep binary-arch
+.PHONY: binary binary-indep binary-arch build clean install
Property changes on: trunk/testset/debug/debian/rules
___________________________________________________________________
Name: svn:executable
+ *
Added: trunk/testset/debug/hello.c
===================================================================
--- trunk/testset/debug/hello.c 2006-03-12 03:18:20 UTC (rev 573)
+++ trunk/testset/debug/hello.c 2006-03-12 03:33:35 UTC (rev 574)
@@ -0,0 +1,9 @@
+#include <stdlib.h>
+#include "libhello.h"
+
+int
+main(void)
+{
+ hello();
+ exit(0);
+}
Added: trunk/testset/debug/libhello.c
===================================================================
--- trunk/testset/debug/libhello.c 2006-03-12 03:18:20 UTC (rev 573)
+++ trunk/testset/debug/libhello.c 2006-03-12 03:33:35 UTC (rev 574)
@@ -0,0 +1,7 @@
+#include <stdio.h>
+
+void
+hello(void)
+{
+ printf("Hello, World!\n");
+}
Added: trunk/testset/debug/libhello.h
===================================================================
--- trunk/testset/debug/libhello.h 2006-03-12 03:18:20 UTC (rev 573)
+++ trunk/testset/debug/libhello.h 2006-03-12 03:33:35 UTC (rev 574)
@@ -0,0 +1 @@
+void hello(void);
Added: trunk/testset/tags.debug
===================================================================
--- trunk/testset/tags.debug 2006-03-12 03:18:20 UTC (rev 573)
+++ trunk/testset/tags.debug 2006-03-12 03:33:35 UTC (rev 574)
@@ -0,0 +1,7 @@
+E: hello: statically-linked-binary ./usr/bin/hello.dbg
+E: hello: unstripped-binary-or-object ./usr/bin/hello.dbg
+E: libhello0-dbg: binary-with-bad-dynamic-table ./usr/lib/libhello.so.dbg
+E: libhello0-dbg: sharedobject-in-library-directory-not-actually-a-shlib usr/lib/libhello.so.dbg
+W: hello: binary-without-manpage hello
+W: hello: binary-without-manpage hello.dbg
+W: libhello0-dbg: shared-lib-without-dependency-information ./usr/lib/libhello.so.dbg
Reply to: