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

[SCM] Debian package checker branch, master, updated. 2.5.7-26-g07a7625



The following commit has been merged in the master branch:
commit 07a76258052c2491a4a36bf40a423c3d9f05a9fb
Author: Marc Deslauriers <marc.deslauriers@ubuntu.com>
Date:   Tue May 29 09:38:00 2012 +0200

    coll/objdump-info: Drop the -D flag for readelf
    
      * collection/objdump-info: objdump-info switched from objdump to
        readelf, but readelf in Ubuntu doesn't seem to work properly when
        used with the -D option, possibly due to differences in default
        hardening. Work around issue by using different flags and
        adjusting parsing. This also restores version parsing.
    
    Changes to the orignal patch:
     * Bump version of coll/objdump-info.
    
    Signed-off-by: Niels Thykier <niels@thykier.net>

diff --git a/collection/objdump-info b/collection/objdump-info
index e6304d4..57edc4f 100755
--- a/collection/objdump-info
+++ b/collection/objdump-info
@@ -142,16 +142,20 @@ foreach my $bin (@{ $info->sorted_index }) {
             close PIPE;
         }
 
-        if (open(PIPE, '-|', "readelf -W -s -D \Q$bin\E 2>&1")) {
+        if (open(PIPE, '-|', "readelf -W -s \Q$bin\E 2>&1")) {
+            my $section = '';
             print {$opts{pipe_in}} "DYNAMIC SYMBOL TABLE:\n";
 
             while(<PIPE>) {
-                last if m/^Symbol table of/;
-
-                if (m/^\s*(\d+)\s+\d+:\s*[0-9a-f]+\s+\d+\s+(?:(?:\S+\s+){3})(\S+)\s+(.*)\Z/) {
+                if (m/^Symbol table '.dynsym'/) {
+                    $section = 'DS';
+                } elsif (m/^Symbol table/) {
+                    $section = '';
+                } elsif (m/^\s*(\d+):\s*[0-9a-f]+\s+\d+\s+(?:(?:\S+\s+){3})(\S+)\s+(.*)\Z/
+                         and $section eq 'DS') {
                     my ($symnum, $seg, $sym, $ver) = ($1, $2, $3, '');
 
-                    if ($sym =~ m/^(.*)@(.*)$/) {
+                    if ($sym =~ m/^(.*)@(.*) \(.*\)$/) {
                         $sym = $1;
                         $ver = $2;
                     } elsif (@symbol_versions == 0) {
diff --git a/collection/objdump-info.desc b/collection/objdump-info.desc
index 4a9b084..71e7df7 100644
--- a/collection/objdump-info.desc
+++ b/collection/objdump-info.desc
@@ -3,5 +3,5 @@ Author: Christian Schwarz <schwarz@debian.org>
 Info: This script runs objdump(1) over all binaries and object files of a
  binary package.
 Type: binary, udeb
-Version: 2
+Version: 3
 Needs-Info: file-info, unpacked, index
diff --git a/debian/changelog b/debian/changelog
index 7db58a5..2a179eb 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -37,6 +37,12 @@ lintian (2.5.8) UNRELEASED; urgency=low
       instead of re-reading the file when parsing it as a
       DEP-5 copyright file.
 
+  * collection/objdump-info{,.desc}:
+    + [NT] Drop -D flag for readelf when looking for symbols.
+      This makes some checks more reliable in Ubuntu.  Thanks
+      to Marc Deslauriers for the report and the patch.
+      (Closes: #673451)
+
   * debian/control:
     + [NT] Add versioned Build-Depends on dpkg-dev (>= 1.16.1~)
       as the test suite relies on it.  Thanks to Luca Falavigna

-- 
Debian package checker


Reply to: