diff options
author | Michael Vogt <mvo@debian.org> | 2013-12-12 18:32:44 +0100 |
---|---|---|
committer | Michael Vogt <mvo@debian.org> | 2013-12-12 18:32:44 +0100 |
commit | 3ab9b6c0e9209d3d14f136c7a703c873fa8f14df (patch) | |
tree | 08b17d64ddc427ee4839d4693d94807e110345d8 /test/integration/test-apt-key-net-update | |
parent | c9829e0744ca678e105aa0af26b87588023d7536 (diff) | |
parent | c23e6cd58242470daad78ddad85285f9cd7aed0f (diff) |
Merge remote-tracking branch 'mvo/bugfix/conffile' into debian/sid
Diffstat (limited to 'test/integration/test-apt-key-net-update')
-rwxr-xr-x | test/integration/test-apt-key-net-update | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/test/integration/test-apt-key-net-update b/test/integration/test-apt-key-net-update index d5205836f..73545aff7 100755 --- a/test/integration/test-apt-key-net-update +++ b/test/integration/test-apt-key-net-update @@ -21,10 +21,29 @@ TRUSTEDFILE=./etc/apt/trusted.gpg mkdir -p ./var/lib/apt/keyrings TMP_KEYRING=./var/lib/apt/keyrings/maybe-import-keyring.gpg GPG_CMD="gpg --ignore-time-conflict --no-options --no-default-keyring" + +# FIXME: instead of copying this use apt-key and the buildin apt webserver +# to do a real test + +# COPYIED from apt-key.in -------------- + +# gpg needs a trustdb to function, but it can't be invalid (not even empty) +# so we create a temporary directory to store our fresh readable trustdb in +TRUSTDBDIR="$(mktemp -d)" +CURRENTTRAP="${CURRENTTRAP} rm -rf '${TRUSTDBDIR}';" +trap "${CURRENTTRAP}" 0 HUP INT QUIT ILL ABRT FPE SEGV PIPE TERM +chmod 700 "$TRUSTDBDIR" +# We also don't use a secret keyring, of course, but gpg panics and +# implodes if there isn't one available - and writeable for imports +SECRETKEYRING="${TRUSTDBDIR}/secring.gpg" +touch $SECRETKEYRING +GPG_CMD="$GPG_CMD --secret-keyring $SECRETKEYRING" +GPG_CMD="$GPG_CMD --trustdb-name ${TRUSTDBDIR}/trustdb.gpg" +#----------------------------------------- END COPY + GPG="$GPG_CMD --keyring $TRUSTEDFILE" MASTER_KEYRING=/usr/share/keyrings/ubuntu-master-keyring.gpg - msgtest "add_keys_with_verify_against_master_keyring" if [ ! -e $MASTER_KEYRING ]; then echo -n "No $MASTER_KEYRING found" |