Quellcode durchsuchen

Sync with apt--main--0--patch-78
Patches applied:

* apt@packages.debian.org/apt--main--0--patch-77
Merge apt--mvo--0

* apt@packages.debian.org/apt--main--0--patch-78
Update changelog

* michael.vogt@ubuntu.com--2005/apt--mvo--0--patch-14
* changelog entry for 0.6.34ubuntu1 added, MinAge default is 2 days now

* michael.vogt@ubuntu.com--2005/apt--mvo--0--patch-15
* merged with matts tree

* michael.vogt@ubuntu.com--2005/apt--mvo--0--patch-16
* changelog updated

* michael.vogt@ubuntu.com--2005/apt--mvo--0--patch-17
* whitespace change to add incomplete log for last patch

* michael.vogt@ubuntu.com--2005/apt--mvo--0--patch-18
* honor "Acquire::gpgv::Options" in apt-cdrom too

* michael.vogt@ubuntu.com--2005/apt--mvo--0--patch-19
* corrected a incorrect use of string().c_str() (thanks to mdz!)

Otavio Salvador vor 21 Jahren
Ursprung
Commit
b2869b22be
5 geänderte Dateien mit 54 neuen und 7 gelöschten Zeilen
  1. 6 0
      apt-pkg/acquire-item.cc
  2. 31 3
      apt-pkg/indexcopy.cc
  3. 1 1
      configure.in
  4. 1 1
      debian/apt.cron.daily
  5. 15 2
      debian/changelog

+ 6 - 0
apt-pkg/acquire-item.cc

@@ -369,6 +369,12 @@ pkgAcqMetaSig::pkgAcqMetaSig(pkgAcquire *Owner,
       // File was already in place.  It needs to be re-verified
       // File was already in place.  It needs to be re-verified
       // because Release might have changed, so Move it into partial
       // because Release might have changed, so Move it into partial
       Rename(Final,DestFile);
       Rename(Final,DestFile);
+      // unlink the file and do not try to use I-M-S and Last-Modified
+      // if the users proxy is broken
+      if(_config->FindB("Acquire::BrokenProxy", false) == true) {
+	 std::cerr << "forcing re-get of the signature file as requested" << std::endl;
+	 unlink(DestFile.c_str());
+      }
    }
    }
 
 
    QueueURI(Desc);
    QueueURI(Desc);

+ 31 - 3
apt-pkg/indexcopy.cc

