[devscripts] 01/02: Fix CI test failures by placing GNUPGHOME in /tmp
James McCoy
jamessan at debian.org
Sun Mar 19 01:19:58 UTC 2017
This is an automated email from the git hooks/post-receive script.
jamessan pushed a commit to branch master
in repository devscripts.
commit 35c7269650fbe0f84501849bec78b20d3c641cf3
Author: James McCoy <jamessan at debian.org>
Date: Sat Mar 18 20:56:10 2017 -0400
Fix CI test failures by placing GNUPGHOME in /tmp
gpg uses a UNIX socket for communicating among the various processes.
On ci.debian.net, the path being used was exceeding the valid string
length for a path to a UNIX socket.
Signed-off-by: James McCoy <jamessan at debian.org>
---
debian/changelog | 6 ++++++
test/test_package_lifecycle | 15 ++++++---------
test/test_uscan_mangle | 21 +++++++++------------
3 files changed, 21 insertions(+), 21 deletions(-)
diff --git a/debian/changelog b/debian/changelog
index 81f5f92..3c5348b 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,9 @@
+devscripts (2.17.5) UNRELEASED; urgency=medium
+
+ * Create GNUPGHOME in /tmp to fix CI failures due to long path names.
+
+ -- James McCoy <jamessan at debian.org> Sat, 18 Mar 2017 20:55:36 -0400
+
devscripts (2.17.4) unstable; urgency=medium
* debsign:
diff --git a/test/test_package_lifecycle b/test/test_package_lifecycle
index 7aefeae..6e7a196 100755
--- a/test/test_package_lifecycle
+++ b/test/test_package_lifecycle
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/bin/bash
# Copyright (C) 2015, Nicholas Bamber <nicholas at periapt.co.uk>
#
@@ -28,7 +28,7 @@ fi
. "${0%/*}/shunit2-helper-functions.sh"
-GPGHOME=$(readlink -f ${WORKDIR}/uscan/gpg)
+GPGHOME=$(mktemp -d -p /tmp gpg.XXXXX)
oneTimeSetUp () {
GPG=gpg
@@ -44,19 +44,16 @@ oneTimeSetUp () {
PRIVATE_KEY=${WORKDIR}/uscan/PRIVATE_KEY.asc
PUBLIC_KEY=${WORKDIR}/uscan/PUBLIC_KEY.asc
- rm -rf $GPGHOME
- mkdir -p $GPGHOME
- chmod 700 $GPGHOME
PRIVATE_KEYRING=$GPGHOME/secring.gpg
PUBLIC_KEYRING=$GPGHOME/pubring.gpg
- $GPG -v --homedir $GPGHOME --no-options -q --batch --no-default-keyring \
+ $GPG -v --homedir "$GPGHOME" --no-options -q --batch --no-default-keyring \
--output $PRIVATE_KEYRING --dearmor $PRIVATE_KEY
- $GPG -v --homedir $GPGHOME --no-options -q --batch --no-default-keyring \
+ $GPG -v --homedir "$GPGHOME" --no-options -q --batch --no-default-keyring \
--output $PUBLIC_KEYRING --dearmor $PUBLIC_KEY
- $GPG --homedir $GPGHOME --no-options -q --batch --no-default-keyring \
+ $GPG --homedir "$GPGHOME" --no-options -q --batch --no-default-keyring \
--secret-keyring $PRIVATE_KEYRING --default-key 72543FAF \
--list-keys --verbose
@@ -335,7 +332,7 @@ EOS
oneTimeTearDown () {
rm -rf ${WORKDIR}/package_lifecycle
gpgconf --homedir "$GPGHOME" --kill gpg-agent
- rm -rf $GPGHOME
+ rm -rf "$GPGHOME"
}
cd ${WORKDIR}
diff --git a/test/test_uscan_mangle b/test/test_uscan_mangle
index b5de3d7..496038c 100755
--- a/test/test_uscan_mangle
+++ b/test/test_uscan_mangle
@@ -40,7 +40,7 @@ DEBUGBASH=":"
#DEBUGBASH="bash -i"
#DEBUGBASH="ls -laR"
-GPGHOME=$(readlink -f $test_dir/uscan/gpg)
+GPGHOME=$(mktemp -d -p /tmp gpg.XXXXX)
GPG=gpg
if !command -v $GPG >/dev/null 2>&1; then
@@ -59,16 +59,13 @@ PUBLIC_KEYRING=$GPGHOME/pubring.gpg
oneTimeSetUp () {
- rm -rf $GPGHOME
- mkdir -p $GPGHOME
- chmod 700 $GPGHOME
- $GPG -v --homedir $GPGHOME --no-options -q --batch --no-default-keyring \
+ $GPG -v --homedir "$GPGHOME" --no-options -q --batch --no-default-keyring \
--output $PRIVATE_KEYRING --dearmor $PRIVATE_KEY
- $GPG -v --homedir $GPGHOME --no-options -q --batch --no-default-keyring \
+ $GPG -v --homedir "$GPGHOME" --no-options -q --batch --no-default-keyring \
--output $PUBLIC_KEYRING --dearmor $PUBLIC_KEY
- $GPG --homedir $GPGHOME --no-options -q --batch --no-default-keyring \
+ $GPG --homedir "$GPGHOME" --no-options -q --batch --no-default-keyring \
--secret-keyring $PRIVATE_KEYRING --default-key 72543FAF \
--list-keys --verbose
@@ -209,7 +206,7 @@ END
if [ "$KEYMODE" = "ASC" ]; then
cp -f $test_dir/uscan/PUBLIC_KEY.asc debian/upstream/signing-key.asc
else
- cp -f $test_dir/uscan/gpg/pubring.gpg debian/upstream/signing-key.pgp
+ cp -f "$GPGHOME/pubring.gpg" debian/upstream/signing-key.pgp
fi
}
@@ -262,17 +259,17 @@ makeUpstreamTar() {
esac
case $SIGMODE in
ASC) # make $NEWTAR.asc
- $GPG --homedir $GPGHOME --no-options -q --batch --no-default-keyring \
+ $GPG --homedir "$GPGHOME" --no-options -q --batch --no-default-keyring \
--secret-keyring $PRIVATE_KEYRING --default-key 72543FAF \
--armor --detach-sign $NEWTAR
;;
BIN) #make $NEWTAR.sig
- $GPG --homedir $GPGHOME --no-options -q --batch --no-default-keyring \
+ $GPG --homedir "$GPGHOME" --no-options -q --batch --no-default-keyring \
--secret-keyring $PRIVATE_KEYRING --default-key 72543FAF \
--detach-sign $NEWTAR
;;
SELF) #make $NEWTAR.gpg
- $GPG --homedir $GPGHOME --no-options -q --batch --no-default-keyring \
+ $GPG --homedir "$GPGHOME" --no-options -q --batch --no-default-keyring \
--secret-keyring $PRIVATE_KEYRING --default-key 72543FAF \
--sign $NEWTAR
esac
@@ -996,7 +993,7 @@ opts="component=baz,pgpsigurlmangle=s/$/.asc/" @@@url@@@ (?:.*)/baz at ANY_VERSION@
oneTimeTearDown () {
gpgconf --homedir "$GPGHOME" --verbose --kill gpg-agent
- rm -rf ${GPGHOME}
+ rm -rf "$GPGHOME"
}
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/collab-maint/devscripts.git
More information about the devscripts-devel
mailing list