summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Release 1.2.61.2.6Julian Andres Klode2016-03-0713-13/+26
|
* apt-pkg/algorithms.cc: Avoid stack buffer overflow in KillListJulian Andres Klode2016-03-071-10/+9
| | | | | | | | Dynamically allocate KillList in order to avoid an overflow when more than 100 elements would be written to it. This happened while playing around with the status file from Bug#701069 on a modern system.
* Fix several typosVeres Lajos2016-03-0718-37/+37
| | | | | | | | | | | | | This effectively merges branch 'typofixes-vlajos-20150807' of github.com:vlajos/apt with the following commit: commit 13cacb3e2e2352ba701e769fc889e3344fabbf7e Author: Veres Lajos <vlajos@gmail.com> Date: Sun Aug 9 00:12:53 2015 +0100 typofix - https://github.com/vlajos/misspell_fixer It has been rebased for a better commit message.
* Release 1.2.51.2.5Julian Andres Klode2016-03-0613-13/+35
|
* debian/control: Set Standards-Version to 3.9.7Julian Andres Klode2016-03-061-1/+1
| | | | | | | We do not follow the recommendation with regards to placement of documentation in apt-doc, as we install in apt-doc, but it's only a recommendation and I don't want think we should move them.
* get group again after potential remap in Source: parseDavid Kalnischkies2016-03-061-1/+3
| | | | | | | | | | | | | | | | Mysteriously segfaults only on i386 for me, but at least one reporter had the same behavior and it makes sense that this is the problem as the parsing of Source: was fixed in 1.2.2 – before the not remapped group was not used. We don't use our usual Dynamic<> trick here as we don't have it in the parser. Its a bit of a layer violation to do this parsing here, but its how it is always was… Until next time with this lovely kind of problem. Closes: 812251 Thanks: Francesco Poli and Marc Haber for testdata.
* Prevent double remapping of iterators and string viewsJulian Andres Klode2016-03-061-8/+22
| | | | | | | | | | | If an iterator or a stringview has multiple dynamic objects registered with it, it may be remapped twice. Prevent that by noting which iterators/views we have seen and not remapping one if we have already seen it. We most likely do not have any instance of multiple dynamics on a single object, but let's play safe - the overhead is not high.
* do not move not-failed pdiff-patches into CWD on failureDavid Kalnischkies2016-03-062-0/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | If a single pdiff fails, we have to fail the entire patching endeavour and fall back to getting the complete file instead. That is easy in serverside merged pdiffs as we get them one by one. For clientside we get them all at once through, which means that a failure in one has to stop the entire pipeline, which works as expected (as proven by the bugreporters as they don't even notice it happening). The problem is just that the first failing pdiff will do the cleanup, so another pdiff which happens to be successfully acquired after we processed the failure doesn't find the file it is supposed to use as a basename anymore, so the patch is renamed to what should be the unique extension and moved into the current working directory. Processing is then stopped as the patch realizes that it isn't the last one which completed downloading. On the plus side this means this is neither us using a bad temporary location nor a security problem. It "just" overrides unconditionally files in your current working directory (if you happen to have them named like a pdiff patch – a bit unlikely perhaps) and so drops files there which are never used again. I guess this was introduced in 4e3c5633b1e74b4f58b95f339cfbbf4cbf21ab3e for real as I made the need for the existence of the base file rather explicit, but the potential lingers in the code for far longer. Closes: #816837
* Fix lzma write support to handle "try again" caseColin Watson2016-03-061-4/+25
| | | | | | | | | | | | The liblzma-based write code needs the same tweaks that the read code already has to cope with the situation where lzma_code returns zero the first time through because avail_out is zero, but will do more work if called again. This ports the read tweaks to the write code as closely as possible (including matching comments etc.). Closes: #751688
* add test for apt-key 0xKEY and use parameter expansionDavid Kalnischkies2016-03-062-1/+12
| | | | | | | | | Fixed in f7bd44bae0d7cb7f9838490b5eece075da83899e already, but the commit misses the Closes tag and while we are at it we can add a simple regression test and micro-optimize it a bit. Thanks: James McCoy for the suggestion. Closes: 816691
* support APT::Get::Build-Dep-Automatic again in build-depDavid Kalnischkies2016-03-062-0/+47
| | | | | | | | | | | In a249b3e6fd798935a02b769149c9791a6fa6ef16 I dropped with the manual first resolver step also the support for installing build-deps as automatic in such a way that it behaved like this option was enabled by default. Restoring support for it means that we go back to mark build- dependencies as manually installed again by default and provide this option to keep them as automatically installed.
* tests: expect no output while compiling noopchrootDavid Kalnischkies2016-03-062-4/+8
| | | | | | This way we hopefully notice (new) warnings in this little helper. Git-Dch: Ignore
* deal with partially downloaded changelogsDavid Kalnischkies2016-03-062-2/+25
| | | | | | | | | | | | 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
* apt-key del should correctly handle keyids prefixed with 0xDaniel Kahn Gillmor2016-03-041-0/+4
|
* Release 1.2.41.2.4Julian Andres Klode2016-02-2713-13/+27
|
* Add missing numeric includes in files using std::accumulate()Julian Andres Klode2016-02-262-0/+2
| | | | Reported-By: Helmut Grohne on IRC
* Fix crash with empty architecture listJulian Andres Klode2016-02-252-4/+19
| | | | | | If the architecture list is empty somehow, fail normally. LP: #1549819
* pass versioned provides to external solvers in EDSPDavid Kalnischkies2016-02-162-117/+165
| | | | | | The EDSP output generated by apt didn't include the versioned provides information so that every provides looked like an unversioned one in the eyes of an external resolver.
* Fix maintscript to properly remove 20changelogJulian Andres Klode2016-02-151-1/+1
| | | | Closes: #814754
* always download changelogs into /tmp firstDavid Kalnischkies2016-02-114-43/+50
| | | | | | | | | | 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-115-2/+60
| | | | | | | | | | | 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.
* Release 1.2.31.2.3Julian Andres Klode2016-02-1057-3554/+2939
| | | | | Build system messed up the 1.2.2 commit by not updating the .po files properly, so they are now.
* test: use our special downloaded dir for 'source' resultDavid Kalnischkies2016-02-101-0/+2
| | | | | | | | | | | Otherwise the test run as root fails seeing the W: Can't drop privileges for downloading as file 'foo_1.tar.gz' couldn't be accessed by user '_apt'. - pkgAcquire::Run (13: Permission denied) warning in a command which isn't supposed to warn. One trivial test, two fixups and still counting… Git-Dch: Ignore
* accept any tarball compression in 814139 testcaseDavid Kalnischkies2016-02-101-2/+2
| | | | | | | | Travis still uses a dpkg version which defaults to gz and as which compression is picked isn't all to important as long as one is just accept any. Git-Dch: Ignore
* test that seeking to a position earlier in the file worksJulian Andres Klode2016-02-101-0/+12
| | | | | | This tests the fix for #812994, #813000 Gbp-Dch: ignore
* get dpkg lock in build-dep if cache was invalid againDavid Kalnischkies2016-02-103-6/+64
| | | | | | | | | | | | | | | | Regression introduced in a249b3e6fd798935a02b769149c9791a6fa6ef16, which in the case of an invalid cache would build the first part unlocked and later pick up the (still unlocked) cache for further processing, so the system got never locked and apt would end up complaining about being unable to release the lock at shutdown. The far more common case of having a valid cache worked as expected and hence covered up the problem – especially as tests who would have noticed it are simulations only, which do not lock. Closes: 814139 Reported-By: Balint Reczey <balint@balintreczey.hu> Reported-By: Helmut Grohne <helmut@subdivi.de> on IRC
* Set seekpos to 0 after reopening files in Seek()Julian Andres Klode2016-02-101-0/+1
| | | | | | | | | If we just reopened the file, we also need to reset the current seek position when we reset the buffer, otherwise the code will not try to seek to the position given to Skip (from 0), but will try to seek to old offset + the position given to skip. Closes: #812994, #813000
* Release 1.2.21.2.2Julian Andres Klode2016-02-0414-84/+133
|
* Use some semantically more correct buffer operationsJulian Andres Klode2016-02-041-1/+1
| | | | | | | | | | | When writing into the buffer write to free() bytes starting at getend(), instead of buffersize_max bytes at get() -> get() is a read pointer. This makes no difference in practice though, as we reset the buffer before the call, so start = end = 0. Gbp-Dch: ignore
* test: Fix apt-key tests to work with current gpg 2.1Julian Andres Klode2016-02-041-1/+11
|
* Correctly report write errors when flushing buffered writerJulian Andres Klode2016-02-041-1/+1
| | | | | We cannot just return false without setting an error, as InternalWrite does not set one itself.
* rred: If there were I/O errors, failJulian Andres Klode2016-02-041-0/+5
| | | | | We basically ignored errors from writing and flushing, let's not do that.
* NEWS: Prefix the keep deb option with Binary::apt::Julian Andres Klode2016-02-041-3/+4
| | | | | | | I find the per-binary overrides a bit confusing in their current form, but let's tell the user the truth. Closes: #812111
* Merge branch 'master' of github.com:adrian17/aptJulian Andres Klode2016-02-041-1/+3
|\
| * Avoid temporary strings in SubstVar.Adrian Wielgosik2016-02-031-1/+3
| | | | | | | | | | Microoptimization, but still gives a measurable 2-3% improvement when using commands with lots of output like `apt list`.
* | edspsystem.cc: include <stdlib.h> for mkdtempFredrik Fornwall2016-02-031-0/+1
| | | | | | | | | | | | | | Include <stdlib.h> to ensure that mkdtemp(3) is defined to improve general portability and fix a specific build failure on Android. Closes: #807367
* | avoid building dependency tree in 'source' commandDavid Kalnischkies2016-02-035-25/+5
| | | | | | | | | | | | We don't need the dependencies for obvious reasons and we don't need the candidate version either, so building a pkgDepCache is wasted effort, which we can stop doing now that build-dep cleared the path.
* | use pkgCache::VS instead of pkgDepCache::VS()David Kalnischkies2016-02-033-27/+63
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The later just calls the earlier, but the later needs the fullblown dependency cache to be initialized, which is a very costly operation and isn't done anymore that early in the run as we would need to throw away and rebuild it again after we got all the information about source pkgs. As we end up with a nullptr for the pkgDepCache, we use a slightly longer calling convention to make sure that we use the pkgCache directly, avoiding nullptr induced segfaults and costly operations. Git-Dch: Ignore Reported-By: Balint Reczey <balint@balintreczey.hu>
* | Drop the g++ build-dep, transition is doneJulian Andres Klode2016-02-031-2/+1
|/ | | | | | It's not cross-satisfiable. Reported-by: Helmut Grohne
* Merge github.com:adrian17/aptJulian Andres Klode2016-02-021-1/+2
|\
| * Try avoiding loading long package descriptionAdrian Wielgosik2016-02-021-1/+2
| | | | | | | | | | | | | | | | | | | | | | It's a fairly expensive call and it's called on every package, even though it's usually only used when we're interested in a small number of packages. Long description is currently only shown by this function when using `apt search X --full`. On my PC, this patch speeds up `apt list` by roughly 20% and `apt list --installed` by 1-2%.
* | Spanish program translation updateManuel "Venturi" Porras Peralta2016-02-021-197/+250
|/ | | | Closes: 813467
* Do not buffer writes larger than the buffer if possibleJulian Andres Klode2016-02-011-0/+6
| | | | | | It makes no sense to split a large block into multiple small blocks, so when we have the chance to write them unbuffered, do so.
* BufferedWriteFileFdPrivate: Simplify InternalWrite()Julian Andres Klode2016-02-011-9/+3
| | | | | | We do not need the loop, FileFd::Private() handles this for us. Gbp-Dch: ignore
* simple_buffer::write: Use free() instead of maxsize - size()Julian Andres Klode2016-02-011-3/+3
| | | | | | | | We want to check whether the amount of free space is smaller than the requested write size. Checking maxsize - size() is incorrect for bufferstart >= 0, as size() = end - start. Gbp-Dch: ignore
* support <libc>-<kernel>-<cpu> in architecture specsDavid Kalnischkies2016-01-314-18/+125
| | | | | | | | | | | | | | | | | | | APT has a different understanding than dpkg (#748936) what matches and what doesn't match an architecture specification as it isn't converting back (and forward) to Debian triplets. That has to eventually be solved some way or the other, but until that happens we change the matching in apt so that porters can continue their work on non-gnu libc-ports even if policy doesn't specify that yet (and dpkg just supporting it "by accident" via triplets). The initial patch was reformatted, fixed in terms of patterns containing "any-any", dealing with expanding an arch without libc to gnu while a pattern expands libc to any, the parsedepends test was fixed (the new if's were inserted one step too early) and another test just for the specifications added. Closes: #812212 Thanks: Bálint Réczey for initial patch
* test all redirection codes work as expectedDavid Kalnischkies2016-01-312-6/+14
| | | | Git-Dch: Ignore
* use CPPFLAGS instead of CXXFLAGS for stringview exportDavid Kalnischkies2016-01-311-1/+1
| | | | Git-Dch: Ignore
* fix "Mismatched free() / delete / delete []" in simple_bufferStefan Bühler2016-01-301-1/+1
|
* only warn about missing/invalid Date field for nowDavid Kalnischkies2016-01-273-12/+61
| | | | | | | | | | | | | | | | | | | | | The Date field in the Release file is useful to avoid allowing an attacker to 'downgrade' a user to earlier Release files (and hence to older states of the archieve with open security bugs). It is also needed to allow a user to define min/max values for the validation of a Release file (with or without the Release file providing a Valid-Until field). APT wasn't formally requiring this field before through and (agrueable not binding and still incomplete) online documentation declares it optional (until now), so we downgrade the error to a warning for now to give repository creators a bit more time to adapt – the bigger ones should have a Date field for years already, so the effected group should be small in any case. It should be noted that earlier apt versions had this as an error already, but only showed it if a Valid-Until field was present (or the user tried to used the configuration items for min/max valid-until). Closes: 809329