]> git.saurik.com Git - apt.git/commitdiff
Merge apt--mvo--0
authorMatt Zimmerman <matt.zimmerman@canonical.com>
Wed, 29 Dec 2004 01:18:28 +0000 (01:18 +0000)
committerMatt Zimmerman <matt.zimmerman@canonical.com>
Wed, 29 Dec 2004 01:18:28 +0000 (01:18 +0000)
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

apt-pkg/acquire-item.cc
cmdline/apt-key
configure.in
debian/changelog
debian/rules
po/apt-all.pot

index f40c6a50d862cce446e3fae11429780442a9c3a1..de8cfe8f2249e2b74d2aeccd46b93264663bcf94 100644 (file)
@@ -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);
 }
 
index 583cde19152882b311379dbea3f7becac0eeede0..a96afe944f9efd078964c590ddb1f7d063f8dd22 100755 (executable)
@@ -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
         ;;
index 6c81ae7f6b3267780f49097f36f04b3bf45253bc..b40a53b7f69f26c033787e335cc01d222bdee252 100644 (file)
@@ -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)
index 26368db0e2a77618351f5925d27940d7c69f1c3d..1551df078851810efabfcd7ba0d1928dfcf3743f 100644 (file)
@@ -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
index 1fbbb61d1ef2dea105b50c1c1523d53b39662d96..b756b3b323c93ae39d9d3ffec3003c1a59975a3a 100755 (executable)
@@ -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')
index 7d8e9d40f5625a5fae9c4d24ffbe60e5a0494ff5..dfafb2c4f137083de7cb1d8c844424a31b18260f 100644 (file)
@@ -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 ""