[git] GPGME - branch, master, updated. gpgme-1.9.0-53-g9cd2b58
by Justus Winter
cvs at cvs.gnupg.org
Thu Jul 13 15:44:52 CEST 2017
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 9cd2b58dfb2c21cce64520cf4c726859b583d14e (commit)
via 2446138e3c8c45fd4bd64eba84edd32fcd009699 (commit)
from 46d2e48105e0929ec38dd4106004dd60d941df9a (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 9cd2b58dfb2c21cce64520cf4c726859b583d14e
Author: Justus Winter <justus at g10code.com>
Date: Thu Jul 13 15:41:11 2017 +0200
tests: Make agent spawning more robust.
* tests/gpgsm/Makefile.am (gpgsm.conf): Add agent-program directive.
* tests/start-stop-agent: Update agent-program directive.
--
Update the 'agent-program' configuration directive to point to the
same agent that we are starting. Previously, it was possible that a
different agent was started if 'make check' was run with a different
PATH.
Signed-off-by: Justus Winter <justus at g10code.com>
diff --git a/tests/gpgsm/Makefile.am b/tests/gpgsm/Makefile.am
index c73faea..a5667a8 100644
--- a/tests/gpgsm/Makefile.am
+++ b/tests/gpgsm/Makefile.am
@@ -65,6 +65,7 @@ BUILT_SOURCES = gpgsm.conf trustlist.txt pubring-stamp \
./gpgsm.conf:
echo disable-crl-checks > ./gpgsm.conf
echo faked-system-time 1008241200 >> ./gpgsm.conf
+ echo "agent-program `which $(GPG_AGENT)`|--debug-quick-random" >> ./gpg.conf
./private-keys-v1.d/gpg-sample.stamp: $(srcdir)/$(key_id)
-gpgconf --kill all
diff --git a/tests/start-stop-agent b/tests/start-stop-agent
index 3ce6f22..9514e0a 100755
--- a/tests/start-stop-agent
+++ b/tests/start-stop-agent
@@ -30,6 +30,18 @@ if [ "$1" = "--stop" ]; then
exit 0
fi
+# Update 'agent-program' in the configuration files to make sure we
+# will always start exactly this agent again if we ever need to.
+for F in gpg.conf gpgsm.conf
+do
+ if test -f "$GNUPGHOME/$F"
+ then
+ mv "$GNUPGHOME/$F" "$GNUPGHOME/$F~"
+ sed -e "s#^agent-program.*#agent-program ${GPG_AGENT}|--debug-quick-random#" \
+ >"$GNUPGHOME/$F" <"$GNUPGHOME/$F~"
+ fi
+done
+
if [ "$(gpg-connect-agent --no-autostart getval\ $token /bye 2>/dev/null | head -1)" \
= "D set" ]; then
echo "gpg-agent already running" >&2
commit 2446138e3c8c45fd4bd64eba84edd32fcd009699
Author: Justus Winter <justus at g10code.com>
Date: Thu Jul 13 15:30:38 2017 +0200
Sync 'autogen.sh'.
--
Signed-off-by: Justus Winter <justus at g10code.com>
diff --git a/autogen.sh b/autogen.sh
index 91f35a6..e5ba5bf 100755
--- a/autogen.sh
+++ b/autogen.sh
@@ -1,6 +1,6 @@
#! /bin/sh
# autogen.sh
-# Copyright (C) 2003, 2014 g10 Code GmbH
+# Copyright (C) 2003, 2014, 2017 g10 Code GmbH
#
# This file is free software; as a special exception the author gives
# unlimited permission to copy and/or distribute it, with or without
@@ -15,7 +15,7 @@
# configure it for the respective package. It is maintained as part of
# GnuPG and source copied by other packages.
#
-# Version: 2014-01-10
+# Version: 2017-01-17
configure_ac="configure.ac"
@@ -41,7 +41,7 @@ fatal () {
info () {
if [ -z "${SILENT}" ]; then
- echo "autogen.sh:" "$*"
+ echo "autogen.sh:" "$*" >&2
fi
}
@@ -70,14 +70,27 @@ MSGMERGE=${GETTEXT_PREFIX}${MSGMERGE:-msgmerge}${GETTEXT_SUFFIX}
DIE=no
FORCE=
SILENT=
+PRINT_HOST=no
+PRINT_BUILD=no
tmp=$(dirname "$0")
tsdir=$(cd "${tmp}"; pwd)
+version_parts=3
if [ -n "${AUTOGEN_SH_SILENT}" ]; then
SILENT=" --silent"
fi
if test x"$1" = x"--help"; then
- echo "usage: ./autogen.sh [--silent] [--force] [--build-TYPE] [ARGS]"
+ echo "usage: ./autogen.sh [OPTIONS] [ARGS]"
+ echo " Options:"
+ echo " --silent Silent operation"
+ echo " --force Pass --force to autoconf"
+ echo " --find-version Helper for configure.ac"
+ echo " --build-TYPE Configure to cross build for TYPE"
+ echo " --print-host Print only the host triplet"
+ echo " --print-build Print only the build platform triplet"
+ echo ""
+ echo " ARGS are passed to configure in --build-TYPE mode."
+ echo " Configuration for this script is expected in autogen.rc"
exit 0
fi
if test x"$1" = x"--silent"; then
@@ -88,6 +101,14 @@ if test x"$1" = x"--force"; then
FORCE=" --force"
shift
fi
+if test x"$1" = x"--print-host"; then
+ PRINT_HOST=yes
+ shift
+fi
+if test x"$1" = x"--print-build"; then
+ PRINT_BUILD=yes
+ shift
+fi
# Reject unsafe characters in $HOME, $tsdir and cwd. We consider spaces
@@ -133,6 +154,11 @@ amd64_toolprefixes=
myhost=""
myhostsub=""
case "$1" in
+ --find-version)
+ myhost="find-version"
+ SILENT=" --silent"
+ shift
+ ;;
--build-w32)
myhost="w32"
shift
@@ -172,16 +198,81 @@ if [ -f "$HOME/.gnupg-autogen.rc" ]; then
. "$HOME/.gnupg-autogen.rc"
fi
+
+# **** FIND VERSION ****
+# This is a helper for the configure.ac M4 magic
+# Called
+# ./autogen.sh --find-version PACKAGE MAJOR MINOR [MICRO]
+# returns a complete version string with automatic beta numbering.
+if [ "$myhost" = "find-version" ]; then
+ package="$1"
+ major="$2"
+ minor="$3"
+ micro="$4"
+
+ if [ -z "$package" -o -z "$major" -o -z "$minor" ]; then
+ echo "usage: ./autogen.sh --find-version PACKAGE MAJOR MINOR [MICRO]" >&2
+ exit 1
+ fi
+
+ case "$version_parts" in
+ 2)
+ matchstr1="$package-$major.[0-9]*"
+ matchstr2="$package-$major-base"
+ vers="$major.$minor"
+ ;;
+ *)
+ matchstr1="$package-$major.$minor.[0-9]*"
+ matchstr2="$package-$major.$minor-base"
+ vers="$major.$minor.$micro"
+ ;;
+ esac
+
+ beta=no
+ if [ -e .git ]; then
+ ingit=yes
+ tmp=$(git describe --match "${matchstr1}" --long 2>/dev/null)
+ tmp=$(echo "$tmp" | sed s/^"$package"//)
+ if [ -n "$tmp" ]; then
+ tmp=$(echo "$tmp" | sed s/^"$package"// \
+ | awk -F- '$3!=0 && $3 !~ /^beta/ {print"-beta"$3}')
+ else
+ tmp=$(git describe --match "${matchstr2}" --long 2>/dev/null \
+ | awk -F- '$4!=0{print"-beta"$4}')
+ fi
+ [ -n "$tmp" ] && beta=yes
+ rev=$(git rev-parse --short HEAD | tr -d '\n\r')
+ rvd=$((0x$(echo ${rev} | dd bs=1 count=4 2>/dev/null)))
+ else
+ ingit=no
+ beta=yes
+ tmp="-unknown"
+ rev="0000000"
+ rvd="0"
+ fi
+
+ echo "$package-$vers$tmp:$beta:$ingit:$vers$tmp:$vers:$tmp:$rev:$rvd:"
+ exit 0
+fi
+# **** end FIND VERSION ****
+
+
+if [ ! -f "$tsdir/build-aux/config.guess" ]; then
+ fatal "$tsdir/build-aux/config.guess not found"
+ exit 1
+fi
+build=`$tsdir/build-aux/config.guess`
+if [ $PRINT_BUILD = yes ]; then
+ echo "$build"
+ exit 0
+fi
+
+
+
# ******************
# W32 build script
# ******************
if [ "$myhost" = "w32" ]; then
- if [ ! -f "$tsdir/build-aux/config.guess" ]; then
- fatal "$tsdir/build-aux/config.guess not found"
- exit 1
- fi
- build=`$tsdir/build-aux/config.guess`
-
case $myhostsub in
ce)
w32root="$w32ce_root"
@@ -222,6 +313,10 @@ if [ "$myhost" = "w32" ]; then
fi
die_p
fi
+ if [ $PRINT_HOST = yes ]; then
+ echo "$host"
+ exit 0
+ fi
if [ -f "$tsdir/config.log" ]; then
if ! head $tsdir/config.log | grep "$host" >/dev/null; then
@@ -232,7 +327,8 @@ if [ "$myhost" = "w32" ]; then
$tsdir/configure --enable-maintainer-mode ${SILENT} \
--prefix=${w32root} \
- --host=${host} --build=${build} \
+ --host=${host} --build=${build} SYSROOT=${w32root} \
+ PKG_CONFIG_LIBDIR=${w32root}/lib/pkgconfig \
${configure_opts} ${extraoptions} "$@"
rc=$?
exit $rc
@@ -242,13 +338,6 @@ fi
# ***** AMD64 cross build script *******
# Used to cross-compile for AMD64 (for testing)
if [ "$myhost" = "amd64" ]; then
- shift
- if [ ! -f $tsdir/build-aux/config.guess ]; then
- echo "$tsdir/build-aux/config.guess not found" >&2
- exit 1
- fi
- build=`$tsdir/build-aux/config.guess`
-
[ -z "$amd64root" ] && amd64root="$HOME/amd64root"
info "Using $amd64root as standard install directory"
replace_sysroot
@@ -269,6 +358,10 @@ if [ "$myhost" = "amd64" ]; then
echo "Stop." >&2
exit 1
fi
+ if [ $PRINT_HOST = yes ]; then
+ echo "$host"
+ exit 0
+ fi
if [ -f "$tsdir/config.log" ]; then
if ! head $tsdir/config.log | grep "$host" >/dev/null; then
@@ -341,8 +434,11 @@ fi
# Check the git setup.
if [ -d .git ]; then
- CP="cp -a"
- [ -z "${SILENT}" ] && CP="$CP -v"
+ CP="cp -p"
+ # If we have a GNU cp we can add -v
+ if cp --version >/dev/null 2>/dev/null; then
+ [ -z "${SILENT}" ] && CP="$CP -v"
+ fi
if [ -f .git/hooks/pre-commit.sample -a ! -f .git/hooks/pre-commit ] ; then
[ -z "${SILENT}" ] && cat <<EOF
*** Activating trailing whitespace git pre-commit hook. ***
-----------------------------------------------------------------------
Summary of changes:
autogen.sh | 136 +++++++++++++++++++++++++++++++++++++++++-------
tests/gpgsm/Makefile.am | 1 +
tests/start-stop-agent | 12 +++++
3 files changed, 129 insertions(+), 20 deletions(-)
hooks/post-receive
--
GnuPG Made Easy
http://git.gnupg.org
More information about the Gnupg-commits
mailing list