[Libreoffice-commits] core.git: Branch 'libreoffice-6-2' - configure.ac

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Tue Jan 8 21:54:46 UTC 2019


 configure.ac |   29 +++++++++++++++++++++--------
 1 file changed, 21 insertions(+), 8 deletions(-)

New commits:
commit a9e05d48a0a4e00acd49a7e06375e227f11ae26e
Author:     Samuel Mehrbrodt <Samuel.Mehrbrodt at cib.de>
AuthorDate: Mon Jan 7 11:21:44 2019 +0100
Commit:     Christian Lohmaier <lohmaier+LibreOffice at googlemail.com>
CommitDate: Tue Jan 8 22:54:25 2019 +0100

    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 at cib.de>
    (cherry picked from commit 32b85ec64e5c901369ce3ce5dbda0e96f2ec7fc0)
    Reviewed-on: https://gerrit.libreoffice.org/65983
    Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice at googlemail.com>

diff --git a/configure.ac b/configure.ac
index 38b7709fbe1a..c9a12c07ecd4 100644
--- a/configure.ac
+++ b/configure.ac
@@ -10602,17 +10602,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])


More information about the Libreoffice-commits mailing list