[git] GPGME - branch, master, updated. gpgme-1.4.2-26-g766355b

by Werner Koch cvs at cvs.gnupg.org
Thu Mar 13 14:23:31 CET 2014


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 "GnuPG Made Easy".

The branch, master has been updated
       via  766355b5d4f63261c428531fdbdafb8b67de9369 (commit)
      from  dd9c8c56719db093b8daa23aa40b2be71bbd1526 (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 766355b5d4f63261c428531fdbdafb8b67de9369
Author: Werner Koch <wk at gnupg.org>
Date:   Thu Mar 13 14:24:14 2014 +0100

    Add configure option --enable-fixed-path.
    
    * configure.ac: Add option --enable-fixed-path.
    (FIXED_SEARCH_PATH): New ac_define.
    * src/posix-util.c (walk_path): Make use of the option.  Remove
    current directory from fallback PATH.
    --
    
    Note that using this option PATH is entirely ignored by GPGME and only
    the given value is used instead to locate the GnuPG binaries.
    
    On Android the use of PATH is not desirable.  Instead the GnuPG tools
    are expected in a fixed directory.  By using
    
      ./configure --enable-fixed-path="/foo/bar"
    
    gpg et al are expected to be installed as /foo/bar/gpg.  With
    
      ./configure --enable-fixed-path="/foo/bar:/bin"
    
    gpg is expected as /foo/bar/gpg or /bin/gpg.

diff --git a/configure.ac b/configure.ac
index 21951fe..1111849 100644
--- a/configure.ac
+++ b/configure.ac
@@ -236,6 +236,17 @@ AM_CONDITIONAL(BUILD_W32_QT, test "$build_w32_qt" = yes)
 AM_CONDITIONAL(HAVE_PTHREAD, test "$have_pthread" = "yes")
 
 
+AC_ARG_ENABLE([fixed-path],
+              AC_HELP_STRING([--enable-fixed-path=PATH],
+                             [locate binaries only via this PATH]),
+              [fixed_search_path="$enableval"],
+              [fixed_search_path=""])
+if test x$fixed_search_path != x ; then
+  AC_DEFINE_UNQUOTED(FIXED_SEARCH_PATH, "$fixed_search_path",
+                    [Locate binaries only via this PATH])
+fi
+
+
 #
 # Provide information about the build.
 #
diff --git a/src/posix-util.c b/src/posix-util.c
index 1b92ec1..e78cd77 100644
--- a/src/posix-util.c
+++ b/src/posix-util.c
@@ -78,9 +78,13 @@ walk_path (const char *pgm)
   const char *orig_path, *path, *s;
   char *fname, *p;
 
+#ifdef FIXED_SEARCH_PATH
+  orig_path = FIXED_SEARCH_PATH;
+#else
   orig_path = getenv ("PATH");
   if (!orig_path)
-    orig_path = "/bin:/usr/bin:.";
+    orig_path = "/bin:/usr/bin";
+#endif
 
   fname = malloc (strlen (orig_path) + 1 + strlen (pgm) + 1);
   if (!fname)

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

Summary of changes:
 configure.ac     |   11 +++++++++++
 src/posix-util.c |    6 +++++-
 2 files changed, 16 insertions(+), 1 deletion(-)


hooks/post-receive
-- 
GnuPG Made Easy
http://git.gnupg.org




More information about the Gnupg-commits mailing list