summaryrefslogtreecommitdiff
path: root/apt-pkg
AgeCommit message (Collapse)Author
2014-09-21generalize Acquire::GzipIndexMichael Vogt
2014-09-17improve test for commit daff4aMichael Vogt
2014-09-17Fix regression for file:/// uris from CVE-2014-0487Michael Vogt
Do not run ReverifyAfterIMS() for local file URIs as this will causes apt to mess around in the file:/// uri space. This is wrong in itself, but it will also cause a incorrect verification failure when the archive and the lists directory are on different partitions as rename().
2014-09-16SECURITY UPDATE for CVE-2014-{0488,0487,0489}Michael Vogt
incorrect invalidating of unauthenticated data (CVE-2014-0488) incorect verification of 304 reply (CVE-2014-0487) incorrect verification of Acquire::Gzip indexes (CVE-2014-0489)
2014-09-12Allow override of Proxy-Auto-Detect by the users configurationMichael Vogt
Only run the Proxy-Auto-Detect code if there is not already a host specific configuration. Closes: 759264
2014-09-08rework PTY magic to fix stair-stepping on kfreebsdDavid Kalnischkies
A pty slave we have got from openpty can only be used for one dpkg child, if we give it to a second child on kfreebsd setting TIOCSCTTY fails causing the output to be stair-stepped from now on. By switching the code to creating a master and opening a new slave in the child for each child we can fix this glitch, so that at least the master remains stable. Closes: 759684
2014-09-08fix progress report for upgrade and reinstallDavid Kalnischkies
APT treats upgrades like installs and dpkg is very similar in this, but prints still a slightly different processing message indicating that it is really an upgrade which we hadn't parsed so far, but this wasn't really visible as we quickly moved on to a 'known' state. More problematic was the reinstall case as apt hadn't recognized this for the package name detection, so that reinstalls had no progress since we introduced MultiArch.
2014-09-07strip everything spacey in APT::String::StripDavid Kalnischkies
Git-Dch: Ignore
2014-09-07make GetLocalitySortedVersionSet more genericDavid Kalnischkies
No reason in and of by itself at the moment, but prepares for the goal of having 'apt search' and 'apt-cache search' using the same code now that they at least support the same stuff. The 'apt' code is just a multitude slower at the moment… Git-Dch: Ignore
2014-09-05Ensure we have a Policy in CacheFile.BuildDepCache()Michael Vogt
This partly reverts d059cc2 and fixes bug #753297 in a more general way by ensuring that CacheFile.BuildDepCache() builds a pkgPolicy if there isn't one already.
2014-09-02* apt-pkg/deb/dpkgpm.cc:Michael Vogt
- update string matching for dpkg I/O errors. (LP: #1363257) - properly parse the dpkg status line so that package name is properly set and an apport report is created. Thanks to Anders Kaseorg for the patch. (LP: #1353171)
2014-09-02Make Proxy-Auto-Detect check for each hostMichael Vogt
When doing Acquire::http{,s}::Proxy-Auto-Detect, run the auto-detect command for each host instead of only once. This should make using "proxy" from libproxy-tools feasible which can then be used for PAC style or other proxy configurations. Closes: #759264
2014-08-29initialize iPolicyBrokenCount in DepCache::UpdateWarren He
All other counters are correctly initialized here, expect this one. The practical effect is low as in apt we usually just do "!= 0" checks, but only correct counters are good counters. Closes: 758397
2014-08-26support versioned provides as implemented by dpkgDavid Kalnischkies
APT supported versioned provides for a long while in an attempt to get it working with rpm. While this support is old, we can be relatively sure that it works as versioned provides are used internally to make Multi-Arch:foreign work. Previous versions of apt will print a warning indicating that the versioned provides is ignored, so that something which "Provides: foo (= 2)" doesn't provide anything. Note that dpkg does allow only a equals-relation in the provides line as anything else is deemed too complex. apt doesn't support anything else either and such a support would require potentially big changes. Closes: 758153
2014-08-24Fix debListParser to accept "no" as a value for the Multi-Arch fieldJulian Andres Klode
Seems this was missed somehow. Closes: #759099
2014-07-29Fix SmartConfigure to ignore ordering of packages that are already validMichael Vogt
With the change of SmartConfigure() in git commit 42d51f the ordering code was trying to re-order dependencies, even when at this point in time this was not needed. Now it will first check all targets of the given dependency and only if there is not a good one try to reorder and unpack/configure as needed. Closes: LP: #1347721
2014-07-17apt-pkg/acquire-item.cc: make pkgAcqDiffIndex more uniformMichael Vogt
2014-07-16StringToBool: only act if the entire string is consumed by strtol()Michael Vogt
StringToBool uses strtol() internally to check if the argument is a number. This function stops when it does not find any more numbers. So a string like "0ad" (which is a valid packagename) is interpreted as a "0". The code now checks that the entire string is consumed not just a part of it. Thanks to Johannes Schauer for raising this issue.
2014-07-08Do not clean "/" in pkgAcquire::Clean/pkgArchiveCleanerMichael Vogt
Having "/" here is most likely a user configuration error and may cause removal of import symlinks like /vmlinuz Closes: #753531
2014-07-07handle moved mmap after UniqFindTagWrite callDavid Kalnischkies
A call to UniqFindTagWrite can trigger the need for a bigger mmap, which is usually done by moving it, but with this move all pointers into it become invalid (and have to be remapped). The compiler calculates the pointer before the execution of the call though, so it tries to store the returned value at the old location, resulting in a segfault. We solve this by use of a temprorary variable as we did in the other instances of this problem before. Closes: #753941
2014-07-03Try not to parse invalid translation files (LP: #756317)Michael Vogt
2014-06-18do not call resolver twice on (dist-)upgradeDavid Kalnischkies
2014-06-18fix SubstVar to be usable as a replace_all methodDavid Kalnischkies
The name suggests that it is supposed to substitute a variable with a value, but we tend to use it in a more liberal replace_all() fashion, but this breaks if either of the parameters is empty or more importantly if two "variable" occurrences follow each other directly.
2014-06-18don't send pkg from an unknown architecture via EDSPDavid Kalnischkies
APT's cache can include packages from architectures dpkg has no knowledge about and can therefore not be installed for e.g. to allow easy lookups. There is no point in telling external solvers about them though and some of them might even be really talkative about ignoring them if we do.
2014-06-10use pkgSrcRecords::Step() instead of Next()Michael Vogt
2014-06-10Merge remote-tracking branch 'mvo/feature/srcrec-enum2' into debian/sidMichael Vogt
2014-06-09add pkgSrcRecords::Next() to step through all the pkgSrcRecordsMichael Vogt
2014-06-07do not revert candidate for protected packagesDavid Kalnischkies
In commit 21b3eac8 I promoted the check for installable dependencies to a pre-install check, which also reverts to a known good candidate (the installed version) if it fails. This revert was done even for user requested candidate switches which disabled our Broken detection so that install requests which are impossible to satisfy do not fail anymore, but print an (incomplete) solution proposal and then exit successfully. Closes: 745046
2014-05-30support parsing EDSP requests Architecture{,s} stanzaDavid Kalnischkies
Adds also a small testcase for EDSP Git-Dch: Ignore
2014-05-30without a filename we can't stat pipesDavid Kalnischkies
EDSP code uses pipes opened via an FD as sources and later for those files modification times and filesize are read - but never really used again. The result we get from FileFd is probably wrong, but as we don't use it anyway, we just don't fallback if we have nothing to fallback to Git-Dch: Ignore
2014-05-30check exit status of external solversDavid Kalnischkies
Solvers are supposed to exit successfully even if they haven't found a solution, but a solver which fails drastically (like e.g. segfaults) should be detected and dealt with accordingly instead of ignored.
2014-05-30Merge EDSP 0.5 w/ multi-arch support for external solversDavid Kalnischkies
"I am going to merge it tomorrow…"
2014-05-29Merge remote-tracking branch 'mvo/debian/sid' into debian/sidMichael Vogt
2014-05-28Fix warning about uninitialized variableMichael Vogt
Reported-By: clang++ -Werror
2014-05-27use free() instead of delete[] in debSrcRecordParser::~debSrcRecordParserMichael Vogt
The Buffer was allocated using strndup() so we need to free it using free() instead of delete[]
2014-05-27Do not try to cast a pkgDepCache::Policy to a pkgCacheMichael Vogt
Fix incorrect cast in pkgDepCache::Policy::GetCandidateVer() Reported-By: clang -fsanitize=address -fno-omit-frame-pointer
2014-05-27use free() instead of delete() when realloc is usedMichael Vogt
ContentsExtract::~ContentsExtract() needs to use free() because Data got allocated via realloc() Reported-By: clang -fsanitize=address -fno-omit-frame-pointer
2014-05-22fix tight loop detection and temporary removesDavid Kalnischkies
As outlined in #748355 apt segfaulted if it encountered a loop between a package pre-depending on a package conflicting with the previous as it ended up in an endless loop trying to unpack 'the other package'. In this specific case as an essential package is involved a lot of force needs to be applied, but can also be caused by 'normal' tight loops and highlights a problem in how we handle breaks which we want to avoid. The fix comes in multiple entangled changes: 1. All Smart* calls are guarded with loop detection. Some already had it, some had parts of it, some did it incorrect, and some didn't even try. 2. temporary removes to avoid a loop (which is done if a loop is detected) prevent the unpack of this looping package (we tried to unpack it to avoid the conflict/breaks, but due to a loop we couldn't, so we remove/deconfigure it instead which means we can't unpack it now) 3. handle conflicts and breaks very similar instead of duplicating most of the code. The only remaining difference is, as it should: deconfigure is enough for breaks, for conflicts we need the big hammer
2014-05-22consistently fail if Smart* packagemanager actions failDavid Kalnischkies
These failure conditions come with an error message attached and the conditions aren't workaroundable (otherwise this would have been done instead of returning failure), so not erroring out here means that we execute dpkg later on with a known not-working ordering adding insult (our own error messages at the end) to injury (dpkg failure).
2014-05-22mark as Automatic/Downloadable pure as gcc suggestsDavid Kalnischkies
Git-Dch: Ignore Reported-By: gcc
2014-05-15Never parse Version/Architecture tags in a Translation-$lang fileMichael Vogt
Version/Architecture information in a Translation-$lang file is not allowed, so don't try to parse it. This is a fix for a bugreport where a Translation-en file contained the content of the regular Packages file (probably due to local FS corruption). This lead to strange error messages on file download. Thanks to Thomas Reusch for the report.
2014-05-07Merge remote-tracking branch 'mvo/feature/apt-ftparchive-srccache2' into ↵Michael Vogt
debian/sid
2014-05-07Merge remote-tracking branch 'donkult/debian/sid' into debian/sidMichael Vogt
2014-05-04EDSP: add APT-Release field to Package stanzasStefano Zacchiroli
2014-05-04EDSP: add Source field to Package stanzasStefano Zacchiroli
2014-05-04EDSP: add Architecture(s) multi-arch fields to the Request stanzaStefano Zacchiroli
2014-05-04EDSP: bump protocol version to 0.5Stefano Zacchiroli
2014-04-30Only do openpty() if both stdin/stdout are terminalsMichael Vogt
Closes: 746434
2014-04-28initialize Verify in second pkgAcqIndex constructorDavid Kalnischkies
gcc reports in testcase ./test-bug-596498-trusted-unsigned-repo: apt-pkg/acquire-item.cc:1059:7: runtime error: load of value 234, which is not a valid value for type 'bool' This happens as the bool Verify is initialized only in one of the two constructors of the pkgAcqIndex class. It isn't a problem through as the verification controlled by this flag is optional and used to fail early on garbage files (like network portal pages) instead of later on in the hashsum verification or while parsing (the then untrusted) file. Reported-By: gcc-4.9 -fsanitize=undefined
2014-04-26fix FileFd::Size bitswap on big-endian architecturesAdam Conrad
gzip only gives us 32bit of size, storing it in a 64bit container and doing a 32bit flip on it has therefore unintended results. So we just go with a exact size container and let the flipping be handled by eglibc provided le32toh removing our #ifdef machinery. Closes: 745866