Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

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

50 views
Skip to first unread message

Daniel Kahn Gillmor

unread,
Aug 30, 2016, 8:40:03 AM8/30/16
to
Control: affects 835075 src:gnupg2

On Mon 2016-08-22 03:20:05 -0400, Chris Lamb wrote:
> Source: libmail-gnupg-perl
> Version: 0.22-1
> Severity: serious
> Justification: fails to build from source
> User: reproduci...@lists.alioth.debian.org
> Usertags: ftbfs
> X-Debbugs-Cc: reproduci...@lists.alioth.debian.org
>
> Dear Maintainer,
>
> libmail-gnupg-perl fails to build from source in unstable/amd64:
>
> [..]
>
>
> **************************************************************************************
> ** Starting build **
> **************************************************************************************
>
> Package: libmail-gnupg-perl
> Version: 0.22-1
> Build architecture: amd64
> Date: Mon, 22 Aug 2016 08:12:30 +0100
> Hostname: 0ca479999040
> Uname: Linux 0ca479999040 4.6.0-1-amd64 #1 SMP Debian 4.6.4-1 (2016-07-18) x86_64 GNU/Linux
> /etc/timezone: Europe/London
>
> **************************************************************************************
> ** Installing build dependencies **
> **************************************************************************************
>
> dh_testdir
> dh_testroot
> dh_prep
> dh_testdir
> dh_testroot
> dh_install
> dh_installdocs
> dh_installchangelogs
> dh_compress
> dh_fixperms
> dh_installdeb
> dh_gencontrol
> dh_md5sums
> dh_builddeb
> dpkg-deb: building package 'libmail-gnupg-perl-build-deps' in '../libmail-gnupg-perl-build-deps_0.22-1_all.deb'.
>
> The package has been created.
> Attention, the package has been created in the current directory,
> not in ".." as indicated by the message above!
> Selecting previously unselected package libmail-gnupg-perl-build-deps.
> (Reading database ... 23244 files and directories currently installed.)
> Preparing to unpack libmail-gnupg-perl-build-deps_0.22-1_all.deb ...
> Unpacking libmail-gnupg-perl-build-deps (0.22-1) ...
> Reading package lists...
> Building dependency tree...
> Reading state information...
> Correcting dependencies... Done
> The following additional packages will be installed:
> libclass-method-modifiers-perl libconvert-binhex-perl libdata-perl-perl
> libdevel-globaldestruction-perl libgnupg-interface-perl libimport-into-perl
> libmime-tools-perl libmodule-build-perl libmodule-runtime-perl libmoo-perl
> libmoox-handlesvia-perl libmoox-late-perl libparams-classify-perl
> librole-tiny-perl libstrictures-perl libsub-exporter-progressive-perl
> libtest-pod-perl libtype-tiny-perl
> Suggested packages:
> libscalar-number-perl libbareword-filehandles-perl libindirect-perl
> libmultidimensional-perl libdevel-stacktrace-perl
> Recommended packages:
> libmodule-signature-perl libpod-readme-perl libsoftware-license-perl
> libclass-xsaccessor-perl libdevel-lexalias-perl libtype-tiny-xs-perl
> The following NEW packages will be installed:
> libclass-method-modifiers-perl libconvert-binhex-perl libdata-perl-perl
> libdevel-globaldestruction-perl libgnupg-interface-perl libimport-into-perl
> libmime-tools-perl libmodule-build-perl libmodule-runtime-perl libmoo-perl
> libmoox-handlesvia-perl libmoox-late-perl libparams-classify-perl
> librole-tiny-perl libstrictures-perl libsub-exporter-progressive-perl
> libtest-pod-perl libtype-tiny-perl
> 0 upgraded, 18 newly installed, 0 to remove and 0 not upgraded.
> 1 not fully installed or removed.
> Need to get 1148 kB of archives.
> After this operation, 2785 kB of additional disk space will be used.
> Get:1 http://httpredir.debian.org/debian sid/main amd64 libmodule-build-perl all 0.421800-2 [259 kB]
> Get:2 http://httpredir.debian.org/debian sid/main amd64 libclass-method-modifiers-perl all 2.12-1 [18.6 kB]
> Get:3 http://httpredir.debian.org/debian sid/main amd64 libsub-exporter-progressive-perl all 0.001011-1 [7748 B]
> Get:4 http://httpredir.debian.org/debian sid/main amd64 libdevel-globaldestruction-perl all 0.13-1 [8676 B]
> Get:5 http://httpredir.debian.org/debian sid/main amd64 libparams-classify-perl amd64 0.013-6 [24.2 kB]
> Get:6 http://httpredir.debian.org/debian sid/main amd64 libmodule-runtime-perl all 0.014-2 [18.0 kB]
> Get:7 http://httpredir.debian.org/debian sid/main amd64 libimport-into-perl all 1.002005-1 [11.6 kB]
> Get:8 http://httpredir.debian.org/debian sid/main amd64 librole-tiny-perl all 2.000003-1 [19.0 kB]
> Get:9 http://httpredir.debian.org/debian sid/main amd64 libstrictures-perl all 2.000003-1 [18.1 kB]
> Get:10 http://httpredir.debian.org/debian sid/main amd64 libmoo-perl all 2.002004-1 [66.8 kB]
> Get:11 http://httpredir.debian.org/debian sid/main amd64 libdata-perl-perl all 0.002009-1 [50.5 kB]
> Get:12 http://httpredir.debian.org/debian sid/main amd64 libmoox-handlesvia-perl all 0.001008-2 [22.1 kB]
> Get:13 http://httpredir.debian.org/debian sid/main amd64 libtype-tiny-perl all 1.000005-1 [271 kB]
> Get:14 http://httpredir.debian.org/debian sid/main amd64 libmoox-late-perl all 0.015-2 [13.1 kB]
> Get:15 http://httpredir.debian.org/debian sid/main amd64 libgnupg-interface-perl all 0.52-2 [68.2 kB]
> Get:16 http://httpredir.debian.org/debian sid/main amd64 libconvert-binhex-perl all 1.125-1 [30.5 kB]
> Get:17 http://httpredir.debian.org/debian sid/main amd64 libmime-tools-perl all 5.507-1 [226 kB]
> Get:18 http://httpredir.debian.org/debian sid/main amd64 libtest-pod-perl all 1.51-1 [14.7 kB]
> Fetched 1148 kB in 0s (39.7 MB/s)
> Selecting previously unselected package libmodule-build-perl.
> (Reading database ...
> (Reading database ... 5%
> (Reading database ... 10%
> (Reading database ... 15%
> (Reading database ... 20%
> (Reading database ... 25%
> (Reading database ... 30%
> (Reading database ... 35%
> (Reading database ... 40%
> (Reading database ... 45%
> (Reading database ... 50%
> (Reading database ... 55%
> (Reading database ... 60%
> (Reading database ... 65%
> (Reading database ... 70%
> (Reading database ... 75%
> (Reading database ... 80%
> (Reading database ... 85%
> (Reading database ... 90%
> (Reading database ... 95%
> (Reading database ... 100%
> (Reading database ... 23248 files and directories currently installed.)
> Preparing to unpack .../00-libmodule-build-perl_0.421800-2_all.deb ...
> Adding 'diversion of /usr/bin/config_data to /usr/bin/config_data.diverted by libmodule-build-perl'
> Adding 'diversion of /usr/share/man/man1/config_data.1.gz to /usr/share/man/man1/config_data.diverted.1.gz by libmodule-build-perl'
> Unpacking libmodule-build-perl (0.421800-2) ...
> Selecting previously unselected package libclass-method-modifiers-perl.
> Preparing to unpack .../01-libclass-method-modifiers-perl_2.12-1_all.deb ...
> Unpacking libclass-method-modifiers-perl (2.12-1) ...
> Selecting previously unselected package libsub-exporter-progressive-perl.
> Preparing to unpack .../02-libsub-exporter-progressive-perl_0.001011-1_all.deb ...
> Unpacking libsub-exporter-progressive-perl (0.001011-1) ...
> Selecting previously unselected package libdevel-globaldestruction-perl.
> Preparing to unpack .../03-libdevel-globaldestruction-perl_0.13-1_all.deb ...
> Unpacking libdevel-globaldestruction-perl (0.13-1) ...
> Selecting previously unselected package libparams-classify-perl.
> Preparing to unpack .../04-libparams-classify-perl_0.013-6_amd64.deb ...
> Unpacking libparams-classify-perl (0.013-6) ...
> Selecting previously unselected package libmodule-runtime-perl.
> Preparing to unpack .../05-libmodule-runtime-perl_0.014-2_all.deb ...
> Unpacking libmodule-runtime-perl (0.014-2) ...
> Selecting previously unselected package libimport-into-perl.
> Preparing to unpack .../06-libimport-into-perl_1.002005-1_all.deb ...
> Unpacking libimport-into-perl (1.002005-1) ...
> Selecting previously unselected package librole-tiny-perl.
> Preparing to unpack .../07-librole-tiny-perl_2.000003-1_all.deb ...
> Unpacking librole-tiny-perl (2.000003-1) ...
> Selecting previously unselected package libstrictures-perl.
> Preparing to unpack .../08-libstrictures-perl_2.000003-1_all.deb ...
> Unpacking libstrictures-perl (2.000003-1) ...
> Selecting previously unselected package libmoo-perl.
> Preparing to unpack .../09-libmoo-perl_2.002004-1_all.deb ...
> Unpacking libmoo-perl (2.002004-1) ...
> Selecting previously unselected package libdata-perl-perl.
> Preparing to unpack .../10-libdata-perl-perl_0.002009-1_all.deb ...
> Unpacking libdata-perl-perl (0.002009-1) ...
> Selecting previously unselected package libmoox-handlesvia-perl.
> Preparing to unpack .../11-libmoox-handlesvia-perl_0.001008-2_all.deb ...
> Unpacking libmoox-handlesvia-perl (0.001008-2) ...
> Selecting previously unselected package libtype-tiny-perl.
> Preparing to unpack .../12-libtype-tiny-perl_1.000005-1_all.deb ...
> Unpacking libtype-tiny-perl (1.000005-1) ...
> Selecting previously unselected package libmoox-late-perl.
> Preparing to unpack .../13-libmoox-late-perl_0.015-2_all.deb ...
> Unpacking libmoox-late-perl (0.015-2) ...
> Selecting previously unselected package libgnupg-interface-perl.
> Preparing to unpack .../14-libgnupg-interface-perl_0.52-2_all.deb ...
> Unpacking libgnupg-interface-perl (0.52-2) ...
> Selecting previously unselected package libconvert-binhex-perl.
> Preparing to unpack .../15-libconvert-binhex-perl_1.125-1_all.deb ...
> Unpacking libconvert-binhex-perl (1.125-1) ...
> Selecting previously unselected package libmime-tools-perl.
> Preparing to unpack .../16-libmime-tools-perl_5.507-1_all.deb ...
> Unpacking libmime-tools-perl (5.507-1) ...
> Selecting previously unselected package libtest-pod-perl.
> Preparing to unpack .../17-libtest-pod-perl_1.51-1_all.deb ...
> Unpacking libtest-pod-perl (1.51-1) ...
> Setting up libsub-exporter-progressive-perl (0.001011-1) ...
> Setting up libclass-method-modifiers-perl (2.12-1) ...
> Setting up librole-tiny-perl (2.000003-1) ...
> Setting up libtype-tiny-perl (1.000005-1) ...
> Setting up libstrictures-perl (2.000003-1) ...
> Setting up libdevel-globaldestruction-perl (0.13-1) ...
> Processing triggers for man-db (2.7.5-1) ...
> Setting up libtest-pod-perl (1.51-1) ...
> Setting up libmodule-build-perl (0.421800-2) ...
> Setting up libconvert-binhex-perl (1.125-1) ...
> Setting up libparams-classify-perl (0.013-6) ...
> Setting up libmime-tools-perl (5.507-1) ...
> Setting up libmodule-runtime-perl (0.014-2) ...
> Setting up libdata-perl-perl (0.002009-1) ...
> Setting up libimport-into-perl (1.002005-1) ...
> Setting up libmoo-perl (2.002004-1) ...
> Setting up libmoox-late-perl (0.015-2) ...
> Setting up libmoox-handlesvia-perl (0.001008-2) ...
> Setting up libgnupg-interface-perl (0.52-2) ...
> Setting up libmail-gnupg-perl-build-deps (0.22-1) ...
>
> **************************************************************************************
> ** Environment **
> **************************************************************************************
>
> PATH=/home/lamby/git/projects/dotfiles/dotfiles/..//bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
> HOSTNAME=0ca479999040
> TERM=xterm
> PAGER=more
> DISPLAY=:0
> DOCKER_IMAGE=lamby-debian-sid
> DEB_BUILD_OPTIONS=parallel=9
> PIP_DOWNLOAD_CACHE=/home/lamby/.cache/pip
> HOME=/home/lamby
> LOGNAME=lamby
> SHLVL=1
> PWD=/home/lamby/temp/cdt.20160822081228.ynLAUew7Ua.db.libmail-gnupg-perl/libmail-gnupg-perl-0.22
> OLDPWD=/home/lamby/temp/cdt.20160822081228.ynLAUew7Ua.db.libmail-gnupg-perl
> GPG_TTY=/dev/console
> QUILT_PATCHES=debian/patches
> QUILT_NO_DIFF_INDEX=1
> QUILT_REFRESH_ARGS=-p ab --no-timestamps --no-index
> DEBEMAIL=la...@debian.org
> DEBFULLNAME=Chris Lamb
> EDITOR=vim
> LESS=-cgiFx4M
> GPG_KEY=1E953E27D4311E58
> BLASTER=A220 I5 D1 H5 P330 T6
> _=/usr/bin/env
>
> **************************************************************************************
> ** Building libmail-gnupg-perl 0.22-1 on amd64 **
> **************************************************************************************
>
> dpkg-buildpackage -rfakeroot -D -us -uc -b
> dpkg-buildpackage: info: source package libmail-gnupg-perl
> dpkg-buildpackage: info: source version 0.22-1
> dpkg-buildpackage: info: source distribution unstable
> dpkg-buildpackage: info: source changed by Salvatore Bonaccorso <car...@debian.org>
> dpkg-source --before-build libmail-gnupg-perl-0.22
> dpkg-buildpackage: info: host architecture amd64
> fakeroot debian/rules clean
> dh clean
> dh_testdir
> dh_auto_clean
> dh_clean
> debian/rules build
> dh build
> dh_testdir
> dh_update_autotools_config
> dh_auto_configure
> perl -I. Build.PL --installdirs vendor --config "optimize=-g -O2 -fdebug-prefix-map=/home/lamby/temp/cdt.20160822081228.ynLAUew7Ua.db.libmail-gnupg-perl/libmail-gnupg-perl-0.22=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2" --config "ld=x86_64-linux-gnu-gcc -g -O2 -fdebug-prefix-map=/home/lamby/temp/cdt.20160822081228.ynLAUew7Ua.db.libmail-gnupg-perl/libmail-gnupg-perl-0.22=. -fstack-protector-strong -Wformat -Werror=format-security -Wl,-z,relro"
> Created MYMETA.yml and MYMETA.json
> Creating new 'Build' script for 'Mail-GnuPG' version '0.22'
> dh_auto_build
> perl Build
> Building Mail-GnuPG
> dh_auto_test
> perl Build test --verbose 1
> t/00.signature.t ......... skipped: Set the environment variable TEST_SIGNATURE to enable this test.
> t/05.load.t ..............
> 1..1
> ok 1 - use Mail::GnuPG;
> ok
> t/20.inline-verify.t ..... skipped: failed to import GPG keys for testing
> t/25.multipart-verify.t .. skipped: failed to import GPG keys for testing
> 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 <ma...@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 <ma...@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
> t/35.has-public-key.t .... skipped: failed to import GPG keys for testing
> t/99.pod.t ...............
> 1..1
> ok 1 - POD test for blib/lib/Mail/GnuPG.pm
> ok
> t/agent.t ................ skipped: unable to find gpg agent
> t/base.t .................
> 1..1
> ok 1
> ok
> t/round-trip.t ........... skipped: failed to import GPG keys for testing
>
> Test Summary Report
> -------------------
> t/30.inline-decrypt.t (Wstat: 512 Tests: 1 Failed: 0)
> Non-zero exit status: 2
> Parse errors: Bad plan. You planned 5 tests but ran 1.
> Files=10, Tests=4, 63 wallclock secs ( 0.05 usr 0.01 sys + 2.10 cusr 0.20 csys = 2.36 CPU)
> Result: FAIL
> Failed 1/10 test programs. 0/4 subtests failed.
> dh_auto_test: perl Build test --verbose 1 returned exit code 255
> debian/rules:4: recipe for target 'build' failed
> make: *** [build] Error 2

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. 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. I would be sad to see too
such a workaround, because it would mean that users of
libmail-gnupg-perl wouldn't get the benefits of the modern branch of
GnuPG, so hopefully an upstream fix (or even a debian-specific fix that
works just with the 2.1.x branch) is the right way out.

Happy hacking,

--dkg
signature.asc

gregor herrmann

unread,
Sep 1, 2016, 11:00:03 AM9/1/16
to
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 <ma...@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 <ma...@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 <ma...@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 <ma...@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 <ma...@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 <ma...@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 <ma...@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 <ma...@gnupg.dom>" imported
gpg: key 49539D60EFEA4EAD: secret key imported
gpg: key 49539D60EFEA4EAD: "Mail::GnuPG Test Key <ma...@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
signature.asc

gregor herrmann

unread,
Sep 1, 2016, 6:30:03 PM9/1/16
to
On Thu, 01 Sep 2016 16:00:52 -0400, Daniel Kahn Gillmor wrote:
> An even better way to work around pinentry-related failures in test
> suites is to supply a phony pinentry and point to it. This ensures that
> the gpg codepaths in use in the test suite are the same ones that are
> used by the code in operation, with a change only to the pinentry.

This sounds good, thanks.

Two random thoughts:

> GnuPG itself does this with a minimal fake-pinentry.c for its own test
> suite:
>
> https://anonscm.debian.org/git/pkg-gnupg/gnupg2.git/tree/tests/openpgp/fake-pinentry.c
>
> I imagine for perl we'd want to use a fake-pinentry written in perl so
> that we don't introduce new system-level dependencies for the test
> suite.

- I'm not sure it makes sense to have a fake-pinentry for each
language (perl is not the only language with these issues I
assume); would it be possible to ship something in the gnupg
package itself that can be used by each package (by exporting some
environment variable e.g.)?
- This still leaves the gpg-agent question; if I'm not mistaken
gnupg2 will start a gpg-agent instance unconditionally -- and this
one lingers on after the tests which is problematic for tests
and/or in chroots.

My dream is something like
export HI_GPG_THIS_IS_A_TEST_DONT_ASK_PINENTRY_QUESTIONS_AND_CLEANUP_GPG_AGENT_THANKS=1
(maybe a bit shorter :)

> I'll take a crack at this for libmail-gnupg-perl and see if i can sort
> something out.

Great, thanks alot!


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: Ludwig Hirsch: Die Weihnachtstraurigkeit
signature.asc
0 new messages