Skip Menu |

This queue is for tickets about the Mail-GnuPG CPAN distribution.

Report information
The Basics
Id: 97283
Status: resolved
Priority: 0/
Queue: Mail-GnuPG

People
Owner: Nobody in particular
Requestors: robert.schubert [...] mathint.com
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: 0.20



Subject: use_agent still broken
Date: Wed, 16 Jul 2014 17:31:12 +0200
To: bug-Mail-GnuPG [...] rt.cpan.org
From: Robert Sachunsky <robert.schubert [...] mathint.com>
Dear maintainer, it seems the option use_agent _still_ fails with Mail::GnuPG v. 19: t/agent.t ................ 1/? # Failed test at t/agent.t line 78. # got: '0' # expected: '2' # Failed test at t/agent.t line 81. # got: '0' # expected: '2' # Failed test at t/agent.t line 82. # got: 'EFEA4EAD' # expected: undef # Failed test at t/agent.t line 83. # got: 'Mail::GnuPG Test Key <mail@gnupg.dom>' # expected: undef # Failed test at t/agent.t line 92. # got: '0' # expected: '2' Unknown Content-Type or no PGP message in body at /root/.cpan/build/Mail-GnuPG-0.19-vA0Gug/blib/lib/Mail/GnuPG.pm line 400. # Looks like you planned 20 tests but ran 8. # Looks like you failed 5 tests of 8 run. # Looks like your test exited with 32 just after 8. t/agent.t ................ Dubious, test returned 32 (wstat 8192, 0x2000) Trying this with a test of my own, I found out the following: - gpg-agent gets called, but with CLEAR_PASSPHRASE instead of GET_PASSPHRASE - gpg uses the (empty) default passphrase sent to it via separate FD, which it reports as wrong (exit code 2) This can be fixed by changing GnuPG.pm such that if use_agent was set, GnuPG::Interface will not receive an IO::Handle for the passphrase (hence in turn gpg will not be called with --passphrase-fd), as in the patch attached below. With this change, the agent test eventually succeeds (under an English locale). However, agent.t itself should be fixed as well, in order to: - get more sensible test output when errors do occur (as exptected vs measured output are reversed in the test) - get a correct result on systems with a non-English locale To that end, I also provided a patch. Hope this helps. Regards, Robert -- My system is a openSUSE 12.3 (i386 GNU/Linux 3.7.10, perl v5.16.2, GnuPG::Interface v0.50). All GnuPG::Interface tests were successful.

Message body is not shown because sender requested not to inline it.

Message body is not shown because sender requested not to inline it.

Download signature.asc
application/pgp-signature 490b

Message body not shown because it is not plain text.

