lintian: r1177 - in trunk: checks debian testset testset/debug/debian
Author: rra
Date: 2008-02-05 05:54:42 +0100 (Tue, 05 Feb 2008)
New Revision: 1177
Modified:
trunk/checks/binaries
trunk/checks/binaries.desc
trunk/debian/changelog
trunk/testset/debug/debian/rules
trunk/testset/tags.debug
trunk/testset/tags.diffs
Log:
+ [RA] Check files in /usr/lib/debug directories mirroring the main
file system to verify they are detached debugging symbols and not
full libraries or executables. Thanks, Neil Williams and Niko
Tyni. (Closes: #462456)
Modified: trunk/checks/binaries
===================================================================
--- trunk/checks/binaries 2008-02-05 04:06:02 UTC (rev 1176)
+++ trunk/checks/binaries 2008-02-05 04:54:42 UTC (rev 1177)
@@ -226,6 +226,13 @@
$has_perl_lib = 1;
}
+ # Something other than detached debugging symbols in /usr/lib/debug paths.
+ if ($file =~ m,/usr/lib/debug/(lib\d*|s?bin|usr|opt|dev|emul)/,) {
+ if (exists($NEEDED{$file})) {
+ tag "debug-file-should-use-detached-symbols", $file;
+ }
+ }
+
# statically linked?
my @needed;
if (!exists($NEEDED{$file}) && !defined($NEEDED{$file})) {
@@ -289,6 +296,7 @@
my $re = qr/(?:^|,)\s*\Q$needs_libc\E\b/o;
if ($depends !~ /$re/) {
my $others = '';
+ $needs_libc_count--;
if ($needs_libc_count > 0) {
$others = " and $needs_libc_count others";
}
Modified: trunk/checks/binaries.desc
===================================================================
--- trunk/checks/binaries.desc 2008-02-05 04:06:02 UTC (rev 1176)
+++ trunk/checks/binaries.desc 2008-02-05 04:54:42 UTC (rev 1177)
@@ -164,3 +164,19 @@
missing dh_perl call in <tt>debian/rules</tt> or a missing
${perl:Depends} substitution variable in the Depends line in
<tt>debian/control</tt>.
+
+Tag: debug-file-should-use-detached-symbols
+Type: warning
+Info: This file is in a location generally used for detached debugging
+ symbols, but it appears to contain a complete copy of the executable or
+ library instead of only the debugging symbols. Files in subdirectories
+ of <tt>/usr/lib/debug</tt> mirroring the main file system should contain
+ only debugging information generated by <tt>objcopy
+ --only-keep-debug</tt>. Binaries or shared objects built with extra
+ debugging should be installed directly in <tt>/usr/lib/debug</tt> or in
+ subdirectories corresponding to the package, not in the directories that
+ mirror the main file system.
+ .
+ If you are using dh_strip with the --dbg-package flag, don't also install
+ the library in <tt>/usr/lib/debug</tt>. dh_strip does all the work for
+ you.
Modified: trunk/debian/changelog
===================================================================
--- trunk/debian/changelog 2008-02-05 04:06:02 UTC (rev 1176)
+++ trunk/debian/changelog 2008-02-05 04:54:42 UTC (rev 1177)
@@ -10,6 +10,10 @@
+ [RA] Remove various dead tag descriptions we no longer issue.
+ [RA] Warn on packages that provide Perl modules but don't depend on
perlapi-*. Thanks, Niko Tyni. (Closes: #463142)
+ + [RA] Check files in /usr/lib/debug directories mirroring the main
+ file system to verify they are detached debugging symbols and not
+ full libraries or executables. Thanks, Neil Williams and Niko
+ Tyni. (Closes: #462456)
* checks/changelog-file:
+ [RA] Decode the changelog entry from UTF-8 before doing length
checks. Thanks, Cyril Brulebois. (Closes: #461822)
Modified: trunk/testset/debug/debian/rules
===================================================================
--- trunk/testset/debug/debian/rules 2008-02-05 04:06:02 UTC (rev 1176)
+++ trunk/testset/debug/debian/rules 2008-02-05 04:54:42 UTC (rev 1177)
@@ -47,13 +47,22 @@
cp $(CURDIR)/debian/libhello0-dbg/usr/lib/debug/usr/lib/libhello.so.0.0 \
$(CURDIR)/debian/libhello0-dbg/usr/lib/libhello.so.dbg
+ # Put a full copy of the library in libhello0-dbg in /usr/lib/debug,
+ # which is okay.
+ install -m 644 libhello.so.0.0 \
+ $(CURDIR)/debian/libhello0-dbg/usr/lib/debug/libhello.so.0.0
+
+ # Also put it in /usr/lib/debug/lib, which isn't.
+ install -D -m 644 libhello.so.0.0 \
+ $(CURDIR)/debian/libhello0-dbg/usr/lib/debug/lib/libhello.so.0.0
+
# Requires a versioned dependency.
dh_icons
dh_link
dh_compress
dh_fixperms
- dh_makeshlibs
+ dh_makeshlibs -X debug
dh_installdeb
dh_shlibdeps
dh_gencontrol
Modified: trunk/testset/tags.debug
===================================================================
--- trunk/testset/tags.debug 2008-02-05 04:06:02 UTC (rev 1176)
+++ trunk/testset/tags.debug 2008-02-05 04:54:42 UTC (rev 1177)
@@ -3,6 +3,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: missing-dependency-on-libc needed by ./usr/lib/debug/lib/libhello.so.0.0 and 1 others
E: libhello0-dbg: sharedobject-in-library-directory-not-actually-a-shlib usr/lib/libhello.so.dbg
I: debug source: non-standard-architecture kfreebsd-i386
I: debug source: non-standard-architecture ppc64
@@ -13,4 +14,5 @@
W: hello: binary-without-manpage usr/bin/hello
W: hello: binary-without-manpage usr/bin/hello.dbg
W: libhello0-dbg: dbg-package-missing-depends libhello0
+W: libhello0-dbg: debug-file-should-use-detached-symbols ./usr/lib/debug/lib/libhello.so.0.0
W: libhello0-dbg: shared-lib-without-dependency-information ./usr/lib/libhello.so.dbg
Modified: trunk/testset/tags.diffs
===================================================================
--- trunk/testset/tags.diffs 2008-02-05 04:06:02 UTC (rev 1176)
+++ trunk/testset/tags.diffs 2008-02-05 04:54:42 UTC (rev 1177)
@@ -1,6 +1,6 @@
E: diffs source: debian-files-list-in-source
E: diffs: arch-independent-package-contains-binary-or-object ./usr/bin/diffs
-E: diffs: missing-dependency-on-libc needed by ./usr/bin/diffs and 1 others
+E: diffs: missing-dependency-on-libc needed by ./usr/bin/diffs
E: diffs: no-copyright-file
E: diffs: unstripped-binary-or-object ./usr/bin/diffs
I: diffs source: diff-contains-editor-backup-file binary.c~
Reply to: