You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by st...@apache.org on 2011/07/26 01:00:22 UTC

svn commit: r1150950 - in /subversion/trunk: ./ build/generator/ subversion/bindings/swig/ subversion/include/ subversion/libsvn_auth_gpg_agent/ subversion/libsvn_subr/

Author: stsp
Date: Mon Jul 25 23:00:20 2011
New Revision: 1150950

URL: http://svn.apache.org/viewvc?rev=1150950&view=rev
Log:
Remove libsvn_auth_gpg_agent and move gpg-agent support into libsvn_subr.

There is no need to put gpg-agent support into a library loaded at runtime.
The svn code talks to the GPG agent via a UNIX stream socket.
There are no massive external library dependencies involved that
we need to keep at a distance, as with GNOME or KDE.

This should also fix the problem where svn fails to enable gpg-agent
support on Mac OS X because of a filename mismatch (*.so vs. *.dylib).

* subversion/include/svn_auth.h
  (svn_auth_gpg_agent_version): Remove declaration. A version function
   is only needed for DSOs.
  (svn_auth_get_gpg_agent_simple_provider): Declare this function on Darwin.
   Remove mention of libsvn_auth_gpg_agent from docstring.

* subversion/libsvn_auth_gpg_agent,
  subversion/libsvn_auth_gpg_agent/version.c: Remove.

* subversion/libsvn_auth_gpg_agent/gpg_agent.c: Move to ...

* subversion/libsvn_subr/gpg_agent.c: ... here. Wrap all code into
   the SVN_HAVE_GPG_AGENT define.

* subversion/libsvn_subr/auth.c
  (svn_auth_get_platform_specific_provider): Directly call
   svn_auth_get_gpg_agent_simple_provider() if SVN_HAVE_GPG_AGENT is defined
   instead of loading gpg-agent support as a DSO.

* subversion/bindings/swig/core.i: Remove svn_auth_gpg_agent_version.

* configure.ac,
  build.conf,
  build/generator/gen_make.py,
  build/generator/gen_win.py: Remove references to libsvn_auth_gpg_agent.

Added:
    subversion/trunk/subversion/libsvn_subr/gpg_agent.c
      - copied, changed from r1150916, subversion/trunk/subversion/libsvn_auth_gpg_agent/gpg_agent.c
Removed:
    subversion/trunk/subversion/libsvn_auth_gpg_agent/
Modified:
    subversion/trunk/build.conf
    subversion/trunk/build/generator/gen_make.py
    subversion/trunk/build/generator/gen_win.py
    subversion/trunk/configure.ac
    subversion/trunk/subversion/bindings/swig/core.i
    subversion/trunk/subversion/include/svn_auth.h
    subversion/trunk/subversion/libsvn_subr/auth.c

Modified: subversion/trunk/build.conf
URL: http://svn.apache.org/viewvc/subversion/trunk/build.conf?rev=1150950&r1=1150949&r2=1150950&view=diff
==============================================================================
--- subversion/trunk/build.conf (original)
+++ subversion/trunk/build.conf Mon Jul 25 23:00:20 2011
@@ -174,14 +174,6 @@ libs = libsvn_client libsvn_ra libsvn_re
 install = bin
 manpages = subversion/svnrdump/svnrdump.1
 
-# Support for GPG Agent
-[libsvn_auth_gpg_agent]]
-description = Subversion GPG Agent library
-type = lib
-install = gpg-agent-lib
-path = subversion/libsvn_auth_gpg_agent
-libs = apr libsvn_subr
-
 # Support for GNOME Keyring
 [libsvn_auth_gnome_keyring]
 description = Subversion GNOME Keyring Library

