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

[SCM] Debian package checker branch, master, updated. 2.5.4-146-g357fa5e



The following commit has been merged in the master branch:
commit 357fa5e44e25bb38628729f6672a14f31cc6ab98
Author: Niels Thykier <niels@thykier.net>
Date:   Sat Feb 4 16:57:00 2012 +0100

    Work around dpkg-source hardcoding gpg{,v} paths
    
    dpkg-source hardcodes the paths to gpg (and gpgv).  To fix this,
    harness exports a magic/internal env variable if signature checks are
    to be skipped.
    
    Signed-off-by: Niels Thykier <niels@thykier.net>

diff --git a/collection/unpacked b/collection/unpacked
index 658a4a1..bf49c53 100755
--- a/collection/unpacked
+++ b/collection/unpacked
@@ -50,8 +50,10 @@ if ($type eq 'source') {
         # Ignore STDOUT of the child process because older versions of
         # dpkg-source print things out even with -q.
         my $opts = { out => '/dev/null', err => 'unpacked-errors' };
+        my @args = ('-q');
+        push @args, '--no-check' if $ENV{'LINTIAN_COLL_UNPACKED_SKIP_SIG'};
         print "N: Using dpkg-source to unpack $pkg\n" if $ENV{'LINTIAN_DEBUG'};
-        unless (spawn($opts, ['dpkg-source', '-q', '-x', 'dsc', 'unpacked'])) {
+        unless (spawn($opts, ['dpkg-source', @args, '-x', 'dsc', 'unpacked'])) {
             open(ERRORS, '<', 'unpacked-errors')
                 or fail("cannot open unpacked-errors: $!");
             print STDERR while <ERRORS>;
@@ -94,7 +96,7 @@ if ($type eq 'source') {
 sub libdpkg_unpack_dsc {
     my ($dsc, $target) = @_;
     my $opt = {
-        # If there is a signature, we require it to be valid
+        # This is used to make check_signature fatal
         'require_valid_signature' => 1,
         'quiet' => 1
     };
@@ -105,7 +107,7 @@ sub libdpkg_unpack_dsc {
 
     $srcpkg->check_checksums();
 
-    if ($srcpkg->is_signed()) {
+    if ($srcpkg->is_signed() && !$ENV{'LINTIAN_COLL_UNPACKED_SKIP_SIG'}) {
         $srcpkg->check_signature();
     }
 
diff --git a/debian/changelog b/debian/changelog
index 596426f..1939a1b 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -142,6 +142,9 @@ lintian (2.5.5) UNRELEASED; urgency=low
   * collection/source-control-file{,.desc}:
     + [NT] Removed as they are no longer needed.  They have been
       replaced by a smarter Lintian::Collect.
+  * collcetion/unpacked:
+    + [NT] Pass --no-check to dpkg-source when requested not to
+      check signatures (via reporting/harness).
 
   * data/{fields => common}/architectures:
     + [NT] Moved architectures to data/common.
diff --git a/reporting/harness b/reporting/harness
index a8c5334..411a21d 100755
--- a/reporting/harness
+++ b/reporting/harness
@@ -137,6 +137,8 @@ unless ($opt{'dry-run'}) {
             symlink '/bin/true', "$LINTIAN_BIN_DIR/$g"
                 unless -f "$LINTIAN_BIN_DIR/$g";
         }
+        # Passed to coll/unpacked
+        $ENV{'LINTIAN_COLL_UNPACKED_SKIP_SIG'} = 1;
     }
 }
 

-- 
Debian package checker


Reply to: