aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Bremner <david@tethera.net>2017-02-21 08:16:07 -0400
committerDavid Bremner <david@tethera.net>2017-02-21 08:16:07 -0400
commit9951598d11f9e883374d295f886009cdb64d8f63 (patch)
treecc41a08a34aa9f804818d96c45b101decfc25f23
parent0e037c34dd4b7eb9be96e62e0ee18260291de1b2 (diff)
parent928016a4ea0de23960b9c44b9f5d556b8878b5ab (diff)
Merge branch 'release'
Merge changes to use gpgconf --create-socketdir
-rw-r--r--NEWS12
-rwxr-xr-xconfigure16
-rw-r--r--debian/changelog7
-rw-r--r--test/test-lib.sh14
4 files changed, 49 insertions, 0 deletions
diff --git a/NEWS b/NEWS
index c023c03e..01397914 100644
--- a/NEWS
+++ b/NEWS
@@ -1,3 +1,15 @@
+Notmuch 0.23.6 (UNRELEASED)
+===========================
+
+Test Suite
+----------
+
+Use gpgconf --create-socketdir if available.
+
+ GnuPG has a facility to use sockets in /run or /var/run to avoid
+ problems with long socket paths, but this is not enabled by default
+ for GNUPGHOME other than $HOME/.gnupg. Enable it, if possible.
+
Notmuch 0.23.5 (2017-01-09)
===========================
diff --git a/configure b/configure
index fa77eb8f..d0d8f18a 100755
--- a/configure
+++ b/configure
@@ -612,6 +612,19 @@ 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
+
if [ $WITH_DESKTOP = "1" ]; then
printf "Checking if desktop-file-install is available... "
if command -v desktop-file-install > /dev/null; then
@@ -1186,6 +1199,9 @@ 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.
diff --git a/debian/changelog b/debian/changelog
index 513ddebe..ccce50e1 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,10 @@
+notmuch (0.23.5-2) UNRELEASED; urgency=medium
+
+ * Use gpgconf --create-socketdir to create gpg-agent sockets for
+ test suite.
+
+ -- David Bremner <bremner@debian.org> Tue, 21 Feb 2017 07:51:08 -0400
+
notmuch (0.23.5-1) unstable; urgency=medium
* Remove RUNPATH from /usr/bin/notmuch
diff --git a/test/test-lib.sh b/test/test-lib.sh
index 6f9468ae..67be917e 100644
--- a/test/test-lib.sh
+++ b/test/test-lib.sh
@@ -230,10 +230,19 @@ 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"
}
@@ -1277,6 +1286,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