summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--apt-pkg/acquire-item.cc61
-rw-r--r--apt-pkg/acquire-item.h15
-rw-r--r--apt-pkg/acquire-method.cc21
-rw-r--r--apt-pkg/acquire-method.h15
-rw-r--r--apt-pkg/deb/dpkgpm.cc117
-rw-r--r--apt-pkg/deb/dpkgpm.h4
-rw-r--r--apt-pkg/depcache.cc1
-rw-r--r--apt-pkg/init.cc3
-rw-r--r--apt-pkg/init.h2
-rw-r--r--apt-pkg/makefile2
-rw-r--r--apt-pkg/pkgrecords.cc4
-rw-r--r--apt-pkg/tagfile.cc2
-rw-r--r--cmdline/apt-get.cc27
-rwxr-xr-xcmdline/apt-key6
-rwxr-xr-xcmdline/apt-report-mirror-failure24
-rw-r--r--cmdline/makefile6
-rw-r--r--configure.in2
-rw-r--r--debian/README.ubuntu-dev6
-rw-r--r--debian/apt.conf.autoremove9
-rw-r--r--debian/apt.conf.ubuntu10
-rw-r--r--debian/apt.cron.daily5
-rw-r--r--debian/apt.dirs1
-rw-r--r--debian/apt.postinst4
-rw-r--r--debian/changelog895
-rw-r--r--debian/control10
-rw-r--r--debian/copyright142
-rwxr-xr-xdebian/rules9
-rw-r--r--doc/examples/configure-index20
-rw-r--r--doc/examples/sources.list12
-rw-r--r--methods/connect.cc18
-rw-r--r--methods/copy.cc1
-rw-r--r--methods/http.cc16
-rw-r--r--methods/http.h6
-rw-r--r--methods/http_main.cc15
-rw-r--r--methods/makefile19
-rw-r--r--methods/mirror.cc316
-rw-r--r--methods/mirror.h52
-rw-r--r--mirror-failure.py23
-rw-r--r--share/debian-archive.gpg.movedbin0 -> 2717 bytes
39 files changed, 1774 insertions, 127 deletions
diff --git a/apt-pkg/acquire-item.cc b/apt-pkg/acquire-item.cc
index 7cae6c8b7..d0eee0b43 100644
--- a/apt-pkg/acquire-item.cc
+++ b/apt-pkg/acquire-item.cc
@@ -63,6 +63,7 @@ void pkgAcquire::Item::Failed(string Message,pkgAcquire::MethodConfig *Cnf)
{
Status = StatIdle;
ErrorText = LookupTag(Message,"Message");
+ UsedMirror = LookupTag(Message,"UsedMirror");
if (QueueCounter <= 1)
{
/* This indicates that the file is not available right now but might
@@ -75,10 +76,17 @@ void pkgAcquire::Item::Failed(string Message,pkgAcquire::MethodConfig *Cnf)
Dequeue();
return;
}
-
+
Status = StatError;
Dequeue();
}
+
+ // report mirror failure back to LP if we actually use a mirror
+ string FailReason = LookupTag(Message, "FailReason");
+ if(FailReason.size() != 0)
+ ReportMirrorFailure(FailReason);
+ else
+ ReportMirrorFailure(ErrorText);
}
/*}}}*/
// Acquire::Item::Start - Item has begun to download /*{{{*/
@@ -100,7 +108,7 @@ void pkgAcquire::Item::Done(string Message,unsigned long Size,string Hash,
{
// We just downloaded something..
string FileName = LookupTag(Message,"Filename");
- // we only inform the Log class if it was actually not a local thing
+ UsedMirror = LookupTag(Message,"UsedMirror");
if (Complete == false && !Local && FileName == DestFile)
{
if (Owner->Log != 0)
@@ -109,7 +117,6 @@ void pkgAcquire::Item::Done(string Message,unsigned long Size,string Hash,
if (FileSize == 0)
FileSize= Size;
-
Status = StatDone;
ErrorText = string();
Owner->Dequeue(this);
@@ -132,6 +139,49 @@ void pkgAcquire::Item::Rename(string From,string To)
}
/*}}}*/
+void pkgAcquire::Item::ReportMirrorFailure(string FailCode)
+{
+ // we only act if a mirror was used at all
+ if(UsedMirror.empty())
+ return;
+#if 0
+ std::cerr << "\nReportMirrorFailure: "
+ << UsedMirror
+ << " Uri: " << DescURI()
+ << " FailCode: "
+ << FailCode << std::endl;
+#endif
+ const char *Args[40];
+ unsigned int i = 0;
+ string report = _config->Find("Methods::Mirror::ProblemReporting",
+ "/usr/lib/apt/apt-report-mirror-failure");
+ if(!FileExists(report))
+ return;
+ Args[i++] = report.c_str();
+ Args[i++] = UsedMirror.c_str();
+ Args[i++] = DescURI().c_str();
+ Args[i++] = FailCode.c_str();
+ Args[i++] = NULL;
+ pid_t pid = ExecFork();
+ if(pid < 0)
+ {
+ _error->Error("ReportMirrorFailure Fork failed");
+ return;
+ }
+ else if(pid == 0)
+ {
+ execvp(Args[0], (char**)Args);
+ std::cerr << "Could not exec " << Args[0] << std::endl;
+ _exit(100);
+ }
+ if(!ExecWait(pid, "report-mirror-failure"))
+ {
+ _error->Warning("Couldn't report problem to '%s'",
+ _config->Find("Methods::Mirror::ProblemReporting").c_str());
+ }
+}
+
+
// AcqDiffIndex::AcqDiffIndex - Constructor
// ---------------------------------------------------------------------
@@ -590,7 +640,6 @@ string pkgAcqIndex::Custom600Headers()
struct stat Buf;
if (stat(Final.c_str(),&Buf) != 0)
return "\nIndex-File: true";
-
return "\nIndex-File: true\nLast-Modified: " + TimeRFC1123(Buf.st_mtime);
}
/*}}}*/
@@ -646,6 +695,7 @@ void pkgAcqIndex::Done(string Message,unsigned long Size,string Hash,
Status = StatAuthError;
ErrorText = _("Hash Sum mismatch");
Rename(DestFile,DestFile + ".FAILED");
+ ReportMirrorFailure("HashChecksumFailure");
return;
}
// Done, move it into position
@@ -1058,7 +1108,7 @@ void pkgAcqMetaIndex::QueueIndexes(bool verify)
// Queue Packages file (either diff or full packages files, depending
// on the users option)
- if(_config->FindB("Acquire::PDiffs",true) == true)
+ if(_config->FindB("Acquire::PDiffs",false) == true)
new pkgAcqDiffIndex(Owner, (*Target)->URI, (*Target)->Description,
(*Target)->ShortDesc, ExpectedIndexHash);
else
@@ -1182,6 +1232,7 @@ void pkgAcqMetaIndex::Failed(string Message,pkgAcquire::MethodConfig *Cnf)
}
// gpgv method failed
+ ReportMirrorFailure("GPGFailure");
_error->Warning("GPG error: %s: %s",
Desc.Description.c_str(),
LookupTag(Message,"Message").c_str());
diff --git a/apt-pkg/acquire-item.h b/apt-pkg/acquire-item.h
index a48f7f7e5..5088a41ae 100644
--- a/apt-pkg/acquire-item.h
+++ b/apt-pkg/acquire-item.h
@@ -142,6 +142,7 @@ class pkgAcquire::Item
* download progress indicator's overall statistics.
*/
bool Local;
+ string UsedMirror;
/** \brief The number of fetch queues into which this item has been
* inserted.
@@ -242,6 +243,17 @@ class pkgAcquire::Item
/** \return \b true if this object is being fetched from a trusted source. */
virtual bool IsTrusted() {return false;};
+
+ // report mirror problems
+ /** \brief Report mirror problem
+ *
+ * This allows reporting mirror failures back to a centralized
+ * server. The apt-report-mirror-failure script is called for this
+ *
+ * \param FailCode A short failure string that is send
+ */
+ void ReportMirrorFailure(string FailCode);
+
/** \brief Initialize an item.
*
@@ -543,7 +555,8 @@ class pkgAcqIndex : public pkgAcquire::Item
* (".bz2" is used if bzip2 is installed, ".gz" otherwise).
*/
pkgAcqIndex(pkgAcquire *Owner,string URI,string URIDesc,
- string ShortDesc, HashString ExpectedHash, string compressExt="");
+ string ShortDesc, HashString ExpectedHash,
+ string compressExt="");
};
/** \brief An acquire item that is responsible for fetching a
diff --git a/apt-pkg/acquire-method.cc b/apt-pkg/acquire-method.cc
index bc29417f7..26f992bcf 100644
--- a/apt-pkg/acquire-method.cc
+++ b/apt-pkg/acquire-method.cc
@@ -96,12 +96,11 @@ void pkgAcqMethod::Fail(string Err,bool Transient)
}
char S[1024];
+ char *End = S;
if (Queue != 0)
{
- snprintf(S,sizeof(S)-50,"400 URI Failure\nURI: %s\n"
- "Message: %s %s\n",Queue->Uri.c_str(),Err.c_str(),
- FailExtra.c_str());
-
+ End += snprintf(S,sizeof(S)-50,"400 URI Failure\nURI: %s\n"
+ "Message: %s %s\n",Queue->Uri.c_str(), Err.c_str(), IP.c_str());
// Dequeue
FetchItem *Tmp = Queue;
Queue = Queue->Next;
@@ -110,10 +109,14 @@ void pkgAcqMethod::Fail(string Err,bool Transient)
QueueBack = Queue;
}
else
- snprintf(S,sizeof(S)-50,"400 URI Failure\nURI: <UNKNOWN>\n"
- "Message: %s %s\n",Err.c_str(),
- FailExtra.c_str());
-
+ {
+ End += snprintf(S,sizeof(S)-50,"400 URI Failure\nURI: <UNKNOWN>\n"
+ "Message: %s\n",Err.c_str());
+ }
+ if(FailReason.empty() == false)
+ End += snprintf(End,sizeof(S)-50 - (End - S),"FailReason: %s\n",FailReason.c_str());
+ if (UsedMirror.empty() == false)
+ End += snprintf(End,sizeof(S)-50 - (End - S),"UsedMirror: %s\n",UsedMirror.c_str());
// Set the transient flag
if (Transient == true)
strcat(S,"Transient-Failure: true\n\n");
@@ -184,6 +187,8 @@ void pkgAcqMethod::URIDone(FetchResult &Res, FetchResult *Alt)
End += snprintf(End,sizeof(S)-50 - (End - S),"SHA1-Hash: %s\n",Res.SHA1Sum.c_str());
if (Res.SHA256Sum.empty() == false)
End += snprintf(End,sizeof(S)-50 - (End - S),"SHA256-Hash: %s\n",Res.SHA256Sum.c_str());
+ if (UsedMirror.empty() == false)
+ End += snprintf(End,sizeof(S)-50 - (End - S),"UsedMirror: %s\n",UsedMirror.c_str());
if (Res.GPGVOutput.size() > 0)
End += snprintf(End,sizeof(S)-50 - (End - S),"GPGVOutput:\n");
for (vector<string>::iterator I = Res.GPGVOutput.begin();
diff --git a/apt-pkg/acquire-method.h b/apt-pkg/acquire-method.h
index e02eab018..18c2cf009 100644
--- a/apt-pkg/acquire-method.h
+++ b/apt-pkg/acquire-method.h
@@ -59,7 +59,9 @@ class pkgAcqMethod
vector<string> Messages;
FetchItem *Queue;
FetchItem *QueueBack;
- string FailExtra;
+ string FailReason;
+ string UsedMirror;
+ string IP;
// Handlers for messages
virtual bool Configuration(string Message);
@@ -68,14 +70,14 @@ class pkgAcqMethod
// Outgoing messages
void Fail(bool Transient = false);
inline void Fail(const char *Why, bool Transient = false) {Fail(string(Why),Transient);};
- void Fail(string Why, bool Transient = false);
- void URIStart(FetchResult &Res);
- void URIDone(FetchResult &Res,FetchResult *Alt = 0);
+ virtual void Fail(string Why, bool Transient = false);
+ virtual void URIStart(FetchResult &Res);
+ virtual void URIDone(FetchResult &Res,FetchResult *Alt = 0);
+
bool MediaFail(string Required,string Drive);
virtual void Exit() {};
public:
-
enum CnfFlags {SingleInstance = (1<<0),
Pipeline = (1<<1), SendConfig = (1<<2),
LocalOnly = (1<<3), NeedsCleanup = (1<<4),
@@ -85,7 +87,8 @@ class pkgAcqMethod
void Status(const char *Format,...);
int Run(bool Single = false);
- inline void SetFailExtraMsg(string Msg) {FailExtra = Msg;};
+ inline void SetFailReason(string Msg) {FailReason = Msg;};
+ inline void SetIP(string aIP) {IP = aIP;};
pkgAcqMethod(const char *Ver,unsigned long Flags = 0);
virtual ~pkgAcqMethod() {};
diff --git a/apt-pkg/deb/dpkgpm.cc b/apt-pkg/deb/dpkgpm.cc
index d796146fa..2753936b2 100644
--- a/apt-pkg/deb/dpkgpm.cc
+++ b/apt-pkg/deb/dpkgpm.cc
@@ -12,6 +12,7 @@
#include <apt-pkg/error.h>
#include <apt-pkg/configuration.h>
#include <apt-pkg/depcache.h>
+#include <apt-pkg/pkgrecords.h>
#include <apt-pkg/strutl.h>
#include <apti18n.h>
@@ -334,7 +335,6 @@ bool pkgDPkgPM::RunScriptsWithPkgs(const char *Cnf)
return true;
}
-
/*}}}*/
// DPkgPM::DoStdin - Read stdin and pass to slave pty /*{{{*/
// ---------------------------------------------------------------------
@@ -422,6 +422,8 @@ void pkgDPkgPM::ProcessDpkgStatusLine(int OutStatusFd, char *line)
write(OutStatusFd, status.str().c_str(), status.str().size());
if (_config->FindB("Debug::pkgDPkgProgressReporting",false) == true)
std::clog << "send: '" << status.str() << "'" << endl;
+ pkgFailures++;
+ WriteApportReport(list[1], list[3]);
return;
}
if(strncmp(action,"conffile",strlen("conffile")) == 0)
@@ -870,7 +872,6 @@ bool pkgDPkgPM::Go(int OutStatusFd)
signal(SIGINT,old_SIGINT);
return _error->Errno("waitpid","Couldn't wait for subprocess");
}
-
// wait for input or output here
FD_ZERO(&rfds);
if (!stdin_is_dev_null)
@@ -954,3 +955,115 @@ void pkgDPkgPM::Reset()
List.erase(List.begin(),List.end());
}
/*}}}*/
+// pkgDpkgPM::WriteApportReport - write out error report pkg failure /*{{{*/
+// ---------------------------------------------------------------------
+/* */
+void pkgDPkgPM::WriteApportReport(const char *pkgpath, const char *errormsg)
+{
+ string pkgname, reportfile, srcpkgname, pkgver, arch;
+ string::size_type pos;
+ FILE *report;
+
+ if (_config->FindB("Dpkg::ApportFailureReport",true) == false)
+ return;
+
+ // only report the first error if we are in StopOnError=false mode
+ // to prevent bogus reports
+ if((_config->FindB("Dpkg::StopOnError",true) == false) && pkgFailures > 1)
+ return;
+
+ // get the pkgname and reportfile
+ pkgname = flNotDir(pkgpath);
+ pos = pkgname.find('_');
+ if(pos != string::npos)
+ pkgname = pkgname.substr(0, pos);
+
+ // find the package versin and source package name
+ pkgCache::PkgIterator Pkg = Cache.FindPkg(pkgname);
+ if (Pkg.end() == true)
+ return;
+ pkgCache::VerIterator Ver = Cache.GetCandidateVer(Pkg);
+ if (Ver.end() == true)
+ return;
+ pkgver = Ver.VerStr() == NULL ? "unknown" : Ver.VerStr();
+ pkgRecords Recs(Cache);
+ pkgRecords::Parser &Parse = Recs.Lookup(Ver.FileList());
+ srcpkgname = Parse.SourcePkg();
+ if(srcpkgname.empty())
+ srcpkgname = pkgname;
+
+ // if the file exists already, we check:
+ // - if it was reported already (touched by apport).
+ // If not, we do nothing, otherwise
+ // we overwrite it. This is the same behaviour as apport
+ // - if we have a report with the same pkgversion already
+ // then we skip it
+ reportfile = flCombine("/var/crash",pkgname+".0.crash");
+ if(FileExists(reportfile))
+ {
+ struct stat buf;
+ char strbuf[255];
+
+ // check atime/mtime
+ stat(reportfile.c_str(), &buf);
+ if(buf.st_mtime > buf.st_atime)
+ return;
+
+ // check if the existing report is the same version
+ report = fopen(reportfile.c_str(),"r");
+ while(fgets(strbuf, sizeof(strbuf), report) != NULL)
+ {
+ if(strstr(strbuf,"Package:") == strbuf)
+ {
+ char pkgname[255], version[255];
+ if(sscanf(strbuf, "Package: %s %s", pkgname, version) == 2)
+ if(strcmp(pkgver.c_str(), version) == 0)
+ {
+ fclose(report);
+ return;
+ }
+ }
+ }
+ fclose(report);
+ }
+
+ // now write the report
+ arch = _config->Find("APT::Architecture");
+ report = fopen(reportfile.c_str(),"w");
+ if(report == NULL)
+ return;
+ if(_config->FindB("DPkgPM::InitialReportOnly",false) == true)
+ chmod(reportfile.c_str(), 0);
+ else
+ chmod(reportfile.c_str(), 0600);
+ fprintf(report, "ProblemType: Package\n");
+ fprintf(report, "Architecture: %s\n", arch.c_str());
+ time_t now = time(NULL);
+ fprintf(report, "Date: %s" , ctime(&now));
+ fprintf(report, "Package: %s %s\n", pkgname.c_str(), pkgver.c_str());
+ fprintf(report, "SourcePackage: %s\n", srcpkgname.c_str());
+ fprintf(report, "ErrorMessage:\n %s\n", errormsg);
+
+ // ensure that the log is flushed
+ if(term_out)
+ fflush(term_out);
+
+ // attach terminal log it if we have it
+ string logfile_name = _config->FindFile("Dir::Log::Terminal");
+ if (!logfile_name.empty())
+ {
+ FILE *log = NULL;
+ char buf[1024];
+
+ fprintf(report, "DpkgTerminalLog:\n");
+ log = fopen(logfile_name.c_str(),"r");
+ if(log != NULL)
+ {
+ while( fgets(buf, sizeof(buf), log) != NULL)
+ fprintf(report, " %s", buf);
+ fclose(log);
+ }
+ }
+ fclose(report);
+}
+ /*}}}*/
diff --git a/apt-pkg/deb/dpkgpm.h b/apt-pkg/deb/dpkgpm.h
index 81a888f05..83b3f95fc 100644
--- a/apt-pkg/deb/dpkgpm.h
+++ b/apt-pkg/deb/dpkgpm.h
@@ -31,6 +31,7 @@ class pkgDPkgPM : public pkgPackageManager
FILE *term_out;
protected:
+ int pkgFailures;
// progress reporting
struct DpkgState
@@ -68,6 +69,9 @@ class pkgDPkgPM : public pkgPackageManager
bool RunScriptsWithPkgs(const char *Cnf);
bool SendV2Pkgs(FILE *F);
+ // apport integration
+ void WriteApportReport(const char *pkgpath, const char *errormsg);
+
// dpkg log
bool OpenLog();
bool CloseLog();
diff --git a/apt-pkg/depcache.cc b/apt-pkg/depcache.cc
index c21872449..d447d175e 100644
--- a/apt-pkg/depcache.cc
+++ b/apt-pkg/depcache.cc
@@ -1397,3 +1397,4 @@ bool pkgDepCache::Sweep()
return true;
}
+
diff --git a/apt-pkg/init.cc b/apt-pkg/init.cc
index 338bef66c..c0384cd45 100644
--- a/apt-pkg/init.cc
+++ b/apt-pkg/init.cc
@@ -51,6 +51,7 @@ bool pkgInitConfig(Configuration &Cnf)
Cnf.Set("Dir::State::lists","lists/");
Cnf.Set("Dir::State::cdroms","cdroms.list");
+ Cnf.Set("Dir::State::mirrors","mirrors/");
// Cache
Cnf.Set("Dir::Cache","var/cache/apt/");
@@ -72,7 +73,7 @@ bool pkgInitConfig(Configuration &Cnf)
// State
Cnf.Set("Dir::Log","var/log/apt");
Cnf.Set("Dir::Log::Terminal","term.log");
-
+
// Translation
Cnf.Set("APT::Acquire::Translation", "environment");
diff --git a/apt-pkg/init.h b/apt-pkg/init.h
index 6d8693be9..23e951eff 100644
--- a/apt-pkg/init.h
+++ b/apt-pkg/init.h
@@ -18,7 +18,7 @@
// See the makefile
#define APT_PKG_MAJOR 4
-#define APT_PKG_MINOR 6
+#define APT_PKG_MINOR 5
#define APT_PKG_RELEASE 0
extern const char *pkgVersion;
diff --git a/apt-pkg/makefile b/apt-pkg/makefile
index 1b78c94f6..b327dbf64 100644
--- a/apt-pkg/makefile
+++ b/apt-pkg/makefile
@@ -13,7 +13,7 @@ include ../buildlib/defaults.mak
# methods/makefile - FIXME
LIBRARY=apt-pkg
LIBEXT=$(GLIBC_VER)$(LIBSTDCPP_VER)
-MAJOR=4.6
+MAJOR=4.5
MINOR=0
SLIBS=$(PTHREADLIB) $(INTLLIBS) -lutil
APT_DOMAIN:=libapt-pkg$(MAJOR)
diff --git a/apt-pkg/pkgrecords.cc b/apt-pkg/pkgrecords.cc
index e506de73a..a5dab22ff 100644
--- a/apt-pkg/pkgrecords.cc
+++ b/apt-pkg/pkgrecords.cc
@@ -23,8 +23,8 @@
pkgRecords::pkgRecords(pkgCache &Cache) : Cache(Cache),
Files(Cache.HeaderP->PackageFileCount)
{
- for (pkgCache::PkgFileIterator I = Cache.FileBegin();
- I.end() == false; I++)
+ for (pkgCache::PkgFileIterator I = Cache.FileBegin();
+ I.end() == false; I++)
{
const pkgIndexFile::Type *Type = pkgIndexFile::Type::GetType(I.IndexType());
if (Type == 0)
diff --git a/apt-pkg/tagfile.cc b/apt-pkg/tagfile.cc
index 893cb8ee7..0ae6950f3 100644
--- a/apt-pkg/tagfile.cc
+++ b/apt-pkg/tagfile.cc
@@ -407,6 +407,7 @@ static const char *iTFRewritePackageOrder[] = {
"Section",
"Installed-Size",
"Maintainer",
+ "Original-Maintainer",
"Architecture",
"Source",
"Version",
@@ -436,6 +437,7 @@ static const char *iTFRewriteSourceOrder[] = {"Package",
"Priority",
"Section",
"Maintainer",
+ "Original-Maintainer",
"Build-Depends",
"Build-Depends-Indep",
"Build-Conflicts",
diff --git a/cmdline/apt-get.cc b/cmdline/apt-get.cc
index efb618cb0..b619a45c5 100644
--- a/cmdline/apt-get.cc
+++ b/cmdline/apt-get.cc
@@ -2117,6 +2117,33 @@ bool DoSource(CommandLine &CmdL)
if (Last == 0)
return _error->Error(_("Unable to find a source package for %s"),Src.c_str());
+ string srec = Last->AsStr();
+ string::size_type pos = srec.find("\nVcs-");
+ while (pos != string::npos)
+ {
+ pos += strlen("\nVcs-");
+ string vcs = srec.substr(pos,srec.find(":",pos)-pos);
+ if(vcs == "Browser")
+ {
+ pos = srec.find("\nVcs-", pos);
+ continue;
+ }
+ pos += vcs.length()+2;
+ string::size_type epos = srec.find("\n", pos);
+ string uri = srec.substr(pos,epos-pos).c_str();
+ ioprintf(c1out, _("NOTICE: '%s' packaging is maintained in "
+ "the '%s' version control system at:\n"
+ "%s\n"),
+ Src.c_str(), vcs.c_str(), uri.c_str());
+ if(vcs == "Bzr")
+ ioprintf(c1out,_("Please use:\n"
+ "bzr get %s\n"
+ "to retrieve the latest (possible unreleased) "
+ "updates to the package.\n"),
+ uri.c_str());
+ break;
+ }
+
// Back track
vector<pkgSrcRecords::File> Lst;
if (Last->Files(Lst) == false)
diff --git a/cmdline/apt-key b/cmdline/apt-key
index 3bd1a92d9..15cc4427c 100755
--- a/cmdline/apt-key
+++ b/cmdline/apt-key
@@ -9,14 +9,14 @@ GPG_CMD="gpg --no-options --no-default-keyring --secret-keyring /etc/apt/secring
GPG="$GPG_CMD --keyring /etc/apt/trusted.gpg"
-ARCHIVE_KEYRING=/usr/share/keyrings/debian-archive-keyring.gpg
-REMOVED_KEYS=/usr/share/keyrings/debian-archive-removed-keys.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 debian-archive-keyring package installed?"
+ echo >&2 "Is the ubuntu-keyring package installed?"
exit 1
fi
diff --git a/cmdline/apt-report-mirror-failure b/cmdline/apt-report-mirror-failure
new file mode 100755
index 000000000..1567e78e3
--- /dev/null
+++ b/cmdline/apt-report-mirror-failure
@@ -0,0 +1,24 @@
+#!/usr/bin/python
+
+import sys
+import urllib
+import apt_pkg
+
+apt_pkg.init()
+url = apt_pkg.Config.Find("Acquire::Mirror::ReportFailures", None)
+ #"http://people.ubuntu.com:9000/mirror-failure")
+ #"http://localhost:9000/mirror-failure")
+if not url:
+ sys.exit(0)
+
+print "Reporting mirror failure to '%s'" % url
+
+data = {}
+data['mirror'] = sys.argv[1]
+data['failurl'] = sys.argv[2]
+data['error'] = sys.argv[3]
+f = urllib.urlopen(url, urllib.urlencode(data))
+f.read()
+f.close()
+
+
diff --git a/cmdline/makefile b/cmdline/makefile
index 5820c2e0f..c795921c1 100644
--- a/cmdline/makefile
+++ b/cmdline/makefile
@@ -58,3 +58,9 @@ SOURCE=apt-mark
TO=$(BIN)
TARGET=program
include $(COPY_H)
+
+# The apt-key program
+SOURCE=apt-report-mirror-failure
+TO=$(BIN)
+TARGET=program
+include $(COPY_H)
diff --git a/configure.in b/configure.in
index 5f19c98a6..52e85fc5b 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.7.10")
+AC_DEFINE_UNQUOTED(VERSION,"0.7.9ubuntu1~ppa1")
PACKAGE="apt"
AC_DEFINE_UNQUOTED(PACKAGE,"$PACKAGE")
AC_SUBST(PACKAGE)
diff --git a/debian/README.ubuntu-dev b/debian/README.ubuntu-dev
new file mode 100644
index 000000000..9da152556
--- /dev/null
+++ b/debian/README.ubuntu-dev
@@ -0,0 +1,6 @@
+Build this package with:
+$ debian/rules arch-build
+or
+$ DEB_BUILD_PROG_OPTS="-S" debian/rules arch-build
+
+make sure you have the pre-build-depds in README.arch installed
diff --git a/debian/apt.conf.autoremove b/debian/apt.conf.autoremove
index 98143ce9a..63b69d5f6 100644
--- a/debian/apt.conf.autoremove
+++ b/debian/apt.conf.autoremove
@@ -4,5 +4,14 @@ APT
{
"^linux-image.*";
"^linux-restricted-modules.*";
+ "^linux-ubuntu-modules-.*";
+ };
+
+ Never-MarkAuto-Sections
+ {
+ "metapackages";
+ "restricted/metapackages";
+ "universe/metapackages";
+ "multiverse/metapackages";
};
};
diff --git a/debian/apt.conf.ubuntu b/debian/apt.conf.ubuntu
new file mode 100644
index 000000000..0489faf98
--- /dev/null
+++ b/debian/apt.conf.ubuntu
@@ -0,0 +1,10 @@
+APT
+{
+ Install-Recommends-Sections
+ {
+ "metapackages";
+ "restricted/metapackages";
+ "universe/metapackages";
+ "multiverse/metapackages";
+ };
+};
diff --git a/debian/apt.cron.daily b/debian/apt.cron.daily
index 5524c16ee..4f7eff47b 100644
--- a/debian/apt.cron.daily
+++ b/debian/apt.cron.daily
@@ -179,8 +179,11 @@ fi
UPDATE_STAMP=/var/lib/apt/periodic/update-stamp
if check_stamp $UPDATE_STAMP $UpdateInterval; then
if apt-get -qq update 2>/dev/null; then
+ # Could possible test access to '/var/run/dbus/system_bus_socket' has well,
+ # but I'm not sure how stable the internal pipe location is defined as
+ # being; so for the moment just 2>/dev/null . --sladen 2007-09-27
if which dbus-send >/dev/null; then
- dbus-send --system / app.apt.dbus.updated boolean:true
+ dbus-send --system / app.apt.dbus.updated boolean:true 2>/dev/null || true
fi
update_stamp $UPDATE_STAMP
fi
diff --git a/debian/apt.dirs b/debian/apt.dirs
index 8ce9b175a..2db8dca9a 100644
--- a/debian/apt.dirs
+++ b/debian/apt.dirs
@@ -7,6 +7,7 @@ etc/apt/sources.list.d
etc/logrotate.d
var/cache/apt/archives/partial
var/lib/apt/lists/partial
+var/lib/apt/mirrors/partial
var/lib/apt/periodic
var/log/apt
usr/share/bug/apt
diff --git a/debian/apt.postinst b/debian/apt.postinst
index 88fb932df..df0433057 100644
--- a/debian/apt.postinst
+++ b/debian/apt.postinst
@@ -17,11 +17,9 @@ case "$1" in
configure)
if ! test -f /etc/apt/trusted.gpg; then
- cp /usr/share/apt/debian-archive.gpg /etc/apt/trusted.gpg
+ cp /usr/share/apt/ubuntu-archive.gpg /etc/apt/trusted.gpg
fi
- apt-key update
-
;;
abort-upgrade|abort-remove|abort-deconfigure)
diff --git a/debian/changelog b/debian/changelog
index 854bec8c6..acb025da1 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,4 +1,4 @@
-apt (0.7.10) unstable; urgency=low
+apt (0.7.9ubuntu1) hardy; urgency=low
[ Otavio Salvador ]
* Applied patch from Mike O'Connor <stew@vireo.org> to add a manpage to
@@ -22,6 +22,8 @@ apt (0.7.10) unstable; urgency=low
- remove cruft code that caused timestamp/I-M-S issues
* ftparchive/contents.cc:
- fix error output
+ * methods/mirror.{cc,h}:
+ - only update mirror list on IndexFile updates
* apt-pkg/acquire-item.{cc,h}:
- make the authentication download code more robust against
servers/proxies with broken If-Range implementations
@@ -32,7 +34,7 @@ apt (0.7.10) unstable; urgency=low
* ftparchive/multicompress.cc:
- support lzma output
- -- Michael Vogt <mvo@debian.org> Wed, 28 Nov 2007 17:10:49 +0100
+ -- Michael Vogt <michael.vogt@ubuntu.com> Thu, 06 Dec 2007 19:32:07 +0100
apt (0.7.9) unstable; urgency=low
@@ -159,12 +161,192 @@ apt (0.7.7) unstable; urgency=low
-- Michael Vogt <mvo@debian.org> Tue, 23 Oct 2007 14:58:03 +0200
-apt (0.7.6) unstable; urgency=low
+apt (0.7.6ubuntu14.1) gutsy-proposed; urgency=low
- * Applied patch from Aurelien Jarno <aurel32@debian.org> to fix wrong
- directory downloading on non-linux architectures (closes: #435597)
+ [ Michael Vogt ]
+ * apt-pkg/deb/dpkgpm.{cc,h}:
+ - give up timeslice on EIO error in read from master terminal
+ * debian/apt.cron.daily:
+ - only run the cron job if apt-get check succeeds (LP: #131719)
- -- Otavio Salvador <otavio@debian.org> Wed, 01 Aug 2007 19:49:51 -0300
+ [ Martin Emrich ]
+ * apt-pkg/deb/dpkgpm.{cc,h}:
+ - rewrite dpkgpm.cc to use pselect() instead of select()
+ to block signals during select() (LP: #134858)
+
+ -- Michael Vogt <michael.vogt@ubuntu.com> Sat, 20 Oct 2007 07:51:12 +0200
+
+apt (0.7.6ubuntu14) gutsy; urgency=low
+
+ * apt-pkg/deb/dpkgpm.cc:
+ - fix resource leak (LP: #148806)
+
+ -- Michael Vogt <michael.vogt@ubuntu.com> Mon, 15 Oct 2007 20:57:44 +0200
+
+apt (0.7.6ubuntu13) gutsy; urgency=low
+
+ * apt-pkg/deb/dpkgpm.cc:
+ - fix crash in WriteApportReport (LP: #144537)
+ * apt-pkg/acquire-item.cc
+ - fix disappearing local Packages.gz file (LP: #131166)
+ * methods/https.cc:
+ - fix off-by-one error I-M-S handling
+ - cleanup after I-M-S hit
+
+ -- Michael Vogt <michael.vogt@ubuntu.com> Tue, 09 Oct 2007 01:48:26 +0200
+
+apt (0.7.6ubuntu12) gutsy; urgency=low
+
+ [ Michael Vogt ]
+ * cmdline/apt-mark:
+ - Fix chmoding after have renamed the extended-states file
+ (thanks to Laurent Bigonville, LP: #140019)
+ * apt-pkg/deb/debmetaindex.cc: comparison with string literal results
+ in unspecified behaviour;
+ * Reset curl options and timestamp between downloaded files. Thanks to
+ Ryan Murray <rmurray@debian.org> for the patch
+
+ [Paul Sladen]
+ * Have 'cron.daily/apt' send D-Bus doesn't exist error messages
+ to the bit bucket. Thanks to 'dasdda'. (LP: #115397)
+
+ -- Michael Vogt <michael.vogt@ubuntu.com> Wed, 03 Oct 2007 02:17:45 +0200
+
+apt (0.7.6ubuntu11) gutsy; urgency=low
+
+ * apt-pkg/contrib/mmap.cc:
+ - don't fail if msync() returns > 0 (LP: #144001)
+
+ -- Colin Watson <cjwatson@ubuntu.com> Sat, 22 Sep 2007 21:39:29 +0100
+
+apt (0.7.6ubuntu10) gutsy; urgency=low
+
+ * apt-pkg/deb/dpkgpm.cc:
+ - fix parse error when dpkg sends unexpected data
+
+ -- Michael Vogt <michael.vogt@ubuntu.com> Tue, 18 Sep 2007 17:25:09 +0100
+
+apt (0.7.6ubuntu9) gutsy; urgency=low
+
+ * apt-pkg/deb/dpkgpm.cc:
+ - fix progress reporting precent calculation (LP: #137798)
+ * make apt build with g++ 4.3
+ * fix missing SetExecClose() call when the status-fd is used
+ (LP: #136767)
+ * debian/apt.cron.daily:
+ - move unattended-upgrade before apt-get autoclean
+ * fix "purge" commandline argument, closes LP: #125733
+ (thanks to Julien Danjou for the patch)
+ * cmdline/apt-get.cc:
+ - do not change the auto-installed information if a package
+ is reinstalled (LP: #139448)
+
+ -- Michael Vogt <michael.vogt@ubuntu.com> Tue, 11 Sep 2007 20:55:00 +0200
+
+apt (0.7.6ubuntu8) gutsy; urgency=low
+
+ * apt-pkg/deb/dpkgpm.{cc,h}:
+ - fix bug in dpkg log writing when a signal is caught during
+ select() (LP: #134858)
+ - write end marker in the log as well
+
+ -- Michael Vogt <michael.vogt@ubuntu.com> Wed, 05 Sep 2007 15:03:46 +0200
+
+apt (0.7.6ubuntu7) gutsy; urgency=low
+
+ * reupload to fix FTBFS
+
+ -- Michael Vogt <michael.vogt@ubuntu.com> Thu, 16 Aug 2007 19:44:20 +0200
+
+apt (0.7.6ubuntu6) gutsy; urgency=low
+
+ * dpkg-triggers: Deal properly with new package states.
+
+ -- Ian Jackson <iwj@ubuntu.com> Wed, 15 Aug 2007 20:44:37 +0100
+
+apt (0.7.6ubuntu5) UNRELEASED; urgency=low
+
+ * apt-pkg/acquire-item.cc:
+ - fix file removal on local repo i-m-s hit (LP: #131166)
+ * tests/local-repo:
+ - added regression test for this bug
+
+ -- Michael Vogt <michael.vogt@ubuntu.com> Thu, 09 Aug 2007 12:34:07 +0200
+
+apt (0.7.6ubuntu4) gutsy; urgency=low
+
+ * cmdline/apt-get.cc:
+ - remove YnPrompt when a XS-Vcs- tag is found, improve the
+ notice (LP: #129575)
+ * methods/copy.cc:
+ - take hashes here too
+ * apt-pkg/acquire-worker.cc:
+ - only pass on computed hash if we recived one from the method
+
+ -- Michael Vogt <michael.vogt@ubuntu.com> Wed, 08 Aug 2007 19:30:29 +0200
+
+apt (0.7.6ubuntu3) gutsy; urgency=low
+
+ * apt-pkg/deb/dpkgpm.cc:
+ - fix packagename extraction when writting apport reports
+ * apt-pkg/pkgcachegen.cc:
+ - increase default mmap size (LP: #125640)
+
+ -- Michael Vogt <michael.vogt@ubuntu.com> Tue, 07 Aug 2007 09:52:00 +0200
+
+apt (0.7.6ubuntu2) gutsy; urgency=low
+
+ * doc/examples/sources.list:
+ - change example source to gutsy
+ * apt-pkg/deb/dpkgpm.cc:
+ - do not break if no /dev/pts is available
+
+ -- Michael Vogt <michael.vogt@ubuntu.com> Mon, 06 Aug 2007 15:17:57 +0200
+
+apt (0.7.6ubuntu1) gutsy; urgency=low
+
+ [ Michael Vogt ]
+ * apt-inst/contrib/extracttar.cc:
+ - fix fd leak for zero size files (thanks to Bill Broadley for
+ reporting this bug)
+ * apt-pkg/acquire-item.cc:
+ - remove zero size files on I-M-S hit
+ * methods/https.cc:
+ - only send LastModified if we actually have a file
+ - send range request with if-range
+ - delete failed downloads
+ (thanks to Thom May for his help here)
+ - delete zero size I-M-S hits
+ * apt-pkg/deb/dpkgpm.{cc,h}:
+ - merged dpkg-log branch, this lets you specify a
+ Dir::Log::Terminal file to log dpkg output to
+ (ABI break)
+ - when writting apport reports, attach the dpkg
+ terminal log too
+ * merged apt--sha256 branch to fully support the new
+ sha256 checksums in the Packages and Release files
+ (ABI break)
+ * apt-pkg/pkgcachegen.cc:
+ - increase default mmap size
+ * tests/local-repo:
+ - added local repository testcase
+ * make apt build with g++ 4.3
+ * fix missing SetExecClose() call when the status-fd is used
+ * debian/apt.cron.daily:
+ - move unattended-upgrade before apt-get autoclean
+ * fix "purge" commandline argument, closes: #133421
+ (thanks to Julien Danjou for the patch)
+ * cmdline/apt-get.cc:
+ - do not change the auto-installed information if a package
+ is reinstalled
+ * cmdline/apt-mark:
+ - Fix chmoding after have renamed the extended-states file (LP: #140019)
+ (thanks to Laurent Bigonville)
+
+ [ Ian Jackson ]
+ * dpkg-triggers: Deal properly with new package states.
+
+ -- Michael Vogt <michael.vogt@ubuntu.com> Thu, 02 Aug 2007 11:55:54 +0200
apt (0.7.6) unstable; urgency=low
@@ -193,6 +375,14 @@ apt (0.7.5) unstable; urgency=low
-- Otavio Salvador <otavio@ossystems.com.br> Wed, 25 Jul 2007 20:16:46 -0300
+apt (0.7.4ubuntu1) gutsy; urgency=low
+
+ * debian/apt.conf.ubuntu, apt.conf.autoremove:
+ - Change metapackages to {restricted,universe,multiverse}/metapackages
+ in Install-Recommends-Sections and Never-MarkAuto-Sections
+
+ -- Michael Vogt <michael.vogt@ubuntu.com> Thu, 26 Jul 2007 10:42:29 +0200
+
apt (0.7.4) unstable; urgency=low
[ Michael Vogt ]
@@ -252,6 +442,90 @@ apt (0.7.3) unstable; urgency=low
which disappeared from the BZR repositories
-- Michael Vogt <mvo@debian.org> Sun, 01 Jul 2007 12:31:29 +0200
+
+apt (0.7.2ubuntu7) gutsy; urgency=low
+
+ * fix build-dependencies
+ * fixes in the auto-mark code (thanks to Daniel
+ Burrows)
+
+ -- Michael Vogt <michael.vogt@ubuntu.com> Mon, 9 Jul 2007 19:02:54 +0200
+
+apt (0.7.2ubuntu6) gutsy; urgency=low
+
+ [ Michael Vogt]
+ * cmdline/apt-get.cc:
+ - make the XS-Vcs-$foo warning more copy'n'paste
+ friendly (thanks to Matt Zimmerman)
+ - ignore the Vcs-Browser tag (Fixes LP: #121770)
+ * debian/apt.conf.autoremove:
+ - added "linux-ubuntu-modules" to APT::NeverAutoRemove
+
+ [ Sarah Hobbs ]
+ * Change metapackages to *metapackages in Install-Recommends-Section
+ and Never-MarkAuto-Section of debian/apt.conf.autoremove, so that
+ the Recommends of metapackages in universe and multiverse will get
+ installed.
+ * Also make this change in doc/examples/configure-index.
+ * Added a Build Dependancies of automake, docbook-xsl, xsltproc, xmlto,
+ docbook to fix FTBFS.
+ * Added in previous changelog entries, as those who uploaded did not
+ actually commit to Bzr.
+
+ -- Sarah Hobbs <hobbsee@ubuntu.com> Mon, 09 Jul 2007 01:15:57 +1000
+
+apt (0.7.2ubuntu5) gutsy; urgency=low
+
+ * Rerun autoconf to fix the FTBFS.
+
+ -- Michael Bienia <geser@ubuntu.com> Fri, 06 Jul 2007 19:17:33 +0200
+
+apt (0.7.2ubuntu4) gutsy; urgency=low
+
+ * Rebuild for the libcurl4 -> libcurl3 transition mess.
+
+ -- Steve Kowalik <stevenk@ubuntu.com> Fri, 6 Jul 2007 12:44:05 +1000
+
+apt (0.7.2ubuntu3) gutsy; urgency=low
+
+ * cmdline/apt-get.cc:
+ - fix InstallTask code when a pkgRecord ends
+ with a single '\n' (thanks to Soren Hansen for reporting)
+
+ -- Michael Vogt <michael.vogt@ubuntu.com> Wed, 27 Jun 2007 13:33:38 +0200
+
+apt (0.7.2ubuntu2) gutsy; urgency=low
+
+ * fixed compile errors with g++ 4.3 (thanks to
+ Daniel Burrows, closes: #429378)
+ * fix FTFBFS by changing build-depends to
+ libcurl4-gnutls-dev (closes: #428363)
+
+ -- Michael Vogt <michael.vogt@ubuntu.com> Tue, 19 Jun 2007 13:47:03 +0200
+
+apt (0.7.2ubuntu1) gutsy; urgency=low
+
+ * apt-pkg/deb/dpkgpm.cc:
+ - apport integration added, this means that a apport
+ report is written on dpkg failures
+ * cmdline/apt-get.cc:
+ - merged http://people.ubuntu.com/~mvo/bzr/apt/xs-vcs-bzr/
+ this will warn when Vcs- headers are found on apt-get source
+ (Fixes LP:#115959)
+ * merged from debian/unstable, remaining changes:
+ - maintainer field changed
+ - merged the apt--mirror branch
+ http://people.ubuntu.com/~mvo/bzr/apt/apt--mirror/
+ - apport reporting on package install/upgrade/remove failure
+ - support for "Originial-Maintainer" field
+ - merged apt--xs-vcs-bzr branch
+ (http://people.ubuntu.com/~mvo/bzr/apt/xs-vcs-bzr/)
+ - use ubuntu archive keyring by default
+ - debian/apt.conf.autoremove
+ + install recommands for section "metapackages"
+ + do not mark direct dependencies of "metapackages" as autoremoved
+
+ -- Michael Vogt <michael.vogt@ubuntu.com> Thu, 14 Jun 2007 10:38:36 +0200
apt (0.7.2-0.1) unstable; urgency=low
@@ -319,12 +593,16 @@ apt (0.7.1) experimental; urgency=low
* methods/cdrom.cc:
- only umount if it was mounted by the method before
* po/gl.po:
- - fix error translation that causes trouble to lsb_release
+ - fix error in translation that causes trouble to lsb_release
+ (LP#79165)
* apt-pkg/acquire-item.cc:
- if decompression of a index fails, delete the index
* apt-pkg/acquire.{cc,h}:
- deal better with duplicated sources.list entries (avoid
double queuing of URLs) - this fixes hangs in bzip/gzip
+ (LP#102511)
+ * Fix broken use of awk in apt-key that caused removal of the wrong keys
+ from the keyring. Closes: #412572
* merged from Christian Perrier:
* mr.po: New Marathi translation Closes: #416806
* zh_CN.po: Updated by Eric Pareja Closes: #416822
@@ -348,6 +626,93 @@ apt (0.7.1) experimental; urgency=low
-- Michael Vogt <mvo@debian.org> Wed, 2 May 2007 13:43:44 +0200
+apt (0.6.46.4ubuntu10) feisty; urgency=low
+
+ * apt-pkg/depcache.cc:
+ - added "APT::Never-MarkAuto-Section" and consider dependencies
+ of packages in this section manual (LP#59893)
+ - ensure proper permissions in the extended_state file (LP#67037)
+ * debian/apt.conf.ubuntu:
+ - added APT::Never-MarkAuto-Section "metapackages" (LP#59893)
+ * cmdline/apt-get.cc:
+ - "apt-get install foo" on a already installed package foo will
+ clean the automatic installed flag (LP#72007)
+ - do not show packages already marked for removal as auto-installed
+ (LP#64493)
+ - applied patch to (optionally) hide the auto-remove information
+ (thanks to Frode M. Døving) (LP#69148)
+
+ -- Michael Vogt <michael.vogt@ubuntu.com> Wed, 14 Mar 2007 13:32:32 +0100
+
+apt (0.6.46.4ubuntu9) feisty; urgency=low
+
+ * debian/control:
+ - set XS-Vcs-Bzr header
+ - Set Ubuntu maintainer address
+ * apt-pkg/cdrom.cc:
+ - only unmount if APT::CDROM::NoMount is false
+ - only umount if it was mounted by the method before
+ * cmdline/apt-get.cc:
+ - fix version output in autoremove list (LP#68941)
+ * apt-pkg/packagemanager.cc:
+ - do not spin 100% cpu in FixMissing() (LP#84476)
+ * apt-pkg/indexfile.cc:
+ - fix problem overwriting APT::Acquire::Translation
+ * doc/examples/configure-index:
+ - document APT::Acquire::Translation
+
+ -- Michael Vogt <michael.vogt@ubuntu.com> Tue, 13 Mar 2007 15:24:39 +0100
+
+apt (0.6.46.4ubuntu8) feisty; urgency=low
+
+ * fix segfault in the pkgRecords destructor
+ * Bump ABI version
+ * debian/control:
+ - make the libcurl3-gnutls-dev versionized (LP#86614)
+
+ -- Michael Vogt <michael.vogt@ubuntu.com> Mon, 26 Feb 2007 14:26:33 +0100
+
+apt (0.6.46.4ubuntu7) feisty; urgency=low
+
+ * Merged the apt--mirror branch. This means that a new 'mirror'
+ method is available that will allow dynamic mirror updates.
+ The sources.list entry looks something like this:
+ "deb mirror://mirrors.lp.net/get_mirror feisty main restricted"
+
+ It also supports error reporting to a configurable url for mirror
+ problems/failures.
+ * Bump ABI version
+
+ -- Michael Vogt <michael.vogt@ubuntu.com> Tue, 6 Feb 2007 11:38:06 +0100
+
+apt (0.6.46.4ubuntu6) feisty; urgency=low
+
+ * methods/http.cc:
+ - send apt version in User-Agent
+ * apt-pkg/deb/debrecords.cc:
+ - fix SHA1Hash() return value
+ * apt-pkg/algorithms.cc:
+ - fix resolver bug on removal triggered by weak-dependencies
+ with or-groups
+ - fix segfault (lp: #76530)
+
+ -- Michael Vogt <michael.vogt@ubuntu.com> Wed, 20 Dec 2006 11:04:36 +0100
+
+apt (0.6.46.4ubuntu5) feisty; urgency=low
+
+ * added apt-transport-https package to provide a optional
+ https transport (apt-https spec)
+
+ -- Michael Vogt <michael.vogt@ubuntu.com> Tue, 19 Dec 2006 16:23:43 +0100
+
+apt (0.6.46.4ubuntu4) feisty; urgency=low
+
+ * apt-pkg/algorithms.cc:
+ - only increase the score of installed applications if they
+ are not obsolete
+
+ -- Michael Vogt <michael.vogt@ubuntu.com> Mon, 18 Dec 2006 19:39:05 +0100
+
apt (0.7.0) experimental; urgency=low
* Package that contains tall the new features
@@ -365,6 +730,29 @@ apt (0.7.0) experimental; urgency=low
-- Michael Vogt <mvo@debian.org> Fri, 12 Jan 2007 20:48:07 +0100
+apt (0.6.46.4ubuntu3) feisty; urgency=low
+
+ * apt-pkg/algorithm.cc:
+ - use clog for all debugging
+ * apt-pkg/depcache.cc:
+ - never mark Required package for autoremoval (lp: #75882)
+
+ -- Michael Vogt <michael.vogt@ubuntu.com> Mon, 18 Dec 2006 11:56:05 +0100
+
+apt (0.6.46.4ubuntu2) feisty; urgency=low
+
+ * apt-pkg/algorithms.cc: add missing call to MarkKeep
+ so that dist-upgrade isn't broken by unsatisfiable Breaks.
+ (thanks to Ian Jackson)
+
+ -- Michael Vogt <michael.vogt@ubuntu.com> Thu, 7 Dec 2006 23:07:24 +0100
+
+apt (0.6.46.4ubuntu1) feisty; urgency=low
+
+ * merged with debian
+
+ -- Michael Vogt <michael.vogt@ubuntu.com> Thu, 7 Dec 2006 12:13:14 +0100
+
apt (0.6.46.4-0.1) unstable; urgency=emergency
* NMU
@@ -411,6 +799,26 @@ apt (0.6.46.3-0.1) unstable; urgency=high
-- Andreas Barth <aba@not.so.argh.org> Tue, 5 Dec 2006 10:34:56 +0000
+apt (0.6.46.3ubuntu2) feisty; urgency=low
+
+ * apt-pkg/algorithms.cc: add missing call to MarkKeep
+ so that dist-upgrade isn't broken by unsatisfiable Breaks.
+
+ -- Ian Jackson <iwj@ubuntu.com> Thu, 7 Dec 2006 15:46:52 +0000
+
+apt (0.6.46.3ubuntu1) feisty; urgency=low
+
+ * doc/apt-get.8.xml:
+ - documented autoremove, thanks to Vladimír Lapá%Gč%@ek
+ (lp: #62919)
+ * fix broken i18n in the dpkg progress reporting, thanks to
+ Frans Pop and Steinar Gunderson. (closes: #389261)
+ * po/en_GB.po:
+ - typo (lp: #61270)
+ * add apt-secure.8 to "See also" section
+
+ -- Michael Vogt <michael.vogt@ubuntu.com> Thu, 23 Nov 2006 07:24:12 +0100
+
apt (0.6.46.3) unstable; urgency=low
* apt-pkg/deb/dpkgpm.cc:
@@ -485,10 +893,46 @@ apt (0.6.46) unstable; urgency=low
* debian/control:
- switched to libdb4.4 for building (closes: #381019)
* cmdline/apt-get.cc:
- - show only the recommends/suggests for the candidate-version, not for all
- versions of the package (closes: #257054)
- - properly handle recommends/suggests or-groups when printing the list of
- suggested/recommends packages (closes: #311619)
+ - fix in the TryInstallTask() code to make sure that all package
+ there are marked manual install (lp: #61684)
+
+ -- Michael Vogt <michael.vogt@ubuntu.com> Thu, 28 Sep 2006 00:34:20 +0200
+
+apt (0.6.45ubuntu14) edgy; urgency=low
+
+ * cmdline/apt-get.cc:
+ - fix in the TryInstallTask() code to make sure that all package
+ there are marked manual install (lp: #61684)
+
+ -- Michael Vogt <michael.vogt@ubuntu.com> Thu, 28 Sep 2006 00:34:20 +0200
+
+apt (0.6.45ubuntu13) edgy; urgency=low
+
+ * no-changes upload to make apt rebuild against latest g++ and
+ fix synaptic FTBFS (see bug: #62461 for details)
+
+ -- Michael Vogt <michael.vogt@ubuntu.com> Tue, 26 Sep 2006 22:33:10 +0200
+
+apt (0.6.45ubuntu12) edgy; urgency=low
+
+ * apt-pkg/depcache.cc:
+ - fix in the sweep() code, set garbage flag for packages scheduled
+ for removal too
+ - do not change the autoFlag in MarkKeep(), this can lead to suprising
+ side effects
+
+ -- Michael Vogt <michael.vogt@ubuntu.com> Thu, 21 Sep 2006 00:58:24 +0200
+
+apt (0.6.45ubuntu11) edgy; urgency=low
+
+ * removed "installtask" and change it so that tasknames can be given
+ with "apt-get install taskname^"
+ * improve the writeStateFile() code
+
+ -- Michael Vogt <michael.vogt@ubuntu.com> Wed, 20 Sep 2006 14:14:24 +0200
+
+apt (0.6.45ubuntu10) edgy; urgency=low
+
* methods/http.cc:
- check more careful for incorrect proxy settings (closes: #378868)
* methods/gzip.cc:
@@ -513,8 +957,113 @@ apt (0.6.46) unstable; urgency=low
caseinsensitive (closes: #384182)
- reverted MMap use in the tagfile because it does not work
across pipes (closes: #383487)
+ * added "installtask" command
+ * added new ubuntu specific rewrite rule for "Original-Maintainer"
- -- Michael Vogt <mvo@debian.org> Thu, 21 Sep 2006 10:25:03 +0200
+ -- Michael Vogt <michael.vogt@ubuntu.com> Tue, 19 Sep 2006 15:07:51 +0200
+
+apt (0.6.45ubuntu9) edgy; urgency=low
+
+ * cmdline/apt-get.cc:
+ - if --no-remove is given, do not run the AutoRemove code
+
+ -- Michael Vogt <michael.vogt@ubuntu.com> Wed, 13 Sep 2006 11:54:20 +0200
+
+apt (0.6.45ubuntu8) edgy; urgency=low
+
+ * apt-pkg/algorithm.cc:
+ - fix pkgProblemResolver.InstallProtect() to preserve the auto-install
+ information (lp: #59457)
+ * cmdline/apt-get.cc:
+ - fix typo in autoremove information (lp: #59420)
+ * install apt-mark to modify the automatically install information for
+ packages
+
+ -- Michael Vogt <michael.vogt@ubuntu.com> Fri, 8 Sep 2006 20:07:22 +0200
+
+apt (0.6.45ubuntu7) edgy; urgency=low
+
+ * apt-pkg/depcache.cc:
+ - fix a bug in the install-recommends-section code
+
+ -- Michael Vogt <michael.vogt@ubuntu.com> Thu, 7 Sep 2006 18:22:38 +0200
+
+apt (0.6.45ubuntu6) edgy; urgency=low
+
+ [Michael Vogt]
+ * cmdline/apt-get.cc:
+ - always show auto-removable packages and give a hint how to remove
+ them
+ * debian/apt.conf.ubuntu:
+ - exlucde linux-image and linux-restricted-modules from ever being
+ auto-removed
+ - added "metapackages" as the section we want to install recommends
+ by default
+ * apt-pkg/depcache.cc:
+ - added support to turn install-recommends selectively on/off by
+ section
+ [Ian Jackson]
+ * Tests pass without code changes! Except that we need this:
+ * Bump cache file major version to force rebuild so that Breaks
+ dependencies are included.
+ * Don't depend on or suggest any particular dpkg or dpkg-dev versions;
+ --auto-deconfigure is very very old and dpkg-dev's Breaks support
+ is more or less orthogonal.
+ * Initial draft of `Breaks' implementation. Appears to compile,
+ but as yet *completely untested*.
+
+ -- Michael Vogt <michael.vogt@ubuntu.com> Thu, 7 Sep 2006 11:50:52 +0200
+
+apt (0.6.45ubuntu5) edgy; urgency=low
+
+ * apt-pkg/pkgcachegen.cc:
+ - increase the APT::Cache-Limit to deal with the increased demand due
+ to the translated descriptions
+ * apt-pkg/deb/dpkgpm.cc:
+ - pass "--auto-deconfigure" to dpkg on install to support the
+ new "breaks" in dpkg
+
+ -- Michael Vogt <michael.vogt@ubuntu.com> Tue, 15 Aug 2006 12:06:26 +0200
+
+apt (0.6.45ubuntu4) edgy; urgency=low
+
+ * cmdline/apt-get.cc:
+ - fix in the new --fix-polciy code
+
+ -- Michael Vogt <michael.vogt@ubuntu.com> Mon, 14 Aug 2006 21:08:11 +0200
+
+apt (0.6.45ubuntu3) edgy; urgency=low
+
+ * ABI break
+ * merged latest apt--install-recommends (closes: #559000)
+ * added "--fix-policy" option to can be used as "--fix-broken" and
+ will install missing weak depends (recommends, and/or suggests
+ depending on the settings)
+ * merged the apt--ddtp branch
+
+ -- Michael Vogt <michael.vogt@ubuntu.com> Fri, 11 Aug 2006 12:53:23 +0200
+
+apt (0.6.45ubuntu2) edgy; urgency=low
+
+ * debian/control:
+ - switched to libdb4.4 for building (closes: #381019)
+ * cmdline/apt-get.cc:
+ - show only the recommends/suggests for the candidate-version, not for all
+ versions of the package (closes: #257054)
+ - properly handle recommends/suggests or-groups when printing the list of
+ suggested/recommends packages (closes: #311619)
+ * merged "apt--install-recommends" branch:
+ - added "{no-}install-recommends" commandline option
+ - added APT::Install-{Recommends,Suggests} option
+ - currently Install-Recommends defaults to "False"
+
+ -- Michael Vogt <michael.vogt@ubuntu.com> Wed, 9 Aug 2006 23:38:46 +0200
+
+apt (0.6.45ubuntu1) edgy; urgency=low
+
+ * merged with debian/unstable
+
+ -- Michael Vogt <michael.vogt@ubuntu.com> Tue, 1 Aug 2006 15:43:22 +0200
apt (0.6.45) unstable; urgency=low
@@ -552,42 +1101,57 @@ apt (0.6.45) unstable; urgency=low
* dz.po: New Dzongkha translation: 512t
* ro.po: Updated to 512t
* eu.po: Updated
- * eu.po: Updated
- * fix apt-get dist-upgrade
- * fix warning if no /var/lib/apt/extended_states is present
- * don't download Translations for deb-src sources.list lines
- * apt-pkg/tagfile.cc:
- - support not-mmapable files again
-- Michael Vogt <mvo@debian.org> Thu, 27 Jul 2006 00:52:05 +0200
-apt (0.6.44.2exp1) experimental; urgency=low
+apt (0.6.44.2ubuntu4) edgy; urgency=low
- * added support for i18n of the package descriptions
- * added support for aptitude like auto-install tracking (a HUGE
- HUGE thanks to Daniel Burrows who made this possible)
- * synced with the http://people.debian.org/~mvo/bzr/apt/debian-sid branch
- * build from http://people.debian.org/~mvo/bzr/apt/debian-experimental
+ * Make apt-get dselect-upgrade happy again
- -- Michael Vogt <mvo@debian.org> Mon, 3 Jul 2006 21:50:31 +0200
+ -- Michael Vogt <michael.vogt@ubuntu.com> Fri, 21 Jul 2006 11:03:02 +0200
-apt (0.6.44.2) unstable; urgency=low
+apt (0.6.44.2ubuntu3) edgy; urgency=low
- * apt-pkg/depcache.cc:
- - added Debug::pkgDepCache::AutoInstall (thanks to infinity)
- * apt-pkg/acquire-item.cc:
- - fix missing chmod() in the new aquire code
- (thanks to Bastian Blank, Closes: #367425)
- * merged from
- http://www.perrier.eu.org/debian/packages/d-i/level4/apt-main:
- * sk.po: Completed to 512t
- * eu.po: Completed to 512t
- * fr.po: Completed to 512t
- * sv.po: Completed to 512t
- * Update all PO and the POT. Gives 506t6f for formerly
- complete translations
+ * Close extended_states file after writing it.
+
+ -- Colin Watson <cjwatson@ubuntu.com> Tue, 18 Jul 2006 00:12:13 +0100
+
+apt (0.6.44.2ubuntu2) edgy; urgency=low
+
+ * create a empty extended_states file if none exists already
+
+ -- Michael Vogt <michael.vogt@ubuntu.com> Tue, 4 Jul 2006 09:23:03 +0200
+
+apt (0.6.44.2ubuntu1) edgy; urgency=low
- -- Michael Vogt <mvo@debian.org> Wed, 14 Jun 2006 12:00:57 +0200
+ * merged with debian/unstable
+ * merged the "auto-mark" branch to support aptitude like
+ marking of automatically installed dependencies and added
+ "apt-get remove --auto-remove" to remove unused auto-installed
+ packages again
+ * changed library version from 3.11 to 3.50 to make it clearly
+ different from the debian version (we are ABI incompatible because
+ of the auto-mark patch)
+
+ -- Michael Vogt <michael.vogt@ubuntu.com> Mon, 3 Jul 2006 18:30:46 +0200
+
+apt (0.6.44.2) unstable; urgency=low
+
+ * apt-pkg/depcache.cc:
+ - added Debug::pkgDepCache::AutoInstall (thanks to infinity)
+ * apt-pkg/acquire-item.cc:
+ - fix missing chmod() in the new aquire code
+ (thanks to Bastian Blank, Closes: #367425)
+ * merged from
+ http://www.perrier.eu.org/debian/packages/d-i/level4/apt-main:
+ * sk.po: Completed to 512t
+ * eu.po: Completed to 512t
+ * fr.po: Completed to 512t
+ * sv.po: Completed to 512t
+ * Update all PO and the POT. Gives 506t6f for formerly
+ complete translations
+
+ -- Michael Vogt <mvo@debian.org> Wed, 14 Jun 2006 12:00:57 +0200
apt (0.6.44.1-0.1) unstable; urgency=low
@@ -649,6 +1213,26 @@ apt (0.6.44) unstable; urgency=low
-- Michael Vogt <mvo@debian.org> Mon, 8 May 2006 22:28:53 +0200
+apt (0.6.43.3ubuntu3) dapper; urgency=low
+
+ * methods/http.cc:
+ - fix the user-agent string
+
+ -- Michael Vogt <michael.vogt@ubuntu.com> Fri, 26 May 2006 18:09:32 +0200
+
+apt (0.6.43.3ubuntu2) dapper; urgency=low
+
+ * apt-pkg/deb/dpkgpm.cc: wording fixes (thanks to Matt Zimmerman)
+
+ -- Michael Vogt <michael.vogt@ubuntu.com> Tue, 18 Apr 2006 13:24:40 +0200
+
+apt (0.6.43.3ubuntu1) dapper; urgency=low
+
+ * apt-pkg/acquire.cc: don't show ETA if it is 0 or absurdely large in
+ the status-fd (ubuntu #28954)
+
+ -- Michael Vogt <michael.vogt@ubuntu.com> Tue, 28 Mar 2006 20:34:46 +0200
+
apt (0.6.43.3) unstable; urgency=low
* Merge bubulle@debian.org--2005/apt--main--0 up to patch-186:
@@ -658,16 +1242,46 @@ apt (0.6.43.3) unstable; urgency=low
* pl.po: Completed to 512t. Closes: #349514
* sk.po: Completed to 512t. Closes: #349474
* gl.po: Completed to 512 strings Closes: #349407
+ * vi.po: Completed to 512 strings
* sv.po: Completed to 512 strings Closes: #349210
* ru.po: Completed to 512 strings Closes: #349154
* da.po: Completed to 512 strings Closes: #349084
* fr.po: Completed to 512 strings
+ * LINGUAS: Add Welsh
+ * *.po: Updated from sources (512 strings)
* vi.po: Completed to 511 strings Closes: #348968
- * zh_CN.po: Completed to 512t. Closes: #353936
- * it.po: Completed to 512t. Closes: #352803
- * pt_BR.po: Completed to 512t. Closes: #352419
+ * apt-pkg/deb/deblistparser.cc:
+ - don't explode on a DepCompareOp in a Provides line, but warn about
+ it and ignore it otherwise (thanks to James Troup for reporting it)
+ * cmdline/apt-get.cc:
+ - don't lock the lists directory in DoInstall, breaks --print-uri
+ (thanks to James Troup for reporting it)
+ * debian/apt.dirs: create /etc/apt/sources.list.d
+ * make apt-cache madison work without deb-src entries (#352583)
+ * cmdline/apt-get.cc: only run the list-cleaner if a update was
+ successfull
+ * apt-get update errors are only warnings nowdays
+ * be more careful with the signature file on network failures
+
+ -- Michael Vogt <mvo@debian.org> Wed, 22 Feb 2006 10:13:04 +0100
+
+apt (0.6.43.2ubuntu1) dapper; urgency=low
+
+ * Merge bubulle@debian.org--2005/apt--main--0 up to patch-182:
+ * ca.po: Completed to 512t. Closes: #351592
+ * eu.po: Completed to 512t. Closes: #350483
+ * ja.po: Completed to 512t. Closes: #349806
+ * pl.po: Completed to 512t. Closes: #349514
+ * sk.po: Completed to 512t. Closes: #349474
+ * gl.po: Completed to 512 strings Closes: #349407
+ * vi.po: Completed to 512 strings
+ * sv.po: Completed to 512 strings Closes: #349210
+ * ru.po: Completed to 512 strings Closes: #349154
+ * da.po: Completed to 512 strings Closes: #349084
+ * fr.po: Completed to 512 strings
* LINGUAS: Add Welsh
* *.po: Updated from sources (512 strings)
+ * vi.po: Completed to 511 strings Closes: #348968
* apt-pkg/deb/deblistparser.cc:
- don't explode on a DepCompareOp in a Provides line, but warn about
it and ignore it otherwise (thanks to James Troup for reporting it)
@@ -678,8 +1292,10 @@ apt (0.6.43.3) unstable; urgency=low
* make apt-cache madison work without deb-src entries (#352583)
* cmdline/apt-get.cc: only run the list-cleaner if a update was
successfull
+ * apt-get update errors are only warnings nowdays
+ * be more careful with the signature file on network failures
- -- Michael Vogt <mvo@debian.org> Wed, 22 Feb 2006 10:13:04 +0100
+ -- Michael Vogt <michael.vogt@ubuntu.com> Mon, 20 Feb 2006 22:27:48 +0100
apt (0.6.43.2) unstable; urgency=low
@@ -704,8 +1320,26 @@ apt (0.6.43.2) unstable; urgency=low
-- Michael Vogt <mvo@debian.org> Thu, 19 Jan 2006 00:06:33 +0100
-apt (0.6.43.1) unstable; urgency=low
+apt (0.6.43.1ubuntu1) dapper; urgency=low
+
+ * Merge bubulle@debian.org--2005/apt--main--0 up to patch-159:
+ - en_GB.po, de.po: fix spaces errors in "Ign " translations
+ Closes: #347258
+ - makefile: make update-po a pre-requisite of clean target so
+ that POT and PO files are always up-to-date
+ - sv.po: Completed to 511t. Closes: #346450
+ - sk.po: Completed to 511t. Closes: #346369
+ - fr.po: Completed to 511t
+ - *.po: Updated from sources (511 strings)
+ * add patch to fix http download corruption problem (thanks to
+ Petr Vandrovec, closes: #280844, #290694)
+ * added APT::Periodic::Unattended-Upgrade (requires the package
+ "unattended-upgrade")
+ -- Michael Vogt <michael.vogt@ubuntu.com> Tue, 10 Jan 2006 17:09:31 +0100
+
+apt (0.6.43.1) unstable; urgency=low
+
* Merge bubulle@debian.org--2005/apt--main--0 up to patch-148:
* fr.po: Completed to 510 strings
* it.po: Completed to 510t
@@ -727,6 +1361,19 @@ apt (0.6.43.1) unstable; urgency=low
-- Michael Vogt <mvo@debian.org> Fri, 6 Jan 2006 01:17:08 +0100
+apt (0.6.43ubuntu2) dapper; urgency=low
+
+ * merged some missing bits that wheren't merged by baz in the previous
+ upload (*grumble*)
+
+ -- Michael Vogt <michael.vogt@ubuntu.com> Thu, 8 Dec 2005 18:35:58 +0100
+
+apt (0.6.43ubuntu1) dapper; urgency=low
+
+ * merged with debian
+
+ -- Michael Vogt <michael.vogt@ubuntu.com> Fri, 25 Nov 2005 11:36:29 +0100
+
apt (0.6.43) unstable; urgency=medium
* Merge bubulle@debian.org--2005/apt--main--0 up to patch-132:
@@ -747,6 +1394,22 @@ apt (0.6.43) unstable; urgency=medium
-- Michael Vogt <mvo@debian.org> Tue, 29 Nov 2005 00:17:07 +0100
+apt (0.6.42.3ubuntu2) dapper; urgency=low
+
+ * Merge bubulle@debian.org--2005/apt--main--0 up to patch-131:
+ * zh_CN.po: Completed to 507 strings(Closes: #338267)
+ * gl.po: Completed to 510 strings (Closes: #338356)
+ * added support for "/etc/apt/sources.list.d" directory
+ (closes: #66325)
+
+ -- Michael Vogt <michael.vogt@ubuntu.com> Mon, 14 Nov 2005 15:30:12 +0100
+
+apt (0.6.42.3ubuntu1) dapper; urgency=low
+
+ * synced with debian
+
+ -- Michael Vogt <michael.vogt@ubuntu.com> Thu, 10 Nov 2005 05:05:56 +0100
+
apt (0.6.42.3) unstable; urgency=low
* Merge bubulle@debian.org--2005/apt--main--0 up to patch-129:
@@ -794,13 +1457,13 @@ apt (0.6.42) unstable; urgency=low
- unmount the cdrom when apt failed to locate any package files
* allow cdrom failures and fallback to other sources in that case
(closes: #44135)
- * better error text when dpkg-source fails
+ * better error text when dpkg-source fails
* Merge bubulle@debian.org--2005/apt--main--0 up to patch-115:
- patch-99: Added Galician translation
- patch-100: Completed Danish translation (Closes: #325686)
- patch-104: French translation completed
- patch-109: Italian translation completed
- - patch-112: Swedish translation update
+ - patch-112: Swedish translation update
- patch-115: Basque translation completed (Closes: #333299)
* applied french man-page update (thanks to Philippe Batailler)
(closes: #316638, #327456)
@@ -814,9 +1477,9 @@ apt (0.6.42) unstable; urgency=low
* apt-pkg/contrib/md5.cc:
- fix a alignment problem on sparc64 that gives random bus errors
(thanks to Fabbione for providing a test-case)
- * init the default ScreenWidth to 79 columns by default
+ * init the default ScreenWidth to 79 columns by default
(Closes: #324921)
- * cmdline/apt-cdrom.cc:
+ * cmdline/apt-cdrom.cc:
- fix some missing gettext() calls (closes: #334539)
* doc/apt-cache.8.xml: fix typo (closes: #334714)
@@ -827,8 +1490,8 @@ apt (0.6.41) unstable; urgency=low
* improved the support for "error" and "conffile" reporting from
dpkg, added the format to README.progress-reporting
* added README.progress-reporting to the apt-doc package
- * improved the network timeout handling, if a index file from a
- sources.list times out or EAI_AGAIN is returned from getaddrinfo,
+ * improved the network timeout handling, if a index file from a
+ sources.list times out or EAI_AGAIN is returned from getaddrinfo,
don't try to get the other files from that entry
* Support architecture-specific extra overrides
(closes: #225947). Thanks to Anthony Towns for idea and
@@ -836,10 +1499,10 @@ apt (0.6.41) unstable; urgency=low
* Javier Fernandez-Sanguino Pen~a:
- Added a first version of an apt-secure.8 manpage, and modified
apt-key and apt.end accordingly. Also added the 'update'
- argument to apt-key which was previously not documented
+ argument to apt-key which was previously not documented
(Closes: #322120)
* Andreas Pakulat:
- - added example apt-ftparchive.conf file to doc/examples
+ - added example apt-ftparchive.conf file to doc/examples
(closes: #322483)
* Fix a incorrect example in the man-page (closes: #282918)
* Fix a bug for very long lines in the apt-cdrom code (closes: #280356)
@@ -848,10 +1511,84 @@ apt (0.6.41) unstable; urgency=low
* Change pkgPolicy::Pin from private to protected to let subclasses
access it too (closes: #321799)
* add default constructor for PrvIterator (closes: #322267)
- * Reread status configuration on debSystem::Initialize()
+ * Reread status configuration on debSystem::Initialize()
(needed for apt-proxy, thanks to Otavio for this patch)
-
+
-- Michael Vogt <mvo@debian.org> Mon, 5 Sep 2005 22:59:03 +0200
+
+apt (0.6.40.1ubuntu8) breezy; urgency=low
+
+ * Cherry picked michael.vogt@ubuntu.com--2005/apt--mvo--0--patch-62:
+ - fix for a bad memory/file leak in the mmap code (ubuntu #15603)
+ * po/de.po, po/fr.po:
+ - updated the translations
+ * po/makefile:
+ - create a single pot file in each domain dir to make rosetta happy
+
+ -- Michael Vogt <michael.vogt@ubuntu.com> Wed, 28 Sep 2005 10:16:06 +0200
+
+apt (0.6.40.1ubuntu7) breezy; urgency=low
+
+ * updated the pot/po files , no code changes
+
+ -- Michael Vogt <michael.vogt@ubuntu.com> Tue, 27 Sep 2005 18:38:16 +0200
+
+apt (0.6.40.1ubuntu6) breezy; urgency=low
+
+ * Cherry picked michael.vogt@ubuntu.com--2005/apt--mvo--0--patch-56:
+ - make it possible for apt to handle a failed MediaChange event and
+ fall back to other sources (ubuntu #13713)
+
+ -- Michael Vogt <michael.vogt@ubuntu.com> Tue, 13 Sep 2005 22:09:50 +0200
+
+apt (0.6.40.1ubuntu5) breezy; urgency=low
+
+ * Cherry picked michael.vogt@ubuntu.com--2005/apt--mvo--0--patch-{50,51}.
+ This adds media-change reporting to the apt status-fd (ubuntu #15213)
+ * Cherry picked michael.vogt@ubuntu.com--2005/apt--mvo--0--patch-55:
+ apt-pkg/cdrom.cc:
+ - unmount the cdrom when apt failed to locate any package files
+
+ -- Michael Vogt <michael.vogt@ubuntu.com> Mon, 12 Sep 2005 15:44:26 +0200
+
+apt (0.6.40.1ubuntu4) breezy; urgency=low
+
+ * debian/apt.cron.daily:
+ - fix a embarrassing typo
+
+ -- Michael Vogt <michael.vogt@ubuntu.com> Wed, 7 Sep 2005 10:10:37 +0200
+
+apt (0.6.40.1ubuntu3) breezy; urgency=low
+
+ * debian/apt.cron.daily:
+ - use the ctime as well when figuring what packages need to
+ be removed. This fixes the problem that packages copied with
+ "cp -a" (e.g. from the installer) have old mtimes (ubuntu #14504)
+
+ -- Michael Vogt <michael.vogt@ubuntu.com> Tue, 6 Sep 2005 18:30:46 +0200
+
+apt (0.6.40.1ubuntu2) breezy; urgency=low
+
+ * improved the support for "error" and "conffile" reporting from
+ dpkg, added the format to README.progress-reporting
+ * added README.progress-reporting to the apt-doc package
+ * Do md5sum checking for file and cdrom method (closes: #319142)
+ * Change pkgPolicy::Pin from private to protected to let subclasses
+ access it too (closes: #321799)
+ * methods/connect.cc:
+ - send failure reason for EAI_AGAIN (TmpResolveFailure) to acuire-item
+ * apt-pkg/acquire-item.cc:
+ - fail early if a FailReason is TmpResolveFailure (avoids hangs during
+ the install when no network is available)
+ * merged michael.vogt@ubuntu.com--2005/apt--trust-cdrom--0
+
+ -- Michael Vogt <michael.vogt@ubuntu.com> Tue, 23 Aug 2005 19:44:55 +0200
+
+apt (0.6.40.1ubuntu1) breezy; urgency=low
+
+ * Synchronize with Debian
+
+ -- Michael Vogt <michael.vogt@ubuntu.com> Fri, 5 Aug 2005 14:20:56 +0200
apt (0.6.40.1) unstable; urgency=low
@@ -862,6 +1599,12 @@ apt (0.6.40.1) unstable; urgency=low
-- Michael Vogt <mvo@debian.org> Fri, 5 Aug 2005 13:24:58 +0200
+apt (0.6.40ubuntu1) breezy; urgency=low
+
+ * Synchronize with Debian
+
+ -- Matt Zimmerman <mdz@ubuntu.com> Thu, 4 Aug 2005 15:53:22 -0700
+
apt (0.6.40) unstable; urgency=low
* Patch from Jordi Mallach to mark some additional strings for translation
@@ -877,6 +1620,39 @@ apt (0.6.40) unstable; urgency=low
-- Matt Zimmerman <mdz@debian.org> Thu, 28 Jul 2005 11:57:32 -0700
+apt (0.6.39ubuntu4) breezy; urgency=low
+
+ * Fix keyring paths in apt-key, apt.postinst (I swear I remember doing this
+ before...)
+
+ -- Matt Zimmerman <mdz@ubuntu.com> Wed, 29 Jun 2005 08:39:17 -0700
+
+apt (0.6.39ubuntu3) breezy; urgency=low
+
+ * Fix keyring locations for Ubuntu in apt-key too.
+
+ -- Colin Watson <cjwatson@ubuntu.com> Wed, 29 Jun 2005 14:45:36 +0100
+
+apt (0.6.39ubuntu2) breezy; urgency=low
+
+ * Install ubuntu-archive.gpg rather than debian-archive.gpg as
+ /etc/apt/trusted.gpg.
+
+ -- Colin Watson <cjwatson@ubuntu.com> Wed, 29 Jun 2005 11:53:34 +0100
+
+apt (0.6.39ubuntu1) breezy; urgency=low
+
+ * Michael Vogt
+ - Change debian/bugscript to use #!/bin/bash (Closes: #313402)
+ - Fix a incorrect example in the man-page (closes: #282918)
+ - Support architecture-specific extra overrides
+ (closes: #225947). Thanks to Anthony Towns for idea and
+ the patch, thanks to Colin Watson for testing it.
+ - better report network timeouts from the methods to the acuire code,
+ only timeout once per sources.list line
+
+ -- Matt Zimmerman <mdz@ubuntu.com> Tue, 28 Jun 2005 11:52:24 -0700
+
apt (0.6.39) unstable; urgency=low
* Welsh translation update: daf@muse.19inch.net--2005/apt--main--0--patch-6
@@ -887,7 +1663,14 @@ apt (0.6.39) unstable; urgency=low
* Update priority of apt-utils to important, to match the override file
* Install only one keyring on each branch (Closes: #316119)
- -- Matt Zimmerman <mdz@debian.org> Tue, 28 Jun 2005 11:51:09 -0700
+ -- Matt Zimmerman <mdz@debian.org> Tue, 28 Jun 2005 11:35:21 -0700
+
+apt (0.6.38ubuntu1) breezy; urgency=low
+
+ * First release from Ubuntu branch
+ * Merge with --main--0, switch back to Ubuntu keyring
+
+ -- Matt Zimmerman <mdz@ubuntu.com> Sat, 25 Jun 2005 16:52:41 -0700
apt (0.6.38) unstable; urgency=low
diff --git a/debian/control b/debian/control
index 742e8ca5c..6c1453857 100644
--- a/debian/control
+++ b/debian/control
@@ -1,20 +1,22 @@
Source: apt
Section: admin
Priority: important
-Maintainer: APT Development Team <deity@lists.debian.org>
+Maintainer: Ubuntu Core Developers <ubuntu-devel-discuss@lists.ubuntu.com>
+XSBC-Original-Maintainer: APT Development Team <deity@lists.debian.org>
Uploaders: Jason Gunthorpe <jgg@debian.org>, Adam Heath <doogie@debian.org>, Matt Zimmerman <mdz@debian.org>, Michael Vogt <mvo@debian.org>, Otavio Salvador <otavio@debian.org>
Standards-Version: 3.7.2.2
Build-Depends: debhelper (>= 5.0), libdb4.4-dev, gettext (>= 0.12), libcurl4-gnutls-dev | libcurl3-gnutls-dev (>= 7.15.5)
Build-Depends-Indep: debiandoc-sgml, docbook-utils (>= 0.6.12-1)
-XS-Vcs-Bzr: http://bzr.debian.org/apt/debian-sid/
+XS-Vcs-Bzr: http://code.launchpad.net/~ubuntu-core-dev/apt/ubuntu
Package: apt
Architecture: any
-Depends: ${shlibs:Depends}, debian-archive-keyring
+Depends: ${shlibs:Depends}
Priority: important
Replaces: libapt-pkg-doc (<< 0.3.7), libapt-pkg-dev (<< 0.3.7)
Provides: ${libapt-pkg:provides}
-Suggests: aptitude | synaptic | gnome-apt | wajig, dpkg-dev, apt-doc, bzip2, lzma
+Recommends: ubuntu-keyring
+Suggests: aptitude | synaptic | gnome-apt | wajig, dpkg-dev, apt-doc, bzip2, lzma, gnupg
Section: admin
Description: Advanced front-end for dpkg
This is Debian's next generation front-end for the dpkg package manager.
diff --git a/debian/copyright b/debian/copyright
new file mode 100644
index 000000000..9e277e57d
--- /dev/null
+++ b/debian/copyright
@@ -0,0 +1,142 @@
+Apt is copyright 1997, 1998, 1999 Jason Gunthorpe and others.
+
+Apt is licened under the terms of the GNU General Public License (GPL),
+version 2.0 or later, as published by the Free Software Foundation. See
+the file COPYING.GPL [included], /usr/share/common-licenses/GPL, or
+<http://www.gnu.org/copyleft/gpl.txt> for the terms of the latest version
+of the GNU General Public License.
+
+In addition, prior to November 15th, 2000, apt may be distributed under
+terms identical to the above with the following addition:
+
+Works using apt may link against the GUI library "libqt", copyright by
+Troll Tech AS, Norway, provided that:
+
+1. The version of "libqt" is licensed under the terms of the "Qt Free Edition
+ License" published by Troll Tech AS. The license terms identified as
+ the Qt Free Edition License below are the only such terms under which
+ distribution of works derived from both apt and "libqt" are permitted;
+
+and
+
+2. The source code of the version of "libqt" used is
+
+ a) Distributed with the binary version;
+
+ or
+
+ b) Downloadable by anyone, without fee, using a publicly-announced
+ URL on the Internet, for a duration of at least three years
+ starting with distribution of the binary version.
+
+On and after November 15th, 2000, the above additional terms lose all
+force, and apt will be licensed only under the terms of the GNU General
+Public License, version 2.0 or later.
+
+ _______________________________________________________________
+
+The following text, up to the text of the Qt Free Edition License, is
+informational and not part of the license terms on apt.
+
+Modifications to apt in either source or compiled form must be licensed
+under the terms of the GNU General Public License, version 2.0 (or later),
+but need not include the above clause permitting usage of the "libqt"
+library under the Qt Free Edition License. Note that removal of this
+clause will result in software which is not licensed for binary
+redistribution linked against software governed by the Qt Free Edition
+License. In the event that a version of "libqt" is released that is
+licensed under terms that do not conflict with the GPL, the additional
+clause above is not required to grant permission for distribution of works
+that are derived from both apt and "libqt".
+
+No part of apt is licensed under the Qt Free Edition License. The terms
+below are provided to help identify the circumstances under which the
+"libqt" library may be used with apt (or a work derived from both). The
+terms below are copied from the LICENSE file of the qt-1.44 distribution,
+as of November 10th, 1999.
+
+ _______________________________________________________________
+
+ QT FREE EDITION LICENSE
+
+Copyright (C) 1992-1999 Troll Tech AS. All rights reserved.
+
+This is the license for Qt Free Edition version 1.44; it covers private use,
+use of third-party application programs based on Qt, and development of
+free software for the free software community.
+
+
+ COPYRIGHT AND RESTRICTIONS
+
+The Qt toolkit is a product of Troll Tech AS. The Qt Free Edition is limited
+to use with the X Window System.
+
+You may copy this version of the Qt Free Edition provided that the entire
+archive is distributed unchanged and as a whole, including this notice.
+
+You may use this version of the Qt Free Edition to compile, link and run
+application programs legally developed by third parties.
+
+You may use the Qt Free Edition to create application programs
+provided that:
+
+ You accept this license.
+ Your software does not require modifications to Qt Free Edition.
+ You satisfy ONE of the following three requirements
+ EITHER
+ Users of your software can freely obtain source code for the
+ software, freely modify the source code (possibly with
+ restrictions on copyright notices, attributions and legal
+ responsibility), and freely redistribute original or modified
+ versions of the software.
+ OR
+ Your software is distributed under the GNU GENERAL
+ PUBLIC LICENSE, version 2 or later, as defined by the
+ Free Software Foundation.
+ OR
+ Your software is distributed under the GNU LIBRARY
+ GENERAL PUBLIC LICENSE, version 2 or later, as
+ defined by the Free Software Foundation.
+
+If you are paid to develop something with Qt Free Edition or it is a part of
+your job the following conditions also apply:
+
+ Your software must not require libraries, programs, data or
+ documentation that are not available outside your organization in
+ order to compile or use.
+ If and when your organization starts using the software, you must
+ notify Troll Tech AS of the following:
+ Your organization's name and purpose.
+ The software's name and purpose.
+ The software's license.
+ That your organization considers the software to be free
+ software.
+
+You may also use the Qt Free Edition to create reusable components
+(such as libraries) provided that you accept the terms above, and in
+addition that:
+
+ Your components' license includes the following text:
+
+ [Your package] requires the Qt library, which is
+ copyright Troll Tech AS. Freely distributable
+ programs may generally use Qt Free Edition free of
+ charge, see [README.QT] for details.
+
+ README.QT is distributed along with your components.
+ Qt Free Edition is not distributed as an integral part of your
+ components.
+
+ LIMITATIONS OF LIABILITY
+
+Troll Tech AS makes no obligation under this license to support or
+upgrade Qt Free Edition, or assist in the use of Qt Free Edition.
+
+In no event shall Troll Tech AS be liable for any lost revenue or profits or
+other direct, indirect, special, incidental or consequential damages, even
+if Troll Tech has been advised of the possibility of such damages.
+
+QT FREE EDITION IS PROVIDED AS IS WITH NO WARRANTY OF ANY KIND,
+INCLUDING THE WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A
+PARTICULAR PURPOSE.
+ _______________________________________________________________
diff --git a/debian/rules b/debian/rules
index 5989934b4..b64efa925 100755
--- a/debian/rules
+++ b/debian/rules
@@ -131,7 +131,7 @@ clean:
rm -rf build
# Add here commands to clean up after the build process.
- dh_clean debian/copyright debian/shlibs.local debian/shlibs.local.apt debian/shlibs.local.apt-utils
+ dh_clean debian/shlibs.local debian/shlibs.local.apt debian/shlibs.local.apt-utils
binary-indep: apt-doc libapt-pkg-doc
# Build architecture-independent files here.
@@ -213,8 +213,9 @@ apt: build debian/shlibs.local
cp debian/bugscript debian/$@/usr/share/bug/apt/script
cp debian/apt.logrotate debian/$@/etc/logrotate.d/apt
- cp share/debian-archive.gpg debian/$@/usr/share/$@
+ cp share/ubuntu-archive.gpg debian/$@/usr/share/$@
cp debian/apt.conf.autoremove debian/$@/etc/apt/apt.conf.d/01autoremove
+ cp debian/apt.conf.ubuntu debian/$@/etc/apt/apt.conf.d/01ubuntu
# head -n 500 ChangeLog > debian/ChangeLog
# make rosetta happy and remove pot files in po/ (but leave stuff
@@ -222,6 +223,10 @@ apt: build debian/shlibs.local
rm -f build/po/*.pot
rm -f po/*.pot
+ # move the mirror failure script in place
+ mv debian/$@/usr/bin/apt-report-mirror-failure \
+ debian/$@/usr/lib/apt/apt-report-mirror-failure \
+
dh_installexamples -p$@ $(BLD)/docs/examples/*
dh_installman -p$@
dh_installcron -p$@
diff --git a/doc/examples/configure-index b/doc/examples/configure-index
index ba3ed3892..a4a955b6a 100644
--- a/doc/examples/configure-index
+++ b/doc/examples/configure-index
@@ -100,6 +100,9 @@ APT
Install-Recommends "false";
Install-Suggests "false";
+ // install recommends automatically for packages in this section
+ Install-Recommends-Section { "metapackages"; "universe/metapackages"; };
+
// consider dependencies of packages in this section manual
Never-MarkAuto-Sections {"metapackages"; "universe/metapackages"; };
@@ -186,6 +189,20 @@ Acquire
{
Options {"--ignore-time-conflict";} // not very usefull on a normal system
};
+
+ mirror
+ {
+ RefreshInterval "360"; // refresh interval in minutes
+ MaxAge "90"; // max age for a mirror file in days before
+ // it gets deleted
+ // mirror failure reporting script
+ ProblemReporting "/usr/lib/apt/apt-report-mirror-failure";
+ // mirror failure reporting url
+ ReportFailures "http://example.com/mirror-failure";
+ };
+
+ // translations can be set here to "none", "environment" or "$locale"
+ Translation "none";
};
// Directory layout
@@ -199,6 +216,7 @@ Dir "/"
userstatus "status.user";
status "/var/lib/dpkg/status";
cdroms "cdroms.list";
+ mirrors "mirrors/";
};
// Location of the cache dir
@@ -294,9 +312,9 @@ Debug
Acquire::Http "false"; // Show http command traffic
Acquire::Https "false"; // Show https debug
Acquire::gpgv "false"; // Show the gpgv traffic
+ Acquire::Mirror "false"; // Show debugging of the mirror method
aptcdrom "false"; // Show found package files
IdentCdrom "false";
-
}
/* Whatever you do, do not use this configuration file!! Take out ONLY
diff --git a/doc/examples/sources.list b/doc/examples/sources.list
index 9af1c3c4c..b93306724 100644
--- a/doc/examples/sources.list
+++ b/doc/examples/sources.list
@@ -1,9 +1,11 @@
# See sources.list(5) for more information, especialy
# Remember that you can only use http, ftp or file URIs
# CDROMs are managed through the apt-cdrom tool.
-deb http://http.us.debian.org/debian stable main contrib non-free
-deb http://security.debian.org stable/updates main contrib non-free
+deb http://us.archive.ubuntu.com/ubuntu gutsy main restricted
+deb-src http://us.archive.ubuntu.com/ubuntu gutsy main restricted
-# Uncomment if you want the apt-get source function to work
-#deb-src http://http.us.debian.org/debian stable main contrib non-free
-#deb-src http://non-us.debian.org/debian-non-US stable/non-US main contrib non-free
+deb http://security.ubuntu.com/ubuntu gutsy-security main restricted
+deb-src http://security.ubuntu.com/ubuntu gutsy-security main restricted
+
+deb http://us.archive.ubuntu.com/ubuntu gutsy-updates main restricted
+deb-src http://us.archive.ubuntu.com/ubuntu gutsy-updates main restricted
diff --git a/methods/connect.cc b/methods/connect.cc
index 8c2ac6d56..145001fb3 100644
--- a/methods/connect.cc
+++ b/methods/connect.cc
@@ -18,6 +18,7 @@
#include <stdio.h>
#include <errno.h>
#include <unistd.h>
+#include <sstream>
// Internet stuff
#include <netinet/in.h>
@@ -67,12 +68,10 @@ static bool DoConnect(struct addrinfo *Addr,string Host,
wrong this will get tacked onto the end of the error message */
if (LastHostAddr->ai_next != 0)
{
- char Name2[NI_MAXHOST + NI_MAXSERV + 10];
- snprintf(Name2,sizeof(Name2),_("[IP: %s %s]"),Name,Service);
- Owner->SetFailExtraMsg(string(Name2));
- }
- else
- Owner->SetFailExtraMsg("");
+ std::stringstream ss;
+ ioprintf(ss, _("[IP: %s %s]"),Name,Service);
+ Owner->SetIP(ss.str());
+ }
// Get a socket
if ((Fd = socket(Addr->ai_family,Addr->ai_socktype,
@@ -89,7 +88,7 @@ static bool DoConnect(struct addrinfo *Addr,string Host,
/* This implements a timeout for connect by opening the connection
nonblocking */
if (WaitFd(Fd,true,TimeOut) == false) {
- Owner->SetFailExtraMsg("\nFailReason: Timeout");
+ Owner->SetFailReason("Timeout");
return _error->Error(_("Could not connect to %s:%s (%s), "
"connection timed out"),Host.c_str(),Service,Name);
}
@@ -104,7 +103,7 @@ static bool DoConnect(struct addrinfo *Addr,string Host,
{
errno = Err;
if(errno == ECONNREFUSED)
- Owner->SetFailExtraMsg("\nFailReason: ConnectionRefused");
+ Owner->SetFailReason("ConnectionRefused");
return _error->Errno("connect",_("Could not connect to %s:%s (%s)."),Host.c_str(),
Service,Name);
}
@@ -164,12 +163,13 @@ bool Connect(string Host,int Port,const char *Service,int DefPort,int &Fd,
DefPort = 0;
continue;
}
+ Owner->SetFailReason("ResolveFailure");
return _error->Error(_("Could not resolve '%s'"),Host.c_str());
}
if (Res == EAI_AGAIN)
{
- Owner->SetFailExtraMsg("\nFailReason: TmpResolveFailure");
+ Owner->SetFailReason("TmpResolveFailure");
return _error->Error(_("Temporary failure resolving '%s'"),
Host.c_str());
}
diff --git a/methods/copy.cc b/methods/copy.cc
index 72896b4c0..027b59f46 100644
--- a/methods/copy.cc
+++ b/methods/copy.cc
@@ -84,6 +84,7 @@ bool CopyMethod::Fetch(FetchItem *Itm)
FileFd Fd(Res.Filename, FileFd::ReadOnly);
Hash.AddFD(Fd.Fd(), Fd.Size());
Res.TakeHashes(Hash);
+
URIDone(Res);
return true;
}
diff --git a/methods/http.cc b/methods/http.cc
index d4e231fbe..6aa4261ff 100644
--- a/methods/http.cc
+++ b/methods/http.cc
@@ -38,7 +38,6 @@
#include <stdio.h>
#include <errno.h>
#include <string.h>
-#include <iostream>
#include <apti18n.h>
// Internet stuff
@@ -715,7 +714,7 @@ void HttpMethod::SendReq(FetchItem *Itm,CircleBuf &Out)
Req += string("Authorization: Basic ") +
Base64Encode(Uri.User + ":" + Uri.Password) + "\r\n";
- Req += "User-Agent: Debian APT-HTTP/1.3 ("VERSION")\r\n\r\n";
+ Req += "User-Agent: Ubuntu APT-HTTP/1.3 ("VERSION")\r\n\r\n";
if (Debug == true)
cerr << Req << endl;
@@ -916,6 +915,9 @@ int HttpMethod::DealWithHeaders(FetchResult &Res,ServerState *Srv)
failure */
if (Srv->Result < 200 || Srv->Result >= 300)
{
+ char err[255];
+ snprintf(err,sizeof(err)-1,"HttpError%i",Srv->Result);
+ SetFailReason(err);
_error->Error("%u %s",Srv->Result,Srv->Code);
if (Srv->HaveContent == true)
return 4;
@@ -991,7 +993,7 @@ void HttpMethod::SigTerm(int)
depth. */
bool HttpMethod::Fetch(FetchItem *)
{
- if (Server == 0)
+ if (Server == 0)
return true;
// Queue the requests
@@ -1236,13 +1238,5 @@ int HttpMethod::Loop()
}
/*}}}*/
-int main()
-{
- setlocale(LC_ALL, "");
-
- HttpMethod Mth;
-
- return Mth.Loop();
-}
diff --git a/methods/http.h b/methods/http.h
index 6753a9901..dec5cd80f 100644
--- a/methods/http.h
+++ b/methods/http.h
@@ -13,7 +13,7 @@
#define MAXLEN 360
-#include <iostream>
+
using std::cout;
using std::endl;
@@ -134,7 +134,6 @@ class HttpMethod : public pkgAcqMethod
bool ServerDie(ServerState *Srv);
int DealWithHeaders(FetchResult &Res,ServerState *Srv);
- virtual bool Fetch(FetchItem *);
virtual bool Configuration(string Message);
// In the event of a fatal signal this file will be closed and timestamped.
@@ -142,6 +141,9 @@ class HttpMethod : public pkgAcqMethod
static int FailFd;
static time_t FailTime;
static void SigTerm(int);
+
+ protected:
+ virtual bool Fetch(FetchItem *);
public:
friend class ServerState;
diff --git a/methods/http_main.cc b/methods/http_main.cc
new file mode 100644
index 000000000..2c46ab19d
--- /dev/null
+++ b/methods/http_main.cc
@@ -0,0 +1,15 @@
+#include <apt-pkg/fileutl.h>
+#include <apt-pkg/acquire-method.h>
+
+#include "connect.h"
+#include "rfc2553emu.h"
+#include "http.h"
+
+
+int main()
+{
+ setlocale(LC_ALL, "");
+
+ HttpMethod Mth;
+ return Mth.Loop();
+}
diff --git a/methods/makefile b/methods/makefile
index 5794c84e7..3c12bb974 100644
--- a/methods/makefile
+++ b/methods/makefile
@@ -7,7 +7,7 @@ include ../buildlib/defaults.mak
BIN := $(BIN)/methods
# FIXME..
-LIB_APT_PKG_MAJOR = 4.6
+LIB_APT_PKG_MAJOR = 4.5
APT_DOMAIN := libapt-pkg$(LIB_APT_PKG_MAJOR)
# The file method
@@ -49,7 +49,14 @@ include $(PROGRAM_H)
PROGRAM=http
SLIBS = -lapt-pkg $(SOCKETLIBS)
LIB_MAKES = apt-pkg/makefile
-SOURCE = http.cc rfc2553emu.cc connect.cc
+SOURCE = http.cc http_main.cc rfc2553emu.cc connect.cc
+include $(PROGRAM_H)
+
+# The https method
+PROGRAM=https
+SLIBS = -lapt-pkg -lcurl
+LIB_MAKES = apt-pkg/makefile
+SOURCE = https.cc
include $(PROGRAM_H)
# The https method
@@ -80,9 +87,17 @@ LIB_MAKES = apt-pkg/makefile
SOURCE = rsh.cc
include $(PROGRAM_H)
+# The mirror method
+PROGRAM=mirror
+SLIBS = -lapt-pkg $(SOCKETLIBS)
+LIB_MAKES = apt-pkg/makefile
+SOURCE = mirror.cc http.cc rfc2553emu.cc connect.cc
+include $(PROGRAM_H)
+
# SSH and bzip2 method symlink
binary: $(BIN)/ssh $(BIN)/bzip2 $(BIN)/lzma
veryclean: clean-$(BIN)/ssh clean-$(BIN)/bzip2 clean-$(BIN)/lzma
+
$(BIN)/ssh:
echo "Installing ssh method link"
ln -fs rsh $(BIN)/ssh
diff --git a/methods/mirror.cc b/methods/mirror.cc
new file mode 100644
index 000000000..bdd783cc7
--- /dev/null
+++ b/methods/mirror.cc
@@ -0,0 +1,316 @@
+// -*- mode: cpp; mode: fold -*-
+// Description /*{{{*/
+// $Id: mirror.cc,v 1.59 2004/05/08 19:42:35 mdz Exp $
+/* ######################################################################
+
+ Mirror Aquire Method - This is the Mirror aquire method for APT.
+
+ ##################################################################### */
+ /*}}}*/
+// Include Files /*{{{*/
+#include <apt-pkg/fileutl.h>
+#include <apt-pkg/acquire-method.h>
+#include <apt-pkg/acquire-item.h>
+#include <apt-pkg/acquire.h>
+#include <apt-pkg/error.h>
+#include <apt-pkg/hashes.h>
+#include <apt-pkg/sourcelist.h>
+
+#include <fstream>
+#include <iostream>
+#include <stdarg.h>
+#include <sys/stat.h>
+#include <sys/types.h>
+#include <dirent.h>
+
+using namespace std;
+
+#include "mirror.h"
+#include "http.h"
+#include "apti18n.h"
+ /*}}}*/
+
+/* Done:
+ * - works with http (only!)
+ * - always picks the first mirror from the list
+ * - call out to problem reporting script
+ * - supports "deb mirror://host/path/to/mirror-list/// dist component"
+ * - uses pkgAcqMethod::FailReason() to have a string representation
+ * of the failure that is also send to LP
+ *
+ * TODO:
+ * - deal with runing as non-root because we can't write to the lists
+ dir then -> use the cached mirror file
+ * - better method to download than having a pkgAcquire interface here
+ * and better error handling there!
+ * - support more than http
+ * - testing :)
+ */
+
+MirrorMethod::MirrorMethod()
+ : HttpMethod(), DownloadedMirrorFile(false)
+{
+};
+
+// HttpMethod::Configuration - Handle a configuration message /*{{{*/
+// ---------------------------------------------------------------------
+/* We stash the desired pipeline depth */
+bool MirrorMethod::Configuration(string Message)
+{
+ if (pkgAcqMethod::Configuration(Message) == false)
+ return false;
+ Debug = _config->FindB("Debug::Acquire::mirror",false);
+
+ return true;
+}
+ /*}}}*/
+
+// clean the mirrors dir based on ttl information
+bool MirrorMethod::Clean(string Dir)
+{
+ vector<metaIndex *>::const_iterator I;
+
+ if(Debug)
+ clog << "MirrorMethod::Clean(): " << Dir << endl;
+
+ if(Dir == "/")
+ return _error->Error("will not clean: '/'");
+
+ // read sources.list
+ pkgSourceList list;
+ list.ReadMainList();
+
+ DIR *D = opendir(Dir.c_str());
+ if (D == 0)
+ return _error->Errno("opendir",_("Unable to read %s"),Dir.c_str());
+
+ string StartDir = SafeGetCWD();
+ if (chdir(Dir.c_str()) != 0)
+ {
+ closedir(D);
+ return _error->Errno("chdir",_("Unable to change to %s"),Dir.c_str());
+ }
+
+ for (struct dirent *Dir = readdir(D); Dir != 0; Dir = readdir(D))
+ {
+ // Skip some files..
+ if (strcmp(Dir->d_name,"lock") == 0 ||
+ strcmp(Dir->d_name,"partial") == 0 ||
+ strcmp(Dir->d_name,".") == 0 ||
+ strcmp(Dir->d_name,"..") == 0)
+ continue;
+
+ // see if we have that uri
+ for(I=list.begin(); I != list.end(); I++)
+ {
+ string uri = (*I)->GetURI();
+ if(uri.substr(0,strlen("mirror://")) != string("mirror://"))
+ continue;
+ string BaseUri = uri.substr(0,uri.size()-1);
+ if (URItoFileName(BaseUri) == Dir->d_name)
+ break;
+ }
+ // nothing found, nuke it
+ if (I == list.end())
+ unlink(Dir->d_name);
+ };
+
+ chdir(StartDir.c_str());
+ closedir(D);
+ return true;
+}
+
+
+bool MirrorMethod::DownloadMirrorFile(string mirror_uri_str)
+{
+
+ // check the file, if it is not older than RefreshInterval just use it
+ // otherwise try to get a new one
+ if(FileExists(MirrorFile))
+ {
+ struct stat buf;
+ time_t t,now,refresh;
+ if(stat(MirrorFile.c_str(), &buf) != 0)
+ return false;
+ t = std::max(buf.st_mtime, buf.st_ctime);
+ now = time(NULL);
+ refresh = 60*_config->FindI("Acquire::Mirror::RefreshInterval",360);
+ if(t + refresh > now)
+ {
+ if(Debug)
+ clog << "Mirror file is in RefreshInterval" << endl;
+ DownloadedMirrorFile = true;
+ return true;
+ }
+ if(Debug)
+ clog << "Mirror file " << MirrorFile << " older than " << refresh << "min, re-download it" << endl;
+ }
+
+ // not that great to use pkgAcquire here, but we do not have
+ // any other way right now
+ string fetch = BaseUri;
+ fetch.replace(0,strlen("mirror://"),"http://");
+
+ pkgAcquire Fetcher;
+ new pkgAcqFile(&Fetcher, fetch, "", 0, "", "", "", MirrorFile);
+ bool res = (Fetcher.Run() == pkgAcquire::Continue);
+ if(res)
+ DownloadedMirrorFile = true;
+ Fetcher.Shutdown();
+ return res;
+}
+
+bool MirrorMethod::SelectMirror()
+{
+ // if we do not have a MirrorFile, fallback
+ if(!FileExists(MirrorFile))
+ {
+ // FIXME: fallback to a default mirror here instead
+ // and provide a config option to define that default
+ return _error->Error(_("No mirror file '%s' found "), MirrorFile.c_str());
+ }
+
+ // FIXME: make the mirror selection more clever, do not
+ // just use the first one!
+ // BUT: we can not make this random, the mirror has to be
+ // stable accross session, because otherwise we can
+ // get into sync issues (got indexfiles from mirror A,
+ // but packages from mirror B - one might be out of date etc)
+ ifstream in(MirrorFile.c_str());
+ getline(in, Mirror);
+ if(Debug)
+ cerr << "Using mirror: " << Mirror << endl;
+
+ UsedMirror = Mirror;
+ return true;
+}
+
+string MirrorMethod::GetMirrorFileName(string mirror_uri_str)
+{
+ /*
+ - a mirror_uri_str looks like this:
+ mirror://people.ubuntu.com/~mvo/apt/mirror/mirrors/dists/feisty/Release.gpg
+
+ - the matching source.list entry
+ deb mirror://people.ubuntu.com/~mvo/apt/mirror/mirrors feisty main
+
+ - we actually want to go after:
+ http://people.ubuntu.com/~mvo/apt/mirror/mirrors
+
+ And we need to save the BaseUri for later:
+ - mirror://people.ubuntu.com/~mvo/apt/mirror/mirrors
+
+ FIXME: what if we have two similar prefixes?
+ mirror://people.ubuntu.com/~mvo/mirror
+ mirror://people.ubuntu.com/~mvo/mirror2
+ then mirror_uri_str looks like:
+ mirror://people.ubuntu.com/~mvo/apt/mirror/dists/feisty/Release.gpg
+ mirror://people.ubuntu.com/~mvo/apt/mirror2/dists/feisty/Release.gpg
+ we search sources.list and find:
+ mirror://people.ubuntu.com/~mvo/apt/mirror
+ in both cases! So we need to apply some domain knowledge here :( and
+ check for /dists/ or /Release.gpg as suffixes
+ */
+ string name;
+ if(Debug)
+ std::cerr << "GetMirrorFileName: " << mirror_uri_str << std::endl;
+
+ // read sources.list and find match
+ vector<metaIndex *>::const_iterator I;
+ pkgSourceList list;
+ list.ReadMainList();
+ for(I=list.begin(); I != list.end(); I++)
+ {
+ string uristr = (*I)->GetURI();
+ if(Debug)
+ std::cerr << "Checking: " << uristr << std::endl;
+ if(uristr.substr(0,strlen("mirror://")) != string("mirror://"))
+ continue;
+ // find matching uri in sources.list
+ if(mirror_uri_str.substr(0,uristr.size()) == uristr)
+ {
+ if(Debug)
+ std::cerr << "found BaseURI: " << uristr << std::endl;
+ BaseUri = uristr.substr(0,uristr.size()-1);
+ }
+ }
+ // get new file
+ name = _config->FindDir("Dir::State::mirrors") + URItoFileName(BaseUri);
+
+ if(Debug)
+ {
+ cerr << "base-uri: " << BaseUri << endl;
+ cerr << "mirror-file: " << name << endl;
+ }
+ return name;
+}
+
+// MirrorMethod::Fetch - Fetch an item /*{{{*/
+// ---------------------------------------------------------------------
+/* This adds an item to the pipeline. We keep the pipeline at a fixed
+ depth. */
+bool MirrorMethod::Fetch(FetchItem *Itm)
+{
+ // the http method uses Fetch(0) as a way to update the pipeline,
+ // just let it do its work in this case - Fetch() with a valid
+ // Itm will always run before the first Fetch(0)
+ if(Itm == NULL)
+ return HttpMethod::Fetch(Itm);
+
+ // if we don't have the name of the mirror file on disk yet,
+ // calculate it now (can be derived from the uri)
+ if(MirrorFile.empty())
+ MirrorFile = GetMirrorFileName(Itm->Uri);
+
+ // download mirror file once (if we are after index files)
+ if(Itm->IndexFile && !DownloadedMirrorFile)
+ {
+ Clean(_config->FindDir("Dir::State::mirrors"));
+ DownloadMirrorFile(Itm->Uri);
+ }
+
+ if(Mirror.empty())
+ SelectMirror();
+
+ for (FetchItem *I = Queue; I != 0; I = I->Next)
+ {
+ if(I->Uri.find("mirror://") != string::npos)
+ I->Uri.replace(0,BaseUri.size(), Mirror);
+ }
+
+ // now run the real fetcher
+ return HttpMethod::Fetch(Itm);
+};
+
+void MirrorMethod::Fail(string Err,bool Transient)
+{
+ if(Queue->Uri.find("http://") != string::npos)
+ Queue->Uri.replace(0,Mirror.size(), BaseUri);
+ pkgAcqMethod::Fail(Err, Transient);
+}
+
+void MirrorMethod::URIStart(FetchResult &Res)
+{
+ if(Queue->Uri.find("http://") != string::npos)
+ Queue->Uri.replace(0,Mirror.size(), BaseUri);
+ pkgAcqMethod::URIStart(Res);
+}
+
+void MirrorMethod::URIDone(FetchResult &Res,FetchResult *Alt)
+{
+ if(Queue->Uri.find("http://") != string::npos)
+ Queue->Uri.replace(0,Mirror.size(), BaseUri);
+ pkgAcqMethod::URIDone(Res, Alt);
+}
+
+
+int main()
+{
+ setlocale(LC_ALL, "");
+
+ MirrorMethod Mth;
+
+ return Mth.Loop();
+}
+
+
diff --git a/methods/mirror.h b/methods/mirror.h
new file mode 100644
index 000000000..ed817806b
--- /dev/null
+++ b/methods/mirror.h
@@ -0,0 +1,52 @@
+// -*- mode: cpp; mode: fold -*-
+// Description /*{{{*/// $Id: http.h,v 1.12 2002/04/18 05:09:38 jgg Exp $
+// $Id: http.h,v 1.12 2002/04/18 05:09:38 jgg Exp $
+/* ######################################################################
+
+ MIRROR Aquire Method - This is the MIRROR aquire method for APT.
+
+ ##################################################################### */
+ /*}}}*/
+
+#ifndef APT_MIRROR_H
+#define APT_MIRROR_H
+
+
+#include <iostream>
+
+using std::cout;
+using std::cerr;
+using std::endl;
+
+#include "http.h"
+
+class MirrorMethod : public HttpMethod
+{
+ FetchResult Res;
+ // we simply transform between BaseUri and Mirror
+ string BaseUri; // the original mirror://... url
+ string Mirror; // the selected mirror uri (http://...)
+ string MirrorFile; // the file that contains the list of mirrors
+ bool DownloadedMirrorFile; // already downloaded this session
+
+ bool Debug;
+
+ protected:
+ bool DownloadMirrorFile(string uri);
+ string GetMirrorFileName(string uri);
+ bool SelectMirror();
+ bool Clean(string dir);
+
+ // we need to overwrite those to transform the url back
+ virtual void Fail(string Why, bool Transient = false);
+ virtual void URIStart(FetchResult &Res);
+ virtual void URIDone(FetchResult &Res,FetchResult *Alt = 0);
+ virtual bool Configuration(string Message);
+
+ public:
+ MirrorMethod();
+ virtual bool Fetch(FetchItem *Itm);
+};
+
+
+#endif
diff --git a/mirror-failure.py b/mirror-failure.py
new file mode 100644
index 000000000..e7d2bbf54
--- /dev/null
+++ b/mirror-failure.py
@@ -0,0 +1,23 @@
+# File: cgihttpserver-example-1.py
+
+import CGIHTTPServer
+import BaseHTTPServer
+
+class Handler(CGIHTTPServer.CGIHTTPRequestHandler):
+ #cgi_directories = ["/cgi"]
+ def do_POST(self):
+ print "do_POST"
+ #print self.command
+ #print self.path
+ #print self.headers
+ print self.client_address
+ data = self.rfile.read(int(self.headers["content-length"]))
+ print data
+ self.wfile.write("200 Ok\n");
+
+PORT = 8000
+
+httpd = BaseHTTPServer.HTTPServer(("", PORT), Handler)
+print "serving at port", PORT
+httpd.serve_forever()
+
diff --git a/share/debian-archive.gpg.moved b/share/debian-archive.gpg.moved
new file mode 100644
index 000000000..bb5ed5033
--- /dev/null
+++ b/share/debian-archive.gpg.moved
Binary files differ