* Take two of making gpg using tests more robust.
@ 2017-02-28 0:26 David Bremner
2017-02-28 0:26 ` [PATCH 1/3] Revert "test: use gpgconf --create-socketdir if available" David Bremner
` (2 more replies)
0 siblings, 3 replies; 7+ messages in thread
From: David Bremner @ 2017-02-28 0:26 UTC (permalink / raw)
To: notmuch
It turns out the hardcoded use of /run/user in gpg doesn't work out
that well in some environments, particularly autobuilders, since
creating those directories is typically done by some login session
manager like systemd-logind (or pam_systemd to be more precise).
This is a more low-tech attempt, simply moving GNUPGHOME into /tmp/
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH 1/3] Revert "test: use gpgconf --create-socketdir if available"
2017-02-28 0:26 Take two of making gpg using tests more robust David Bremner
@ 2017-02-28 0:26 ` David Bremner
2017-02-28 0:26 ` [PATCH 2/3] Revert "configure: add test for gpgconf --create-socketdir" David Bremner
2017-02-28 0:26 ` [PATCH 3/3] test: move GNUPGHOME to TEST_TMPDIR David Bremner
2 siblings, 0 replies; 7+ messages in thread
From: David Bremner @ 2017-02-28 0:26 UTC (permalink / raw)
To: notmuch
This reverts commit e7b88e8b0a93ca83d807edc00e0c97af54c5b5f1.
It turns out that this does not work well in environments without a
running systemd (or some other provider of /run/user)
---
test/test-lib.sh | 14 --------------
1 file changed, 14 deletions(-)
diff --git a/test/test-lib.sh b/test/test-lib.sh
index ba1580cd..86e792a8 100644
--- a/test/test-lib.sh
+++ b/test/test-lib.sh
@@ -229,19 +229,10 @@ 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
set +ex
- _shutdown_gpg_agent
rm -rf "$TEST_TMPDIR"
}
@@ -1285,11 +1276,6 @@ 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
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH 2/3] Revert "configure: add test for gpgconf --create-socketdir"
2017-02-28 0:26 Take two of making gpg using tests more robust David Bremner
2017-02-28 0:26 ` [PATCH 1/3] Revert "test: use gpgconf --create-socketdir if available" David Bremner
@ 2017-02-28 0:26 ` David Bremner
2017-02-28 0:26 ` [PATCH 3/3] test: move GNUPGHOME to TEST_TMPDIR David Bremner
2 siblings, 0 replies; 7+ messages in thread
From: David Bremner @ 2017-02-28 0:26 UTC (permalink / raw)
To: notmuch
This reverts commit 12f7d4e61d30fb9a5c99e128ab1aab0bf069cdb4.
Since we're not using gpgconf anymore, drop the unneeded test in
configure.
---
configure | 16 ----------------
1 file changed, 16 deletions(-)
diff --git a/configure b/configure
index 46063b5d..f1773044 100755
--- a/configure
+++ b/configure
@@ -602,19 +602,6 @@ if [ $WITH_DOCS = "1" ] ; then
fi
fi
-have_gpgconf_socketdir=0
-printf "Checking for gpgconf --{create,remove}-socketdir... "
-if gpgconf --dump-options > /dev/null ; then
- if gpgconf --dump-options | grep -q create-socketdir ; then
- printf "Yes.\n"
- have_gpgconf_socketdir=1
- else
- printf "No.\n"
- fi
-else
- printf "No. (missing or broken gpgconf?)\n"
-fi
-
libdir_in_ldconfig=0
printf "Checking which platform we are on... "
@@ -1192,9 +1179,6 @@ NOTMUCH_PYTHON=${python}
# Are the ruby development files (and ruby) available? If not skip
# building/testing ruby bindings.
NOTMUCH_HAVE_RUBY_DEV=${have_ruby_dev}
-
-# Recent enough gnupg to support gpgconf --create-socketdir?
-NOTMUCH_HAVE_GPGCONF_SOCKETDIR=${have_gpgconf_socketdir}
EOF
# Finally, after everything configured, inform the user how to continue.
--
2.11.0
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH 3/3] test: move GNUPGHOME to TEST_TMPDIR
2017-02-28 0:26 Take two of making gpg using tests more robust David Bremner
2017-02-28 0:26 ` [PATCH 1/3] Revert "test: use gpgconf --create-socketdir if available" David Bremner
2017-02-28 0:26 ` [PATCH 2/3] Revert "configure: add test for gpgconf --create-socketdir" David Bremner
@ 2017-02-28 0:26 ` David Bremner
2017-02-28 15:05 ` Tomi Ollila
2017-03-01 1:04 ` Daniel Kahn Gillmor
2 siblings, 2 replies; 7+ messages in thread
From: David Bremner @ 2017-02-28 0:26 UTC (permalink / raw)
To: notmuch
We already use this directory for dtach sockets, so it makes sense to
put gnupg sockets there as well. There doesn't seem to be a clean way
to put a fully functional socket in a different location than
GNUPGHOME.
---
test/test-lib-common.sh | 1 -
test/test-lib.sh | 2 ++
2 files changed, 2 insertions(+), 1 deletion(-)
diff --git a/test/test-lib-common.sh b/test/test-lib-common.sh
index 03ef1d2d..a96cfbeb 100644
--- a/test/test-lib-common.sh
+++ b/test/test-lib-common.sh
@@ -158,7 +158,6 @@ export HOME="${TMP_DIRECTORY}/home"
mkdir -p "${HOME}"
MAIL_DIR="${TMP_DIRECTORY}/mail"
-export GNUPGHOME="${TMP_DIRECTORY}/gnupg"
export NOTMUCH_CONFIG="${TMP_DIRECTORY}/notmuch-config"
mkdir -p "${test}"
diff --git a/test/test-lib.sh b/test/test-lib.sh
index 86e792a8..518d9c7f 100644
--- a/test/test-lib.sh
+++ b/test/test-lib.sh
@@ -270,6 +270,8 @@ die () {
GIT_EXIT_OK=
# Note: TEST_TMPDIR *NOT* exported!
TEST_TMPDIR=$(mktemp -d "${TMPDIR:-/tmp}/notmuch-test-$$.XXXXXX")
+# Put GNUPGHOME in TMPDIR to avoid problems with long paths.
+export GNUPGHOME="${TEST_TMPDIR}/gnupg"
trap 'trap_exit' EXIT
trap 'trap_signal' HUP INT TERM
--
2.11.0
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH 3/3] test: move GNUPGHOME to TEST_TMPDIR
2017-02-28 0:26 ` [PATCH 3/3] test: move GNUPGHOME to TEST_TMPDIR David Bremner
@ 2017-02-28 15:05 ` Tomi Ollila
2017-03-01 1:04 ` Daniel Kahn Gillmor
1 sibling, 0 replies; 7+ messages in thread
From: Tomi Ollila @ 2017-02-28 15:05 UTC (permalink / raw)
To: David Bremner, notmuch
On Tue, Feb 28 2017, David Bremner <david@tethera.net> wrote:
> We already use this directory for dtach sockets, so it makes sense to
> put gnupg sockets there as well. There doesn't seem to be a clean way
> to put a fully functional socket in a different location than
> GNUPGHOME.
> ---
LGTM.
Tomi
> test/test-lib-common.sh | 1 -
> test/test-lib.sh | 2 ++
> 2 files changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/test/test-lib-common.sh b/test/test-lib-common.sh
> index 03ef1d2d..a96cfbeb 100644
> --- a/test/test-lib-common.sh
> +++ b/test/test-lib-common.sh
> @@ -158,7 +158,6 @@ export HOME="${TMP_DIRECTORY}/home"
> mkdir -p "${HOME}"
>
> MAIL_DIR="${TMP_DIRECTORY}/mail"
> -export GNUPGHOME="${TMP_DIRECTORY}/gnupg"
> export NOTMUCH_CONFIG="${TMP_DIRECTORY}/notmuch-config"
>
> mkdir -p "${test}"
> diff --git a/test/test-lib.sh b/test/test-lib.sh
> index 86e792a8..518d9c7f 100644
> --- a/test/test-lib.sh
> +++ b/test/test-lib.sh
> @@ -270,6 +270,8 @@ die () {
> GIT_EXIT_OK=
> # Note: TEST_TMPDIR *NOT* exported!
> TEST_TMPDIR=$(mktemp -d "${TMPDIR:-/tmp}/notmuch-test-$$.XXXXXX")
> +# Put GNUPGHOME in TMPDIR to avoid problems with long paths.
> +export GNUPGHOME="${TEST_TMPDIR}/gnupg"
> trap 'trap_exit' EXIT
> trap 'trap_signal' HUP INT TERM
>
> --
> 2.11.0
>
> _______________________________________________
> notmuch mailing list
> notmuch@notmuchmail.org
> https://notmuchmail.org/mailman/listinfo/notmuch
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 3/3] test: move GNUPGHOME to TEST_TMPDIR
2017-02-28 0:26 ` [PATCH 3/3] test: move GNUPGHOME to TEST_TMPDIR David Bremner
2017-02-28 15:05 ` Tomi Ollila
@ 2017-03-01 1:04 ` Daniel Kahn Gillmor
2017-03-01 2:16 ` David Bremner
1 sibling, 1 reply; 7+ messages in thread
From: Daniel Kahn Gillmor @ 2017-03-01 1:04 UTC (permalink / raw)
To: David Bremner, notmuch
On Mon 2017-02-27 16:26:50 -0800, David Bremner wrote:
> We already use this directory for dtach sockets, so it makes sense to
> put gnupg sockets there as well. There doesn't seem to be a clean way
> to put a fully functional socket in a different location than
> GNUPGHOME.
LGTM. Thanks for wrangling these frustrations, Bremner.
--dkg
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 3/3] test: move GNUPGHOME to TEST_TMPDIR
2017-03-01 1:04 ` Daniel Kahn Gillmor
@ 2017-03-01 2:16 ` David Bremner
0 siblings, 0 replies; 7+ messages in thread
From: David Bremner @ 2017-03-01 2:16 UTC (permalink / raw)
To: notmuch
Daniel Kahn Gillmor <dkg@fifthhorseman.net> writes:
> On Mon 2017-02-27 16:26:50 -0800, David Bremner wrote:
>> We already use this directory for dtach sockets, so it makes sense to
>> put gnupg sockets there as well. There doesn't seem to be a clean way
>> to put a fully functional socket in a different location than
>> GNUPGHOME.
>
> LGTM. Thanks for wrangling these frustrations, Bremner.
>
> --dkg
Thanks for the kind words.
Series pushed to master/release as part of 0.23.7
d
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2017-03-01 2:16 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-02-28 0:26 Take two of making gpg using tests more robust David Bremner
2017-02-28 0:26 ` [PATCH 1/3] Revert "test: use gpgconf --create-socketdir if available" David Bremner
2017-02-28 0:26 ` [PATCH 2/3] Revert "configure: add test for gpgconf --create-socketdir" David Bremner
2017-02-28 0:26 ` [PATCH 3/3] test: move GNUPGHOME to TEST_TMPDIR David Bremner
2017-02-28 15:05 ` Tomi Ollila
2017-03-01 1:04 ` Daniel Kahn Gillmor
2017-03-01 2:16 ` David Bremner
Code repositories for project(s) associated with this public inbox
https://yhetil.org/notmuch.git/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).