r30185 - in /trunk/libgnupg-perl: ./ GnuPG/ debian/ debian/patches/
gregoa at users.alioth.debian.org
gregoa at users.alioth.debian.org
Tue Jan 27 16:46:16 UTC 2009
Author: gregoa
Date: Tue Jan 27 16:46:13 2009
New Revision: 30185
URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=30185
Log:
* Split out patches against the upstream code; add quilt framework.; add
debian/README.source.
Added:
trunk/libgnupg-perl/debian/README.source
trunk/libgnupg-perl/debian/patches/
trunk/libgnupg-perl/debian/patches/auto_retrieve_missing_subkey.patch
trunk/libgnupg-perl/debian/patches/gnupg1.2.5.patch
trunk/libgnupg-perl/debian/patches/pod.patch
trunk/libgnupg-perl/debian/patches/policy_url.patch
trunk/libgnupg-perl/debian/patches/series
trunk/libgnupg-perl/debian/patches/strict_subs.patch
Modified:
trunk/libgnupg-perl/GnuPG.pm
trunk/libgnupg-perl/GnuPG/Tie.pm
trunk/libgnupg-perl/debian/changelog
trunk/libgnupg-perl/debian/control
trunk/libgnupg-perl/debian/rules
Modified: trunk/libgnupg-perl/GnuPG.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libgnupg-perl/GnuPG.pm?rev=30185&op=diff
==============================================================================
--- trunk/libgnupg-perl/GnuPG.pm (original)
+++ trunk/libgnupg-perl/GnuPG.pm Tue Jan 27 16:46:13 2009
@@ -264,7 +264,7 @@
# some ends must be closed in the child.
#
# Besides this is just plain good hygiene
- my $max_fd = POSIX::sysconf( &POSIX::_SC_OPEN_MAX ) || 256;
+ my $max_fd = POSIX::sysconf( POSIX::_SC_OPEN_MAX ) || 256;
foreach my $f ( 3 .. $max_fd ) {
next if $f == fileno $self->{status_fd};
POSIX::close( $f );
@@ -611,30 +611,12 @@
( $cmd, $arg ) = $self->read_from_status()
if ( $cmd =~ /RSA_OR_IDEA/ );
- # Ignore automatic key imports
- ( $cmd, $arg ) = $self->read_from_status()
- if ( $cmd =~ /IMPORTED/ );
-
- ( $cmd, $arg ) = $self->read_from_status()
- if ( $cmd =~ /IMPORT_OK/ );
-
- ( $cmd, $arg ) = $self->read_from_status()
- if ( $cmd =~ /IMPORT_RES/ );
-
$self->abort_gnupg( "invalid signature from ", $arg =~ /[^ ](.+)/, "\n" )
if ( $cmd =~ /BADSIG/);
- if ( $cmd =~ /ERRSIG/)
- {
- my ($keyid, $key_algo, $digest_algo, $sig_class, $timestamp, $rc)
- = split ' ', $arg;
- if ($rc == 9)
- {
- ($cmd, $arg) = $self->read_from_status();
- $self->abort_gnupg( "no public key $keyid" );
- }
- $self->abort_gnupg( "error verifying signature from $keyid" )
- }
+ $self->abort_gnupg( "error verifying signature from ",
+ $arg =~ /([^ ])/, "\n" )
+ if ( $cmd =~ /ERRSIG/);
$self->abort_gnupg ( "protocol error: expected SIG_ID" )
unless $cmd =~ /SIG_ID/;
@@ -646,12 +628,6 @@
my ( $keyid, $name ) = split /\s+/, $arg, 2;
( $cmd, $arg ) = $self->read_from_status;
- my $policy_url = undef;
- if ( $cmd =~ /POLICY_URL/ ) {
- $policy_url = $arg;
- ( $cmd, $arg ) = $self->read_from_status;
- }
-
$self->abort_gnupg ( "protocol error: expected VALIDSIG" )
unless $cmd =~ /VALIDSIG/;
my ( $fingerprint ) = split /\s+/, $arg, 2;
@@ -668,7 +644,6 @@
user => $name,
fingerprint => $fingerprint,
trust => $trust,
- policy_url => $policy_url,
};
}
@@ -752,27 +727,19 @@
sub decrypt_postread($) {
my $self = shift;
- my @cmds;
# gnupg 1.0.2 adds this status message
my ( $cmd, $arg ) = $self->read_from_status;
- push @cmds, $cmd;
-
- if ($cmd =~ /BEGIN_DECRYPTION/) {
- ( $cmd, $arg ) = $self->read_from_status();
- push @cmds, $cmd;
- };
+
+ ( $cmd, $arg ) = $self->read_from_status()
+ if $cmd =~ /BEGIN_DECRYPTION/;
my $sig = undef;
- while (defined $cmd && !($cmd =~ /DECRYPTION_OKAY/)) {
- if ( $cmd =~ /SIG_ID/ ) {
- $sig = $self->check_sig( $cmd, $arg );
- }
- ( $cmd, $arg ) = $self->read_from_status();
- push @cmds, $cmd if defined $cmd;
- };
-
- my $cmds = join ', ', @cmds;
- $self->abort_gnupg( "protocol error: expected DECRYPTION_OKAY but never got it (all I saw was: $cmds): \n" )
+ if ( $cmd =~ /SIG_ID/ ) {
+ $sig = $self->check_sig( $cmd, $arg );
+ ( $cmd, $arg ) = $self->read_from_status;
+ }
+
+ $self->abort_gnupg( "protocol error: expected DECRYPTION_OKAY got $cmd: \n" )
unless $cmd =~ /DECRYPTION_OKAY/;
return $sig ? $sig : 1;
Modified: trunk/libgnupg-perl/GnuPG/Tie.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libgnupg-perl/GnuPG/Tie.pm?rev=30185&op=diff
==============================================================================
--- trunk/libgnupg-perl/GnuPG/Tie.pm (original)
+++ trunk/libgnupg-perl/GnuPG/Tie.pm Tue Jan 27 16:46:13 2009
@@ -336,7 +336,7 @@
use GnuPG::Tie::Decrypt;
tie *CIPHER, 'GnuPG::Tie::Encrypt', armor => 1, recipient => 'User';
- print CIPHER <<EOF;
+ print CIPHER <<EOF
This is a secret
EOF
local $/ = undef;
@@ -350,7 +350,7 @@
# $plaintext should now contains 'This is a secret'
close PLAINTEXT;
- untie *PLAINTEXT;
+ untie *PLAINTEXT
=head1 DESCRIPTION
Added: trunk/libgnupg-perl/debian/README.source
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libgnupg-perl/debian/README.source?rev=30185&op=file
==============================================================================
--- trunk/libgnupg-perl/debian/README.source (added)
+++ trunk/libgnupg-perl/debian/README.source Tue Jan 27 16:46:13 2009
@@ -1,0 +1,5 @@
+This package uses quilt to manage all modifications to the upstream
+source. Changes are stored in the source package as diffs in
+debian/patches and applied during the build.
+
+See /usr/share/doc/quilt/README.source for a detailed explanation.
Modified: trunk/libgnupg-perl/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libgnupg-perl/debian/changelog?rev=30185&op=diff
==============================================================================
--- trunk/libgnupg-perl/debian/changelog (original)
+++ trunk/libgnupg-perl/debian/changelog Tue Jan 27 16:46:13 2009
@@ -8,7 +8,9 @@
Group <pkg-perl-maintainers at lists.alioth.debian.org> (was: Peter Palfrader
<weasel at debian.org>); add /me to Uploaders.
* Add debian/watch.
- * Set Standards-Version to 3.8.0 (no changes).
+ * Set Standards-Version to 3.8.0.
+ * Split out patches against the upstream code; add quilt framework.; add
+ debian/README.source.
* Set debhelper compatibility level to 7; adapt
debian/{control,compat,rules}.
* debian/copyright: switch to new format.
Modified: trunk/libgnupg-perl/debian/control
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libgnupg-perl/debian/control?rev=30185&op=diff
==============================================================================
--- trunk/libgnupg-perl/debian/control (original)
+++ trunk/libgnupg-perl/debian/control Tue Jan 27 16:46:13 2009
@@ -3,7 +3,7 @@
Priority: optional
Maintainer: Debian Perl Group <pkg-perl-maintainers at lists.alioth.debian.org>
Uploaders: gregor herrmann <gregoa at debian.org>
-Build-Depends: debhelper (>= 7)
+Build-Depends: debhelper (>= 7), quilt
Standards-Version: 3.8.0
Homepage: http://search.cpan.org/dist/GnuPG/
Vcs-Svn: svn://svn.debian.org/pkg-perl/trunk/libgnupg-perl/
Added: trunk/libgnupg-perl/debian/patches/auto_retrieve_missing_subkey.patch
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libgnupg-perl/debian/patches/auto_retrieve_missing_subkey.patch?rev=30185&op=file
==============================================================================
--- trunk/libgnupg-perl/debian/patches/auto_retrieve_missing_subkey.patch (added)
+++ trunk/libgnupg-perl/debian/patches/auto_retrieve_missing_subkey.patch Tue Jan 27 16:46:13 2009
@@ -1,0 +1,43 @@
+Author: Andrew Suffield <asuffield at debian.org>
+Description:
+* libgnupg-perl dies with a protocol error if you have 'keyserver-options
+ auto-key-retrieve' set and gpg decides to import a new key.
+* propagate that reason for verification errors when the key is not around
+Bugs: #269627, #310792
+
+--- a/GnuPG.pm
++++ b/GnuPG.pm
+@@ -611,12 +611,30 @@
+ ( $cmd, $arg ) = $self->read_from_status()
+ if ( $cmd =~ /RSA_OR_IDEA/ );
+
++ # Ignore automatic key imports
++ ( $cmd, $arg ) = $self->read_from_status()
++ if ( $cmd =~ /IMPORTED/ );
++
++ ( $cmd, $arg ) = $self->read_from_status()
++ if ( $cmd =~ /IMPORT_OK/ );
++
++ ( $cmd, $arg ) = $self->read_from_status()
++ if ( $cmd =~ /IMPORT_RES/ );
++
+ $self->abort_gnupg( "invalid signature from ", $arg =~ /[^ ](.+)/, "\n" )
+ if ( $cmd =~ /BADSIG/);
+
+- $self->abort_gnupg( "error verifying signature from ",
+- $arg =~ /([^ ])/, "\n" )
+- if ( $cmd =~ /ERRSIG/);
++ if ( $cmd =~ /ERRSIG/)
++ {
++ my ($keyid, $key_algo, $digest_algo, $sig_class, $timestamp, $rc)
++ = split ' ', $arg;
++ if ($rc == 9)
++ {
++ ($cmd, $arg) = $self->read_from_status();
++ $self->abort_gnupg( "no public key $keyid" );
++ }
++ $self->abort_gnupg( "error verifying signature from $keyid" )
++ }
+
+ $self->abort_gnupg ( "protocol error: expected SIG_ID" )
+ unless $cmd =~ /SIG_ID/;
Added: trunk/libgnupg-perl/debian/patches/gnupg1.2.5.patch
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libgnupg-perl/debian/patches/gnupg1.2.5.patch?rev=30185&op=file
==============================================================================
--- trunk/libgnupg-perl/debian/patches/gnupg1.2.5.patch (added)
+++ trunk/libgnupg-perl/debian/patches/gnupg1.2.5.patch Tue Jan 27 16:46:13 2009
@@ -1,0 +1,43 @@
+Author: Peter Palfrader <weasel at debian.org>
+Description: GnuPG 1.2.5 introduced a few more status lines when
+ decrypting/verifying files. GnuPG.pm would not handle that properly. We now
+ eat all the status lines in decrypt_postread()
+Bug: #298556
+
+--- a/GnuPG.pm
++++ b/GnuPG.pm
+@@ -745,19 +745,27 @@
+ sub decrypt_postread($) {
+ my $self = shift;
+
++ my @cmds;
+ # gnupg 1.0.2 adds this status message
+ my ( $cmd, $arg ) = $self->read_from_status;
++ push @cmds, $cmd;
+
+- ( $cmd, $arg ) = $self->read_from_status()
+- if $cmd =~ /BEGIN_DECRYPTION/;
++ if ($cmd =~ /BEGIN_DECRYPTION/) {
++ ( $cmd, $arg ) = $self->read_from_status();
++ push @cmds, $cmd;
++ };
+
+ my $sig = undef;
+- if ( $cmd =~ /SIG_ID/ ) {
+- $sig = $self->check_sig( $cmd, $arg );
+- ( $cmd, $arg ) = $self->read_from_status;
+- }
++ while (defined $cmd && !($cmd =~ /DECRYPTION_OKAY/)) {
++ if ( $cmd =~ /SIG_ID/ ) {
++ $sig = $self->check_sig( $cmd, $arg );
++ }
++ ( $cmd, $arg ) = $self->read_from_status();
++ push @cmds, $cmd if defined $cmd;
++ };
+
+- $self->abort_gnupg( "protocol error: expected DECRYPTION_OKAY got $cmd: \n" )
++ my $cmds = join ', ', @cmds;
++ $self->abort_gnupg( "protocol error: expected DECRYPTION_OKAY but never got it (all I saw was: $cmds): \n" )
+ unless $cmd =~ /DECRYPTION_OKAY/;
+
+ return $sig ? $sig : 1;
Added: trunk/libgnupg-perl/debian/patches/pod.patch
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libgnupg-perl/debian/patches/pod.patch?rev=30185&op=file
==============================================================================
--- trunk/libgnupg-perl/debian/patches/pod.patch (added)
+++ trunk/libgnupg-perl/debian/patches/pod.patch Tue Jan 27 16:46:13 2009
@@ -1,0 +1,24 @@
+Author: Peter Palfrader <weasel at debian.org>
+Description: Fixed example in GnuPG::Tie manpage
+Bug: #90703
+
+--- a/GnuPG/Tie.pm
++++ b/GnuPG/Tie.pm
+@@ -336,7 +336,7 @@
+ use GnuPG::Tie::Decrypt;
+
+ tie *CIPHER, 'GnuPG::Tie::Encrypt', armor => 1, recipient => 'User';
+- print CIPHER <<EOF
++ print CIPHER <<EOF;
+ This is a secret
+ EOF
+ local $/ = undef;
+@@ -350,7 +350,7 @@
+
+ # $plaintext should now contains 'This is a secret'
+ close PLAINTEXT;
+- untie *PLAINTEXT
++ untie *PLAINTEXT;
+
+ =head1 DESCRIPTION
+
Added: trunk/libgnupg-perl/debian/patches/policy_url.patch
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libgnupg-perl/debian/patches/policy_url.patch?rev=30185&op=file
==============================================================================
--- trunk/libgnupg-perl/debian/patches/policy_url.patch (added)
+++ trunk/libgnupg-perl/debian/patches/policy_url.patch Tue Jan 27 16:46:13 2009
@@ -1,0 +1,28 @@
+Author: Adrian von Bidder <avbidder at fortytwo.ch>
+Description: GnuPG.pm would complain about protocol violations when a
+ signature had more information (like a POLICY_URL) than it expected
+Bugs: #316065
+
+--- a/GnuPG.pm
++++ b/GnuPG.pm
+@@ -646,6 +646,12 @@
+ my ( $keyid, $name ) = split /\s+/, $arg, 2;
+
+ ( $cmd, $arg ) = $self->read_from_status;
++ my $policy_url = undef;
++ if ( $cmd =~ /POLICY_URL/ ) {
++ $policy_url = $arg;
++ ( $cmd, $arg ) = $self->read_from_status;
++ }
++
+ $self->abort_gnupg ( "protocol error: expected VALIDSIG" )
+ unless $cmd =~ /VALIDSIG/;
+ my ( $fingerprint ) = split /\s+/, $arg, 2;
+@@ -662,6 +668,7 @@
+ user => $name,
+ fingerprint => $fingerprint,
+ trust => $trust,
++ policy_url => $policy_url,
+ };
+ }
+
Added: trunk/libgnupg-perl/debian/patches/series
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libgnupg-perl/debian/patches/series?rev=30185&op=file
==============================================================================
--- trunk/libgnupg-perl/debian/patches/series (added)
+++ trunk/libgnupg-perl/debian/patches/series Tue Jan 27 16:46:13 2009
@@ -1,0 +1,5 @@
+auto_retrieve_missing_subkey.patch
+gnupg1.2.5.patch
+pod.patch
+policy_url.patch
+strict_subs.patch
Added: trunk/libgnupg-perl/debian/patches/strict_subs.patch
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libgnupg-perl/debian/patches/strict_subs.patch?rev=30185&op=file
==============================================================================
--- trunk/libgnupg-perl/debian/patches/strict_subs.patch (added)
+++ trunk/libgnupg-perl/debian/patches/strict_subs.patch Tue Jan 27 16:46:13 2009
@@ -1,0 +1,14 @@
+Author: Radu Muschevici <radu at stusta.mhn.de>
+Description: make it work under strict subs
+Bug: #117689
+--- a/GnuPG.pm
++++ b/GnuPG.pm
+@@ -264,7 +264,7 @@
+ # some ends must be closed in the child.
+ #
+ # Besides this is just plain good hygiene
+- my $max_fd = POSIX::sysconf( POSIX::_SC_OPEN_MAX ) || 256;
++ my $max_fd = POSIX::sysconf( &POSIX::_SC_OPEN_MAX ) || 256;
+ foreach my $f ( 3 .. $max_fd ) {
+ next if $f == fileno $self->{status_fd};
+ POSIX::close( $f );
Modified: trunk/libgnupg-perl/debian/rules
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libgnupg-perl/debian/rules?rev=30185&op=diff
==============================================================================
--- trunk/libgnupg-perl/debian/rules (original)
+++ trunk/libgnupg-perl/debian/rules Tue Jan 27 16:46:13 2009
@@ -1,11 +1,13 @@
#!/usr/bin/make -f
+include /usr/share/quilt/quilt.make
+
build: build-stamp
-build-stamp:
+build-stamp: $(QUILT_STAMPFN)
dh build
touch $@
-clean:
+clean: unpatch
dh $@
install: install-stamp
More information about the Pkg-perl-cvs-commits
mailing list