I can't duplicate the test failure here, also running GnuPG::Interface version 50. I am running perl 5.18.2, but your report doesn't really sound obviously related to perl versions. Out of curiousity what version(s) of gnupg do you have installed?
Subject: Re: [rt.cpan.org #97283] use_agent still broken
Date: Thu, 17 Jul 2014 18:45:32 +0200
To: bug-Mail-GnuPG [...] rt.cpan.org
From: Robert Sachunsky <robert.schubert [...] mathint.com>
My gnupg release was GnuPG 2.0.19 I still get the exact same error on a more recent system: GnuPG 2.0.22 perl 5.18.1 Linux i386 3.11.10 openSUSE 13.1 In fact, nothing changes when replacing GPG installation from the most recent (2.0.25) source tarball. Also, I could not find anything related to passphrase-fd handling vs. agent on GPG's recent Git history. The proposed changes do make sense, no?
Subject: Re: [rt.cpan.org #97283] use_agent still broken
Date: Fri, 25 Jul 2014 08:01:47 -0300
To: bug-Mail-GnuPG [...] rt.cpan.org
From: David Bremner <david [...] tethera.net>
Robert Sachunsky via RT <bug-Mail-GnuPG@rt.cpan.org> writes: Show quoted text
> > +$ENV{'LC_ALL'}="C"; # avoid other locales for test > +
I've applied all but this to git. What about this test is locale sensitive? There's another open bug about local sensitive tests (7018) that I'd like to track down / close, so I'd like to actually understand what's failing. d
Subject: Re: [rt.cpan.org #97283] use_agent still broken
Date: Fri, 25 Jul 2014 13:59:44 +0200
To: bug-Mail-GnuPG [...] rt.cpan.org
From: Robert Sachunsky <robert.schubert [...] mathint.com>
Am 25.07.2014 13:03, schrieb david via RT: Show quoted text
> <URL: https://rt.cpan.org/Ticket/Display.html?id=97283 > > > Robert Sachunsky via RT <bug-Mail-GnuPG@rt.cpan.org> writes: >
>> >> +$ENV{'LC_ALL'}="C"; # avoid other locales for test >> +
> > I've applied all but this to git. What about this test is locale > sensitive? There's another open bug about local sensitive tests (7018) > that I'd like to track down / close, so I'd like to actually understand > what's failing.
Sorry. Of course, nothing about this test is locale-sensitive. Really only the source is locale-sensitive, namely Mail/GnuPG.pm lines 244-247 and again 483-486: Show quoted text
> # FIXME: these regex are likely to break under non english locales. > my $result = join "", @error_output; > my ($keyid) = $result =~ /using \S+ key ID (.+)$/m; > my ($pemail) = $result =~ /Good signature from "(.+)"$/m;
Yes, this is already addressed by ID 7018. Moreover, ID 87553 is related (but not a good solution in my opinion, this should be handled locale-independently by the module itself). One should try to always call gpg with the above ENV from Mail/GnuPG.pm, I think. Robert
Subject: Re: [rt.cpan.org #97283] use_agent still broken
Date: Sun, 27 Jul 2014 16:24:34 -0300
To: bug-Mail-GnuPG [...] rt.cpan.org
From: David Bremner <david [...] tethera.net>
Robert Sachunsky via RT <bug-Mail-GnuPG@rt.cpan.org> writes: Show quoted text
> > Sorry. Of course, nothing about this test is locale-sensitive. Really > only the source is locale-sensitive, namely Mail/GnuPG.pm lines 244-247 > and again 483-486:
I have pushed a release candidate to git://pivot.cs.unb.ca/mail-gnupg that eliminates those two FIXMEs. It would be great if you could test; I'm curious if I broke something else, and if the tests pass without LC_ALL=C d
Subject: Re: [rt.cpan.org #97283] use_agent still broken
Date: Mon, 28 Jul 2014 12:00:30 +0200
To: bug-Mail-GnuPG [...] rt.cpan.org
From: Robert Sachunsky <robert.schubert [...] mathint.com>
Hi David, Am 27.07.2014 21:24, schrieb david via RT: Show quoted text
> I have pushed a release candidate to > > git://pivot.cs.unb.ca/mail-gnupg > > that eliminates those two FIXMEs. > > It would be great if you could test; I'm curious if I broke something > else, and if the tests pass without LC_ALL=C
sorry again. In my first patch file, I forgot to include one hunk (attached below). After applying this on your git head, agent.t now passes on my (German localised) system. However, now the new t/26.multipart-verify.non-ascii.t fails, because you forgot to include t/msg/multipart-signed-non-ascii.eml. Best, Robert

Message body is not shown because sender requested not to inline it.

Subject: Re: [rt.cpan.org #97283] use_agent still broken
Date: Mon, 28 Jul 2014 07:24:55 -0300
To: bug-Mail-GnuPG [...] rt.cpan.org
From: David Bremner <david [...] tethera.net>
Robert Sachunsky via RT <bug-Mail-GnuPG@rt.cpan.org> writes: Show quoted text
> sorry again. In my first patch file, I forgot to include one hunk > (attached below). After applying this on your git head, agent.t now > passes on my (German localised) system. > > However, now the new t/26.multipart-verify.non-ascii.t fails, because > you forgot to include t/msg/multipart-signed-non-ascii.eml.
Ok, I pushed a new version with your additional patch and the missing test message. d
Subject: Re: [rt.cpan.org #97283] use_agent still broken
Date: Mon, 28 Jul 2014 13:30:36 +0200
To: bug-Mail-GnuPG [...] rt.cpan.org
From: Robert Sachunsky <robert.schubert [...] mathint.com>
Am 28.07.2014 12:25, schrieb david via RT: Show quoted text
> Ok, I pushed a new version with your additional patch and the missing > test message.
It works. Thanks! Robert