summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* try xz instead of bz2 first for compressed filesDavid Kalnischkies2015-08-293-62/+62
| | | | | | | | | | | | | | | | | | 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.
* implement indextargets option 'DefaultEnabled'David Kalnischkies2015-08-296-29/+122
| | | | | | | | | | | 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.
* use c++11 algorithms to avoid strange compiler warningsDavid Kalnischkies2015-08-294-85/+61
| | | | | | | | | | | | | Nobody knows what makes the 'unable to optimize loop' warning to appear in the sourceslist minus-options parsing, especially if we use a foreach loop, but we can replace it with some nice c++11 algorithm+lambda usage, which also helps in making even clearer what happens here. And as this would be a lonely change, lets do it for a few more loops as well where I might or might not have seen the warning at some point in time, too. Git-Dch: Ignore
* implement PDiff patching for compressed filesDavid Kalnischkies2015-08-289-155/+281
| | | | | | | | | | | | | | | | | | 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.
* auto-prefix $(SITE) for indextargets Description fieldDavid Kalnischkies2015-08-271-10/+10
| | | | | | | | This updates the documentation for a change which actually happened in c2a4a8dded2dfb56dbcab9689b6cb4b96c9999b6 already. The acquire system expects the $(SITE) to be there (e.g. for mirror rewriting) so we are better of prefixing it automatically than giving frontends the chance to forget it. There is no point in not showing $(SITE) first anyway.
* sources.list and indextargets option for pdiffsDavid Kalnischkies2015-08-2710-9/+62
| | | | | | | Disabling pdiffs can be useful occasionally, like if you have a fast local mirror where the download doesn't matter, but still want to use it for non-local mirrors. Also, some users might prefer it to only use it for very big indextargets like Contents.
* Release 1.11~exp111.1.exp11Julian Andres Klode2015-08-2756-28274/+28458
|
* Fix test-security-no-remote-statusJulian Andres Klode2015-08-271-3/+3
| | | | Gbp-Dch: ignore
* Do not parse Status fields from remote sourcesJulian Andres Klode2015-08-275-1/+56
| | | | | | | | | | | 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.
* Merge branch 'feature/extractar-filefd' into debian/experimentalJulian Andres Klode2015-08-274-64/+61
|\
| * Use compressor support from FileFd for ExtractTar instead of programsJulian Andres Klode2015-08-271-56/+11
| | | | | | | | This way we do not depend on the decompressor programs anymore.
| * Add test for using ExtractTar on compressed filesJulian Andres Klode2015-08-272-2/+43
| | | | | | | | Git-Dch: ignore
| * Always close compressed files in FileFdJulian Andres Klode2015-08-271-6/+7
| | | | | | | | | | | | | | We dup() the file descriptor when opening compressed files, so we always need to close the dup()ed one. Furthermore, not unsetting the d-pointer causes issues when running OpenDescriptor() multiple times on the same file descriptor.
* | install: Set a local deb as the candidate for that packageJulian Andres Klode2015-08-272-0/+30
| | | | | | | | | | This ensures that we can install .deb files that are not the candidate for a given package.
* | cacheset: Prefer the depcache over the policy againJulian Andres Klode2015-08-271-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | By preferring the policy over the depcache, we ignore any changes we made in the depcache, which makes it impossible for code to change the candidate used here. This basically reverts commit 2fbfb111312257fa5fc29b0c2ed386fb712f960e: prefer the Policy if it is built instead of the DepCache and if DepCache is not available as fallback built the Policy But it also cleans the code up a bit, by removing one level of nesting.
* | debian/rules: Only do parallel build if specified in DEB_BUILD_OPTIONSJulian Andres Klode2015-08-271-0/+4
| | | | | | | | | | | | It was not nice to use 2 * number of cores in all cases. Thanks: Jakub Wilk for the suggestion
* | allow explicit dis/enable of IndexTargets in sources optionsDavid Kalnischkies2015-08-274-2/+93
| | | | | | | | | | | | | | 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'.
* | not all targets are deb-src targetsDavid Kalnischkies2015-08-271-1/+1
| | | | | | | | | | | | | | Sometimes too much refactoring can have bad effects. Thanks: Niels Thykier for reporting on IRC Git-Dch: Ignore
* | use always priv-dropping for changelog download as rootDavid Kalnischkies2015-08-273-8/+10
| | | | | | | | | | | | | | 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.
* | fix various typos reported by codespellDavid Kalnischkies2015-08-2718-59/+59
| | | | | | | | Reported-By: codespell
* | lintian: don't show the typofix as a typoDavid Kalnischkies2015-08-271-3/+3
| | | | | | | | Git-Dch: Ignore
* | add a libapt-pkg recommends aptDavid Kalnischkies2015-08-271-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | For many usecases like the acquire system libapt-pkg actually needs tools and config found in the apt package. apt tends to be installed everywhere libapt-pkg appears usually anyhow, but just in case to nudge users (and tools) in the right direction. Note that this isn't and shouldn't be a hard depends as there are usecases working perfectly without 'apt' and as this is such an esoteric problem incurring the costs arising from a Depends-Breaks-loop isn't deemd as worth it.
* | ignore AllowMem parameter in cache generationDavid Kalnischkies2015-08-272-16/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The parameter name suggests that it should forbid the building of the entire cache in memory, but this isn't how it was previously and as AllowMem is false by default it actually prevents previous usecases from working like being root and configuring apt to build no caches at all. This should be fixed at some point to actually work, but that is hard to pull off as it means switching the default and some callers (including apt itself) actually did call it explicitly with false in certain cases for no apparent reason (at least now where it is common to have enough memory to throw at every problem and even if not is a slow apt usally better than an apt erroring out). Closes: 796459
* | correct 'apt update' download summary lineDavid Kalnischkies2015-08-271-5/+6
| | | | | | | | | | | | | | | | Fetched() was reported for mostly nothing, while we should be calling it for files worked with from non-local sources (e.g. http, but not file or xz). Previously this was called from an acquire item, but got moved to the acquire worker instead to avoid having it (re)implemented in all items, but the checks were faulty.
* | Swedish program translation updateAnders Jonsson2015-08-271-878/+972
| | | | | | | | Closes: 796059
* | just-in-time removal of broken essential packagesDavid Kalnischkies2015-08-274-5/+64
| | | | | | | | | | | | | | | | 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
* | test for #796070: downgrades involving essential packagesJulian Andres Klode2015-08-271-0/+67
| | | | | | | | Git-Dch: Ignore
* | tests: check apt-get source release name switching with -tDavid Kalnischkies2015-08-271-0/+9
| | | | | | | | Git-Dch: Ignore
* | Fix more instances of missing remapping handlingJulian Andres Klode2015-08-271-7/+22
| | | | | | | | | | | | | | | | | | | | | | | | After fixing Bug#796999, we noticed that there were some more instances of iterators which had no associated Dynamic object, causing them to not be updated when the cache was remapped. This happened in two places: In NewPackage() and in NewProvidesAllArch(). Gbp-Dch: ignore
* | pkgcachegen: Account for remapping when parsing depends from NewPackageJulian Andres Klode2015-08-271-2/+6
|/ | | | | | | | | | | | | | | In both the Ver and Dep variables, we need to account for remapping, as otherwise we would still reference the old bug. Reproduction environment: * An i386 system with amd64 foreign architecture * A sources.list with deb http://snapshot.debian.org/archive/debian/20150826T102846Z/ unstable main deb http://snapshot.debian.org/archive/debian/20150826T102846Z/ experimental main Thanks: Jakub Wilk for the bug report and the backtraces Closes: #796999
* releasing package apt version 1.1~exp10Michael Vogt2015-08-2456-64374/+74970
|
* Fix typoMichael Vogt2015-08-242-2/+2
| | | | | Thanks: Julian Andres Klode Git-Dch: ignore
* doc/apt.conf.5.xml: document Acquire::EnableSrvRecodsMichael Vogt2015-08-211-0/+9
| | | | Git-Dch: ignore
* postinst: Correctly pass --home instead of -home, and fixup old userJulian Andres Klode2015-08-201-1/+6
| | | | Thanks: Niels Thykier for reporting this on IRC
* Re-indent GetCandidateVerNew() and make ConsiderFiles argument explicitJulian Andres Klode2015-08-201-7/+7
| | | | Gbp-Dch: ignore
* Merge remote-tracking branch 'mvo/feature/srv-records' into debian/experimentalMichael Vogt2015-08-208-14/+353
|\
| * Add basic (non weight adjusted) shuffling for SrvRecords selectionMichael Vogt2015-08-204-5/+97
| | | | | | | | | | Also add "Debug::Acquire::SrvRecs" debug option and the option "Acquire::EnableSrvRecods" to allow disabling this lookup.
| * apt-pkg/contrib/srvrec.cc: res_query() should not generate a _error->Warning()Michael Vogt2015-08-181-0/+2
| |
| * cleanupMichael Vogt2015-08-184-19/+20
| |
| * Merge remote-tracking branch 'upstream/debian/experimental' into ↵Michael Vogt2015-08-18368-13251/+17360
| |\ | | | | | | | | | feature/srv-records
| * \ Merge branch 'debian/experimental' into feature/srv-recordsMichael Vogt2015-08-18475-85638/+107322
| |\ \ | | | | | | | | | | | | | | | | | | | | Conflicts: cmdline/apt-helper.cc cmdline/makefile
| * | | WIP start randomizingMichael Vogt2014-05-232-2/+34
| | | |
| * | | when using srv records, use the next server if one fails to connectMichael Vogt2014-05-232-18/+41
| | | |
| * | | WIP make connect use GetSrvRecordsMichael Vogt2014-05-224-4/+37
| | | |
| * | | add sorting by priorityMichael Vogt2014-05-202-2/+10
| | | |
| * | | add GetSrvRecord helper to apt-pkg/contrib/srvrec.{cc,h}Michael Vogt2014-05-204-1/+149
| | | |
* | | | Support tabs in sources.list filesJulian Andres Klode2015-08-192-1/+7
| | | | | | | | | | | | | | | | | | | | | | | | Also support vertical tabs, as isspace() does the same. Closes: #796067
* | | | Add support for "apt-cache showsrc --only-source srcpkgname"Michael Vogt2015-08-185-5/+48
| | | | | | | | | | | | | | | | | | | | Thanks: Steve Slangasek for the suggestion Closes: 695633
* | | | Provide "apt-get full-upgrade" to match "apt full-upgrade"Michael Vogt2015-08-181-0/+1
| |_|/ |/| |
* | | releasing package apt version 1.1~exp9Michael Vogt2015-08-182-1/+283
| | |