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

[SCM] Debian package checker branch, master, updated. 2.5.11-73-g3949072



The following commit has been merged in the master branch:
commit 39490728c10556f2588e8bd19cb2295f7b330d31
Author: Niels Thykier <niels@thykier.net>
Date:   Fri Jan 18 12:45:48 2013 +0100

    c/binaries: Detect debug ELFs with no debug symbols
    
    Signed-off-by: Niels Thykier <niels@thykier.net>

diff --git a/checks/binaries b/checks/binaries
index dca565f..7681c8b 100644
--- a/checks/binaries
+++ b/checks/binaries
@@ -341,6 +341,8 @@ foreach my $file ($info->sorted_index) {
         if (scalar (@{ $objdump->{NEEDED} }) ) {
             tag 'debug-file-should-use-detached-symbols', $file;
         }
+        tag 'debug-file-with-no-debug-symbols', $file
+            unless exists $objdump->{'SH'}->{'.debug_line'};
     }
 
     # Detached debugging symbols directly in /usr/lib/debug.
diff --git a/checks/binaries.desc b/checks/binaries.desc
index 4280f1a..decb548 100644
--- a/checks/binaries.desc
+++ b/checks/binaries.desc
@@ -334,3 +334,12 @@ Info: This package provides an ELF binary that lacks the "read-only
  <tt>LDFLAGS</tt>.
 Ref: http://wiki.debian.org/Hardening
 
+Tag: debug-file-with-no-debug-symbols
+Severity: normal
+Certainty: possible
+Ref: #668437
+Info: The binary is installed as a detached "debug symbols" ELF file,
+ but it does not appear to have debug information associated with it.
+ .
+ Implementation detail: Lintian currently checks for the ".debug_line"
+ section, which is a part of the DWARF standard.
diff --git a/debian/changelog b/debian/changelog
index 6335b82..76659b8 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -2,6 +2,7 @@ lintian (2.5.12) UNRELEASED; urgency=low
 
   * Summary of tag changes:
     + Added:
+      - debug-file-with-no-debug-symbols
       - desktop-entry-lacks-keywords-entry
       - dir-or-file-in-build-tree
       - dir-or-file-in-etc-opt
@@ -15,6 +16,9 @@ lintian (2.5.12) UNRELEASED; urgency=low
     + [NT] Accept libx32 as a bi-arch directory.
     + [NT] Correct reference policy reference.  Thanks to
       Samuel Bronson for the correction.  (Closes: #698234)
+    + [NT] Detect debug ELF binaries with no debug symbols.
+      Thanks to Nelson A. de Oliveira for the report.
+      (Closes: #668437)
   * checks/cruft:
     + [NT] Do not emit the license-problem-json-evil tag for
       non-free packages.
diff --git a/t/tests/binaries-general/desc b/t/tests/binaries-general/desc
index f8d6bc9..0c51bd7 100644
--- a/t/tests/binaries-general/desc
+++ b/t/tests/binaries-general/desc
@@ -8,4 +8,5 @@ Test-For:
  binary-compiled-with-profiling-enabled
  binary-or-shlib-defines-rpath
  debug-symbols-directly-in-usr-lib-debug
+ debug-file-with-no-debug-symbols
  library-in-debug-or-profile-should-not-be-stripped
diff --git a/t/tests/binaries-general/tags b/t/tests/binaries-general/tags
index f090942..e795381 100644
--- a/t/tests/binaries-general/tags
+++ b/t/tests/binaries-general/tags
@@ -4,4 +4,5 @@ E: binaries-general: binary-or-shlib-defines-rpath usr/share/foo/basic /usr/loca
 E: binaries-general: debug-symbols-directly-in-usr-lib-debug usr/lib/debug/basic
 E: binaries-general: library-in-debug-or-profile-should-not-be-stripped usr/lib/debug/usr/share/foo/basic
 W: binaries-general: binary-compiled-with-profiling-enabled usr/share/foo/basic
+W: binaries-general: debug-file-with-no-debug-symbols usr/lib/debug/usr/share/foo/basic
 W: binaries-general: debug-package-should-be-named-dbg usr/lib/debug/basic
diff --git a/testset/libbaz/Makefile b/testset/libbaz/Makefile
index 5e64763..4dd2c62 100644
--- a/testset/libbaz/Makefile
+++ b/testset/libbaz/Makefile
@@ -1,7 +1,7 @@
 # This is the correct way to build a lib
 
 CC=gcc
-CFLAGS=-Wall -Winline -O2
+CFLAGS=-g -Wall -Winline -O2
 
 OBJS=baz.o extra.o
 SHOBJS=baz.sho extra.sho
diff --git a/testset/tags.debug b/testset/tags.debug
index a9715a9..df6bf39 100644
--- a/testset/tags.debug
+++ b/testset/tags.debug
@@ -30,12 +30,15 @@ W: debug source: debhelper-but-no-misc-depends hi-dbg
 W: debug source: debhelper-compat-file-is-missing
 W: debug source: debian-rules-sets-DH_COMPAT line 5
 W: debug source: timewarp-standards-version (2006-04-04 < 2006-04-26)
+W: hello-dbg: debug-file-with-no-debug-symbols usr/lib/debug/usr/bin/hello
 W: hello-hello-dbg: latest-debian-changelog-entry-without-new-version
 W: hello: binary-without-manpage usr/bin/hello
 W: hello: binary-without-manpage usr/bin/hello.dbg
 W: hello: latest-debian-changelog-entry-without-new-version
 W: hi-dbg: latest-debian-changelog-entry-without-new-version
 W: libhello0-dbg: debug-file-should-use-detached-symbols usr/lib/debug/lib/libhello.so.0.0
+W: libhello0-dbg: debug-file-with-no-debug-symbols usr/lib/debug/lib/libhello.so.0.0
+W: libhello0-dbg: debug-file-with-no-debug-symbols usr/lib/debug/usr/lib/libhello.so.0.0
 W: libhello0-dbg: latest-debian-changelog-entry-without-new-version
 W: libhello0-dbg: shared-lib-without-dependency-information usr/lib/libhello.so.dbg
 W: libhello0: latest-debian-changelog-entry-without-new-version

-- 
Debian package checker


Reply to: