[pkg-gnupg-maint] Bug#835075: [Reproducible-builds] Bug#835075: libmail-gnupg-perl: FTBFS: Failed 1/10 test programs. 0/4 subtests failed.

gregor herrmann gregoa at debian.org
Thu Sep 1 14:52:47 UTC 2016


On Tue, 30 Aug 2016 08:05:14 -0400, Daniel Kahn Gillmor wrote:

[original log:]
> >   You tried to plan twice at t/30.inline-decrypt.t line 30.
> >   # Looks like you planned 5 tests but ran 1.
> >   # Looks like your test exited with 2 just after 1.
> >   t/30.inline-decrypt.t .... 
> >   1..5
> >   ok 1 - An object of class 'MIME::Entity' isa 'MIME::Entity'
> >   gpg: keybox '/home/lamby/temp/cdt.20160822081228.ynLAUew7Ua.db.libmail-gnupg-perl/libmail-gnupg-perl-0.22/mgtg4ltC/pubring.kbx' created
> >   gpg: /home/lamby/temp/cdt.20160822081228.ynLAUew7Ua.db.libmail-gnupg-perl/libmail-gnupg-perl-0.22/mgtg4ltC/trustdb.gpg: trustdb created
> >   gpg: key 49539D60EFEA4EAD marked as ultimately trusted
> >   gpg: key 49539D60EFEA4EAD: public key "Mail::GnuPG Test Key <mail at gnupg.dom>" imported
> >   gpg: can't connect to the agent: File name too long
> >   gpg: error getting the KEK: No agent running
> >   gpg: key 49539D60EFEA4EAD: "Mail::GnuPG Test Key <mail at gnupg.dom>" 1 new signature
> >   gpg: can't connect to the agent: File name too long
> >   gpg: Total number processed: 2
> >   gpg:               imported: 1
> >   gpg:         new signatures: 1
> >   gpg:       secret keys read: 1
> >   gpg: marginals needed: 3  completes needed: 1  trust model: pgp
> >   gpg: depth: 0  valid:   1  signed:   0  trust: 0-, 0q, 0n, 0m, 0f, 1u
> >   Dubious, test returned 2 (wstat 512, 0x200)
> >   Failed 4/5 subtests 

[my log from other mail:]
> # Looks like you planned 5 tests but ran 1.
> # Looks like your test exited with 2 just after 1.
> t/30.inline-decrypt.t .... 
> 1..5
> ok 1 - An object of class 'MIME::Entity' isa 'MIME::Entity'
> gpg: keybox '/build/libmail-gnupg-perl-0.23/mgtHi1Tk/pubring.kbx' created
> gpg: /build/libmail-gnupg-perl-0.23/mgtHi1Tk/trustdb.gpg: trustdb created
> gpg: key 49539D60EFEA4EAD marked as ultimately trusted
> gpg: key 49539D60EFEA4EAD: public key "Mail::GnuPG Test Key <mail at gnupg.dom>" imported
> gpg: key 49539D60EFEA4EAD/49539D60EFEA4EAD: error sending to agent: Inappropriate ioctl for device
> gpg: error building skey array: Inappropriate ioctl for device
> gpg: key 49539D60EFEA4EAD: "Mail::GnuPG Test Key <mail at gnupg.dom>" 1 new signature
> gpg: Total number processed: 2
> gpg:               imported: 1
> gpg:         new signatures: 1
> gpg:       secret keys read: 1
> gpg: marginals needed: 3  completes needed: 1  trust model: pgp
> gpg: depth: 0  valid:   1  signed:   0  trust: 0-, 0q, 0n, 0m, 0f, 1u
> Dubious, test returned 2 (wstat 512, 0x200)
> Failed 4/5 subtests 


> This appears to be another incompatibility with GnuPG 2.1.x.  I will
> shortly release a new version of gnupg that explicitly Breaks:
> libmail-gnupg-perl <= 0.22-1.
> Ideally, the next version of libmail-gnupg-perl in debian will be fixed
> to support gnupg from the 2.1.x series.  

As an additional data point, I just realized that I'm using
Mail::GnuPG in a script and it still works fine for me (i.e. with
gnupg2). What we're seeing in the two logs above are _test_ failures,
different but both related to gpg-agent; which is a bit of a pain for
all tests/bugs I've seen so far :)

Of course this should be fixed one way or another, and it's still a
RC bug since the package doesn't build; but I'm not sure that the
Breaks in gnupg against the binary libmail-gnupg-perl is really
needed.


Let's test a bit:

