summaryrefslogtreecommitdiff
path: root/test/integration/test-apt-get-download
AgeCommit message (Collapse)Author
2015-06-15deal better with acquiring the same URI multiple timesDavid Kalnischkies
This is an unlikely event for indexes and co, but it can happen quiet easily e.g. for changelogs where you want to get the changelogs for multiple binary package(version)s which happen to all be built from a single source. The interesting part is that the Acquire system actually detected this already and set the item requesting the URI again to StatDone - expect that this is hardly sufficient: an Item must be Complete=true as well to be considered truely done and that is only the tip of the ::Done handling iceberg. So instead of this StatDone hack we allow QItems to be owned by multiple items and notify all owners about everything now, so that for the point of each item they got it downloaded just for them.
2014-10-23chown finished partial files earlierDavid Kalnischkies
partial files are chowned by the Item baseclass to let the methods work with them. Now, this baseclass is also responsible for chowning the files back to root instead of having various deeper levels do this. The consequence is that all overloaded Failed() methods now call the Item::Failed base as their first step. The same is done for Done(). The effect is that even in partial files usually don't belong to _apt anymore, helping sneakernets and reducing possibilities of a bad method modifying files not belonging to them. The change is supported by the framework not only supporting being run as root, but with proper permission management, too, so that privilege dropping can be tested with them.
2014-10-20autorun permission tests for all apt-get update callsDavid Kalnischkies
Adds some infrastructure to run tests automatically for certain commands. The first command being 'apt-get update' (and 'apt update') which check for correct permission and owner of the files in lists/. Git-Dch: Ignore
2014-10-15testcases runable as rootDavid Kalnischkies
Running the testcases is usually not a good idea, but it can be handy to check if the privilege dropping works. Git-Dch: Ignore
2014-10-07use _apt:root only for partial directoriesDavid Kalnischkies
Using a different user for calling methods is intended to protect us from methods running amok (via remotely exploited bugs) by limiting what can be done by them. By using root:root for the final directories and just have the files in partial writeable by the methods we enhance this in sofar as a method can't modify already verified data in its parent directory anymore. As a side effect, this also clears most of the problems you could have if the final directories are shared without user-sharing or if these directories disappear as they are now again root owned and only the partial directories contain _apt owned files (usually none if apt isn't running) and the directory itself is autocreated with the right permissions.
2014-09-27allow fetcher setup without directory creationDavid Kalnischkies
apt-get download and changelog as well as apt-helper reuse the acquire system for their own proposes without requiring the directories the fetcher wants to create, which is a problem if you run them as non-root and the directories do not exist as it greets you with: E: Archives directory /var/cache/apt/archives/partial is missing. - Acquire (13: Permission denied) Closes: 762898
2014-02-13remove duplicated apt-get download apt apt testMichael Vogt
2014-02-12Merge remote-tracking branch 'mvo/debian/sid' into debian/sidMichael Vogt
Conflicts: test/integration/test-apt-get-download
2014-02-12Use a APT::VersionSet instead of a VersionListMichael Vogt
Use a APT::VersionSet instead of a APT::VersionList in DoDownload() to ensure that there is only one version in the set even if the user passes multiple identical name/versions on the commandline (Bug#738103)
2014-02-10use VersionSet in download to handle repeatsDavid Kalnischkies
Closes: 738103
2014-01-29fix apt-get download truncation (closes: #736962)Michael Vogt
2014-01-17improve stdout/stderr usage correctness in test frameworkDavid Kalnischkies
Also adds a friendly note about how many tests were run/passed so that the end of the testrun isn't all that negative by just showing fails. (It now tells us that we have 111 tests at the moment!) Git-Dch: Ignore
2013-10-03use pkgAcqArchive in 'download' for proper errorsDavid Kalnischkies
With a bit of trickery we can reuse the usual infrastructure we have in place to acquire deb files for the 'download' operation as well, which gains us authentification check & display, error messages, correct filenames and "downloads" from the root-owned archives.
2013-03-25merge patches from daniel to fix merge artifact and test failureMichael Vogt
2012-06-18* cmdline/apt-get.cc:David Kalnischkies
- print a friendly message in 'download' if a package can't be downloaded (Closes: #677887)
2011-10-11run apt-get download in quiet mode as it messes with output otherwiseDavid Kalnischkies
2011-02-07implement --print-uris for download commandDavid Kalnischkies