summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorSamuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>2019-01-07 11:21:44 +0100
committerSamuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>2019-01-07 14:58:46 +0100
commit32b85ec64e5c901369ce3ce5dbda0e96f2ec7fc0 (patch)
treea686348a1852cb0f500a97768efbb3553d0be3dd /configure.ac
parentf21a3c35520842624f944e5809fc55fa7ba26119 (diff)
Disable removal of GPG socketdir with older gpgconf versions
Change-Id: Id068f1c1b70c3db3d3a0faa5ebe7706f205fe4da Reviewed-on: https://gerrit.libreoffice.org/65932 Tested-by: Jenkins Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac29
1 files changed, 21 insertions, 8 deletions
diff --git a/configure.ac b/configure.ac
index f3af6a1fc69f..13551d6f3749 100644
--- a/configure.ac
+++ b/configure.ac
@@ -10596,17 +10596,30 @@ elif test "$_os" = "Linux" -o "$_os" = "Darwin" -o "$_os" = "WINNT" ; then
if test -d /run/user/$uid; then
AC_MSG_RESULT([yes])
AC_PATH_PROG(GPGCONF, gpgconf)
- AC_MSG_CHECKING([for gpgconf --create-socketdir... ])
- if $GPGCONF --dump-options > /dev/null ; then
- if $GPGCONF --dump-options | grep -q create-socketdir ; then
- AC_MSG_RESULT([yes])
- AC_DEFINE([HAVE_GPGCONF_SOCKETDIR])
- AC_DEFINE_UNQUOTED([GPGME_GPGCONF], ["$GPGCONF"])
+
+ # Older versions of gpgconf are not working as expected, since
+ # `gpgconf --remove-socketdir` fails to exit any gpg-agent daemon operating
+ # on that socket dir that has (indirectly) been started by the tests in xmlsecurity/qa/unit/signing/signing.cxx
+ # (see commit message of f0305ec0a7d199e605511844d9d6af98b66d4bfd%5E )
+ AC_MSG_CHECKING([whether version of gpgconf is suitable ... ])
+ GPGCONF_VERSION=`"$GPGCONF" --version | "$AWK" '/^gpgconf \(GnuPG\)/{print $3}'`
+ GPGCONF_NUMVER=`echo $GPGCONF_VERSION | $AWK -F. '{ print \$1*10000+\$2*100+\$3 }'`
+ if test "$GPGCONF_VERSION" = "2.2_OOo" -o "$GPGCONF_NUMVER" -ge "020200"; then
+ AC_MSG_RESULT([yes, $GPGCONF_VERSION])
+ AC_MSG_CHECKING([for gpgconf --create-socketdir... ])
+ if $GPGCONF --dump-options > /dev/null ; then
+ if $GPGCONF --dump-options | grep -q create-socketdir ; then
+ AC_MSG_RESULT([yes])
+ AC_DEFINE([HAVE_GPGCONF_SOCKETDIR])
+ AC_DEFINE_UNQUOTED([GPGME_GPGCONF], ["$GPGCONF"])
+ else
+ AC_MSG_RESULT([no])
+ fi
else
- AC_MSG_RESULT([no])
+ AC_MSG_RESULT([no. missing or broken gpgconf?])
fi
else
- AC_MSG_RESULT([no. missing or broken gpgconf?])
+ AC_MSG_RESULT([no, $GPGCONF_VERSION])
fi
else
AC_MSG_RESULT([no])