summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* de-duplicate version strings in the cacheDavid Kalnischkies2014-09-271-3/+3
| | | | | | | | | | | | | | | Turns out that version numbers aren't as random as you might guess. In my cache for example, I have: Total package names: 69513 (1390 k) Total package structures: 188259 (9036 k) Total distinct versions: 186345 (13.4 M) Total dependencies: 2052242 (57.5 M) which amounts to 1035873 (10,1 M) strings. Reusing version strings reduces this to 161465 (3.479 k). This comes at a cost of course: Generation is slightly slower, but we are still faster than what we started with and it makes room (also cache size wise) for further changes.
* drop stored StringItems in favor of in-memory mappingsDavid Kalnischkies2014-09-278-124/+57
| | | | | | | | | | | | | | | Strings like Section names or architectures are needed vary often. Instead of writing them each time we need them, we deploy sharing for these special strings. Until now, this was done with a linked list of strings in which we would search, which was stored in the cache. It turns out we can do this just as well in memory as well with a bunch of std::map's. In memory means here that it isn't available anymore if we have a partly invalid cache, but that isn't much of a problem in practice as the status file is compared to the other files we parse very small and includes mostly duplicates, so the space we would gain by storing is more or less equal to the size of the stored linked list…
* count strings more accurately for statsDavid Kalnischkies2014-09-271-14/+39
| | | | | | | | | | So far, only the few strings stored in stringitems were counted, but many more strings are directly inserted into the cache. We account for this now by identifying all these different strings and measure their length. We are still not at the correct size of the cache in 'stats' this way, but we are now again a bit closer. Git-Dch: Ignore
* packages in the cache are sorted by name so noise-freeDavid Kalnischkies2014-09-271-9/+2
| | | | | | | | | | Commit aa0fe657e46b87cc692895a36df12e8b74bb27bb sorts the package names in the hashtable. We make use of this already in these functions, but as a minor sideeffect it also means that we don't have 'noise' anymore between packages belonging to the same group. We therefore don't need to check for a matching name in Grp.FindPkg anymore. Git-Dch: Ignore
* search for pkg names in the cache case-sensitiveDavid Kalnischkies2014-09-271-4/+4
| | | | | | | | | | | Package names have to be lowercase (debian-policy §5.6.1) and in as lowlevel as these method are it would be quiet strange to treat an invalid package "suddently" as a valid one which other tools might or might not accept. If case-insensitivity is really needed the frontend should ensure this rather than these methods waste cpu cycles by default. Git-Dch: Ignore
* deprecate Pkg->Name in favor of Grp->NameDavid Kalnischkies2014-09-275-12/+21
| | | | | | | They both store the same information, so this field just takes up space in the Package struct for no good reason. We mark it "just" as deprecated instead of instantly removing it though as it isn't misleading like Section was and is potentially used in the wild more often.
* Disable Mth.DropPrivsOrDie() in copy.cc for nowMichael Vogt2014-09-261-1/+0
| | | | Dch-Ignore: true
* Remove check for "Translation-" from pkgAcqIndex::Custom600Headers()Michael Vogt2014-09-251-4/+1
| | | | | This unneeded because pkgAcqIndexTrans has its own Custom600Headers() method.
* Revert making pkgAcquire::Item::DescURI() "const"Michael Vogt2014-09-251-12/+12
| | | | | | Revert because its a API change and the gain does not justify the extra work to make the required changes in the consumers of this interface at this point.
* Use /var/empty as the homedir for _aptMichael Vogt2014-09-251-2/+2
| | | | Thanks to Axel Beckert
* releasing package apt version 1.1~exp3Michael Vogt2014-09-242-0/+20
|
* DropPrivs: Document what it doesJulian Andres Klode2014-09-241-1/+11
| | | | Git-Dch: ignore
* DropPrivs: Use APT::Sandbox::User instead of Apt::User::NobodyJulian Andres Klode2014-09-241-3/+3
| | | | Git-Dch: ignore
* DropPrivs: Hard-fail if the user does not existJulian Andres Klode2014-09-241-1/+1
| | | | Git-Dch: ignore
* DropPrivs: Add some comments for the more obscure setuid/setgid functionsJulian Andres Klode2014-09-241-0/+2
| | | | Git-Dch: ignore
* DropPrivs: Move the re-set uid/gid thing to the end of the functionJulian Andres Klode2014-09-241-7/+7
| | | | Git-Dch: ignore
* methods: Fail if we cannot drop privilegesJulian Andres Klode2014-09-248-14/+27
|
* DropPrivs: Improve commentsJulian Andres Klode2014-09-241-8/+7
| | | | Git-Dch: ignore
* DropPrivs: Also check for saved set-user-ID and set-group-IDJulian Andres Klode2014-09-243-0/+30
|
* DropPrivs: Do not use an invalid return check for setgroups()Julian Andres Klode2014-09-241-1/+1
| | | | | | setgroups() returns 0 on success Git-Dch: ignore
* Use _apt as our unprivileged user nameJulian Andres Klode2014-09-242-3/+3
| | | | | | | Some people want to standardize on it, and BSDs do it too, so let's do the same. Reported-by: Paul Wise <pabs@debian.org>
* DropPriv: Really call seteuid and not setuid, and add more checksJulian Andres Klode2014-09-241-11/+35
| | | | The only thing we are missing is non-portable saved ids support.
* Drop Privileges to "Debian-apt" in most acquire methodsMichael Vogt2014-09-248-2/+55
| | | | | | | | | Add a new "Debian-apt" user that owns the /var/lib/apt/lists and /var/cache/apt/archive directories. The methods http, https, ftp, gpgv, gzip switch to this user when they start. Thanks to Julian and "ioerror" and tors "switch_id()" code.
* fix testsMichael Vogt2014-09-233-4/+5
|
* Merge branch 'debian/sid' into debian/experimentalMichael Vogt2014-09-2386-51848/+55776
|\ | | | | | | | | | | | | | | | | Conflicts: apt-pkg/acquire-item.cc apt-pkg/acquire-item.h apt-pkg/cachefilter.h configure.ac debian/changelog
| * Ensure that iTFRewritePackageOrder is "MD5sum" to match apt-ftparchiveMichael Vogt2014-09-211-1/+1
| | | | | | | | | | | | | | The iTFRewritePackageOrder is used in indexcopy to copy and normalize cdrom Packages files. This change will ensure that there is no "normalization" that changes MD5sum -> MD5Sum which alters the hash of the Packages file on disk (oh the irony).
| * Fix regression for cdrom: sources from latest security updateMichael Vogt2014-09-211-0/+6
| | | | | | | | | | | | | | | | | | | | Skip a reverify for cdrom: sources. The reverify step is actually harmful here because the apt-cdrom add code uses the indexcopy.cc which will "normalize" the Packages file from the cdrom when it writes it to the local disk. This leads to changing the "MD5sum" field (notice the lower case "s") on the cdrom Packages file to a "MD5Sum" field on the local file in /var/lib/apt/lists. Which of course alters the hash and makes apt fail to reverify the file.
| * relax grep to support newer curl output formatDavid Kalnischkies2014-09-201-1/+6
| | | | | | | | Git-Dch: Ignore
| * disable timestamps in the footer of docs by doxygenJérémy Bobbio2014-09-191-1/+1
| | | | | | | | | | The default being 'yes', but this spoils the effort of reproducible builds for no real gain. (https://wiki.debian.org/ReproducibleBuilds)
| * German program translation updateHolger Wansing2014-09-191-10/+13
| | | | | | | | Closes: 762223
| * Fix regression when copy: is used for a relative pathMichael Vogt2014-09-192-6/+8
| | | | | | | | | | | | | | | | | | When we do a ReverifyAfterIMS() we use the copy: method to verify the hashes again. If the user uses -o Dir=./something/relative this fails because we use the URI class in copy.cc that strips away the leading relative part. By not using URI this is fixed. Closes: #762160
| * test/integration/test-apt-update-file: improve testMichael Vogt2014-09-192-0/+17
| |
| * ./pre-release pre-exportMichael Vogt2014-09-183-3/+3
| |
| * releasing package apt version 1.0.9.1Michael Vogt2014-09-171-0/+6
| |
| * Merge remote-tracking branch 'vnwildman/debian/sid' into debian/sidMichael Vogt2014-09-171-5/+5
| |\
| | * l10n: vi.po (636t): Update program translationTrần Ngọc Quân2014-09-131-5/+5
| | | | | | | | | | | | Signed-off-by: Trần Ngọc Quân <vnwildman@gmail.com>
| * | improve test for commit daff4aMichael Vogt2014-09-172-2/+10
| | |
| * | Fix regression for file:/// uris from CVE-2014-0487Michael Vogt2014-09-172-12/+33
| | | | | | | | | | | | | | | | | | | | | | | | 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().
| * | prepare 1.0.9.1Michael Vogt2014-09-161-0/+15
| | |
| * | merge previous uploadMichael Vogt2014-09-161-0/+9
| | |
| * | SECURITY UPDATE for CVE-2014-{0488,0487,0489}Michael Vogt2014-09-167-30/+217
| | | | | | | | | | | | | | | | | | 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)
| * | add a 'coverage' command to generate reportsDavid Kalnischkies2014-09-141-4/+51
| | | | | | | | | | | | | | | | | | | | | | | | | | | Builds, runs and generates everything needed to have a coverage report at the end for apt. The report isn't perfect as most childs apt forks do not have a regular exit and so data is never written for them, which results in e.g. most methods to have zero coverage reported. Git-Dch: Ignore
| * | Turkish program translation updateMert Dirik2014-09-141-8/+8
| | | | | | | | | | | | Closes: 761394
| * | Updated German documentation translationChris Leick2014-09-141-117/+7
| |/
| * Allow override of Proxy-Auto-Detect by the users configurationMichael Vogt2014-09-121-0/+4
| | | | | | | | | | | | | | Only run the Proxy-Auto-Detect code if there is not already a host specific configuration. Closes: 759264
| * prepare 1.0.8Michael Vogt2014-09-0948-51371/+54855
| |
| * debian/gbp.conf: use export-dirMichael Vogt2014-09-091-0/+2
| |
| * don't call pager in non-terminals for changelogDavid Kalnischkies2014-09-093-22/+45
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Most pagers are nice and default to running non-interactively if they aren't connected to a terminal and we relied on that. On ci.debian.net the configured pager is printing a header out of nowhere though, so if we are printing to a non-terminal we call "cat" instead. In the rework we also "remove" the dependency on sensible-utils in sofar as we call some alternatives if calling the utils fail. This seems to be the last problem preventing a "PASS" status on ci.debian.net, so we close the associated bugreport. Closes: 755040
| * rework PTY magic to fix stair-stepping on kfreebsdDavid Kalnischkies2014-09-082-53/+107
| | | | | | | | | | | | | | | | | | | | | | | | 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
| * fix progress report for upgrade and reinstallDavid Kalnischkies2014-09-082-38/+57
| | | | | | | | | | | | | | | | | | | | | | 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.