[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Cvs-cvs] ccvs/src ChangeLog sanity.sh
From: |
Derek Robert Price |
Subject: |
[Cvs-cvs] ccvs/src ChangeLog sanity.sh |
Date: |
Tue, 25 Apr 2006 19:08:58 +0000 |
CVSROOT: /cvsroot/cvs
Module name: ccvs
Branch:
Changes by: Derek Robert Price <address@hidden> 06/04/25 19:08:58
Modified files:
src : ChangeLog sanity.sh
Log message:
* sanity.sh: Test for inablility to suppress GPG warnings which cause
tests to fail. Supress warnings for bases.
(Report from Mark D. Baushke <address@hidden>.)
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/cvs/ccvs/src/ChangeLog.diff?tr1=1.3378&tr2=1.3379&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/cvs/ccvs/src/sanity.sh.diff?tr1=1.1127&tr2=1.1128&r1=text&r2=text
Patches:
Index: ccvs/src/ChangeLog
diff -u ccvs/src/ChangeLog:1.3378 ccvs/src/ChangeLog:1.3379
--- ccvs/src/ChangeLog:1.3378 Tue Apr 25 14:02:13 2006
+++ ccvs/src/ChangeLog Tue Apr 25 19:08:58 2006
@@ -1,5 +1,9 @@
2006-04-25 Derek Price <address@hidden>
+ * sanity.sh: Test for inablility to suppress GPG warnings which cause
+ tests to fail. Supress warnings for bases.
+ (Report from Mark D. Baushke <address@hidden>.)
+
* rcs.c (RCS_delete_openpgp_signatures): Avoid double-free. Add
comments. Clarify traces.
(Report from Mark D. Baushke <address@hidden>.)
Index: ccvs/src/sanity.sh
diff -u ccvs/src/sanity.sh:1.1127 ccvs/src/sanity.sh:1.1128
--- ccvs/src/sanity.sh:1.1127 Tue Apr 25 05:35:06 2006
+++ ccvs/src/sanity.sh Tue Apr 25 19:08:58 2006
@@ -434,22 +434,32 @@
testcvs_server_support=false
fi
+# Initialize $gpg based on whether configure found a gpg in the path.
+unset CVS_SIGN_COMMITS
+unset CVS_VERIFY_CHECKOUTS
+if test x"$GPG" = xgpg; then
+ echo "WARNING: No working GPG was found. This test suite will run, but" >&2
+ echo "OpenPGP commit signatures will not be tested." >&2
+ # No need to set CVS_VERIFY_CHECKOUTS=off & CVS_SIGN_COMMITS=off since
+ # configure will have set this as the default already.
+ gpg=false
+else
+ gpg=:
+fi
+
if $bases; then
unset CVSNOBASES
- # Accept the default GPG mode.
- unset CVS_SIGN_COMMITS
- unset CVS_VERIFY_CHECKOUTS
else
# Force the client to not report base support to the server.
CVSNOBASES=:; export CVSNOBASES
- if $remote; then
+ if $remote && $gpg; then
# CVS doesn't support OpenPGP signatures without Base-* requests in
- # client/server mode. Stop the client from trying.
- CVS_VERIFY_CHECKOUTS=off; export CVS_VERIFY_CHECKOUTS
+ # client/server mode. Stop the client from trying. Don't warn the user
+ # on the assumption that they knew what the implications of passing the
+ # nobases argument to this script.
CVS_SIGN_COMMITS=off; export CVS_SIGN_COMMITS
- # This fools this script into believing configure couldn't find a working
- # gpg.
- GPG=gpg
+ CVS_VERIFY_CHECKOUTS=off; export CVS_VERIFY_CHECKOUTS
+ gpg=false
fi
fi
@@ -1766,17 +1776,40 @@
mkdir home
HOME=$TESTDIR/home; export HOME
-# If $GPG is set, create a key for these tests.
-OPENPGP_PHRASE=
-log_keyid=
-if test x"$GPG" != xgpg; then
+# Verify that GPG is working as we expect.
+if $gpg; then
# This works around a problem in at least a GnuPG 1.2.6 on an AMD64 running
# a Linux 2.6.9.
mkdir $HOME/.gnupg; chmod 0700 $HOME/.gnupg
# Output some status info to the log and create the key files.
- $GPG --list-keys >>$LOGFILE 2>&1
+ $GPG --list-keys >$TESTDIR/gpg.tmp 2>&1
+ cat $TESTDIR/gpg.tmp >>$LOGFILE 2>&1
+ # Output a warning to the user if GPG is installed incorrectly.
+ if grep 'insecure memory' gpg.tmp >/dev/null; then
+ # If the warning can't be suppressed with --quiet, then skip GPG testing.
+ if $GPG --list-keys --quiet 2>&1 |grep 'insecure memory' >/dev/null; then
+ echo "WARNING: GPG is installed incorrectly (\`$GPG' needs set" >&2
+ echo "setuid root to avoid using insecure memory). This test suite" >&2
+ echo "will run, but OpenPGP commit signatures will not be tested." >&2
+ rm -r $HOME/.gnupg
+ CVS_SIGN_COMMITS=off; export CVS_SIGN_COMMITS
+ CVS_VERIFY_CHECKOUTS=off; export CVS_VERIFY_CHECKOUTS
+ gpg=false
+ else
+ echo "WARNING: GPG is installed incorrectly. This will not" >&2
+ echo "interfere with testing, but you may want to set \`$GPG' to" >&2
+ echo "setuid root to avoid using insecure memory." >&2
+ fi
+ fi
+ rm $TESTDIR/gpg.tmp
+fi
+
+# If $GPG is set, create a key for these tests.
+OPENPGP_PHRASE=
+log_keyid=
+if $gpg; then
# Import the test keys.
$GPG --import - <<EOF >>$LOGFILE 2>&1
-----BEGIN PGP PUBLIC KEY BLOCK-----
@@ -1857,15 +1890,11 @@
'
log_keyid="OpenPGP signature using key ID 0x[0-9a-f]*;
"
- gpg=:
CVS_VERIFY_TEMPLATE="`echo $DEFAULT_VERIFY_TEMPLATE \
|sed 's/ -- / --quiet -- /'` 2>/dev/null"
export CVS_VERIFY_TEMPLATE
-else # GPG not set
- echo "No working GPG was found. This test suite will run, but OpenPGP" >&2
- echo "commit signatures will not be tested." >&2
- gpg=false
-fi # GPG set
+fi
+
# Make sure this variable is not defined to anything that would
- [Cvs-cvs] ccvs/src ChangeLog sanity.sh, Derek Robert Price, 2006/04/07
- [Cvs-cvs] ccvs/src ChangeLog sanity.sh, Mark D. Baushke, 2006/04/25
- [Cvs-cvs] ccvs/src ChangeLog sanity.sh,
Derek Robert Price <=
- [Cvs-cvs] ccvs/src ChangeLog sanity.sh, Derek Robert Price, 2006/04/26
- [Cvs-cvs] ccvs/src ChangeLog sanity.sh, Derek Robert Price, 2006/04/27
- [Cvs-cvs] ccvs/src ChangeLog sanity.sh, Derek Robert Price, 2006/04/27
- [Cvs-cvs] ccvs/src ChangeLog sanity.sh, Derek Robert Price, 2006/04/27
- [Cvs-cvs] ccvs/src ChangeLog sanity.sh, Derek Robert Price, 2006/04/28