As for the test suite, if I just run `prove --verbose
t/30.inline-decrypt.t' in my normal environment (with
libmail-gnupg-perl installed and gpg-agent running), I get:

% prove --verbose t/30.inline-decrypt.t
t/30.inline-decrypt.t ..                                  
1..5
ok 1 - An object of class 'MIME::Entity' isa 'MIME::Entity'
gpg: keybox '/home/gregoa/src/git-pkg-perl/meta/packages/libmail-gnupg-perl/mgtvSCcv/pubring.kbx' created
gpg: /home/gregoa/src/git-pkg-perl/meta/packages/libmail-gnupg-perl/mgtvSCcv/trustdb.gpg: trustdb created
gpg: key 49539D60EFEA4EAD marked as ultimately trusted
gpg: key 49539D60EFEA4EAD: public key "Mail::GnuPG Test Key <mail at gnupg.dom>" imported

then pinentry-something pops up (_not_ my usual
pinentry-somethingelse!) and ask for a passphrase for "Mail::GnuPG
Test Key"

and after pressing cancel I get:

gpg: key 49539D60EFEA4EAD/49539D60EFEA4EAD: error sending to agent: Operation cancelled
gpg: key 49539D60EFEA4EAD: "Mail::GnuPG Test Key <mail at gnupg.dom>" 1 new signature
gpg: Total number processed: 2
gpg:               imported: 1
gpg:         new signatures: 1
gpg:       secret keys read: 1
gpg: marginals needed: 3  completes needed: 1  trust model: pgp
gpg: depth: 0  valid:   1  signed:   0  trust: 0-, 0q, 0n, 0m, 0f, 1u
You tried to plan twice at t/30.inline-decrypt.t line 30.
# Looks like you planned 5 tests but ran 1.
# Looks like your test exited with 2 just after 1.
Dubious, test returned 2 (wstat 512, 0x200)
Failed 4/5 subtests 

whereas after pressing Ok (maybe the password is empty?) I get:

gpg: key 49539D60EFEA4EAD/49539D60EFEA4EAD: error sending to agent:
No passphrase given
gpg: error building skey array: No passphrase given
gpg: key 49539D60EFEA4EAD: "Mail::GnuPG Test Key <mail at gnupg.dom>" 1
new signature
gpg: Total number processed: 2
gpg:               imported: 1
gpg:         new signatures: 1
gpg:       secret keys read: 1
gpg: marginals needed: 3  completes needed: 1  trust model: pgp
gpg: depth: 0  valid:   1  signed:   0  trust: 0-, 0q, 0n, 0m, 0f, 1u
You tried to plan twice at t/30.inline-decrypt.t line 30.
# Looks like you planned 5 tests but ran 1.
# Looks like your test exited with 2 just after 1.
Dubious, test returned 2 (wstat 512, 0x200)
Failed 4/5 subtests 

Ah, the passphrase is 'passphrase'. Let's try again:

% prove --verbose t/30.inline-decrypt.t
t/30.inline-decrypt.t ..                                  
1..5
ok 1 - An object of class 'MIME::Entity' isa 'MIME::Entity'
gpg: keybox '/home/gregoa/src/git-pkg-perl/meta/packages/libmail-gnupg-perl/mgtDbcfV/pubring.kbx' created
gpg: /home/gregoa/src/git-pkg-perl/meta/packages/libmail-gnupg-perl/mgtDbcfV/trustdb.gpg: trustdb created
gpg: key 49539D60EFEA4EAD marked as ultimately trusted
gpg: key 49539D60EFEA4EAD: public key "Mail::GnuPG Test Key <mail at gnupg.dom>" imported
gpg: key 49539D60EFEA4EAD: secret key imported
gpg: key 49539D60EFEA4EAD: "Mail::GnuPG Test Key <mail at gnupg.dom>" 1 new signature
gpg: Total number processed: 2
gpg:               imported: 1
gpg:         new signatures: 1
gpg:       secret keys read: 1
gpg:   secret keys imported: 1
gpg: marginals needed: 3  completes needed: 1  trust model: pgp
gpg: depth: 0  valid:   1  signed:   0  trust: 0-, 0q, 0n, 0m, 0f, 1u
ok 2 - An object of class 'Mail::GnuPG' isa 'Mail::GnuPG'
ok 3 - decrypt success
ok 4 - message unsigned
ok 5 - plaintext
ok
All tests successful.
Files=1, Tests=5, 15 wallclock secs ( 0.03 usr  0.00 sys +  0.26 cusr  0.02 csys =  0.31 CPU)
Result: PASS

Works :)


> Barring that, a new version of
> libmail-gnupg-perl could be made that depends on older versions of gnupg
> (<= 2.1).  Or, it as a temporary workaround, it could be patched to look
> for gpg1 and to explicitly depend on gnupg1.  

Maybe we should think about this for the test suite temporarily.
Or maybe we can trick gpg-agent into working during build / in a
chroot somehow. And stopping it afterwards. Etc. ...
Probably the latter, since the tests work in general ...

--allow-preset-passphrase for the agent and gpg-preset-passphrase(1)
look interesting.


Cheers,
gregor

-- 
 .''`.  Homepage https://info.comodo.priv.at/ - OpenPGP key 0xBB3A68018649AA06
 : :' : Debian GNU/Linux user, admin, and developer -  https://www.debian.org/
 `. `'  Member of VIBE!AT & SPI, fellow of the Free Software Foundation Europe
   `-   NP: Kurt Ostbahn & Die Kombo: Damit wos weidageht
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 931 bytes
Desc: Digital Signature
URL: <http://lists.alioth.debian.org/pipermail/pkg-gnupg-maint/attachments/20160901/7ad4628b/attachment.sig>


More information about the pkg-gnupg-maint mailing list