summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Vogt <michael.vogt@ubuntu.com>2008-02-08 14:13:13 +0100
committerMichael Vogt <michael.vogt@ubuntu.com>2008-02-08 14:13:13 +0100
commitfe32e82bce354ffd2832acb39c253f90a9ffb5b9 (patch)
tree2d7a233e7e5599987f9548cadfde73954330e192
parent1b7fe0e12c7553e0efc90ca6922caecb8d5cbb07 (diff)
parent87123e9d81225376f089b0172d0689c1b0413f4f (diff)
merged from apt--mvo
-rwxr-xr-xcmdline/apt-key7
-rw-r--r--debian/changelog3
-rw-r--r--test/networkless-install-fixes/README5
-rw-r--r--test/networkless-install-fixes/sources.test.list25
-rwxr-xr-xtest/networkless-install-fixes/test.sh25
5 files changed, 64 insertions, 1 deletions
diff --git a/cmdline/apt-key b/cmdline/apt-key
index 860895ae2..e2dbd8af7 100755
--- a/cmdline/apt-key
+++ b/cmdline/apt-key
@@ -34,11 +34,16 @@ add_keys_with_verify_against_master_keyring() {
add_keys=`$GPG_CMD --keyring $ADD_KEYRING --with-colons --list-keys | grep ^pub | cut -d: -f5`
master_keys=`$GPG_CMD --keyring $MASTER --with-colons --list-keys | grep ^pub | cut -d: -f5`
for add_key in $add_keys; do
+ ADDED=0
for master_key in $master_keys; do
- if $GPG --list-sigs --with-colons $add_key | grep ^sig | cut -d: -f5 | grep -q $master_key; then
+ if $GPG_CMD --keyring $ADD_KEYRING --list-sigs --with-colons $add_key | grep ^sig | cut -d: -f5 | grep -q $master_key; then
$GPG_CMD --quiet --batch --keyring $ARCHIVE_KEYRING --export $add_key | $GPG --import
+ ADDED=1
fi
done
+ if [ $ADDED = 0 ]; then
+ echo >&2 "Key '$add_key' not added. It is not signed with a master key"
+ fi
done
}
diff --git a/debian/changelog b/debian/changelog
index 84f68dbf8..f1c694de2 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -3,6 +3,9 @@ apt (0.7.9ubuntu7) hardy; urgency=low
* methods/connect.cc:
- remember hosts with Resolve failures or connect Timeouts
see https://wiki.ubuntu.com/NetworklessInstallationFixes
+ * cmdlines/apt-key:
+ - fix bug in the new apt-key update code that imports only
+ keys signed with the master key (thanks to cjwatson)
-- Michael Vogt <michael.vogt@ubuntu.com> Fri, 08 Feb 2008 11:38:35 +0100
diff --git a/test/networkless-install-fixes/README b/test/networkless-install-fixes/README
new file mode 100644
index 000000000..e7ee2b03d
--- /dev/null
+++ b/test/networkless-install-fixes/README
@@ -0,0 +1,5 @@
+
+Those tests aim at making the networkless install timeout
+quicker, see
+https://wiki.ubuntu.com/NetworklessInstallationFixes
+for details
diff --git a/test/networkless-install-fixes/sources.test.list b/test/networkless-install-fixes/sources.test.list
new file mode 100644
index 000000000..380e1804d
--- /dev/null
+++ b/test/networkless-install-fixes/sources.test.list
@@ -0,0 +1,25 @@
+
+# archive.ubuntu.com
+deb http://archive.ubuntu.com/ubuntu/ hardy main restricted
+deb-src http://archive.ubuntu.com/ubuntu/ hardy main restricted
+
+deb http://archive.ubuntu.com/ubuntu/ hardy-updates main restricted
+deb-src http://archive.ubuntu.com/ubuntu/ hardy-updates main restricted
+
+deb http://archive.ubuntu.com/ubuntu/ hardy universe
+deb-src http://archive.ubuntu.com/ubuntu/ hardy universe
+
+deb http://archive.ubuntu.com/ubuntu/ hardy-updates universe
+deb-src http://archive.ubuntu.com/ubuntu/ hardy-updates universe
+
+# security.ubuntu.com
+deb http://security.ubuntu.com/ubuntu/ hardy-security main restricted
+deb-src http://security.ubuntu.com/ubuntu/ hardy-security main restricted
+
+deb http://security.ubuntu.com/ubuntu/ hardy-security universe
+deb-src http://security.ubuntu.com/ubuntu/ hardy-security universe
+
+
+# archive.canonical.com
+deb http://archive.canonical.com/ubuntu/ hardy-partner universe
+deb-src http://archive.canonical.com/ubuntu/ hardy-partner universe
diff --git a/test/networkless-install-fixes/test.sh b/test/networkless-install-fixes/test.sh
new file mode 100755
index 000000000..809d467ba
--- /dev/null
+++ b/test/networkless-install-fixes/test.sh
@@ -0,0 +1,25 @@
+#!/bin/sh
+
+OPTS="-o Dir::Etc::sourcelist=./sources.test.list -o Acquire::http::timeout=20"
+
+# setup
+unset http_proxy
+iptables --flush
+
+echo "No network at all"
+ifdown eth0
+time apt-get update $OPTS 2>&1 |grep system
+ifup eth0
+echo ""
+
+echo "no working DNS (port 53 DROP)"
+iptables -A OUTPUT -p udp --dport 53 -j DROP
+time apt-get update $OPTS 2>&1 |grep system
+iptables --flush
+echo ""
+
+echo "DNS but no access to archive.ubuntu.com (port 80 DROP)"
+iptables -A OUTPUT -p tcp --dport 80 -j DROP
+time apt-get update $OPTS 2>&1 |grep system
+iptables --flush
+echo ""