summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Release 2.3.112.3.11Julian Andres Klode2021-10-2148-491/+508
|
* Invalidate cached architecture list when building cacheJulian Andres Klode2021-10-192-1/+5
| | | | | | | | Fix a regression in python-apt where switching the architectures in the config between cache invocations regressed. Regression-Of: 8ff4e226af55a9feb168477a2b1a99f9c5152e54 Gbp-Dch: full
* Merge branch 'feature/install-versioned-provides' into 'main'Julian Andres Klode2021-10-197-67/+287
|\ | | | | | | | | Allow =version and /release selectors on virtual packages See merge request apt-team/apt!121
| * Allow =version and /release selector on virtual packagesDavid Kalnischkies2020-05-275-60/+253
| | | | | | | | | | | | | | | | | | | | | | We already have code for figuring out if a virtual package is only provided by a single provider (and otherwise show a list) we can auto-select for the user, so we can adapt that to work with versioned provides as well and while at it also release selectors. The code tries to keep ABI backward compatible and hence turns relatively ugly as we need a parameter (the selector) to be passed around without adding a parameter or new virtual methods.
| * Allow version selection to match versioned self-providesDavid Kalnischkies2020-05-272-7/+34
| | | | | | | | | | Edgecase of an edgecase at best, but it works just fine as a dependency, so it should really work on the commandline as well.
* | Respect NO_COLOR environment variableJulian Andres Klode2021-10-192-2/+3
| | | | | | | | | | When color has not been turned on explictly in the configuration file or options, only turn it on if NO_COLOR is not set.
* | Merge branch 'fakechroot' into 'main'Julian Andres Klode2021-10-191-2/+12
|\ \ | | | | | | | | | | | | apt-pkg/deb/dpkgpm.cc: make DPkg::Chroot-Directory work under fakechroot See merge request apt-team/apt!189
| * | apt-pkg/deb/dpkgpm.cc: make DPkg::Chroot-Directory work under fakechrootJohannes Schauer Marin Rodrigues2021-09-191-2/+12
| | |
* | | Release 2.3.102.3.10Julian Andres Klode2021-10-1816-27/+544
| | |
* | | Merge branch 'pu/signed-by-embedded-key' into 'main'Julian Andres Klode2021-10-185-9/+104
|\ \ \ | | | | | | | | | | | | | | | | Add support for embedding PGP keys into Signed-By in deb822 sources See merge request apt-team/apt!176
| * | | Only allow full Signed-By keys where filenames are allowedJulian Andres Klode2021-10-181-3/+5
| | | | | | | | | | | | | | | | | | | | | | | | Rename the argument to Introducer and generalize it to anything that introduces new keys into the trusted vector, like file names and full keys.
| * | | Add support for embedding PGP keys into Signed-By in deb822 sourcesJulian Andres Klode2021-10-184-5/+98
| | | | | | | | | | | | | | | | | | | | | | | | Extend the Signed-By field to handle embedded public key blocks, this allows shipping self-contained .sources files, making it substantially easier to provide third party repositories.
| * | | acquire-item: Quote Signed-By before sending itJulian Andres Klode2021-10-181-2/+2
|/ / / | | | | | | | | | | | | | | | This currently has no effect, as there are no quotable characters inside it, but it will allow us to send embedded keys through to the method.
* | | Merge branch 'pu/content-length-0' into 'main'Julian Andres Klode2021-10-182-15/+28
|\ \ \ | | | | | | | | | | | | | | | | basehttp: Turn HaveContent into a TriState See merge request apt-team/apt!179
| * | | Set haveContent to FALSE on `Content-Length: 0`Julian Andres Klode2021-07-011-3/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Set haveContent to HaveContent::FALSE when Content-Length is 0, and change remaining code to only set it to TRUE if it has not been set so far. Closes: #990281
| * | | basehttp: Turn HaveContent into a TriStateJulian Andres Klode2021-07-012-15/+22
| | | | | | | | | | | | | | | | | | | | | | | | We need to be able to set HaveContent to false if the Content-Length is 0, and not have that overriden just because a later header is Content-Type.
* | | | Merge branch 'pu/ifrange' into 'main'Julian Andres Klode2021-10-184-6/+125
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | Add AllowRange option to disable HTTP Range usage See merge request apt-team/apt!188
| * | | | Use exact If-Range match in our test webserverDavid Kalnischkies2021-09-162-4/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | RFC7233 3.2 If-Range specifies the comparison to be an exact match, not a less or equal, which makes no sense in this context anyhow. Our server exists only to write our tests against it so this isn't much of a practical issue. I did confirm with a crashing server that no test (silently) depends on this or exhibits a different behaviour not explicitly checked for.
| * | | | Disable HTTP Range usage if varnish < 6.4 is involvedDavid Kalnischkies2021-09-162-0/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Debian buster (oldstable) ships 6.1 while bullseye (stable) ships 6.5 and so the later is 'fixed'. Upstream declares 6.0 still as supported. It might be still a while we encounter "bad" versions in the wild, so if we can detect and work around the issue at runtime automatically we can save some users from running into "persistent" partial files. References: https://varnish-cache.org/docs/6.4/whats-new/changes-6.4.html#changes-in-behavior
| * | | | Add AllowRange option to disable HTTP Range usageDavid Kalnischkies2021-09-163-5/+83
| | |/ / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | apt makes heavy usage of HTTP1.1 features including Range and If-Range. Sadly it is not obvious if the involved server(s) (and proxies) actually support them all. The Acquire::http::AllowRange option defaults to true as before, but now a user can disable Range usage if it is known that the involved server is not dealing with such requests correctly.
* | | | Merge branch 'fix/file-https-proxy' into 'main'Julian Andres Klode2021-10-1814-105/+173
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | Fix file:/// vs file:/ hang & https-proxy for http See merge request apt-team/apt!187
| * | | | Use https config on https proxies for http serversDavid Kalnischkies2021-09-135-69/+119
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The settings used for unwrapping TLS connections depend on the access and hostname we connect to more than what we eventually unwrap. The bugreport mentions CaInfo, but all other https-settings should also apply (regardless of generic or hostname specific) to an https proxy, even if the connection we proxy through it is http-only. Closes: #990555
| * | | | Read and work with canonical file-URIs from sources.listsDavid Kalnischkies2021-09-139-36/+54
| |/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We allow file (and other file-based methods) URIs to either be given as file:///path or as file:/path, but in various places of the acquire system we perform string comparisons on URIs which do not handle this expecting the canonical representation produced by our URI code. That used to be hidden by us quoting and dequoting the URIs in the system, but as we don't do this anymore we have to be a bit more careful on input. Ideally we would do less of these comparisons, but for now lets be content with inserting a canonicalisation early on to prevent hangs in the acquire system.
* | | | Merge branch 'bug-989558' into 'main'Julian Andres Klode2021-10-184-2/+30
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | add pattern to select packages by priority (closes: #989558) See merge request apt-team/apt!185
| * | | | add pattern to select packages by priority (closes: #989558)Johannes Schauer Marin Rodrigues2021-10-044-2/+30
| | | | |
* | | | | Merge branch 'feature/barbarianarchs' into 'main'Julian Andres Klode2021-10-1817-132/+604
|\ \ \ \ \ | |_|/ / / |/| | | | | | | | | | | | | | Streamline access to barbarian architecture functionality See merge request apt-team/apt!184
| * | | | Streamline access to barbarian architecture functionalityDavid Kalnischkies2021-09-048-24/+219
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | APT is not the place this information should be stored at, but it is a good place to experiment and see what will be (not) needed in the future for a proper implementation higher up the stack. This is why "BarbarianArchitectures" is chosen instead of a more neutral and/or sensible "VeryForeign" and isn't readily exported in the API to other clients for this PoC as a to be drawn up standard will likely require potentially incompatible changes. Having a then outdated and slightly different implementation block a "good" name would be bad. The functionality itself mostly exists (ignoring bugs) since the introduction of MultiArch as we always had the risk of encountering packages of architectures not known to dpkg (forced onto the system, potentially before MultiArch) we had to deal with somehow and other edge cases. All this commit really does is allowing what could previously only be achieved with editing sources.list and some conf options via a single config option: -o APT::BarbarianArchitectures=foo,bar
| * | | | Barbarian M-A:allowed don't satisfy :any deps of other archsDavid Kalnischkies2021-09-042-4/+256
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | What does a M-A:allowed package from non-native/non-foreign architecture provide? If we look at M-A:foreign, such a package satisfies dependencies within its own architecture, but not in other architectures, so the same should apply to :any dependencies on M-A:allowed packages, but we have a problem: While unqualified package names are architecture-specific, the virtual package name qualified with :any is not (see 3addaba1ff). We could of course make it architecture-specific now, but that would introduce many virtual packages for this relatively minor usecase and would reintroduce a need for special display handling. So, we pull a trick here: Barbarian M-A:allowed packages do not provide the architecture-independent :any package anymore, but only a specific one and every :any dependency from a barbarian package is rewritten to an or-group of the specific and the independent :any package. References: 3addaba1ff
| * | | | Do not make provides of M-A:allowed implicit M-A:foreignDavid Kalnischkies2021-09-042-22/+38
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As we don't know which architectures we will deal with and to avoid creating many "unneeded" packages (and provides) the cache generation uses a scheme of on-demand creation (see ecc138f858). This assumed a particular handling of :any which got changed later (3addaba1ff) making this code path not only no longer needed for M-A:allowed, but actually wrong as it would go on and create provides for the explicit Provides of a package as if the package would be M-A:foreign. The result was that a package A:amd64 providing B tagged as M-A:allowed would satisfy a "C:armel depends on B". Note that this bug does NOT effect "C:armel depends on A" which is (correctly) not satisfied as before. References: ecc138f858, 3addaba1ff
| * | | | Do not strip M-A for native build-dep resolutionDavid Kalnischkies2021-09-042-24/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Back than M-A was added to build-dependencies (#558104) only the qualifiers :native and :any were considered at first which for the native case behave the same, so stripping was a good idea. Nowadays we could encounter arch-qualified dependencies, too, through – or slightly more likely conflicts perhaps – at least in theory as in practice native build-dep operations in Debian and elsewhere wouldn't have other architectures available anyhow. Still, we have full support for all this for the crossbuilding case which makes active use of this (at least is far more likely to do so), so it seems better to converge on one edgecase rather than keeping two in active use and so produce potentially different results for not specifying -a and -a $native.
| * | | | Refactor architecture handling in EDSP/EIPP codeDavid Kalnischkies2021-09-041-20/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This just moves code around without actually changing anything. Gbp-Dch: Ignore
| * | | | Move apt specific test setup into its own functionDavid Kalnischkies2021-09-041-32/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | APTs ad hoc testing framework for integration tests is not intending to be a general propose framework, but it is relatively easy to abuse it for other projects anyhow with some refactoring even if that is neither recommend nor officially supported. Gbp-Dch: Ignore
| * | | | Ensure dpkg -C works correctly in our testcasesDavid Kalnischkies2021-09-043-2/+12
| | | | | | | | | | | | | | | | | | | | Gbp-Dch: Ignore
| * | | | All pkgCaches are MultiArch cachesDavid Kalnischkies2021-09-042-5/+2
| |/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Back in 2015 the code inside libapt who was using this field was dropped as even if we are on a system which is not configured for MultiArch, there are still edge cases in which the cache can include very foreign packages, so any assumption you could make thinking only a single architecture will be in the cache is probably wrong. Maintaining two different codepaths for Multi- and SingleArch is likely not very beneficial for code and users alike and is surprisingly hard to answer correctly and becoming even harder still, so always assuming the "worst case" seems like the far better option. References: 6c9937da76b9155d166092b9dda22d06200510c1
* | | | Release 2.3.92.3.9Julian Andres Klode2021-09-075-6/+23
| | | |
* | | | Improve error handling of cycling delayed queuesJulian Andres Klode2021-09-061-5/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When an item has been delayed and the queue is cycled to start it, we did not properly report an error from the cycling, and we would then fail in the assert(), causing all errors to be lost. Propagate the error instead and make the assert a warning.
* | | | Merge branch 'fix/recursivemark' into 'main'Julian Andres Klode2021-09-0611-129/+281
|\ \ \ \ | |/ / / |/| | | | | | | | | | | Fix infinite recursions in MarkPackage and improve recursions in general See merge request apt-team/apt!183
| * | | Increase recursion limits from 100 to 3000David Kalnischkies2021-08-293-5/+78
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If you install dpkg on an empty status file with all recommends and suggests apt wants to install 4000+ packages. The deepest chain seemingly being 236 steps long. And dpkg isn't even the worst (~259). That is a problem as libapt has a hardcoded recursion limit for MarkInstall and friends … set to 100. We are saved by the fact that chains without suggests are much shorter (dpkg has 5, max seems ~43), but I ignored Conflicts in these chains, which typically trigger upgrades, so if two of the worst are chained together we suddenly get dangerously close to the limit still. So, lets just increase the limit into oblivion as it is really just a safety measure we should not be running into to begin with. MarkPackage was running years without it after all. 3000 is picked as a nice number as any other and because it is roughly the half of the stack crashs I saw previously in this branch.
| * | | Stop autoremover from endlessly exploring cyclic providersDavid Kalnischkies2021-08-282-1/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | fullyExplored is needed to keep track of having explored all providers of a package name, while Marked is tracking if we have explored a given real package (along its chosen version), so we should stop MarkPackage from exploring a (real) package if it is marked and let fullyExplored only guard the looping over the individual dependencies. The testcase is deceptively simple, but in practice only an ecosystem like rust who makes heavy use of cyclic dependency relations intermixed with versioned provides actually triggers this as seen by the buggy code being in use for four months in Debian and Ubuntu development releases. (easier to trigger if most packages are marked manual installed) Note that the testcase is successful already due to the earlier changes as we exit the recursion eventually and all packages are marked as they need to be already, but this fix does work standalone as well. Closes: #992993
| * | | Don't venture too deeply in AutoRemovers MarkPackageDavid Kalnischkies2021-08-281-9/+16
| | | | | | | | | | | | | | | | | | | | | | | | MarkInstall has the same depth limit, so lets use this arbitrary limit to avoid trying to hard as that usually means we will never stop – at least not until we crash, which is not a very good error case.
| * | | Move hidden MarkPackage to a static functionDavid Kalnischkies2021-08-282-113/+93
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We can't have external users as its marked hidden and as we don't even have users outside of pkgDepCache itself we can remove the function completely from the public eye. That adds many new parameters, but it also allows to add a few more like avoiding constantly checking the debug config value. Gbp-Dch: Ignore
| * | | Simplify selection of highest source version providersDavid Kalnischkies2021-08-281-6/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The old code is a bit longer and does a sort (N*log(N)) + find (at most N) It is replaced by max_element (N) + remove_if (N). The practical difference is minimal as the N we operate on is rather small, but the replacement is hopefully easier to understand at a glance as well. Gbp-Dch: Ignore
| * | | Inhibit autoremove calculation in apt-mark and apt showDavid Kalnischkies2021-08-282-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | As we never display the information in these code paths there isn't a lot of point in calculating it first saving us some precious CPU cycles. References: d6f3458badf2cfea3ca7de7632ae31daff5742be
| * | | Try to show core dump info in test frameworkDavid Kalnischkies2021-08-284-5/+65
|/ / / | | | | | | | | | | | | | | | | | | | | | If the system tells us that a core dump was created we should try to display the contained info as that system might not be easily available when we see the error (like C-I or autopkgtest). Gbp-Dch: Ignore
* | | Dutch manpages translation updateFrans Spiesschaert2021-08-181-25/+13
| | | | | | | | | | | | Closes: #992352
* | | Release 2.3.82.3.8Julian Andres Klode2021-08-145-6/+13
| | |
* | | Bump to C++17Julian Andres Klode2021-08-092-2/+2
| | | | | | | | | | | | | | | Comparison operators need to be const-invocable now, but otherwise no change seems necessary.
* | | Release 2.3.72.3.7Julian Andres Klode2021-07-2915-37/+160
| | |
* | | Merge branch 'pu/fetch-at' into 'main'Julian Andres Klode2021-07-297-17/+139
|\ \ \ | | | | | | | | | | | | | | | | Main-process-side implementation of retry back-off See merge request apt-team/apt!181
| * | | tests (retry-downloads): Avoid delay in second testJulian Andres Klode2021-07-291-1/+1
| | | | | | | | | | | | | | | | This delay of 4+2+1=7 seconds in unnecessary.