@@ -593,17 +593,45 @@ bool SigVerify::CopyAndVerify(string CDROM,string Name,vector<string> &SigList,
 
 
       // verify the gpg signature of "Release"
       // verify the gpg signature of "Release"
       // gpg --verify "*I+Release.gpg", "*I+Release"
       // gpg --verify "*I+Release.gpg", "*I+Release"
+      const char *Args[400];
+      unsigned int i = 0;
+
       string gpgvpath = _config->Find("Dir::Bin::gpg", "/usr/bin/gpgv");
       string gpgvpath = _config->Find("Dir::Bin::gpg", "/usr/bin/gpgv");
       string pubringpath = _config->Find("Apt::GPGV::TrustedKeyring", "/etc/apt/trusted.gpg");
       string pubringpath = _config->Find("Apt::GPGV::TrustedKeyring", "/etc/apt/trusted.gpg");
+      string releasegpg = *I+"Release.gpg";
+      string release = *I+"Release";
+
+      Args[i++] = gpgvpath.c_str();
+      Args[i++] = "--keyring";
+      Args[i++] = pubringpath.c_str();
+      Configuration::Item const *Opts;
+      Opts = _config->Tree("Acquire::gpgv::Options");
+      if (Opts != 0)
+      {
+         Opts = Opts->Child;
+	 for (; Opts != 0; Opts = Opts->Next)
+         {
+            if (Opts->Value.empty() == true)
+               continue;
+            Args[i++] = Opts->Value.c_str();
+	    if(i >= 390) { 
+	       _error->Error("Argument list from Acquire::gpgv::Options too long. Exiting.");
+	       return false;
+	    }
+         }
+      }
+      
+      Args[i++] = releasegpg.c_str();
+      Args[i++] = release.c_str();
+      Args[i++] = NULL;
+      
       pid_t pid = ExecFork();
       pid_t pid = ExecFork();
       if(pid < 0) {
       if(pid < 0) {
 	 _error->Error("Fork failed");
 	 _error->Error("Fork failed");
 	 return false;
 	 return false;
       }
       }
       if(pid == 0) {
       if(pid == 0) {
-	 execlp(gpgvpath.c_str(), gpgvpath.c_str(), "--keyring", 
-		pubringpath.c_str(), string(*I+"Release.gpg").c_str(), 
-		string(*I+"Release").c_str(), NULL);
+	 execvp(gpgvpath.c_str(), (char**)Args);
       }
       }
       if(!ExecWait(pid, "gpgv")) {
       if(!ExecWait(pid, "gpgv")) {
 	 _error->Warning("Signature verification failed for: %s",
 	 _error->Warning("Signature verification failed for: %s",

+ 1 - 1
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)
 AC_CONFIG_HEADER(include/config.h:buildlib/config.h.in include/apti18n.h:buildlib/apti18n.h.in)
 
 
 dnl -- SET THIS TO THE RELEASE VERSION --
 dnl -- SET THIS TO THE RELEASE VERSION --
-AC_DEFINE_UNQUOTED(VERSION,"0.6.35")
+AC_DEFINE_UNQUOTED(VERSION,"0.6.35ubuntu1")
 PACKAGE="apt"
 PACKAGE="apt"
 AC_DEFINE_UNQUOTED(PACKAGE,"$PACKAGE")
 AC_DEFINE_UNQUOTED(PACKAGE,"$PACKAGE")
 AC_SUBST(PACKAGE)
 AC_SUBST(PACKAGE)

+ 1 - 1
debian/apt.cron.daily

@@ -74,7 +74,7 @@ check_size_constraints()
 {
 {
     # min-age in days
     # min-age in days
     MaxAge=0
     MaxAge=0
-    MinAge=1
+    MinAge=2
     MaxSize=0
     MaxSize=0
     CacheDir="var/cache/apt"
     CacheDir="var/cache/apt"
     CacheArchive="archives/"
     CacheArchive="archives/"

+ 15 - 2
debian/changelog

@@ -1,10 +1,23 @@
-apt (0.6.35os1) unstable; urgency=low
+apt (0.6.36os1) unstable; urgency=low
 
 
    * Resync with apt--main--0--patch-71.
    * Resync with apt--main--0--patch-71.
      [ This include the DDTP support for testing propose, report bugs
      [ This include the DDTP support for testing propose, report bugs
      directly to me ]
      directly to me ]
 
 
- -- Otavio Salvador <otavio@debian.org>  Wed, 23 Mar 2005 17:19:28 -0300
+ -- Otavio Salvador <otavio@debian.org>  Thu,  7 Apr 2005 21:16:46 -0300
+
+apt (0.6.36) unstable; urgency=low
+
+  * Merge apt--mvo--0:
+    - apt-pkg/acquire-item.cc:
+      added "Acquire::BrokenProxy" that will force apt to always 
+      re-get the Release.gpg file (for broken proxies)
+    - debian/apt.cron.daily:
+      MinAge is defaulting to 2 days now to prevent over-aggresive removal 
+    - apt-pkg/cdrom.cc:
+      honor "Acquire::gpgv::Options" when verifying the signature (Ubuntu #8496)
+ 
+ -- Michael Vogt <michael.vogt@ubuntu.com>  Thu, 31 Mar 2005 20:37:11 +0200
 
 
 apt (0.6.35) hoary; urgency=low
 apt (0.6.35) hoary; urgency=low