[Reproducible-commits] [dpkg] 02/08: Dpkg::Control::Hash: accept PGP signature as end of block

Holger Levsen holger at layer-acht.org
Tue May 3 08:43:20 UTC 2016


This is an automated email from the git hooks/post-receive script.

holger pushed a commit to annotated tag 1.15.12
in repository dpkg.

commit c171377edf7739a9661d9ac15bd1d9b61082be9e
Author: Roger Leigh <rleigh at debian.org>
Date:   Sat Mar 12 16:04:31 2011 +0000

    Dpkg::Control::Hash: accept PGP signature as end of block
    
    Cherry picked from commit 898936120e987d9faf27002e2d01844edbfbb538.
    
    Improved-by: Raphaël Hertzog <hertzog at debian.org>
    Signed-off-by: Ben Hutchings <ben at decadent.org.uk>
    Signed-off-by: Guillem Jover <guillem at debian.org>
---
 debian/changelog             | 5 ++++-
 scripts/Dpkg/Control/Hash.pm | 2 +-
 2 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index 574c651..1cee3d5 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,6 +1,9 @@
 dpkg (1.15.12) UNRELEASED; urgency=high
 
-  *
+  [ Raphaël Hertzog ]
+  * Improve parser in Dpkg::Control::Hash to not require an empty line
+    before the PGP signature. Closes: #617923
+    Thanks to Roger Leigh for the initial patch.
 
  -- Guillem Jover <guillem at debian.org>  Fri, 01 May 2015 22:02:43 +0200
 
diff --git a/scripts/Dpkg/Control/Hash.pm b/scripts/Dpkg/Control/Hash.pm
index 9ecf7d3..82157d9 100644
--- a/scripts/Dpkg/Control/Hash.pm
+++ b/scripts/Dpkg/Control/Hash.pm
@@ -193,7 +193,7 @@ sub parse {
 	    } else {
 		syntaxerr($desc, _g("PGP signature not allowed here"));
 	    }
-	} elsif (m/^$/) {
+	} elsif (m/^$/ || ($expect_pgp_sig && m/^-----BEGIN PGP SIGNATURE/)) {
 	    if ($expect_pgp_sig) {
 		# Skip empty lines
 		$_ = <$fh> while defined($_) && $_ =~ /^\s*$/;

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/reproducible/dpkg.git



More information about the Reproducible-commits mailing list