r56272 - in /branches/upstream/libgnupg-perl/current: ChangeLog GnuPG.pm GnuPG.spec META.yml

ansgar-guest at users.alioth.debian.org ansgar-guest at users.alioth.debian.org
Sat Apr 17 07:14:05 UTC 2010


Author: ansgar-guest
Date: Sat Apr 17 07:12:00 2010
New Revision: 56272

URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=56272
Log:
[svn-upgrade] Integrating new upstream version, libgnupg-perl (0.14)

Modified:
    branches/upstream/libgnupg-perl/current/ChangeLog
    branches/upstream/libgnupg-perl/current/GnuPG.pm
    branches/upstream/libgnupg-perl/current/GnuPG.spec
    branches/upstream/libgnupg-perl/current/META.yml

Modified: branches/upstream/libgnupg-perl/current/ChangeLog
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libgnupg-perl/current/ChangeLog?rev=56272&op=diff
==============================================================================
--- branches/upstream/libgnupg-perl/current/ChangeLog (original)
+++ branches/upstream/libgnupg-perl/current/ChangeLog Sat Apr 17 07:12:00 2010
@@ -1,3 +1,11 @@
+2010-04-16  version 0.14 Mark Frost
+
+    * Fixed an endless read-wait scenario introduced in 0.13
+
+2010-04-16  version 0.13 Mark Frost
+
+    * Catching up some outstanding changes I left out in releases 11 and 12
+
 2010-02-03  version 0.12 Mark Frost
 
     * This release is merely some documentation fixes

Modified: branches/upstream/libgnupg-perl/current/GnuPG.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libgnupg-perl/current/GnuPG.pm?rev=56272&op=diff
==============================================================================
--- branches/upstream/libgnupg-perl/current/GnuPG.pm (original)
+++ branches/upstream/libgnupg-perl/current/GnuPG.pm Sat Apr 17 07:12:00 2010
@@ -47,7 +47,7 @@
 
     Exporter::export_ok_tags( qw( algo trust ) );
 
-    $VERSION = '0.11';
+    $VERSION = '0.14';
 }
 
 use constant DSA_ELGAMAL    => 1;
@@ -184,6 +184,7 @@
 
     my ( $cmd,$arg ) = $line =~ /\[GNUPG:\] (\w+) ?(.+)?$/;
     $self->abort_gnupg( "error communicating with gnupg: bad status line: $line\n" ) unless $cmd;
+    print STDERR "Read in " . $cmd . " - " . $arg if $self->{trace};
     return wantarray ? ( $cmd, $arg ) : $cmd;
 }
 
@@ -242,18 +243,24 @@
     if ( ref $self->{input} && defined fileno $self->{input} ) {
         open ( STDIN, "<&" . fileno $self->{input} )
           or die "error setting up data input: $!\n";
-    } elsif ( $self->{input} ) {
+    } elsif ( $self->{input} && -t STDIN) {
         open ( STDIN, $self->{input} )
           or die "error setting up data input: $!\n";
-    } # Defaults to stdin
+    } elsif ( $self->{input} ) {
+      push(@{$cmdline}, $self->{input});
+    }# Defaults to stdin
 
     # This is where the output goes
     if ( ref $self->{output} && defined fileno $self->{output} ) {
         open ( STDOUT, ">&" . fileno $self->{output} )
           or die "can't redirect stdout to proper output fd: $!\n";
-    } elsif ( $self->{output} ) {
+    } elsif ( $self->{output} && -t STDOUT ) {
         open ( STDOUT, ">".$self->{output} )
           or die "can't open $self->{output} for output: $!\n";
+    } elsif ( $self->{output} ) {
+      my $gpg = shift(@{$cmdline});
+      unshift(@{$cmdline}, '--yes --output ' . $self->{output});
+      unshift(@{$cmdline}, $gpg);
     } # Defaults to stdout
 
     # Close all open file descriptors except STDIN, STDOUT, STDERR
@@ -269,7 +276,7 @@
         POSIX::close( $f );
     }
 
-    exec ( @$cmdline )
+    exec ( join(' ', @$cmdline) )
       or CORE::die "can't exec gnupg: $!\n";
     }
 }
