summaryrefslogtreecommitdiff
path: root/test/integration
AgeCommit message (Collapse)Author
2015-09-14M-A: allowed pkgs of unconfigured archs do not statisfy :anyDavid Kalnischkies
We parse all architectures we encounter recently, which means we also parse packages from architectures which are neither native nor foreign, but still came onto the system somehow (usually via heavy force).
2015-09-14store ':any' pseudo-packages with 'any' as architectureDavid Kalnischkies
Previously we had python:any:amd64, python:any:i386, … in the cache and the dependencies of an amd64 package would be on python:any:amd64, of an i386 on python:any:i386 and so on. That seems like a relatively pointless endeavor given that they will all be provided by the same packages and therefore also a waste of space. Git-Dch: Ignore
2015-09-14tests: refactor printing of the quiet failure headerDavid Kalnischkies
Git-Dch: Ignore
2015-09-14tests: store msgmsg message for display in fail as wellDavid Kalnischkies
Git-Dch: Ignore
2015-09-07Set APT::FTPArchive::DoByHash to false by defaultMichael Vogt
"apt-ftparchive release" will create the by-hash files if this mode is enabled. This maybe unexpected by existing users so make it a opt-in. Git-Dch: ignore
2015-09-07Ensure that no by-hash file for "Release/InRelease is written"Michael Vogt
Git-Dch: ignore Brown-paperbag: yes Thanks: Donkult
2015-09-04Add support for writing by-hash dirs in apt-ftparchiveMichael Vogt
This option is enabled via the APT::FTPArchive::DoByHash switch. It will also honor the option APT::FTPArchive::By-Hash-Keep that controls how many previous generation of by-hash files should be kept (defaults to 3). Merged from https://github.com/mvo5/apt/tree/feature/apt-ftparchive-by-hash
2015-09-02tests: collect more details about failed checkdiffsDavid Kalnischkies
Git-Dch: Ignore
2015-09-01use unusable-for-security hashes for integrity checksDavid Kalnischkies
We want to declare some hashes as not enough for security, so that a user will need --allow-unauthenticated or similar to get data secured only by those hashes, but we can still us these hashes for integrity checks if we got them.
2015-09-01Consider md5sum no longer a usable hashMichael Vogt
The md5sum hash is broken since some time and we should no longer consider it a usable hash. Also update the tests to reflect this.
2015-09-01improve CheckDropPrivsMustBeDisabled furtherDavid Kalnischkies
Various smaller improvements so that the check deals better with already downloaded files, relative paths and other things. Git-Dch: Ignore
2015-08-31test: show the highlevel test for lowerranking onesDavid Kalnischkies
testsuccess checks the return code, but it does also some autotests based on the command like grepping for dpkg warnings in a apt-get install call – but if this finds something it is just showing the grep command. With this change it will additionally show the first msgtest which in this case will detail the actual apt-get install call. Git-Dch: Ignore
2015-08-31tests: store msgtest in -q mode for display in msgfailDavid Kalnischkies
Not-quiet output is very verbose and with our growing array of tests generates many many lines which e.g. kills the log display in travis-ci and obscures failures and uncatched output in a wall of details. The -q mode fixed this by callapsing passed tests to a single P and now with some rework we can even get failures properly displayed with the message from msgtest. Git-Dch: Ignore
2015-08-31tavis: run testcases a second time, but as rootDavid Kalnischkies
Git-Dch: Ignore
2015-08-31do delay the test for http, too, to make it more reliableDavid Kalnischkies
The file method was already slowed down and somehow I thought I had done the same for http, but it turns out that I didn't. Giving it the same delay as file should help in making this test slower and therefore more likely to successfully test what it is supposed to test. Git-Dch: Ignore
2015-08-31if file is inaccessible for _apt, disable privilege drop in acquireDavid Kalnischkies
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.
2015-08-30detect and deal with indextarget duplicatesDavid Kalnischkies
Multiple targets downloading the same file is bad™ as it leads us to all sorts of problems like the acquire system breaking or simply a problem of which settings to use for them. Beside that this is most likely a mistake and silently ignoring it doesn't help the user realizing his mistake… On the other hand, we have 'duplicates' which are 'created' by how we create indextargets, so we have to prevent those from being created to but do not emit a warning for them as this is an implementation detail. And then, there is the absolute and most likely user mistake: Having the same target(s) activated in multiple entries.
2015-08-29try xz instead of bz2 first for compressed filesDavid Kalnischkies
xz has pretty much won "the compressor war" and e.g. the Debian archive doesn't even distribute bz2 anymore in favor of 'xz' and 'gz', so by changing the default order we have a more realistic --print-uris behavior as it will always show the first compressor. In practice this effects repositories without a Release file (very bad, we don't want to support them anymore anyhow) as xz will be tried before bz2 now [which is probably not available, but so might be bz2…] AND repositories which provide both, bz2 and xz (which isn't too common) in sofar as apt will now download xz instead of bz2. Users with special needs can stick with bz2 as first compressor tried with Acquire::CompressionTypes::Order:: "bz2"; (see man apt.conf) – but users with special needs usually prefer "gz" anyhow, so the realworld change is expected to be very low.
2015-08-29implement indextargets option 'DefaultEnabled'David Kalnischkies
Some targets like Contents-udeb are special-needs targets. Shipping the configuration snippet for them is okay, but they shouldn't be downloaded by default. Forcing the user to enable targets by uncommenting targets is wrong and this would still not really solve the problem completely as even if you want to download some -udebs it will probably not be for all sources you have enabled, so having the possibility of disabling a target by default, but giving the user the option to enable it on a per-source entry basis is better.
2015-08-28implement PDiff patching for compressed filesDavid Kalnischkies
Some additional files like 'Contents' are very big and should therefore kept compressed on the disk, which apt-file did in the past. It also implemented pdiff patching of these files by un- and recompressing these files on-the-fly, with this commit we can do the same – but we can do this in both pdiff patching styles (client and server merging) and secured by hashes. Hashes are in so far slightly complicated as we can't compare the hashes of the compressed files as we might compress them differently than the server would (different compressor versions, options, …), so we must compare the hashes of the uncompressed content. While this commit has changes in public headers, the classes it changes are marked as hidden, so nobody can use them directly, which means the ABI break is internal only.
2015-08-27Fix test-security-no-remote-statusJulian Andres Klode
Gbp-Dch: ignore
2015-08-27Do not parse Status fields from remote sourcesJulian Andres Klode
This could allow an attacker to mark a package as installed in a remote package index, as long as the package was not listed in the dpkg status file. This way, an attacker could force the installation of a package during a dist-upgrade, by providing two packages in an index, an older marked as installed, and a newer - apt would "upgrade" to the newer version.
2015-08-27install: Set a local deb as the candidate for that packageJulian Andres Klode
This ensures that we can install .deb files that are not the candidate for a given package.
2015-08-27allow explicit dis/enable of IndexTargets in sources optionsDavid Kalnischkies
While Target{,-Add,-Remove} is available for configuring IndexTargets already, allow Targets to be mentioned explicitely as yes/no options as well, so that the Target 'Contents' can be disabled via 'Contents: no' as well as 'Target-Remove: Contents'.
2015-08-27use always priv-dropping for changelog download as rootDavid Kalnischkies
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.
2015-08-27fix various typos reported by codespellDavid Kalnischkies
Reported-By: codespell
2015-08-27just-in-time removal of broken essential packagesDavid Kalnischkies
We deal with Conflicts in SmartUnpack in pretty much the same way, but Breaks weren't handled in SmartConfigure so that the remove was sheduled after the configuration of the package breaking the to-be-removed. Closes: 796070
2015-08-27test for #796070: downgrades involving essential packagesJulian Andres Klode
Git-Dch: Ignore
2015-08-27tests: check apt-get source release name switching with -tDavid Kalnischkies
Git-Dch: Ignore
2015-08-19Support tabs in sources.list filesJulian Andres Klode
Also support vertical tabs, as isspace() does the same. Closes: #796067
2015-08-18Add support for "apt-cache showsrc --only-source srcpkgname"Michael Vogt
Thanks: Steve Slangasek for the suggestion Closes: 695633
2015-08-17Fix the test suite harderJulian Andres Klode
Gbp-Dch: ignore
2015-08-17Fix the test suite againJulian Andres Klode
Gbp-Dch: ignore
2015-08-14Add integration test for Pin-Priority range checksJulian Andres Klode
Gbp-Dch: ignore
2015-08-14Replace --force-yes by various options starting with --allowJulian Andres Klode
This enables more fine grained control over such exceptions.
2015-08-14Merge branch 'debian/experimental' of https://github.com/DonKult/apt into ↵Julian Andres Klode
debian/experimental
2015-08-13Remove an invalid fi from a testcaseJulian Andres Klode
Gbp-Dch: ignore
2015-08-13Fix integration tests for the removal of the Package pin outputJulian Andres Klode
This should make them work again.
2015-08-12Replace all "press enter" occurrences with "press [Enter]"Luca Bruno
Thanks: Andre Felipe Machado for initial patch Closes: 414848
2015-08-12replace direct calls to egrep with grep -EDaniel Hartwig
The rest of the initial patch is not needed or incorrect in our usage. Big changes for the dselect scripts seem unneeded as well as those are hardly used by anyone anymore… [commit message written by commiter] Closes: 255577 Thanks: David Weinehall for initial patch
2015-08-12travis: add ppa:ubuntu-toolschain-r/test as source for gcc-5David Kalnischkies
This makes travis-ci able to run our tests again. Sometimes. If it doesn't spontaneously fails with internal gcc errors… Git-Dch: Ignore
2015-08-10move manual-bit from 'oldlibs' pkg to its dependenciesDavid Kalnischkies
oldlibs used to be in APT::Never-MarkAuto-Sections so that old transition packages can be removed without causing the then (autoinstalled) renamed package to be autoremoved. It isn't ideal through as ideally you want the oldlibs package to be removed after nothing depends on it anymore regardless of if you have once installed it by hand or not – and if you had the package talking over (the dependencies) should carry the manual bit now as they are the real deal now. As an added bonus if the package has no dependencies because it is an oldlibs without a direct replacement you should move away from (like lib1 and lib2 are currently in the archive, but there will hopefully only be lib2 in the release) you get a lib1 marked as auto. If the user still needs the oldlibs package for some reason all he has to do is mark it as manual once as this move is only performed if a installed package changes its section from a not-Move-Autobit-Sections to a Move-Autobit-Sections.
2015-08-10move APT::Never-MarkAuto-Sections handling to MarkDeleteDavid Kalnischkies
Having the handling in MarkInstall means that it just effects installation of the metapackage, but if the dependencies change the new dependencies aren't protected (and the old dependencies are still protected for no 'reason'). Having it in MarkDelete means that if a metapackage is sheduled for removal all its currently installed dependencies are marked as manual, which helps against both as in this case there is no new/old and additionally if a user decides the installation of a metapackage was wrong he can just remove it explicitely avoid the manual marking entirely.
2015-08-10no value for MultiArch field is 'no', not 'none'David Kalnischkies
Git-Dch: Ignore
2015-08-10mark again deps of pkgs in APT::Never-MarkAuto-Sections as manualDavid Kalnischkies
In 50ef3344c3afaaf9943142906b2f976a0337d264 (and similar for other branches), while 'fixing' the edgecase of a package being in multiple sections (e.g. moved from libs to oldlibs in newer releases) I accidently broke the feature itself completely by operating on the package itself and no longer on its dependencies… The behaviour isn't ideal in multiple ways, which we are hopefully able to fix with new ideas as mentioned in the buglog, but until then the functionality of this "hack" should be restored. Reported-By: Raphaël Hertzog <hertzog@debian.org> Tested-By: Adam Conrad <adconrad@ubuntu.com> Closes: 793360 LP: 1479207 Thanks: Raphaël Hertzog and Adam Conrad for detailed reports and initial patches
2015-08-10drop extra newline in 'Failed to fetch' and 'GPG error' messageDavid Kalnischkies
I never understood why there is an extra newline in those messages, so now is as good time as any to drop them. Lets see if someone complains with a good reason to keep it…
2015-08-10enhance "hit paywall" error message to mention the probable causeDavid Kalnischkies
Reporting errors from Done() is bad for progress reporting and such, so factoring this out is a good idea and we start with moving the supposed- to-be clearsigned file isn't clearsigned out first – improving the error message in the process as we use the same message for a similar case (NODATA) as this is what I have to look at with the venue wifi at DebCamp and the old errormessage doesn't really say anything.
2015-08-10parse packages from all architectures into the cacheDavid Kalnischkies
Now that we can dynamically create dependencies and provides as needed rather than requiring to know with which architectures we will deal before running we can allow the listparser to parse all records rather than skipping records of "unknown" architectures. This can e.g. happen if a user has foreign architecture packages in his status file without dpkg knowing about this architecture (or apt configured in this way). A sideeffect is that now arch:all packages are (correctly) recorded as available from any Packages file, not just from the native one – which has its downsides for the resolver as mixed-arch source packages can appear in different architectures at different times, but that is the problem of the resolver and dealing with it in the parser is at best a hack (and also depends on a helpful repository). Another sideeffect is that his allows :none packages to appear in Packages files again as we don't do any kind of checks now, but given that they aren't really supported (anymore) by anyone we can live with that.
2015-08-10elimate duplicated code in pkgIndexFile subclassesDavid Kalnischkies
Trade deduplication of code for a bunch of new virtuals, so it is actually visible how the different indexes behave cleaning up the interface at large in the process. Git-Dch: Ignore
2015-08-10add volatile sources support in libapt-pkgDavid Kalnischkies
Sources are usually defined in sources.list (and co) and are pretty stable, but once in a while a frontend might want to add an additional "source" like a local .deb file to install this package (No support for 'real' sources being added this way as this is a multistep process). We had a hack in place to allow apt-get and apt to pull this of for a short while now, but other frontends are either left in the cold by this and/or the code for it looks dirty with FIXMEs plastering it and has on top of this also some problems (like including these 'volatile' sources in the srcpkgcache.bin file). So the biggest part in this commit is actually the rewrite of the cache generation as it is now potentially a three step process. The biggest problem with adding support now through is that this makes a bunch of previously mostly unusable by externs and therefore hidden classes public, so a bit of further tuneing on this now public API is in order…