]> git.notmuchmail.org Git - notmuch/commitdiff
Merge branch 'release'
authorDavid Bremner <david@tethera.net>
Tue, 21 Feb 2017 12:16:07 +0000 (08:16 -0400)
committerDavid Bremner <david@tethera.net>
Tue, 21 Feb 2017 12:16:07 +0000 (08:16 -0400)
Merge changes to use gpgconf --create-socketdir

NEWS
configure
debian/changelog
test/test-lib.sh

diff --git a/NEWS b/NEWS
index c023c03e4df4e135db936a18030813cd5cbdab5e..01397914299849bef2e26e4fe2c85fbab689e3c1 100644 (file)
--- 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)
 ===========================
 
index fa77eb8fd4b7b406f2b3a097137c4c5001c285f9..d0d8f18acef8a3d2f5cfbbf2c70361b0410e0af0 100755 (executable)
--- 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.
index 513ddebef531fd3e13e5803f06f1b12c91970b42..ccce50e119ee4518be57d3f7f144df37a69450e0 100644 (file)
@@ -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
index 6f9468ae43bc22760b11b72ed7547d8cacb0b8d6..67be917eb94299c609773ab31a2d798c5b172daa 100644 (file)
@@ -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