[git] GnuPG - branch, master, updated. gnupg-2.1.7-6-g91357b7

by Werner Koch cvs at cvs.gnupg.org
Mon Aug 17 16:20:37 CEST 2015


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "The GNU Privacy Guard".

The branch, master has been updated
       via  91357b7722f2bf0d3765ec72855bdc96732df9d6 (commit)
      from  bba74cdd95ea98b5a7c3a12823b229341e91504e (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 91357b7722f2bf0d3765ec72855bdc96732df9d6
Author: Werner Koch <wk at gnupg.org>
Date:   Mon Aug 17 16:13:25 2015 +0200

    gpg: Avoid linking to Libksba
    
    * kbx/keybox.h (KEYBOX_WITH_X509): Do not define.
    * sm/Makefile.am (AM_CPPFLAGS): Define it here.
    (common_libs): Change to libkeybox509.a
    * g10/Makefile.am (AM_CFLAGS): remove KSBA_CFLAGS.
    (gpg2_LDADD, gpgv2_LDADD): Remove KSBA_LIBS
    * kbx/Makefile.am (noinst_LIBRARIES): Add libkeybox509.a.
    (libkeybox509_a_SOURCES): New.
    (libkeybox_a_CFLAGS): New.
    (libkeybox509_a_CFLAGS): New.
    (kbxutil_CFLAGS): New.
    * kbx/keybox-search.c (has_keygrip) [!KEYBOX_WITH_X509]: Declare args
    as unused.
    --
    
    There is no real need to link to Libksba in gpg.
    
    Signed-off-by: Werner Koch <wk at gnupg.org>

diff --git a/g10/Makefile.am b/g10/Makefile.am
index ea4afc8..0c53eab 100644
--- a/g10/Makefile.am
+++ b/g10/Makefile.am
@@ -25,9 +25,7 @@ AM_CPPFLAGS = -I$(top_srcdir)/common
 
 include $(top_srcdir)/am/cmacros.am
 
-# We need KSBA_CFLAGS because that is included by keybox.h.  See also
-# comments below for libksba.
-AM_CFLAGS = $(LIBGCRYPT_CFLAGS) $(KSBA_CFLAGS) \
+AM_CFLAGS = $(LIBGCRYPT_CFLAGS) \
             $(LIBASSUAN_CFLAGS) $(GPG_ERROR_CFLAGS)
 
 needed_libs = ../kbx/libkeybox.a $(libcommon)
@@ -140,17 +138,14 @@ gpgv2_SOURCES = gpgv.c           \
 #	       ks-db.h \
 #	       $(common_source)
 
-# FIXME: Libkeybox.a links to libksba thus we need to add libksba
-# here, even that it is not used by gpg.  A proper solution would
-# either to split up libkeybox.a or to use a separate keybox daemon.
 LDADD =  $(needed_libs) ../common/libgpgrl.a \
          $(ZLIBS) $(LIBINTL) $(CAPLIBS) $(NETLIBS)
 gpg2_LDADD = $(LDADD) $(LIBGCRYPT_LIBS) $(LIBREADLINE) \
-             $(KSBA_LIBS) $(LIBASSUAN_LIBS) $(GPG_ERROR_LIBS) \
+             $(LIBASSUAN_LIBS) $(GPG_ERROR_LIBS) \
 	     $(LIBICONV) $(resource_objs) $(extra_sys_libs)
 gpg2_LDFLAGS = $(extra_bin_ldflags)
 gpgv2_LDADD = $(LDADD) $(LIBGCRYPT_LIBS) \
-              $(KSBA_LIBS) $(GPG_ERROR_LIBS) \
+              $(GPG_ERROR_LIBS) \
 	      $(LIBICONV) $(resource_objs) $(extra_sys_libs)
 gpgv2_LDFLAGS = $(extra_bin_ldflags)
 
diff --git a/kbx/Makefile.am b/kbx/Makefile.am
index 5df2bba..95138e0 100644
--- a/kbx/Makefile.am
+++ b/kbx/Makefile.am
@@ -26,7 +26,7 @@ include $(top_srcdir)/am/cmacros.am
 
 AM_CFLAGS = $(LIBGCRYPT_CFLAGS) $(KSBA_CFLAGS)
 
-noinst_LIBRARIES = libkeybox.a
+noinst_LIBRARIES = libkeybox.a libkeybox509.a
 bin_PROGRAMS = kbxutil
 
 if HAVE_W32CE_SYSTEM
@@ -48,11 +48,17 @@ common_sources = \
 
 
 libkeybox_a_SOURCES = $(common_sources)
+libkeybox509_a_SOURCES = $(common_sources)
+
+libkeybox_a_CFLAGS = $(AM_CFLAGS)
+libkeybox509_a_CFLAGS = $(AM_CFLAGS) -DKEYBOX_WITH_X509=1
+
 
 # We need W32SOCKLIBS because the init subsystem code in libcommon
 # requires it - although we don't actually need it.  It is easier
 # to do it this way.
 kbxutil_SOURCES = kbxutil.c $(common_sources)
+kbxutil_CFLAGS = $(AM_CFLAGS) -DKEYBOX_WITH_X509=1
 kbxutil_LDADD   = ../common/libcommon.a \
                   $(KSBA_LIBS) $(LIBGCRYPT_LIBS) $(extra_libs) \
                   $(GPG_ERROR_LIBS) $(LIBINTL) $(LIBICONV) $(W32SOCKLIBS)
diff --git a/kbx/keybox-search.c b/kbx/keybox-search.c
index 1433591..05b6859 100644
--- a/kbx/keybox-search.c
+++ b/kbx/keybox-search.c
@@ -611,6 +611,9 @@ has_keygrip (KEYBOXBLOB blob, const unsigned char *grip)
 #ifdef KEYBOX_WITH_X509
   if (blob_get_type (blob) == KEYBOX_BLOBTYPE_X509)
     return blob_x509_has_grip (blob, grip);
+#else
+  (void)blob;
+  (void)grip;
 #endif
   return 0;
 }