@@ -329,6 +336,10 @@
     my $cmd = $self->read_from_status;
     # Skip UserID hint
     $cmd = $self->read_from_status if ( $cmd =~ /USERID_HINT/ );
+    if ($cmd =~ /GOOD_PASSPHRASE/) { # This means we didnt need a passphrase
+      $self->next_status($cmd); # We push this back on for read_from_status
+      return; 
+    }
     $self->abort_gnupg( "Protocol error: expected NEED_PASSPHRASE.* got $cmd\n")
       unless $cmd =~ /NEED_PASSPHRASE/;
     $self->cpr_send( "passphrase.enter", $passwd );
@@ -587,7 +598,7 @@
     # We need to unlock the private key
     $self->send_passphrase( $passphrase );
     my ($cmd,$line) = $self->read_from_status;
-    $self->abort_gnupg( "invalid passphrase - $cmd\n" )
+    $self->abort_gnupg( "invalid passphrase - $cmd\n" ) 
       unless $cmd =~ /GOOD_PASSPHRASE/;
 
     $self->end_gnupg unless $args{tie_mode};
@@ -708,7 +719,7 @@
 
     $self->run_gnupg;
 
-    $self->decrypt_postwrite( @_ ) unless $args{tie_mode};
+    return $self->decrypt_postwrite( @_ ) unless $args{tie_mode};
 }
 
 sub decrypt_postwrite($%) {
@@ -724,16 +735,18 @@
     }
 
     $self->send_passphrase( $passphrase );
-
     ($cmd,$arg) = $self->read_from_status;
+
     $self->abort_gnupg ( "invalid passphrase - $cmd\n" )
       if $cmd =~ /BAD_PASSPHRASE/;
+
     my $sig = undef;
+
     if ( ! $args{symmetric} ) {
-    $self->abort_gnupg ( "protocol error: expected GOOD_PASSPHRASE got $cmd: \n" )
-      unless $cmd =~ /GOOD_PASSPHRASE/;
-
-    $sig = $self->decrypt_postread() unless $args{tie_mode};
+      $self->abort_gnupg ( "protocol error: expected GOOD_PASSPHRASE got $cmd: \n" )
+        unless $cmd =~ /GOOD_PASSPHRASE/;
+
+      $sig = $self->decrypt_postread() unless $args{tie_mode};
     } else {
         # gnupg 1.0.2 adds this status message
         ( $cmd, $arg ) = $self->read_from_status() if $cmd =~ /BEGIN_DECRYPTION/;

Modified: branches/upstream/libgnupg-perl/current/GnuPG.spec
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libgnupg-perl/current/GnuPG.spec?rev=56272&op=diff
==============================================================================
--- branches/upstream/libgnupg-perl/current/GnuPG.spec (original)
+++ branches/upstream/libgnupg-perl/current/GnuPG.spec Sat Apr 17 07:12:00 2010
@@ -1,6 +1,6 @@
 Summary: Perl interface to the Gnu Privacy Guard
 Name: GnuPG
-Version: 0.12
+Version: 0.14
 Release: 1c
 Source: http://www.cpan.org/modules/by-module/GnuPG/%{name}-%{version}.tar.gz
 Copyright: GPL
@@ -41,6 +41,14 @@
 %doc README ChangeLog NEWS
 
 %changelog
+* Fri Apr 16 2010  Mark B. Frost <mark.frost at icainformatics.com> 
+  [0.14-1c]
+- Updated to version 0.14.
+
+* Fri Apr 16 2010  Mark B. Frost <mark.frost at icainformatics.com> 
+  [0.13-1c]
+- Updated to version 0.13.
+
 * Wed Feb 03 2010  Mark B. Frost <mark.frost at icainformatics.com> 
   [0.12-1c]
 - Updated to version 0.12.

Modified: branches/upstream/libgnupg-perl/current/META.yml
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libgnupg-perl/current/META.yml?rev=56272&op=diff
==============================================================================
--- branches/upstream/libgnupg-perl/current/META.yml (original)
+++ branches/upstream/libgnupg-perl/current/META.yml Sat Apr 17 07:12:00 2010
@@ -1,6 +1,6 @@
 --- #YAML:1.0
 name:               GnuPG
-version:            0.12
+version:            0.13
 abstract:           ~
 author:  []
 license:            unknown




More information about the Pkg-perl-cvs-commits mailing list