summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatt Zimmerman <matt.zimmerman@canonical.com>2004-12-29 01:18:28 +0000
committerMatt Zimmerman <matt.zimmerman@canonical.com>2004-12-29 01:18:28 +0000
commit2ee99a54fd671f74b6ee24307e11ab0534580b87 (patch)
tree0e5e082135ad29f15effaa045b5da2758004e5d8
parent51d13ae3354082c12f6e5dd3797c514c6de702b0 (diff)
parent32133629d8c49029f3d04886aa605de4864b486e (diff)
Merge apt--mvo--0
Patches applied: * michael.vogt@canonical.com--2004/apt--mvo--0--patch-5 * added apt-key update method * michael.vogt@canonical.com--2004/apt--mvo--0--patch-6 * if a sign-file download fails, delete the the partial download in "partial/" also * michael.vogt@canonical.com--2004/apt--mvo--0--patch-7 * changelog updated, version is now 0.6.27ubuntu4; added DEB_BUILD_PROG_OPTS to debian/rules * michael.vogt@canonical.com--2004/apt--mvo--0--patch-8 * removed Release.gpg files in partial/ before fetching a new one * michael.vogt@canonical.com--2004/apt--mvo--0--patch-9 * some comments about the pkgAcqMetaSig::Custom600Headers() added * michael.vogt@canonical.com--2004/apt--mvo--0--patch-10 * fix permissions in po/ * michael.vogt@canonical.com--2004/apt--mvo--0--patch-11 * use gpg --with-colons
-rw-r--r--apt-pkg/acquire-item.cc13
-rwxr-xr-xcmdline/apt-key39
-rw-r--r--configure.in2
-rw-r--r--debian/changelog18
-rwxr-xr-xdebian/rules2
-rw-r--r--po/apt-all.pot12
6 files changed, 72 insertions, 14 deletions
diff --git a/apt-pkg/acquire-item.cc b/apt-pkg/acquire-item.cc
index f40c6a50d..de8cfe8f2 100644
--- a/apt-pkg/acquire-item.cc
+++ b/apt-pkg/acquire-item.cc
@@ -321,6 +321,10 @@ pkgAcqMetaSig::pkgAcqMetaSig(pkgAcquire *Owner,
DestFile = _config->FindDir("Dir::State::lists") + "partial/";
DestFile += URItoFileName(URI);
+ // remove any partial downloaded sig-file. it may confuse proxies
+ // and is too small to warrant a partial download anyway
+ unlink(DestFile.c_str());
+
// Create the item
Desc.Description = URIDesc;
Desc.Owner = this;
@@ -346,13 +350,20 @@ pkgAcqMetaSig::pkgAcqMetaSig(pkgAcquire *Owner,
/* The only header we use is the last-modified header. */
string pkgAcqMetaSig::Custom600Headers()
{
+ // mvo: we don't really need the last-modified header here
+ // 1) it points to "Final" and that was renamed to "DestFile"
+ // so it's never send anyway
+ // 2) because DestFIle is in partial/ we will send a partial request
+ // with if-range in the http method (or the equivalent for ftp).
+ // that should give the same result
+
string Final = _config->FindDir("Dir::State::lists");
Final += URItoFileName(RealURI);
struct stat Buf;
if (stat(Final.c_str(),&Buf) != 0)
return "\nIndex-File: true";
-
+
return "\nIndex-File: true\nLast-Modified: " + TimeRFC1123(Buf.st_mtime);
}
diff --git a/cmdline/apt-key b/cmdline/apt-key
index 583cde191..a96afe944 100755
--- a/cmdline/apt-key
+++ b/cmdline/apt-key
@@ -2,6 +2,36 @@
set -e
+# We don't use a secret keyring, of course, but gpg panics and
+# implodes if there isn't one available
+
+GPG_CMD="gpg --no-options --no-default-keyring --secret-keyring /etc/apt/secring.gpg --trustdb-name /etc/apt/trustdb.gpg"
+GPG="$GPG_CMD --keyring /etc/apt/trusted.gpg"
+
+
+ARCHIVE_KEYRING=/usr/share/keyrings/ubuntu-archive-keyring.gpg
+REMOVED_KEYS=/usr/share/keyrings/ubuntu-archive-removed-keys.gpg
+
+
+update() {
+ if [ ! -f $ARCHIVE_KEYRING ]; then
+ echo >&2 "ERROR: Can't find the archive-keyring"
+ echo >&2 "Is the ubuntu-keyring package installed?"
+ exit 1
+ fi
+
+ # add new keys
+ $GPG_CMD --quiet --batch --keyring $ARCHIVE_KEYRING --export | $GPG --import
+
+ # remove no-longer used keys
+ keys=`$GPG_CMD --keyring $REMOVED_KEYS --with-colons --list-keys|awk '/^pub/{FS=":";print $5}'`
+ for key in $keys; do
+ if $GPG --list-keys --with-colons | awk '/^pub/{FS=":";print $5}'|grep -q $key; then
+ $GPG --quiet --batch --delete-key --yes ${key}
+ fi
+ done
+}
+
usage() {
echo "Usage: apt-key [command] [arguments]"
echo
@@ -9,6 +39,7 @@ usage() {
echo
echo " apt-key add <file> - add the key contained in <file> ('-' for stdin)"
echo " apt-key del <keyid> - remove the key <keyid>"
+ echo " apt-key update - update keys using the keyring package"
echo " apt-key list - list keys"
echo
}
@@ -26,11 +57,6 @@ if [ "$command" != "help" ] && ! which gpg >/dev/null 2>&1; then
echo >&2
fi
-# We don't use a secret keyring, of course, but gpg panics and
-# implodes if there isn't one available
-
-GPG="gpg --no-options --no-default-keyring --keyring /etc/apt/trusted.gpg --secret-keyring /etc/apt/secring.gpg --trustdb-name /etc/apt/trustdb.gpg"
-
case "$command" in
add)
$GPG --quiet --batch --import "$1"
@@ -40,6 +66,9 @@ case "$command" in
$GPG --quiet --batch --delete-key --yes "$1"
echo "OK"
;;
+ update)
+ update
+ ;;
list)
$GPG --batch --list-keys
;;
diff --git a/configure.in b/configure.in
index 6c81ae7f6..b40a53b7f 100644
--- a/configure.in
+++ b/configure.in
@@ -18,7 +18,7 @@ AC_CONFIG_AUX_DIR(buildlib)
AC_CONFIG_HEADER(include/config.h:buildlib/config.h.in include/apti18n.h:buildlib/apti18n.h.in)
dnl -- SET THIS TO THE RELEASE VERSION --
-AC_DEFINE_UNQUOTED(VERSION,"0.6.28")
+AC_DEFINE_UNQUOTED(VERSION,"0.6.29")
PACKAGE="apt"
AC_DEFINE_UNQUOTED(PACKAGE,"$PACKAGE")
AC_SUBST(PACKAGE)
diff --git a/debian/changelog b/debian/changelog
index 26368db0e..1551df078 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,10 @@
+apt (0.6.29) unstable; urgency=low
+
+ * Merge apt--mvo--0 (0.6.27ubuntu4)
+
+
+ -- Matt Zimmerman <mdz@canonical.com> Tue, 28 Dec 2004 17:18:02 -0800
+
apt (0.6.28) hoary; urgency=low
* Merge apt--mvo--0
@@ -6,6 +13,17 @@ apt (0.6.28) hoary; urgency=low
-- Matt Zimmerman <mdz@canonical.com> Thu, 23 Dec 2004 18:53:16 -0800
+apt (0.6.27ubuntu4) hoary; urgency=low
+
+ * remove old sig-file in partial/ before starting to fetch a new sig-file
+ (see ubuntu #4769 for the rational)
+ * added apt-key update method (uses ubuntu-keyring)
+ * documented the "--allow-unauthenticated" switch
+ * added DEB_BUILD_PROG_OPTS to debian/rules (additonal options can be
+ passed to DEB_BUILD_PROG like "-S")
+
+ -- Michael Vogt <mvo@debian.org> Thu, 23 Dec 2004 11:12:51 +0100
+
apt (0.6.27ubuntu3) hoary; urgency=low
* added a exact dependency from libapt-pkg-dev to the apt version it was
diff --git a/debian/rules b/debian/rules
index 1fbbb61d1..b756b3b32 100755
--- a/debian/rules
+++ b/debian/rules
@@ -36,7 +36,7 @@ endif
# Default rule
build:
-DEB_BUILD_PROG:=debuild --preserve-envvar PATH --preserve-envvar CCACHE_DIR -us -uc
+DEB_BUILD_PROG:=debuild --preserve-envvar PATH --preserve-envvar CCACHE_DIR -us -uc $(DEB_BUILD_PROG_OPTS)
APT_DEBVER=$(shell dpkg-parsechangelog |sed -n -e '/^Version:/s/^Version: //p')
APT_CONFVER=$(shell sed -n -e 's/^AC_DEFINE_UNQUOTED(VERSION,"\(.*\)")/\1/p' configure.in)
APT_CVSTAG=$(shell echo "$(APT_DEBVER)" | sed -e 's/^/v/' -e 's/\./_/g')
diff --git a/po/apt-all.pot b/po/apt-all.pot
index 7d8e9d40f..dfafb2c4f 100644
--- a/po/apt-all.pot
+++ b/po/apt-all.pot
@@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2004-12-20 10:20+0100\n"
+"POT-Creation-Date: 2004-12-23 12:36+0100\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
@@ -2259,31 +2259,31 @@ msgstr ""
msgid "rename failed, %s (%s -> %s)."
msgstr ""
-#: apt-pkg/acquire-item.cc:235 apt-pkg/acquire-item.cc:893
+#: apt-pkg/acquire-item.cc:235 apt-pkg/acquire-item.cc:897
msgid "MD5Sum mismatch"
msgstr ""
-#: apt-pkg/acquire-item.cc:707
+#: apt-pkg/acquire-item.cc:711
#, c-format
msgid ""
"I wasn't able to locate a file for the %s package. This might mean you need "
"to manually fix this package. (due to missing arch)"
msgstr ""
-#: apt-pkg/acquire-item.cc:760
+#: apt-pkg/acquire-item.cc:764
#, c-format
msgid ""
"I wasn't able to locate file for the %s package. This might mean you need to "
"manually fix this package."
msgstr ""
-#: apt-pkg/acquire-item.cc:796
+#: apt-pkg/acquire-item.cc:800
#, c-format
msgid ""
"The package index files are corrupted. No Filename: field for package %s."
msgstr ""
-#: apt-pkg/acquire-item.cc:883
+#: apt-pkg/acquire-item.cc:887
msgid "Size mismatch"
msgstr ""