/
* configure.ac: Changed gpg and gpgsm version checks to work with arbitrary names of the gpg binary. New option --disable-gpg-test and --disable-gpgsm-test. gpgme/ * w32-io.c (build_commandline): Fixed stupid quoting bug. * w32-glib-io.c (build_commandline): Ditto. * rungpg.c (gpg_set_locale): Avoid dangling pointer after free. * gpgme-config.in: New options --get-gpg and --get-gpgsm.
This commit is contained in:
parent
ffbeb4f508
commit
d6a2521246
11
ChangeLog
11
ChangeLog
@ -1,8 +1,13 @@
|
||||
2007-01-26 Werner Koch <wk@g10code.com>
|
||||
|
||||
* configure.ac: Changed gpg and gpgsm version checks to work with
|
||||
arbitrary names of the gpg binary. New option --disable-gpg-test
|
||||
and --disable-gpgsm-test.
|
||||
|
||||
2007-01-09 Werner Koch <wk@g10code.com>
|
||||
|
||||
* configure.ac (NEED_GPG_VERSION,
|
||||
(NEED_GPGSM_VERSION): Must define after it may have been changed
|
||||
by an option.
|
||||
* configure.ac (NEED_GPG_VERSION, NEED_GPGSM_VERSION): Must define
|
||||
after it may have been changed by an option.
|
||||
|
||||
2007-01-08 Werner Koch <wk@g10code.com>
|
||||
|
||||
|
47
configure.ac
47
configure.ac
@ -324,21 +324,20 @@ else
|
||||
fi
|
||||
fi
|
||||
if test "$ok" = "maybe"; then
|
||||
AC_MSG_CHECKING(for GnuPG >= $NEED_GPG_VERSION)
|
||||
AC_MSG_CHECKING(for GPG >= $NEED_GPG_VERSION)
|
||||
req_major=`echo $NEED_GPG_VERSION | \
|
||||
sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\)/\1/'`
|
||||
req_minor=`echo $NEED_GPG_VERSION | \
|
||||
sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\)/\2/'`
|
||||
req_micro=`echo $NEED_GPG_VERSION | \
|
||||
sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\)/\3/'`
|
||||
gpg_version=`$GPG --version | grep ^gpg`
|
||||
major=`echo $gpg_version | \
|
||||
sed 's/^gpg (GnuPG) \([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\).*/\1/'`
|
||||
minor=`echo $gpg_version | \
|
||||
sed 's/^gpg (GnuPG) \([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\).*/\2/'`
|
||||
micro=`echo $gpg_version | \
|
||||
sed 's/^gpg (GnuPG) \([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\).*/\3/'`
|
||||
GPG_VERSION=`echo $gpg_version | sed 's/^gpg (GnuPG) //'`
|
||||
GPG_VERSION=`$GPG --version | sed -n '1 s/[[^0-9]]*\(.*\)/\1/p'`
|
||||
major=`echo $GPG_VERSION | \
|
||||
sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\).*/\1/'`
|
||||
minor=`echo $GPG_VERSION | \
|
||||
sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\).*/\2/'`
|
||||
micro=`echo $GPG_VERSION | \
|
||||
sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\).*/\3/'`
|
||||
|
||||
if test "$major" -gt "$req_major"; then
|
||||
ok=yes
|
||||
@ -359,10 +358,14 @@ if test "$ok" = "maybe"; then
|
||||
AC_MSG_RESULT(yes)
|
||||
else
|
||||
AC_MSG_RESULT(no)
|
||||
AC_MSG_WARN([GnuPG must be at least version $NEED_GPG_VERSION])
|
||||
AC_MSG_WARN([GPG must be at least version $NEED_GPG_VERSION])
|
||||
fi
|
||||
fi
|
||||
AM_CONDITIONAL(RUN_GPG_TESTS, test "$ok" = "yes")
|
||||
run_gpg_test="$ok"
|
||||
AC_ARG_ENABLE(gpg-test,
|
||||
AC_HELP_STRING([--disable-gpg-test], [disable GPG run test]),
|
||||
run_gpg_test=$enableval)
|
||||
AM_CONDITIONAL(RUN_GPG_TESTS, test "$run_gpg_test" = "yes")
|
||||
AC_SUBST(GPG_PATH)
|
||||
|
||||
NO_OVERRIDE=no
|
||||
@ -424,14 +427,13 @@ if test "$ok" = "maybe"; then
|
||||
sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\)/\2/'`
|
||||
req_micro=`echo $NEED_GPGSM_VERSION | \
|
||||
sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\)/\3/'`
|
||||
gpgsm_version=`$GPGSM --version | grep ^gpgsm`
|
||||
major=`echo $gpgsm_version | \
|
||||
sed 's/^gpgsm (GnuPG) \([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\).*/\1/'`
|
||||
minor=`echo $gpgsm_version | \
|
||||
sed 's/^gpgsm (GnuPG) \([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\).*/\2/'`
|
||||
micro=`echo $gpgsm_version | \
|
||||
sed 's/^gpgsm (GnuPG) \([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\).*/\3/'`
|
||||
GPGSM_VERSION=`echo $gpgsm_version | sed 's/^gpgsm (GnuPG) //'`
|
||||
GPGSM_VERSION=`$GPGSM --version | sed -n '1 s/[[^0-9]]*\(.*\)/\1/p'`
|
||||
major=`echo $GPGSM_VERSION | \
|
||||
sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\).*/\1/'`
|
||||
minor=`echo $GPGSM_VERSION | \
|
||||
sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\).*/\2/'`
|
||||
micro=`echo $GPGSM_VERSION | \
|
||||
sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\).*/\3/'`
|
||||
|
||||
if test "$major" -gt "$req_major"; then
|
||||
ok=yes
|
||||
@ -455,7 +457,12 @@ if test "$ok" = "maybe"; then
|
||||
AC_MSG_WARN([GPGSM must be at least version $NEED_GPGSM_VERSION])
|
||||
fi
|
||||
fi
|
||||
AM_CONDITIONAL(RUN_GPGSM_TESTS, test "$ok" = "yes")
|
||||
run_gpgsm_test="$ok"
|
||||
AC_ARG_ENABLE(gpgsm-test,
|
||||
AC_HELP_STRING([--disable-gpgsm-test], [disable GPGSM run test]),
|
||||
run_gpgsm_test=$enableval)
|
||||
AM_CONDITIONAL(RUN_GPGSM_TESTS, test "$run_gpgsm_test" = "yes")
|
||||
|
||||
|
||||
# FIXME: Only build if supported.
|
||||
AM_CONDITIONAL(BUILD_ASSUAN, test "$GPGSM" != "no")
|
||||
|
@ -1,3 +1,12 @@
|
||||
2007-01-26 Werner Koch <wk@g10code.com>
|
||||
|
||||
* w32-io.c (build_commandline): Fixed stupid quoting bug.
|
||||
* w32-glib-io.c (build_commandline): Ditto.
|
||||
|
||||
* rungpg.c (gpg_set_locale): Avoid dangling pointer after free.
|
||||
|
||||
* gpgme-config.in: New options --get-gpg and --get-gpgsm.
|
||||
|
||||
2007-01-18 Marcus Brinkmann <marcus@g10code.de>
|
||||
|
||||
* data.h (_gpgme_data_get_fd): Add prototype.
|
||||
|
@ -51,6 +51,8 @@ Options:
|
||||
[--api-version]
|
||||
[--libs]
|
||||
[--cflags]
|
||||
[--get-gpg]
|
||||
[--get-gpgsm]
|
||||
EOF
|
||||
exit $1
|
||||
}
|
||||
@ -144,6 +146,12 @@ while test $# -gt 0; do
|
||||
usage 1 1>&2
|
||||
fi
|
||||
;;
|
||||
--get-gpg)
|
||||
output="$output @GPG@"
|
||||
;;
|
||||
--get-gpgsm)
|
||||
output="$output @GPGSM@"
|
||||
;;
|
||||
*)
|
||||
usage 1 1>&2
|
||||
;;
|
||||
|
@ -517,7 +517,10 @@ gpg_set_locale (void *engine, int category, const char *value)
|
||||
if (category == LC_CTYPE)
|
||||
{
|
||||
if (gpg->lc_ctype)
|
||||
{
|
||||
free (gpg->lc_ctype);
|
||||
gpg->lc_ctype = NULL;
|
||||
}
|
||||
if (value)
|
||||
{
|
||||
gpg->lc_ctype = strdup (value);
|
||||
@ -529,7 +532,10 @@ gpg_set_locale (void *engine, int category, const char *value)
|
||||
else if (category == LC_MESSAGES)
|
||||
{
|
||||
if (gpg->lc_messages)
|
||||
{
|
||||
free (gpg->lc_messages);
|
||||
gpg->lc_messages = NULL;
|
||||
}
|
||||
if (value)
|
||||
{
|
||||
gpg->lc_messages = strdup (value);
|
||||
|
@ -389,7 +389,7 @@ build_commandline (char **argv)
|
||||
*(p++) = '"';
|
||||
while (*argvp)
|
||||
{
|
||||
if (*p == '\\' || *p == '"')
|
||||
if (*argvp == '\\' || *argvp == '"')
|
||||
*(p++) = '\\';
|
||||
*(p++) = *(argvp++);
|
||||
}
|
||||
|
@ -841,7 +841,7 @@ build_commandline (char **argv)
|
||||
*(p++) = '"';
|
||||
while (*argvp)
|
||||
{
|
||||
if (*p == '\\' || *p == '"')
|
||||
if (*argvp == '\\' || *argvp == '"')
|
||||
*(p++) = '\\';
|
||||
*(p++) = *(argvp++);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user