From: Michael Vogt Date: Fri, 20 Apr 2012 07:18:26 +0000 (+0200) Subject: merge from the lp:~mvo/apt/mvo branch X-Git-Tag: 0.9.2~3 X-Git-Url: https://git.saurik.com/apt.git/commitdiff_plain/8c6d0ba4e25baa7b0dffc4e06e76fc63a71e656f?ds=inline;hp=-c merge from the lp:~mvo/apt/mvo branch --- 8c6d0ba4e25baa7b0dffc4e06e76fc63a71e656f diff --combined apt-pkg/deb/dpkgpm.cc index 496daf1df,14376f649..296426c80 --- a/apt-pkg/deb/dpkgpm.cc +++ b/apt-pkg/deb/dpkgpm.cc @@@ -425,7 -425,7 +425,7 @@@ void pkgDPkgPM::DoStdin(int master unsigned char input_buf[256] = {0,}; ssize_t len = read(0, input_buf, sizeof(input_buf)); if (len) - write(master, input_buf, len); + FileFd::Write(master, input_buf, len); else d->stdin_is_dev_null = true; } @@@ -451,7 -451,7 +451,7 @@@ void pkgDPkgPM::DoTerminalPty(int maste } if(len <= 0) return; - write(1, term_buf, len); + FileFd::Write(1, term_buf, len); if(d->term_out) fwrite(term_buf, len, sizeof(char), d->term_out); } @@@ -526,7 -526,7 +526,7 @@@ void pkgDPkgPM::ProcessDpkgStatusLine(i << ":" << s << endl; if(OutStatusFd > 0) - write(OutStatusFd, status.str().c_str(), status.str().size()); + FileFd::Write(OutStatusFd, status.str().c_str(), status.str().size()); if (Debug == true) std::clog << "send: '" << status.str() << "'" << endl; @@@ -550,7 -550,7 +550,7 @@@ << ":" << list[3] << endl; if(OutStatusFd > 0) - write(OutStatusFd, status.str().c_str(), status.str().size()); + FileFd::Write(OutStatusFd, status.str().c_str(), status.str().size()); if (Debug == true) std::clog << "send: '" << status.str() << "'" << endl; pkgFailures++; @@@ -564,7 -564,7 +564,7 @@@ << ":" << list[3] << endl; if(OutStatusFd > 0) - write(OutStatusFd, status.str().c_str(), status.str().size()); + FileFd::Write(OutStatusFd, status.str().c_str(), status.str().size()); if (Debug == true) std::clog << "send: '" << status.str() << "'" << endl; return; @@@ -592,7 -592,7 +592,7 @@@ << ":" << s << endl; if(OutStatusFd > 0) - write(OutStatusFd, status.str().c_str(), status.str().size()); + FileFd::Write(OutStatusFd, status.str().c_str(), status.str().size()); if (Debug == true) std::clog << "send: '" << status.str() << "'" << endl; } @@@ -738,6 -738,7 +738,7 @@@ bool pkgDPkgPM::OpenLog( d->history_out = fopen(history_name.c_str(),"a"); if (d->history_out == NULL) return _error->WarningE("OpenLog", _("Could not open file '%s'"), history_name.c_str()); + SetCloseExec(fileno(d->history_out), true); chmod(history_name.c_str(), 0644); fprintf(d->history_out, "\nStart-Date: %s\n", timestr); string remove, purge, install, reinstall, upgrade, downgrade; @@@ -1055,8 -1056,7 +1056,8 @@@ bool pkgDPkgPM::Go(int OutStatusFd } int fd[2]; - pipe(fd); + if (pipe(fd) != 0) + return _error->Errno("pipe","Failed to create IPC pipe to dpkg"); #define ADDARG(X) Args.push_back(X); Size += strlen(X) #define ADDARGC(X) Args.push_back(X); Size += sizeof(X) - 1 @@@ -1237,7 -1237,7 +1238,7 @@@ << (PackagesDone/float(PackagesTotal)*100.0) << ":" << _("Running dpkg") << endl; - write(OutStatusFd, status.str().c_str(), status.str().size()); + FileFd::Write(OutStatusFd, status.str().c_str(), status.str().size()); } Child = ExecFork(); @@@ -1596,7 -1596,10 +1597,10 @@@ void pkgDPkgPM::WriteApportReport(cons const char *ops_str[] = {"Install", "Configure","Remove","Purge"}; fprintf(report, "AptOrdering:\n"); for (vector::iterator I = List.begin(); I != List.end(); ++I) - fprintf(report, " %s: %s\n", (*I).Pkg.Name(), ops_str[(*I).Op]); + if ((*I).Pkg != NULL) + fprintf(report, " %s: %s\n", (*I).Pkg.Name(), ops_str[(*I).Op]); + else + fprintf(report, " %s: %s\n", "NULL", ops_str[(*I).Op]); // attach dmesg log (to learn about segfaults) if (FileExists("/bin/dmesg")) diff --combined debian/changelog index 8eca51cc4,fa4cdc251..f401f312c --- a/debian/changelog +++ b/debian/changelog @@@ -1,29 -1,13 +1,46 @@@ -apt (0.8.16~exp15) unstable; urgency=low ++apt (0.9.2) UNRELEASED; urgency=low + ++ [ Michael Vogt ] + * apt-inst/contrib/extracttar.cc: + - ensure that in StartGzip the InFd is set to "AutoClose" to ensure + that the pipe is closed when InFd is closed. This fixes a Fd leak + (LP: #985452) + - -- Michael Vogt Thu, 19 Apr 2012 10:53:30 +0200 ++ [ Adam Conrad ] ++ * Set FD_CLOEXEC on history.log's FD (Closes: #610069, LP: #636010) ++ ++ [ Thorsten Spindler ] ++ * apt-pkg/deb/dpkgpm.cc: ++ - do not crash if (*I).Pkg is NULL (LP: #939867) ++ ++ -- Michael Vogt Fri, 20 Apr 2012 09:13:19 +0200 ++ +apt (0.9.1) unstable; urgency=low + + [ David Kalnischkies ] + * cmdline/apt-get.cc: + - if pkgCacheFile::Generate is disabled in 'update' don't + remove the caches (and don't try to open them) + * apt-pkg/packagemanager.cc: + - init counter in SmartConfigure so that the loop-breaker isn't + triggered at random… (Closes: #669060) + + [ Christian Perrier ] + * Fix typo in apt-get(8). Closes: #664833 + * Replace "argument" by "paramètre" in French translation. + Merci, les Titeps! + * Drop hardcoded "en.html" suffix in apt-secure manpage. + Thanks to David Prevot. + + -- Michael Vogt Tue, 17 Apr 2012 09:49:31 +0200 + +apt (0.9.0) unstable; urgency=low + + * upload to debian/unstable + + -- Michael Vogt Mon, 16 Apr 2012 15:53:17 +0200 -apt (0.8.16~exp14) UNRELEASED; urgency=low +apt (0.9.0~exp1) experimental; urgency=low [ Michael Vogt ] * apt-pkg/packagemanager.cc: @@@ -31,99 -15,19 +48,99 @@@ - add APT::pkgPackageManager::MaxLoopCount to ensure that the ordering code does not get into a endless loop when it flip-flops between two states - + * update libapt-inst1.4 to libapt-inst1.5 because of the cleanup + performed + * prepare debian/unstable upload, if there are no issues with this + upload it will directly go into unstable as 0.9.0 + [ David Kalnischkies ] + * do not update po and pot files in the process of the build as this + causes timestamp changes for the mo files which therefore can't + be refcounted by dpkg for your M-A: same packages + (Closes: #659333, LP: #924628) + * apt-inst/database.{cc,h}, apt-inst/deb/dpkgdb.{cc,h}: + - drop instead of fix as it is only needed if you want to reimplement dpkg + and comes straight from the beginning of last decade (Closes: #663372) + * apt-inst/deb/debfile.cc: + - {Extract,Merge}Control() is another instance of "lets reimplement dpkg" + so shot of this code before someone ends up using this… + * debian/libapt-pkg4.12: + - update symbols file + * debian/apt-utils.install: + - ship the ftparchive, apt-extractemplates and apt-sortpkgs locales + in the apt-utils package instead of the apt package * apt-pkg/packagemanager.cc: - recheck all dependencies if we changed a package in SmartConfigure as this could break an earlier dependency (LP: #940396) - recheck dependencies in SmartUnpack after a change, too - - [ Thorsten Spindler ] + * apt-pkg/acquire-worker.cc: + - check return of write() as gcc recommends + * apt-pkg/acquire.cc: + - check return of write() as gcc recommends + * apt-pkg/cdrom.cc: + - check return of chdir() and link() as gcc recommends + * apt-pkg/clean.cc: + - check return of chdir() as gcc recommends + * apt-pkg/contrib/netrc.cc: + - check return of asprintf() as gcc recommends + * methods/rred.cc: + - check return of writev() as gcc recommends + * methods/mirror.cc: + - check return of chdir() as gcc recommends * apt-pkg/deb/dpkgpm.cc: - - do not crash if (*I).Pkg is NULL (LP: #939867) - - - -- David Kalnischkies Tue, 13 Mar 2012 12:38:35 +0100 + - check return of write() a gcc recommends + * apt-inst/deb/debfile.cc: + - check return of chdir() as gcc recommends + * apt-inst/deb/dpkgdb.cc: + - check return of chdir() as gcc recommends + * methods/makefile: + - do not link rred against libz anymore as FileFd handles all + this transparently now + * debian/control: + - bump Standards-Version to 3.9.3 (no changes needed) + - add libbz2-dev as new build-dependency + - remove the libz-dev alternative from zlib1g-dev build-dependency + - suggest xz-utils instead of bzip2 and lzma + * doc/apt-get.8.xml: + - typofix: respect → respecting, thanks Mike Erickson! (Closes: #664833) + * debian/rules: + - do not sed in configure.in to set the version-number + * prepare-release: + - add as a small script to lazy check and prepare releases + * doc/*: + - move the command synopsis out of each manpage into apt-verbatim.ent + as they are a hell to translate and just single out the parameters + which can be translated to apt.ent + * apt-pkg/aptconfiguration.cc: + - if present, prefer xz binary over lzma + - if we have zlib builtin insert add a dummy gzip compressor for FileFD + - do the same for bz2 builtin if available + * methods/bzip2.cc: + - remove it as the functionality for all compressors can be + provided by gzip.cc now with the usage of FileFD + * apt-pkg/contrib/fileutl.cc: + - use libz2 library for (de)compression instead of the bzip2 binary as + the first is a dependency of dpkg and the later just priority:optional + so we gain 'easier' access to bz2-compressed Translation files this way + * cmdline/apt-get.cc: + - print list of autoremoves in alphabetical order (Closes: #639008) + + [ Bogdan Purcareata ] + * doc/apt-get.8.xml: + - add 'download' to the usage line (Closes: #649340) + * cmdline/apt-get.cc: + - distinguish information about 'apt-get autoremove' based on the + number of auto-removed packages both before and after the list + of packages (Closes: #665833) + + [ Steve Langasek ] + * don't treat build-depends-indep as cross-build-dependencies; we should + always install the host arch versions. LP: #968828. + + [ Paolo Rotolo ] + * Fix string from automatic to automatically (LP: #967393). + + -- Michael Vogt Thu, 12 Apr 2012 12:40:39 +0200 apt (0.8.16~exp13) experimental; urgency=low @@@ -217,6 -121,12 +234,6 @@@ -- Michael Vogt Tue, 06 Mar 2012 18:12:57 +0100 -apt (0.8.16~exp12ubuntu8) precise; urgency=low - - * Set FD_CLOEXEC on history.log's FD (Closes: #610069, LP: #636010) - - -- Adam Conrad Thu, 12 Apr 2012 16:26:20 -0600 - apt (0.8.16~exp12) experimental; urgency=low [ Michael Vogt ] @@@ -274,10 -184,6 +291,10 @@@ apt (0.8.16~exp10) experimental; urgenc * apt-pkg/contrib/fileutl.h: - store the offset in the internal fd before calculate size of the zlib-handled file to jump back to this place again + * apt-pkg/aptconfiguration.cc: + - parse dpkg --print-foreign-architectures correctly in + case archs are separated by newline instead of space, too. + (Closes: #655590) [ Michael Vogt ] * apt-pkg/contrib/fileutl.h: @@@ -526,30 -432,19 +543,30 @@@ apt (0.8.16~exp1) experimental; urgency -- Michael Vogt Wed, 29 Jun 2011 12:40:31 +0200 -apt (0.8.15.10) UNRELEASEDunstable; urgency=low +apt (0.8.15.11) UNRELEASED; urgency=low + + * Fix typo in apt-get(8). Closes: #664833 + * Replace "argument" by "paramètre" in French translation. + Merci, les Titeps! + * Drop hardcoded "en.html" suffix in apt-secure manpage. + Thanks to David Prevot. + + -- Christian Perrier Tue, 27 Mar 2012 20:31:38 +0200 + +apt (0.8.15.10) unstable; urgency=high [ David Kalnischkies ] * algorithms.cc: - show a debug why a package was kept by ResolveByKeep() * doc/manpage-style.xml: - put around email addresses - * apt-pkg/aptconfiguration.cc: - - parse dpkg --print-foreign-architectures correctly in - case archs are separated by newline instead of space, too. - (Closes: #655590) * doc/po/de.po: - apply typo-fix from Michael Basse, thanks! (LP: #900770) + * apt-pkg/acquire-item.cc: + - remove 'old' InRelease file if we can't get a new one before + proceeding with Release.gpg to avoid the false impression of a still + trusted repository by a (still present) old InRelease file. + Thanks to Simon Ruderich for reporting this issue! (CVE-2012-0214) [ Chris Leick ] * German manpage translation update @@@ -561,16 -456,8 +578,16 @@@ * Slovak (Ivan Masar). Closes: #652985 * Russian (Yuri Kozlov). Closes: #654844 * Hungarian (Gabor Kelemen). Closes: #655238 + * Polish (Michał Kułach). Closes: #656908 + * Danish (Joe Hansen). Closes: #658643 + * French: replace "étiquetage" by "épinglage" for "pinning" + + [ Michael Vogt ] + * merged patch from lp:~uusijani/apt/uusi-branch: + Correct fi translation for hash sum mismatches (lp:420403) + Thanks to Jani Uusitalo - -- David Kalnischkies Fri, 13 Jan 2012 17:30:36 +0100 + -- Michael Vogt Tue, 06 Mar 2012 14:14:26 +0100 apt (0.8.15.9) unstable; urgency=low