--- libgnupg-perl-0.9.orig/GnuPG/Tie.pm +++ libgnupg-perl-0.9/GnuPG/Tie.pm @@ -336,7 +336,7 @@ use GnuPG::Tie::Decrypt; tie *CIPHER, 'GnuPG::Tie::Encrypt', armor => 1, recipient => 'User'; - print CIPHER < +Build-Depends-Indep: debhelper (>= 2) +Standards-Version: 3.6.1 + +Package: libgnupg-perl +Architecture: all +Depends: gnupg +Description: Perl module interface to GnuPG using GnuPG's coprocess interface + GnuPG is a perl module that interface with the Gnu Privacy Guard using + the coprocess hooks provided by gpg. The communication mechanism uses + is shared memory and a status file descriptor. + . + The module tries it best to map the rather interactive interface + of gpg to a more programmatic API. + . + Also the modules now offers a tied file handle interface to encryption + and decryption making a lot more easy to use. + . + This module doesn't yet provides an interface to the key manipulation + facilities of gpg. + . + It doesn't also provides the memory protection offered by gpg when + manipulating user passphrase. + . + There are also several options (like cipher selections) that aren't + available from the perl API. --- libgnupg-perl-0.9.orig/debian/dirs +++ libgnupg-perl-0.9/debian/dirs @@ -0,0 +1,2 @@ +usr/bin +usr/sbin --- libgnupg-perl-0.9.orig/debian/changelog +++ libgnupg-perl-0.9/debian/changelog @@ -0,0 +1,67 @@ +libgnupg-perl (0.9-6) unstable; urgency=low + + * 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() (closes: #298556). + + -- Peter Palfrader Tue, 8 Mar 2005 20:55:41 +0100 + +libgnupg-perl (0.9-5) unstable; urgency=low + + * Change section to perl to fix override disparity. + + -- Peter Palfrader Sun, 25 Apr 2004 16:46:09 +0200 + +libgnupg-perl (0.9-4) unstable; urgency=low + + * Install non binary perl into usr/share rather than usr/lib. + * Slight changes to debian/copyright: replace "author(s)" with + "author", refer to GPL-2 rather than GPL. + * Update standards version to 3.6.1. + * Fix build dependency on debhelper: it needs to be versioned (>=2). + * Don't end short desciprtion with a dot. + + -- Peter Palfrader Sun, 25 Apr 2004 15:27:54 +0200 + +libgnupg-perl (0.9-3) unstable; urgency=low + + * New Standards-Version: 3.5.7 + - Have no /usr/doc link anymore (actually building against the new + debhelper does fix this - I'll not depend on it tho to make + building it on older releases easier) + - Change Build-Depends to Build-Depends-Indep + + -- Peter Palfrader Mon, 11 Nov 2002 13:37:14 +0100 + +libgnupg-perl (0.9-2) unstable; urgency=low + + * Moved from non-US to main (Section: interpreters). + + -- Peter Palfrader Mon, 17 Jun 2002 20:25:34 +0200 + +libgnupg-perl (0.9-1) unstable; urgency=low + + * New upstream version (closes: #99647); + * Upped Standards-Version to 3.5.4. + * Applied patch to make it work under strict subs: + @@ -267 +267 @@ + - my $max_fd = POSIX::sysconf( POSIX::_SC_OPEN_MAX ) || 256; + + my $max_fd = POSIX::sysconf( &POSIX::_SC_OPEN_MAX ) || 256; + Thanks to Radu Muschevici (closes: #117689). + * Also remove empty stuff from usr/lib/perl. + + -- Peter Palfrader Wed, 7 Nov 2001 17:23:00 +0100 + +libgnupg-perl (0.7-2) unstable; urgency=low + + * Fixed example in GnuPG::Tie manpage (closes: #90703). + * Upped Standards-Version to 3.5.2. + * Removed dependency on perl5. perl-base is essential and sufficent. + + -- Peter Palfrader Sun, 25 Mar 2001 21:07:14 +0200 + +libgnupg-perl (0.7-1) unstable; urgency=low + + * Initial Release (closes: #76184). + + -- Peter Palfrader Thu, 4 Jan 2001 02:21:44 +0100 --- libgnupg-perl-0.9.orig/debian/copyright +++ libgnupg-perl-0.9/debian/copyright @@ -0,0 +1,19 @@ +This package was debianized by Peter Palfrader on +Fri, 3 Nov 2000 14:33:54 +0100. + +It was downloaded from http://www.cpan.org/modules/by-module/GnuPG/ + +Upstream Author: Francis J. Lacoste + +Copyright: + +Copyright (c) 1999, 2000 iNsu Innovations Inc. +All rights reserved. + +This program is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2 of the License, or +(at your option) any later version. + +On Debian systems the entire text of version 2 of the GPL can be +found in /usr/share/common-licenses/GPL-2. --- libgnupg-perl-0.9.orig/debian/docs +++ libgnupg-perl-0.9/debian/docs @@ -0,0 +1,2 @@ +NEWS +README --- libgnupg-perl-0.9.orig/debian/rules +++ libgnupg-perl-0.9/debian/rules @@ -0,0 +1,95 @@ +#!/usr/bin/make -f + +# Uncomment this to turn on verbose mode. +#export DH_VERBOSE=1 + +# This is the debhelper compatability version to use. +export DH_COMPAT=2 + +ifndef PERL + PERL = /usr/bin/perl +endif + TMP = `pwd`/debian/libgnupg-perl + archlib = `$(PERL) -MConfig -e 'print $$Config{installarchlib}'` + config = INSTALLBIN=$(TMP)/usr/bin \ + INSTALLSCRIPT=$(TMP)/usr/bin \ + INSTALLDIRS=perl \ + INSTALLMAN1DIR=$(TMP)/usr/share/man/man1 \ + INSTALLMAN3DIR=$(TMP)/usr/share/man/man3 \ + INSTALLPRIVLIB=$(TMP)/usr/share/perl5 \ + INSTALLARCHLIB=$(TMP)$(archlib) + +configure: configure-stamp +configure-stamp: + dh_testdir + # Add here commands to configure the package. + $(PERL) Makefile.PL $(config) + + touch configure-stamp + +build: configure-stamp build-stamp +build-stamp: + dh_testdir + + # Add here commands to compile the package. + $(MAKE) + + touch build-stamp + +clean: + dh_testdir + dh_testroot + rm -f build-stamp configure-stamp + if [ -e Makefile ]; then $(MAKE) -i distclean; fi + dh_clean + +install: build + dh_testdir + dh_testroot + dh_clean -k + dh_installdirs + + # Add here commands to install the package into debian/. + $(MAKE) pure_install + + find debian/libgnupg-perl -type f -name .packlist | xargs rm -f + -find debian/libgnupg-perl/usr/lib/perl -type d -empty | xargs rmdir -p + + +# Build architecture-independent files here. +binary-indep: build install +# dh_testversion + dh_testdir + dh_testroot +# dh_installdebconf + dh_installdocs +# dh_installexamples +# dh_installmenu +# dh_installemacsen +# dh_installpam +# dh_installinit +# dh_installcron +# dh_installmanpages +# dh_installinfo +# dh_undocumented + dh_installchangelogs ChangeLog +# dh_link + dh_strip + dh_compress + dh_fixperms + # You may want to make some executables suid here. +# dh_suidregister +# dh_makeshlibs + dh_installdeb + dh_perl + dh_shlibdeps + dh_gencontrol + dh_md5sums + dh_builddeb + +# Build architecture-dependent files here. +binary-arch: build install +# We have nothing to do here. + +binary: binary-indep binary-arch +.PHONY: build clean binary-indep binary-arch binary install --- libgnupg-perl-0.9.orig/GnuPG.pm +++ libgnupg-perl-0.9/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 ); @@ -727,19 +727,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;