[Tomi Ollila] Re: [PATCH 2/2] test: use gpgconf --create-socketdir if available
I'm pretty sure Tomi meant to complain publicly ;). --- Begin Message --- On Tue, Feb 14 2017, David Bremnerwrote: > This enables the shortened socket pathes in /run or equivalent. The > explicit call to gpgconf is needed for nonstandard GNUPGHOME settings. 2½ comments inline: __> --- > test/test-lib.sh | 14 ++ > 1 file changed, 14 insertions(+) > > diff --git a/test/test-lib.sh b/test/test-lib.sh > index 86e792a8..9aa6163b 100644 > --- a/test/test-lib.sh > +++ b/test/test-lib.sh > @@ -229,9 +229,18 @@ test_fixed=0 > test_broken=0 > test_success=0 > > + > +_shutdown_gpg_agent () { > +if [ ${NOTMUCH_HAVE_GPGCONF_SOCKETDIR} == 1 ]; then '==' is bashishm (well, maybe works in zsh too), standard with [ ... ] and (builtin) test(1) is just single '=' for equality. > + gpgconf --kill gpg-agent > + gpgconf --remove-socketdir > +fi > +} > + > _exit_common () { > code=$? > trap - EXIT > + _shutdown_gpg_agent better put `set +ex` _before_ `_shutdown_gpg_agent` so that possible failure there may not stop exit processing > set +ex > rm -rf "$TEST_TMPDIR" > } > @@ -1276,6 +1285,11 @@ test_init_ () { > > . ./test-lib-common.sh || exit 1 > > +# we need the setting of GNUPGHOME in test-lib-common.sh > +if [ ${NOTMUCH_HAVE_GPGCONF_SOCKETDIR} == 1 ]; then == -> = > +gpgconf --create-socketdir > +fi > + > emacs_generate_script > > > -- > 2.11.0 > > ___ > notmuch mailing list > notmuch@notmuchmail.org > https://notmuchmail.org/mailman/listinfo/notmuch --- End Message --- ___ notmuch mailing list notmuch@notmuchmail.org https://notmuchmail.org/mailman/listinfo/notmuch
Re: [PATCH 2/2] test: use gpgconf --create-socketdir if available
On Tue, Feb 14 2017, David Bremnerwrote: > This enables the shortened socket pathes in /run or equivalent. The > explicit call to gpgconf is needed for nonstandard GNUPGHOME settings. 2½ comments inline: __> --- > test/test-lib.sh | 14 ++ > 1 file changed, 14 insertions(+) > > diff --git a/test/test-lib.sh b/test/test-lib.sh > index 86e792a8..9aa6163b 100644 > --- a/test/test-lib.sh > +++ b/test/test-lib.sh > @@ -229,9 +229,18 @@ test_fixed=0 > test_broken=0 > test_success=0 > > + > +_shutdown_gpg_agent () { > +if [ ${NOTMUCH_HAVE_GPGCONF_SOCKETDIR} == 1 ]; then '==' is bashishm (well, maybe works in zsh too), standard with [ ... ] and (builtin) test(1) is just single '=' for equality. > + gpgconf --kill gpg-agent > + gpgconf --remove-socketdir > +fi > +} > + > _exit_common () { > code=$? > trap - EXIT > + _shutdown_gpg_agent better put `set +ex` _before_ `_shutdown_gpg_agent` so that possible failure there may not stop exit processing > set +ex > rm -rf "$TEST_TMPDIR" > } > @@ -1276,6 +1285,11 @@ test_init_ () { > > . ./test-lib-common.sh || exit 1 > > +# we need the setting of GNUPGHOME in test-lib-common.sh > +if [ ${NOTMUCH_HAVE_GPGCONF_SOCKETDIR} == 1 ]; then == -> = > +gpgconf --create-socketdir > +fi > + > emacs_generate_script > > > -- > 2.11.0 > > ___ > notmuch mailing list > notmuch@notmuchmail.org > https://notmuchmail.org/mailman/listinfo/notmuch ___ notmuch mailing list notmuch@notmuchmail.org https://notmuchmail.org/mailman/listinfo/notmuch
Re: [PATCH 2/2] test: use gpgconf --create-socketdir if available
Daniel Kahn Gillmorwrites: > I'd love to not see this kind of workaround cruft pile up, because it > tends to cause problems in the future. is there a way that we can mark > this sort of thing for fairly prompt removal once it's fixed upstream? Maybe once a gnupg bug is filed, write to this list with the suggestion that we back out the workaround when the bug is fixed upstream (although we have to think about how long to support gnupg 2.1.18. Thanks debian!). We can then tag that message as a bug in nmbug. d ___ notmuch mailing list notmuch@notmuchmail.org https://notmuchmail.org/mailman/listinfo/notmuch
Re: [PATCH 2/2] test: use gpgconf --create-socketdir if available
On Tue 2017-02-14 16:42:39 -0500, David Bremner wrote: > This enables the shortened socket pathes in /run or equivalent. The > explicit call to gpgconf is needed for nonstandard GNUPGHOME settings. For the current GnuPG 2.1.18, this pair of patches looks reasonable to me, and it should indeed solve builds in deeply-nested paths. That said, i currently consider this a workaround to a bug that should really be fixed in GnuPG itself, as i noted on gnupg-users: https://lists.gnupg.org/pipermail/gnupg-users/2017-February/057692.html id:87k28rl6o8@alice.fifthhorseman.net I'd love to not see this kind of workaround cruft pile up, because it tends to cause problems in the future. is there a way that we can mark this sort of thing for fairly prompt removal once it's fixed upstream? --dkg signature.asc Description: PGP signature ___ notmuch mailing list notmuch@notmuchmail.org https://notmuchmail.org/mailman/listinfo/notmuch
[PATCH 2/2] test: use gpgconf --create-socketdir if available
This enables the shortened socket pathes in /run or equivalent. The explicit call to gpgconf is needed for nonstandard GNUPGHOME settings. --- test/test-lib.sh | 14 ++ 1 file changed, 14 insertions(+) diff --git a/test/test-lib.sh b/test/test-lib.sh index 86e792a8..9aa6163b 100644 --- a/test/test-lib.sh +++ b/test/test-lib.sh @@ -229,9 +229,18 @@ test_fixed=0 test_broken=0 test_success=0 + +_shutdown_gpg_agent () { +if [ ${NOTMUCH_HAVE_GPGCONF_SOCKETDIR} == 1 ]; then + gpgconf --kill gpg-agent + gpgconf --remove-socketdir +fi +} + _exit_common () { code=$? trap - EXIT + _shutdown_gpg_agent set +ex rm -rf "$TEST_TMPDIR" } @@ -1276,6 +1285,11 @@ test_init_ () { . ./test-lib-common.sh || exit 1 +# we need the setting of GNUPGHOME in test-lib-common.sh +if [ ${NOTMUCH_HAVE_GPGCONF_SOCKETDIR} == 1 ]; then +gpgconf --create-socketdir +fi + emacs_generate_script -- 2.11.0 ___ notmuch mailing list notmuch@notmuchmail.org https://notmuchmail.org/mailman/listinfo/notmuch