summaryrefslogtreecommitdiff
path: root/test/integration/test-apt-get-download
Commit message (Collapse)AuthorAgeFilesLines
* tests: support spaces in path and TMPDIRDavid Kalnischkies2015-12-191-2/+2
| | | | | | | This doesn't allow all tests to run cleanly, but it at least allows to write tests which could run successfully in such environments. Git-Dch: Ignore
* tests: use quiet level 0 by default in testsDavid Kalnischkies2015-11-191-1/+1
| | | | Git-Dch: Ignore
* do not use _apt for file/copy sources if it isn't world-accessibleDavid Kalnischkies2015-11-191-8/+2
| | | | | | | | | | | | | | | | | | | | | | In 0940230d we started dropping privileges for file (and a bit later for copy, too) with the intend of uniforming this for all methods. The commit message says that the source will likely fail based on the compressors already – and there isn't much secret in the repository content. After all, after apt has run the update everyone can access the content via apt anyway… There are sources through which worked before which are mostly single-deb (and those with the uncompressed files available). The first one being especially surprising for users maybe, so instead of failing, we make it so that apt detects that it can't access a source as _apt and if so doesn't drop (for all sources!) privileges – but we limit this to file/copy, so the uncompress which might be needed will still fail – but that failed before this regression. We display a notice about this, mostly so that if it still fails (e.g. compressed) the user has some idea what is wrong. Closes: 805069
* drop privileges in copy:// method as we do for file://David Kalnischkies2015-11-051-27/+45
| | | | | | | | | | | Continueing on the track of dropping privileges in all methods, lets drop it in copy, too, as the reasoning for it is very similar to file and the interaction between the too quiet interesting as copy kinda surfed as a fallback for file not being able to read the file. Both now show a better error message as well as it was previously claiming to have a hashsum mismatch, given that it couldn't read the file. Git-Dch: Ignore
* tests: try to support spaces in TMPDIRDavid Kalnischkies2015-09-141-2/+2
| | | | | | | | Not all tests work yet, most notable the cdrom tests, but those require changes in libapt itself to have a proper fix and what we have fixed so far is good enough progress for now. Git-Dch: Ignore
* tests: use SHA1 checksum only by default in testsDavid Kalnischkies2015-09-141-0/+1
| | | | | | | | | This is mostly a small speedup for the testcases, but it is also handy to document which tests actually deal with a specific hash compared to those which 'just' need some hash which can be important while adding new hashes. Git-Dch: Ignore
* deal better with acquiring the same URI multiple timesDavid Kalnischkies2015-06-151-1/+1
| | | | | | | | | | | | | | | 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.
* chown finished partial files earlierDavid Kalnischkies2014-10-231-1/+11
| | | | | | | | | | | | | | | | | 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.
* autorun permission tests for all apt-get update callsDavid Kalnischkies2014-10-201-5/+0
| | | | | | | | 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
* testcases runable as rootDavid Kalnischkies2014-10-151-2/+11
| | | | | | | Running the testcases is usually not a good idea, but it can be handy to check if the privilege dropping works. Git-Dch: Ignore
* use _apt:root only for partial directoriesDavid Kalnischkies2014-10-071-0/+16
| | | | | | | | | | | | | | | | 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.
* allow fetcher setup without directory creationDavid Kalnischkies2014-09-271-2/+25
| | | | | | | | | | | 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
* remove duplicated apt-get download apt apt testMichael Vogt2014-02-131-4/+0
|
* Merge remote-tracking branch 'mvo/debian/sid' into debian/sidMichael Vogt2014-02-121-0/+5
|\ | | | | | | | | Conflicts: test/integration/test-apt-get-download
| * Use a APT::VersionSet instead of a VersionListMichael Vogt2014-02-121-0/+5
| | | | | | | | | | | | | | 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)
* | use VersionSet in download to handle repeatsDavid Kalnischkies2014-02-101-4/+9
|/ | | | Closes: 738103
* fix apt-get download truncation (closes: #736962)Michael Vogt2014-01-291-0/+7
|
* improve stdout/stderr usage correctness in test frameworkDavid Kalnischkies2014-01-171-1/+2
| | | | | | | | 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
* use pkgAcqArchive in 'download' for proper errorsDavid Kalnischkies2013-10-031-1/+2
| | | | | | | 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.
* merge patches from daniel to fix merge artifact and test failureMichael Vogt2013-03-251-1/+1
|
* * cmdline/apt-get.cc:David Kalnischkies2012-06-181-0/+4
| | | | - print a friendly message in 'download' if a package can't be downloaded (Closes: #677887)
* run apt-get download in quiet mode as it messes with output otherwiseDavid Kalnischkies2011-10-111-6/+5
|
* implement --print-uris for download commandDavid Kalnischkies2011-02-071-0/+29