--- libcrypt-gpg-perl-1.52.orig/GPG.pm +++ libcrypt-gpg-perl-1.52/GPG.pm @@ -25,14 +25,12 @@ ( $VERSION ) = '$Revision: 1.52 $' =~ /\s+([\d\.]+)/; sub new { - bless { GPGBIN => '/usr/local/bin/gpg', + bless { GPGBIN => 'gpg', FORCEDOPTS => '--no-secmem-warning', GPGOPTS => '--lock-multiple --compress-algo 1 ' . '--cipher-algo cast5 --force-v3-sigs', - VERSION => $VERSION, DELAY => 0, PASSPHRASE => '', - COMMENT => "Crypt::GPG v$VERSION", ARMOR => 1, MARGINALS => 3, DETACH => 1, @@ -78,7 +76,6 @@ print $tmpfh $message; close $tmpfh; my @opts = (split (/\s+/, "$self->{FORCEDOPTS} $self->{GPGOPTS}")); - push (@opts, ('--comment', $self->{COMMENT})) if $self->{COMMENT}; local $SIG{CHLD} = 'IGNORE'; my ($in, $out, $err, $in_q, $out_q, $err_q); @@ -138,7 +135,6 @@ print $tmpfh $ciphertext; close $tmpfh; my @opts = (split (/\s+/, "$self->{FORCEDOPTS} $self->{GPGOPTS}")); - push (@opts, ('--comment', $self->{COMMENT})) if $self->{COMMENT} and !$_[1]; backtick ($self->{GPGBIN}, @opts, '--marginals-needed', $self->{MARGINALS}, '--check-trustdb'); local $SIG{CHLD} = 'IGNORE'; @@ -173,7 +169,7 @@ last; } elsif ($2) { - if ($2 eq $self->{SECRETKEY}->{ID}) { + if ($2 eq ($self->keydb($self->{SECRETKEY}))[0]->{ID}) { $in .= "$self->{PASSPHRASE}\n"; pump $h until $out =~ /(GOOD|BAD)_PASSPHRASE/g; if ($1 eq 'GOOD') { @@ -215,7 +211,7 @@ unless $x =~ /SIG_ID/s; my @signatures; - $x =~ /SIG_ID \S+ (\S+ \S+).*(GOOD|BAD)SIG (\S{16}).*TRUST_(\S+)/sg; + $x =~ /SIG_ID \S+ (\S+ \S+).*(GOOD|BAD)SIG (\S{16}).*(?:TRUST_(\S+))?/sg; my $signature = {'Validity' => $2, 'KeyID' => $3, 'Time' => $1, 'Trusted' => $4}; $signature->{Time} = str2time ($signature->{Time}); @@ -277,7 +273,6 @@ my @opts = (split (/\s+/, "$self->{FORCEDOPTS} $self->{GPGOPTS}")); push (@opts, '--default-key', ref($self->{SECRETKEY})?$self->{SECRETKEY}->{ID}:$self->{SECRETKEY}) if $sign; push (@opts, $sign) if $sign; push (@opts, $armor) if $armor; - push (@opts, ('--comment', $self->{COMMENT})) if $self->{COMMENT}; my ($in, $out, $err, $in_q, $out_q, $err_q); my $h = start ([$self->{GPGBIN}, @opts, '--no-tty', '--status-fd', '1', '--command-fd', 0, @@ -417,7 +412,6 @@ my $armor = $self->{ARMOR} ? '-a' : ''; my $secret = $key->{Type} eq 'sec' ? '-secret-keys' : ''; my @opts = (split (/\s+/, "$self->{FORCEDOPTS} $self->{GPGOPTS}")); - push (@opts, ('--comment', $self->{COMMENT})) if $self->{COMMENT}; push (@opts, '--status-fd', '1'); my ($out) = backtick($self->{GPGBIN}, @opts, "--export$secret", $armor, $id); @@ -811,7 +805,7 @@ my $self = shift; (my $auto = $AUTOLOAD) =~ s/.*:://; # warn "FOO $auto $_[0]\n"; if ($auto =~ /^(passphrase|secretkey|armor|gpgbin|gpgopts|delay|marginals| - detach|encryptsafe|version|comment|debug|tmpdir)$/x) { + detach|encryptsafe|debug|tmpdir)$/x) { return $self->{"\U$auto"} unless defined $_[0]; $self->{"\U$auto"} = shift; } @@ -980,16 +974,6 @@ will fail if trying to encrypt to a key which is not trusted. This is the default. Turn this off if you want to encrypt to untrusted keys. -=item B - -Sets the B instance variable which can be used to change the -Version: string on the GnuPG output to whatever you like. - -=item B - -Sets the B instance variable which can be used to change the -Comment: string on the GnuPG output to whatever you like. - =item B Sets the B instance variable which causes the raw output of @@ -1022,11 +1006,10 @@ The Crypt::GPG::Signature object can be queried with the following methods: - $sig->validity(); # 'Good', 'BAD', or 'Unknown' + $sig->validity(); # 'GOOD', 'BAD', or 'UNKNOWN' $sig->keyid(); # ID of signing key $sig->time(); # Time the signature was made - $sig->trusted(); # True or false depending on whether - the signing key is trusted + $sig->trusted(); # Signature trust level =item B @@ -1076,7 +1059,7 @@ Creates a new keypair with the parameters specified. The only supported B<$keytype> currently is 'ELG-E'. B<$keysize> can be any of -768, 1024, 2048, 3072 or 4096. Returns undef if there was an error, +1024, 2048, 3072 or 4096. Returns undef if there was an error, otherwise returns a filehandle that reports the progress of the key generation process similar to the way GnuPG does. The key generation is not complete till you read an EOF from the returned filehandle. --- libcrypt-gpg-perl-1.52.orig/README +++ libcrypt-gpg-perl-1.52/README @@ -190,7 +190,7 @@ keygen($name, $email, $keytype, $keysize, $expire, $passphrase) Creates a new keypair with the parameters specified. The only - supported $keytype currently is 'ELG-E'. $keysize can be any of 768, + supported $keytype currently is 'ELG-E'. $keysize can be any of 1024, 2048, 3072 or 4096. Returns undef if there was an error, otherwise returns a filehandle that reports the progress of the key generation process similar to the way GnuPG does. The key generation --- libcrypt-gpg-perl-1.52.orig/debian/changelog +++ libcrypt-gpg-perl-1.52/debian/changelog @@ -0,0 +1,43 @@ +libcrypt-gpg-perl (1.52-1.1) unstable; urgency=medium + + * Non-maintainer upload. + * Fix "FTBFS with perl 5.22 in experimental (MakeMaker changes)": + use DESTDIR in debian/rules. + (Closes: #793335) + + -- gregor herrmann Wed, 26 Aug 2015 16:56:43 +0200 + +libcrypt-gpg-perl (1.52-1) unstable; urgency=low + + * New maintainer + * New upstream version (Closes: #329521). + * sign() method generates wrong gpg call and hangs no more, fixed by New + upstream version (Closes: #264166) + * Changes from CPAN bug tracker to make it work + http://rt.cpan.org/Public/Bug/Display.html?id=13563 + * Upload by Amaya Rodrigo : + - (100% MIA highjack) + - Updated Standards-Version + - debian/compat in now 5 + - updated the watch file to version 3 + - made lintian happy: + - build-depends-indep-should-be-build-depends debhelper + - duplicate-relation depends: perl (>= 5.8.0), perl (>= 5.6.0-16) + + -- Roberto Jimeno Fri, 17 Nov 2006 06:54:08 +0000 + +libcrypt-gpg-perl (1.42-2) unstable; urgency=low + + * Changed Section: to "perl". + * Added dependancy for libtimedate-perl + (Closes: bug#200784) + * Relaxed dependancy for libtime-hires-perl (included in perl 5.8) + + -- Matt Hope Fri, 11 Jul 2003 17:10:28 +1000 + +libcrypt-gpg-perl (1.42-1) unstable; urgency=low + + * Initial Package + (Closes: Bug#124205) + + -- Matt Hope Sat, 1 Feb 2003 17:32:27 +1100 --- libcrypt-gpg-perl-1.52.orig/debian/compat +++ libcrypt-gpg-perl-1.52/debian/compat @@ -0,0 +1 @@ +5 --- libcrypt-gpg-perl-1.52.orig/debian/control +++ libcrypt-gpg-perl-1.52/debian/control @@ -0,0 +1,21 @@ +Source: libcrypt-gpg-perl +Section: perl +Priority: optional +Build-Depends: debhelper (>= 5), perl (>= 5.8.8) +Maintainer: Roberto Jimeno +Standards-Version: 3.7.2 + +Package: libcrypt-gpg-perl +Architecture: all +Depends: gnupg, libipc-run-perl, libtimedate-perl, ${perl:Depends} +Description: An Object Oriented Interface to GnuPG + The Crypt::GPG module provides near complete access to GnuPG + functionality through an object oriented interface. It provides + methods for encryption, decryption, signing, signature verification, + key generation, key export and import, and most other key management + functions. + . + This module works almost identically to its cousin, Crypt::PGP5. The + two modules together provide a uniform interface to deal with both PGP + and GnuPG. Eventually, these modules will be folded into a single + module which will interface with GnuPG as well as all versions of PGP. --- libcrypt-gpg-perl-1.52.orig/debian/copyright +++ libcrypt-gpg-perl-1.52/debian/copyright @@ -0,0 +1,29 @@ +This package was debianized by Matt Hope on +Mon, 17 Dec 2001 01:15:20 +1100. + +It was downloaded from http://www.cpan.org/authors/id/AGUL + +Upstream Author: + Ashish Gulhati + + +Crypt::GPG is Copyright (c) 2000-2001 Ashish Gulhati +. All Rights Reserved.. + + +--< from README >-- + +LICENSE + This code is free software; you can redistribute it and/or modify it + under the same terms as Perl itself. + +--- + +Perl is distributed either under the GNU GPL License, or the +Artistic License. + +On a GNU/Linux system, the complete GNU GPL can be found in +`/usr/share/common-licenses/GPL', the Artistic Licence +`/usr/share/common-licenses/Artistic', and Perl's license, +`/usr/share/doc/perl/copyright' + --- libcrypt-gpg-perl-1.52.orig/debian/rules +++ libcrypt-gpg-perl-1.52/debian/rules @@ -0,0 +1,58 @@ +#!/usr/bin/make -f + +#PACKAGE: libcrypt-gpg-perl (Crypt::GPG) + +#export DH_VERBOSE=1 + +ifndef PERL +PERL = /usr/bin/perl +endif + +build: build-stamp +build-stamp: + dh_testdir + + $(PERL) Makefile.PL INSTALLDIRS=vendor + $(MAKE) OPTIMIZE="-O2 -g -Wall" + + touch build-stamp + +clean: + dh_testdir + dh_testroot + rm -f build-stamp + + -$(MAKE) realclean + + dh_clean + +install: + dh_testdir + dh_testroot + dh_clean -k + dh_installdirs + + $(MAKE) install DESTDIR=$(CURDIR)/debian/tmp + dh_movefiles /usr + +binary-arch: + +binary-indep: build install + dh_testdir + dh_testroot + dh_installdocs README + dh_installexamples + dh_installmanpages + dh_installchangelogs + dh_link + dh_strip + dh_compress + dh_fixperms + dh_installdeb -i + dh_perl + dh_gencontrol -i + dh_md5sums -i + dh_builddeb -i + +binary: binary-indep +.PHONY: build clean binary-indep binary-arch binary --- libcrypt-gpg-perl-1.52.orig/debian/watch +++ libcrypt-gpg-perl-1.52/debian/watch @@ -0,0 +1,6 @@ +# See uscan(1) for format +# Compulsory line, this is a version 3 file +version=3 +# +http://search.cpan.org/CPAN/authors/id/A/AG/AGUL/ Crypt-GPG-(.*)\.tar\.gz + --- libcrypt-gpg-perl-1.52.orig/t/01-keygen.t +++ libcrypt-gpg-perl-1.52/t/01-keygen.t @@ -39,7 +39,7 @@ # Start test loop with different key sizes/types ################################################ -for my $bits qw(768 1024 2048) { +for my $bits qw(1024 2048) { for my $type ('ELG-E') { # Generate key pair --- libcrypt-gpg-perl-1.52.orig/t/03-export.t +++ libcrypt-gpg-perl-1.52/t/03-export.t @@ -28,7 +28,7 @@ # Start test loop with different key sizes/types ################################################ -for my $bits qw(768 1024 2048) { +for my $bits qw(1024 2048) { for my $type ('ELG-E') { # Export our public key --- libcrypt-gpg-perl-1.52.orig/t/04-encdec.t +++ libcrypt-gpg-perl-1.52/t/04-encdec.t @@ -29,7 +29,7 @@ # Start test loop with different key sizes/types ################################################ -for my $bits qw(768 1024 2048) { +for my $bits qw(1024 2048) { for my $type ('ELG-E') { my ($secretkey) = grep { $_->{Type} =~ /^sec[^\@]?/ } $gpg->keyinfo("A $bits $type"); --- libcrypt-gpg-perl-1.52.orig/t/05-sigver.t +++ libcrypt-gpg-perl-1.52/t/05-sigver.t @@ -29,7 +29,7 @@ # Start test loop with different key sizes/types ################################################ -for my $bits qw(768 1024 2048) { +for my $bits qw(1024 2048) { for my $type ('ELG-E') { my ($secretkey) = grep { $_->{Type} =~ /^sec[^\@]?/ } $gpg->keyinfo("A $bits $type"); --- libcrypt-gpg-perl-1.52.orig/t/06-keyops.t +++ libcrypt-gpg-perl-1.52/t/06-keyops.t @@ -36,7 +36,7 @@ # Start test loop with different key sizes/types ################################################ -for my $bits qw(768 1024 2048) { +for my $bits qw(1024 2048) { for my $type ('ELG-E') { my @mykeys = $gpg->keyinfo("A $bits $type");