Modified: subversion/trunk/build/generator/gen_make.py
URL: http://svn.apache.org/viewvc/subversion/trunk/build/generator/gen_make.py?rev=1150950&r1=1150949&r2=1150950&view=diff
==============================================================================
--- subversion/trunk/build/generator/gen_make.py (original)
+++ subversion/trunk/build/generator/gen_make.py Mon Jul 25 23:00:20 2011
@@ -531,8 +531,7 @@ DIR=`pwd`
 ''')
     libdep_cache = {}
     paths = {}
-    for lib in ('libsvn_auth_gnome_keyring', 'libsvn_auth_kwallet',
-                'libsvn_auth_gpg_agent'):
+    for lib in ('libsvn_auth_gnome_keyring', 'libsvn_auth_kwallet'):
       paths[lib] = self.sections[lib].options.get('path')
     for target_ob in install_sources:
       if not isinstance(target_ob, gen_base.TargetExe):
@@ -564,8 +563,7 @@ DIR=`pwd`
             for lib in self._get_all_lib_deps(lib_name, libdep_cache, paths):
               libs.add(lib)
       if target_name == 'libsvn_subr':
-        libs.update(('libsvn_auth_gnome_keyring', 'libsvn_auth_kwallet',
-                     'libsvn_auth_gpg_agent'))
+        libs.update(('libsvn_auth_gnome_keyring', 'libsvn_auth_kwallet'))
       libdep_cache[target_name] = sorted(libs)
     return libdep_cache[target_name]
 

Modified: subversion/trunk/build/generator/gen_win.py
URL: http://svn.apache.org/viewvc/subversion/trunk/build/generator/gen_win.py?rev=1150950&r1=1150949&r2=1150950&view=diff
==============================================================================
--- subversion/trunk/build/generator/gen_win.py (original)
+++ subversion/trunk/build/generator/gen_win.py Mon Jul 25 23:00:20 2011
@@ -91,8 +91,7 @@ class GeneratorBase(gen_base.GeneratorBa
     self.skip_sections = { 'mod_dav_svn': None,
                            'mod_authz_svn': None,
                            'libsvn_auth_kwallet': None,
-                           'libsvn_auth_gnome_keyring': None,
-                           'libsvn_auth_gpg_agent': None }
+                           'libsvn_auth_gnome_keyring': None }
 
     # Instrumentation options
     self.disable_shared = None

Modified: subversion/trunk/configure.ac
URL: http://svn.apache.org/viewvc/subversion/trunk/configure.ac?rev=1150950&r1=1150949&r2=1150950&view=diff
==============================================================================
--- subversion/trunk/configure.ac (original)
+++ subversion/trunk/configure.ac Mon Jul 25 23:00:20 2011
@@ -820,12 +820,6 @@ if test "$with_gnome_keyring" = "yes"; t
   INSTALL_STATIC_RULES="$INSTALL_STATIC_RULES install-gnome-keyring-lib"
 fi
 
-if test "$with_gpg_agent" = "yes"; then
-  BUILD_RULES="$BUILD_RULES gpg-agent-lib"
-  INSTALL_RULES="`echo $INSTALL_RULES | sed 's/install-lib/install-lib install-gpg-agent-lib/'`"
-  INSTALL_STATIC_RULES="$INSTALL_STATIC_RULES install-gpg-agent-lib"
-fi
-
 if test "$USE_NLS" = "yes"; then
   BUILD_RULES="$BUILD_RULES locale"
   INSTALL_RULES="$INSTALL_RULES install-locale"

Modified: subversion/trunk/subversion/bindings/swig/core.i
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/bindings/swig/core.i?rev=1150950&r1=1150949&r2=1150950&view=diff
==============================================================================
--- subversion/trunk/subversion/bindings/swig/core.i (original)
+++ subversion/trunk/subversion/bindings/swig/core.i Mon Jul 25 23:00:20 2011
@@ -244,7 +244,6 @@
 %ignore svn_auth_kwallet_version;
 %ignore svn_auth_get_kwallet_simple_provider;
 %ignore svn_auth_get_kwallet_ssl_client_cert_pw_provider;
-%ignore svn_auth_gpg_agent_version;
 %ignore svn_auth_get_gpg_agent_simple_provider;
 
 /* bad pool convention */

Modified: subversion/trunk/subversion/include/svn_auth.h
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/include/svn_auth.h?rev=1150950&r1=1150949&r2=1150950&view=diff
==============================================================================
--- subversion/trunk/subversion/include/svn_auth.h (original)
+++ subversion/trunk/subversion/include/svn_auth.h Mon Jul 25 23:00:20 2011
@@ -1070,17 +1070,9 @@ void
 svn_auth_get_kwallet_ssl_client_cert_pw_provider(
   svn_auth_provider_object_t **provider,
   apr_pool_t *pool);
+#endif /* (!DARWIN && !WIN32) || DOXYGEN */
 
-
-/**
- * Get libsvn_auth_gpg_agent version information.
- *
- * @since New in 1.8.
- */
-const svn_version_t *
-svn_auth_gpg_agent_version(void);
-
-
+#if !defined(WIN32) || defined(DOXYGEN)
 /**
  * Set @a *provider to an authentication provider of type @c
  * svn_auth_cred_simple_t that gets/sets information from the user's
@@ -1094,13 +1086,13 @@ svn_auth_gpg_agent_version(void);
  *
  * @since New in 1.8
  * @note This function actually works only on systems with
- * libsvn_auth_gpg_agent and GNU Privacy Guard installed.
+ * GNU Privacy Guard installed.
  */
 void
 svn_auth_get_gpg_agent_simple_provider
     (svn_auth_provider_object_t **provider,
      apr_pool_t *pool);
-#endif /* (!DARWIN && !WIN32) || DOXYGEN */
+#endif /* !defined(WIN32) || defined(DOXYGEN) */
 
 
 /** Set @a *provider to an authentication provider of type @c

Modified: subversion/trunk/subversion/libsvn_subr/auth.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_subr/auth.c?rev=1150950&r1=1150949&r2=1150950&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_subr/auth.c (original)
+++ subversion/trunk/subversion/libsvn_subr/auth.c Mon Jul 25 23:00:20 2011
@@ -391,12 +391,9 @@ svn_auth_get_platform_specific_provider
   *provider = NULL;
 
   if (apr_strnatcmp(provider_name, "gnome_keyring") == 0 ||
-      apr_strnatcmp(provider_name, "kwallet") == 0 ||
-      (apr_strnatcmp(provider_name, "gpg_agent") == 0 &&
-       strcmp(provider_type, "simple") == 0))
+      apr_strnatcmp(provider_name, "kwallet") == 0)
     {
-#if defined(SVN_HAVE_GNOME_KEYRING) || defined(SVN_HAVE_KWALLET) || \
-defined(SVN_HAVE_GPG_AGENT)
+#if defined(SVN_HAVE_GNOME_KEYRING) || defined(SVN_HAVE_KWALLET)
       apr_dso_handle_t *dso;
       apr_dso_handle_sym_t provider_function_symbol, version_function_symbol;
       const char *library_label, *library_name;
@@ -450,6 +447,13 @@ defined(SVN_HAVE_GPG_AGENT)
     }
   else
     {
+#if defined(SVN_HAVE_GPG_AGENT)
+      if (strcmp(provider_name, "gpg_agent") == 0 &&
+          strcmp(provider_type, "simple") == 0)
+        {
+          svn_auth_get_gpg_agent_simple_provider(provider, pool);
+        }
+#endif
 #ifdef SVN_HAVE_KEYCHAIN_SERVICES
       if (strcmp(provider_name, "keychain") == 0 &&
           strcmp(provider_type, "simple") == 0)

Copied: subversion/trunk/subversion/libsvn_subr/gpg_agent.c (from r1150916, subversion/trunk/subversion/libsvn_auth_gpg_agent/gpg_agent.c)
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_subr/gpg_agent.c?p2=subversion/trunk/subversion/libsvn_subr/gpg_agent.c&p1=subversion/trunk/subversion/libsvn_auth_gpg_agent/gpg_agent.c&r1=1150916&r2=1150950&rev=1150950&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_auth_gpg_agent/gpg_agent.c (original)
+++ subversion/trunk/subversion/libsvn_subr/gpg_agent.c Mon Jul 25 23:00:20 2011
@@ -45,6 +45,8 @@
 
 #include "svn_private_config.h"
 
+#ifdef SVN_HAVE_GPG_AGENT
+
 #define BUFFER_SIZE 1024
 
 /* Modify STR in-place such that blanks are escaped as required by the
@@ -420,3 +422,5 @@ svn_auth_get_gpg_agent_simple_provider
   po->vtable = &gpg_agent_simple_provider;
   *provider = po;
 }
+
+#endif /* SVN_HAVE_GPG_AGENT */