On Thu, 01 Sep 2016 16:00:52 -0400, Daniel Kahn Gillmor wrote: > On Thu 2016-09-01 10:52:47 -0400, gregor herrmann wrote: > > On Tue, 30 Aug 2016 08:05:14 -0400, Daniel Kahn Gillmor wrote: > > 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. > > 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
Description: Digital Signature