summaryrefslogtreecommitdiff
path: root/test/integration/test-apt-get-changelog
Commit message (Collapse)AuthorAgeFilesLines
* Print useful error on "apt changelog" without argumentsJulian Andres Klode2018-11-211-0/+5
| | | | Fixes Debian/apt#77
* Default to https: scheme for fetching Debian changelogsBen Hutchings2018-10-131-2/+2
| | | | Closes: #910941
* Use https for Ubuntu changelogsJulian Andres Klode2018-03-151-4/+4
| | | | We just enabled https on changelogs.ubuntu.com, let's use it.
* changelog: Respect Dir setting for local changelog gettingJulian Andres Klode2016-08-261-3/+3
| | | | | This fixes issues with chroots, but the goal here was to get the test suite working on systems without dpkg.
* drop empty line from fetch errorDavid Kalnischkies2016-04-251-4/+4
| | | | | | | | This is a duplicate of sorts of 0efb29eb36184bbe6de7b1013d1898796d94b171 which is the a lot more frequent case of this error – and also a duplicate of this error message, just without the \n at the end. Git-Dch: Ignore
* deal with partially downloaded changelogsDavid Kalnischkies2016-03-061-0/+6
| | | | | | | | | | | | Changelogs are relatively small and we have no hashes for them, but we had partial support for them before, so lets stick to it. This also deletes the (partial) file before moving the downloaded file into its place – rename(2) should be doing this by itself, but testing on semaphoreci suggests that this isn't always the case (error is "Stale file handle") and we don't need an atomic replace here, so be explicit. Git-Dch: Ignore
* always download changelogs into /tmp firstDavid Kalnischkies2016-02-111-17/+15
| | | | | | | | | | pkgAcqChangelog has the default behaviour of downloading a changelog to a temporary directory (inside /tmp, not /tmp directly), which is cleaned up on shutdown, but this can be overridden to store the changelog more permanently – but that caries a permission problem. For changelog we can 'easily' solve this by always downloading to a temporary directory and only move it out of there on done.
* use local changelog from /usr/share/doc if possibleDavid Kalnischkies2016-02-111-0/+23
| | | | | | | | | | | If pkgAcqChangelog is told to acquire the changelog for a version it will check first if this version is installed on the disk and if so will use the local changelog in /usr/share/doc (possibily/likely gz compressed) instead of downloading the file from the web. An option is provided to disable this, which is enabled by default for the Ubuntu vendor as they truncate the local changelogs – and for apts --print-uris action.
* 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
* use @CHANGEPATH@ as placeholder in changelog URI templatesDavid Kalnischkies2015-12-021-8/+8
| | | | | | | | | This should make it more obvious that CHANGEPATH is a placeholder which apt will replace with a package specific path rather than a string constant. Mail-Reference: <87d1upgvaf.fsf@deep-thought.43-1.org> Mail-Archive: https://lists.debian.org/debian-dak/2015/12/msg00005.html
* tests: don't use hardcoded port for http and httpsDavid Kalnischkies2015-09-151-15/+15
| | | | | | This allows running tests in parallel. Git-Dch: Ignore
* if file is inaccessible for _apt, disable privilege drop in acquireDavid Kalnischkies2015-08-311-2/+6
| | | | | | | | | | | | | | | We had a very similar method previously for our own private usage, but with some generalisation we can move this check into the acquire system proper so that all frontends profit from this compatibility change. As we are disabling a security feature here a warning is issued and frontends are advised to consider reworking their download logic if possible. Note that this is implemented as an all or nothing situation: We can't just (not) drop privileges for a subset of the files in a fetcher, so in case you have to download some files with and some without you need to use two fetchers.
* use always priv-dropping for changelog download as rootDavid Kalnischkies2015-08-271-4/+5
| | | | | | | First of, the temporary directory we download the changelog to needs to be owned by _apt, but that also means that we don't need to check if we could/should drop privs as the download happens to a dedicated tempdir and only after that it is moved to its final location by a privileged user.
* provide a public interface for acquiring changelogsDavid Kalnischkies2015-06-151-25/+79
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Provided is a specialized acquire item which given a version can figure out the correct URI to try by itself and if not provides an error message alongside with static methods to get just the URI it would try to download if it should just be displayed or similar such. The URI is constructed as follows: Release files can provide an URI template in the "Changelogs" field, otherwise we lookup a configuration item based on the "Label" or "Origin" of the Release file to get a (hopefully known) default value for now. This template should contain the string CHANGEPATH which is replaced with the information about the version we want the changelog for (e.g. main/a/apt/apt_1.1). This middleway was choosen as this path part was consistent over the three known implementations (+1 defunct), while the rest of the URI varies widely between them. The benefit of this construct is that it is now easy to get changelogs for Debian packages on Ubuntu and vice versa – even at the moment where the Changelogs field is present nowhere. Strictly better than what apt-get had before as it would even fail to get changelogs from security… Now it will notice that security identifies as Origin: Debian and pick this setting (assuming again that no Changelogs field exists). If on the other hand security would ship its changelogs in a different location we could set it via the Label option overruling Origin. Closes: 687147, 739854, 784027, 787190
* test exitcode as well as string equalityDavid Kalnischkies2015-03-161-2/+2
| | | | | | | | We use test{success,failure} now all over the place in the framework, so its only consequencial to do this in the situations in which we test for a specific output as well. Git-Dch: Ignore
* fix file ownership tests to work on kfreebsdDavid Kalnischkies2014-11-181-2/+2
| | | | | | While on linux files are created in /tmp with $USER:$USER, on my kfreebsd testmachine they are created with $USER:root, so we pull some strings here to make it work on both.
* chown finished partial files earlierDavid Kalnischkies2014-10-231-10/+15
| | | | | | | | | | | | | | | | | 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.
* testcases runable as rootDavid Kalnischkies2014-10-151-5/+4
| | | | | | | Running the testcases is usually not a good idea, but it can be handy to check if the privilege dropping works. Git-Dch: Ignore
* allow fetcher setup without directory creationDavid Kalnischkies2014-09-271-0/+6
| | | | | | | | | | | 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
* don't call pager in non-terminals for changelogDavid Kalnischkies2014-09-091-3/+2
| | | | | | | | | | | | | | | 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
* enforce 'house-style' on changelog testcaseDavid Kalnischkies2014-02-141-5/+5
| | | | Git-Dch: Ignore
* * cmdline/apt-get.cc:Daniel Hartwig2012-06-101-0/+3
| | | | | - print URIs for all changelogs in case of --print-uris, thanks to Daniel Hartwig for the patch! (Closes: #674897)
* rename changelog and autoremove testfile to indicate better what is testedDavid Kalnischkies2011-02-071-0/+36