summaryrefslogtreecommitdiff
path: root/test/integration/test-apt-key-net-update
diff options
context:
space:
mode:
authorMichael Vogt <mvo@debian.org>2013-12-12 21:39:44 +0100
committerMichael Vogt <mvo@debian.org>2013-12-12 21:46:09 +0100
commit81dca2d03ad4095c7aaa8b5f74885bc0e61b3ee3 (patch)
treedce43f02c0f8d61c413d98f559f4f3ef90d60876 /test/integration/test-apt-key-net-update
parent49fc36e1acda8453df079cad8d04b70d9ad4fcfa (diff)
parent5669725a6163d3e1184c3991f993085e42734c33 (diff)
Merge branch 'debian/sid' into ubuntu/master
Conflicts: configure.ac debian/changelog doc/apt-verbatim.ent doc/po/apt-doc.pot po/ar.po po/ast.po po/bg.po po/bs.po po/ca.po po/cs.po po/cy.po po/da.po po/de.po po/dz.po po/el.po po/es.po po/eu.po po/fi.po po/fr.po po/gl.po po/hu.po po/it.po po/ja.po po/km.po po/ko.po po/ku.po po/lt.po po/mr.po po/nb.po po/ne.po po/nl.po po/nn.po po/pl.po po/pt.po po/pt_BR.po po/ro.po po/ru.po po/sk.po po/sl.po po/sv.po po/th.po po/tl.po po/tr.po po/uk.po po/vi.po po/zh_CN.po po/zh_TW.po
Diffstat (limited to 'test/integration/test-apt-key-net-update')
-rwxr-xr-xtest/integration/test-apt-key-net-update21
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"