diff --git a/kbx/keybox.h b/kbx/keybox.h
index 386fff1..8c31141 100644
--- a/kbx/keybox.h
+++ b/kbx/keybox.h
@@ -29,9 +29,6 @@ extern "C" {
 #include "../common/iobuf.h"
 #include "keybox-search-desc.h"
 
-#define KEYBOX_WITH_X509 1
-
-
 #ifdef KEYBOX_WITH_X509
 # include <ksba.h>
 #endif
diff --git a/sm/Makefile.am b/sm/Makefile.am
index dda3eb8..43e3598 100644
--- a/sm/Makefile.am
+++ b/sm/Makefile.am
@@ -23,7 +23,7 @@ bin_PROGRAMS = gpgsm
 
 AM_CFLAGS = $(LIBGCRYPT_CFLAGS) $(KSBA_CFLAGS) $(LIBASSUAN_CFLAGS)
 
-AM_CPPFLAGS = -I$(top_srcdir)/common
+AM_CPPFLAGS = -I$(top_srcdir)/common -DKEYBOX_WITH_X509=1
 include $(top_srcdir)/am/cmacros.am
 
 if HAVE_W32_SYSTEM
@@ -57,7 +57,7 @@ gpgsm_SOURCES = \
 	qualified.c
 
 
-common_libs = ../kbx/libkeybox.a $(libcommon)
+common_libs = ../kbx/libkeybox509.a $(libcommon)
 
 gpgsm_LDADD = $(common_libs) ../common/libgpgrl.a \
               $(LIBGCRYPT_LIBS) $(KSBA_LIBS) $(LIBASSUAN_LIBS) \

-----------------------------------------------------------------------

Summary of changes:
 g10/Makefile.am     | 11 +++--------
 kbx/Makefile.am     |  8 +++++++-
 kbx/keybox-search.c |  3 +++
 kbx/keybox.h        |  3 ---
 sm/Makefile.am      |  4 ++--
 5 files changed, 15 insertions(+), 14 deletions(-)


hooks/post-receive
-- 
The GNU Privacy Guard
http://git.gnupg.org




More information about the Gnupg-commits mailing list