[git] gnupg-doc - branch, master, updated. 55eb257c40313f8fbaee6938d0c9f0eeb9ceef10

by Werner Koch cvs at cvs.gnupg.org
Thu Dec 8 11:37:32 CET 2016


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 GnuPG website and other docs".

The branch, master has been updated
       via  55eb257c40313f8fbaee6938d0c9f0eeb9ceef10 (commit)
      from  1c99eac456264ffc8979578a7e907ec238af59fc (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 55eb257c40313f8fbaee6938d0c9f0eeb9ceef10
Author: Werner Koch <wk at gnupg.org>
Date:   Thu Dec 8 11:34:23 2016 +0100

    jenkins: Add scripts from our jenkins installation

diff --git a/misc/jenkins/bin/build.bash b/misc/jenkins/bin/build.bash
new file mode 100755
index 0000000..23f78eb
--- /dev/null
+++ b/misc/jenkins/bin/build.bash
@@ -0,0 +1,167 @@
+#!/bin/bash
+
+set -xe
+
+renice -n 10 -p $$
+
+PREFIX=$HOME/prefix/$XTARGET
+ORIGINAL_PREFIX=$HOME/prefix/$XTARGET
+export PATH=$PREFIX/bin:$PATH
+
+env
+
+# Tweak the prefix we're installing this project into.  For gnupg-1.4
+# and friends.
+case "$JOB_NAME" in
+    *-1.4*)
+        PREFIX=$PREFIX-1.4
+        ;;
+    *-2.0*)
+        PREFIX=$PREFIX-2.0
+        ;;
+    *-2.2*)
+        PREFIX=$PREFIX-2.2
+        ;;
+esac
+mkdir -p $PREFIX
+
+fix_permissions()
+{
+  find $1 -type d -exec chmod +w {} + || true
+}
+
+fix_permissions .
+git clean -fdx
+./autogen.sh
+
+MAKEFLAGS="-j2"
+SCANBUILD=
+if [ "$(uname)" = Linux ]; then
+    # XXX: We should really have an analyzer target
+    SCANBUILD="scan-build -o ${WORKSPACE}/clangScanBuildReports -v"
+fi
+CONFIGUREFLAGS=
+SANFLAGS=""
+if [ "$(uname)" = Linux ]; then
+    # XXX: We should really have an analyzer target
+    SANFLAGS="-fsanitize=undefined -fsanitize=address"
+fi
+
+if [ "$(uname)" = Darwin ]; then
+    # XXX until we properly set this somewhere else
+    cversion="_DARWIN_C_SOURCE=900000L"
+    CFLAGS="$CFLAGS -D$cversion"
+    CXXFLAGS="$CXXFLAGS -D$cversion"
+fi
+
+case "$JOB_NAME" in
+    *tgpg*)
+        MAKEFLAGS="$MAKEFLAGS GPG=/usr/bin/gpg2"
+        ;;
+    *gpgme*)
+        # using libasan for python broke again, so disable the python bindings for the native build
+        if [ "$XTARGET" = native ] && [ "$label" != macos ]; then
+            CONFIGUREFLAGS_0="--enable-languages=cpp qt"
+        fi
+        ;;
+    *gnupg*)
+        if [ "$XTARGET" = native ]; then
+            CONFIGUREFLAGS="--enable-wks-tools --enable-g13 --enable-symcryptrun --enable-gpg2-is-gpg"
+        fi
+        if [ "$XTARGET" = w32 ]; then
+            CONFIGUREFLAGS="--enable-wks-tools --enable-gpg2-is-gpg --with-zlib=$ORIGINAL_PREFIX --with-bzip2=$ORIGINAL_PREFIX"
+        fi
+	if [ "$NODE_NAME" = zygalski ]; then
+	    CONFIGUREFLAGS="$CONFIGUREFLAGS --with-libiconv-prefix=$HOME/pkg"
+	fi
+        ;;
+esac
+
+abs_configure="$(pwd)/configure"
+mkdir -p obj
+cd obj
+
+case "$XTARGET" in
+    native)
+        ASAN_OPTIONS=detect_leaks=0 \
+        $SCANBUILD \
+            ../configure --prefix=$PREFIX --enable-maintainer-mode \
+	           $CONFIGUREFLAGS \
+	           "$CONFIGUREFLAGS_0" \
+	           CFLAGS="$CFLAGS $SANFLAGS -fPIC" \
+	           CXXFLAGS="$CXXFLAGS $SANFLAGS -fPIC -std=c++11"
+        $SCANBUILD make $MAKEFLAGS
+
+        # so make sure the asan runtime is there for e.g. python
+        PATH=/home/jenkins/bin:$PATH \
+        LD_LIBRARY_PATH=$PREFIX/lib \
+          make check verbose=2 LD_LIBRARY_PATH=$PREFIX/lib || true
+        # Jenkins looks for "tests? failed" to mark a build unstable,
+        # hence || true here
+
+        make install
+        ;;
+    w32)
+        export w32root=$PREFIX
+
+	# autogen.rc adds --with-gpg-error-prefix=@SYSROOT@, so we cannot
+	# install to a prefix that doesn't also contain all the dependencies,
+	# patch that out, so that the gpg-error-config and friends are located
+	# using PATH
+	if [ -f "/home/jenkins/bin/$(dirname $JOB_NAME)-w32.patch" ]; then
+	  ( cd .. && patch -p1 <"/home/jenkins/bin/$(dirname $JOB_NAME)-w32.patch" )
+	fi
+	# We need to point it to npth and adns then...
+	CONFIGUREFLAGS="${CONFIGUREFLAGS} --with-npth-prefix=$ORIGINAL_PREFIX --with-adns=$ORIGINAL_PREFIX"
+
+        # gpg1's autogen.sh does not add --enable-maintainer-mode, so
+        # version.texi is not generated.  we add it here to be sure.
+        # likewise for --prefix
+        ../autogen.sh --build-w32 --enable-maintainer-mode --prefix=$PREFIX \
+          $CONFIGUREFLAGS
+        make $MAKEFLAGS
+        make install
+
+	case "$JOB_NAME" in
+		gnupg/*|gnupg-2.2/*)
+			bash /home/jenkins/bin/make-windows-cd.sh
+			;;
+	esac
+        ;;
+    distcheck)
+        CONFIGUREFLAGS=
+	WORKDIR="$(mktemp -d)"
+	cleanup()
+	{
+	  cd /tmp
+	  fix_permissions "$WORKDIR"
+	  rm -rf -- "$WORKDIR" || true
+	}
+	trap cleanup EXIT
+
+	  cd "$WORKDIR"
+          $abs_configure --prefix=$PREFIX --enable-maintainer-mode \
+                   $CONFIGUREFLAGS LD_LIBRARY_PATH=$PREFIX/lib
+          make $MAKEFLAGS distcheck
+          tarname=$(awk <config.h '
+	             /^#define PACKAGE_TARNAME/ {gsub(/"/,"",$3);name=$3};
+	             /^#define PACKAGE_VERSION/ {gsub(/"/,"",$3);vers=$3};
+		     END {print name "-" vers}')
+	  if [ -f "${tarname}.tar.bz2" ]; then
+	     bzcat "${tarname}.tar.bz2" | tar xf -
+	  elif [ -f "${tarname}.tar.gz" ]; then
+	     zcat "${tarname}.tar.gz" | tar xf -
+          else
+	     echo "No tarball named $tarname found - skipping installation" >&2
+	     exit 0
+	  fi
+	  cd ${tarname}
+	  ./configure --prefix=$PREFIX $CONFIGUREFLAGS LD_LIBRARY_PATH=$PREFIX/lib
+	  make $MAKEFLAGS
+	  make $MAKEFLAGS install
+
+        ;;
+    *)
+        echo "Bad XTARGET: '$XTARGET'"
+        exit 2
+esac
diff --git a/misc/jenkins/bin/make-windows-cd.sh b/misc/jenkins/bin/make-windows-cd.sh
new file mode 100644
index 0000000..a66c38a
--- /dev/null
+++ b/misc/jenkins/bin/make-windows-cd.sh
@@ -0,0 +1,33 @@
+#!/bin/sh
+
+set -ex
+
+if ! [ -f config.log ] || ! grep -q mingw config.log; then
+    echo "must be run from a configured windows build environment"
+fi
+
+[ -z "$w32root" ] && w32root="$HOME/w32root"
+ADDITIONAL_FILES=
+IMAGE=gnupg-test.iso
+
+[ -f make-windows-cd.rc ] && . make-windows-cd.rc
+
+# we pick binaries from the prefix, so make sure they are current.
+make install
+
+WORKDIR="$(mktemp --directory)"
+TARGET="${WORKDIR}/gnupg"
+
+mkdir "$TARGET"
+
+[ "$ADDITIONAL_FILES" ] && cp -v $(ls -1 $ADDITIONAL_FILES) $TARGET
+cp -v $w32root/bin/*.exe $w32root/bin/*.dll $TARGET
+cp -v tests/gpgscm/*.exe $TARGET
+# XXX mk-tdata is on the way out
+cp -v tools/mk-tdata.exe $TARGET || true
+cp -v agent/gpg-preset-passphrase.exe $TARGET
+cp -v -a ../tests $TARGET
+cp -v tests/openpgp/fake-pinentry.exe $TARGET
+cp -v /home/jenkins/bin/run-tests.bat $WORKDIR
+genisoimage --output "$IMAGE" -J "$WORKDIR"
+[ "${WORKDIR}" ] && rm -rf -- "${WORKDIR}"
diff --git a/misc/jenkins/bin/python.txt b/misc/jenkins/bin/python.txt
new file mode 100644
index 0000000..6eaf41a
--- /dev/null
+++ b/misc/jenkins/bin/python.txt
@@ -0,0 +1 @@
+leak:python
diff --git a/misc/jenkins/bin/python3 b/misc/jenkins/bin/python3
new file mode 100755
index 0000000..fed5c24
--- /dev/null
+++ b/misc/jenkins/bin/python3
@@ -0,0 +1,4 @@
+#!/bin/sh
+LD_PRELOAD=/usr/lib/x86_64-linux-gnu/libasan.so.2 \
+LSAN_OPTIONS=suppressions=/home/jenkins/bin/python.txt \
+exec /usr/bin/python3 "$@"
diff --git a/misc/jenkins/bin/run-tests.bat b/misc/jenkins/bin/run-tests.bat
new file mode 100644
index 0000000..d88e197
--- /dev/null
+++ b/misc/jenkins/bin/run-tests.bat
@@ -0,0 +1,27 @@
+ at echo off
+cd /d d:\
+
+set TARGET=gnupg-test
+
+set GNUPGHOME=c:/%TARGET%/tests/openpgp
+c:/%TARGET%/gpg-connect-agent.exe killagent /bye
+rem is there a nicer way to sleep?
+ping -n 1 localhost > nul
+set GNUPGHOME=
+
+rmdir /q /s c:\%TARGET%
+mkdir c:\%TARGET%
+xcopy /q /s d:\gnupg c:\%TARGET%
+
+set GPGSCM_PATH=c:/%TARGET%/tests/gpgscm;c:/%TARGET%/tests/openpgp
+set EXEEXT=.exe
+set srcdir=/%TARGET%/tests/openpgp
+set BIN_PREFIX=c:/%TARGET%
+set TMP=c:\temp
+mkdir %TMP%
+
+cd /d c:\%TARGET%
+c:\%TARGET%\gpgscm.exe --verbose tests/gpgscm/t-child.scm
+
+cd /d c:\%TARGET%\tests\openpgp
+c:\%TARGET%\gpgscm.exe run-tests.scm --shared version.scm mds.scm decrypt.scm decrypt-dsa.scm sigs.scm sigs-dsa.scm encrypt.scm encrypt-dsa.scm seat.scm clearsig.scm encryptp.scm detach.scm detachm.scm armsigs.scm armencrypt.scm armencryptp.scm signencrypt.scm signencrypt-dsa.scm armsignencrypt.scm armdetach.scm armdetachm.scm genkey1024.scm conventional.scm conventional-mdc.scm multisig.scm verify.scm gpgv-forged-keyring.scm armor.scm import.scm ecc.scm 4gb-packet.scm tofu.scm gpgtar.scm use-exact-key.scm default-key.scm export.scm ssh.scm quick-key-manipulation.scm issue2015.scm issue2346.scm issue2417.scm issue2419.scm

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

Summary of changes:
 misc/jenkins/bin/build.bash         | 167 ++++++++++++++++++++++++++++++++++++
 misc/jenkins/bin/make-windows-cd.sh |  33 +++++++
 misc/jenkins/bin/python.txt         |   1 +
 misc/jenkins/bin/python3            |   4 +
 misc/jenkins/bin/run-tests.bat      |  27 ++++++
 5 files changed, 232 insertions(+)
 create mode 100755 misc/jenkins/bin/build.bash
 create mode 100644 misc/jenkins/bin/make-windows-cd.sh
 create mode 100644 misc/jenkins/bin/python.txt
 create mode 100755 misc/jenkins/bin/python3
 create mode 100644 misc/jenkins/bin/run-tests.bat


hooks/post-receive
-- 
The GnuPG website and other docs
http://git.gnupg.org




More information about the Gnupg-commits mailing list