summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* stop handling items in doomed transactionsDavid Kalnischkies2016-04-073-53/+102
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | With the previous commit we track the state of transactions, so we can now use our knowledge to avoid processing data for a transaction which was already closed (via an abort in this case). This is needed as multiple independent processes are interacting in the process, so there isn't a simple immediate full-engine stop and it would also be bad to teach each and every item how to check if its manager has failed subordinate and what to do in that case. In the pdiff case, which deals (potentially) with many items during its lifetime e.g. a hashsum mismatch in another file can abort the transaction the file we try to patch via pdiff belongs to. This causes some of the items (which are already done) to be aborted with it, but items still in the process of acquisition continue in the processing and will later try to use all the items together failing in strange ways as cleanup already happened. The chosen solution is to dry up the communication channels instead by ignoring new requests for data acquisition, canceling requests which are not assigned to a queue and not calling Done/Failed on items anymore. This means that e.g. already started or pending (e.g. pipelined) downloads aren't stopped and continue as normal for now, but they remain in partial/ and aren't processed further so the next update command will pick them up and put them to good use while the current process fails updating (for this transaction group) in an orderly fashion. Closes: 817240 Thanks: Barr Detwix & Vincent Lefevre for log files
* ensure transaction states are changed only onceDavid Kalnischkies2016-04-072-11/+32
| | | | | | | | | | | | | | We want to keep track of the state of a transaction overall to base future decisions on it, but as a pre-requirement we have to make sure that a transaction isn't commited twice (which happened if the download of InRelease failed and Release takes over). It also happened to create empty commits after a transaction was already aborted in cases in which the Release files were rejected. This isn't effecting security at the moment, but to ensure this isn't happening again and can never be bad a bunch of fatal error messages are added to make regressions on this front visible.
* releasing package apt version 1.2.101.2.10Michael Vogt2016-04-0514-14/+35
|
* Fix `OnCalendar=*-*-* 6,18:00` instead of `OnCalendar=*-*-* 6:00,18:00`Michael Vogt2016-04-041-1/+1
| | | | | | | | See https://github.com/systemd/systemd/issues/2956 - it appears that `OnCalendar=*-*-* 6,18:00` and `OnCalendar=*-*-* 6:00,18:00` are quite different. Git-Dch: ignore
* Japanese program translation updateTakuma Yamada2016-04-041-122/+171
| | | | Closes: 819938
* don't leak on error in listparser creationDavid Kalnischkies2016-04-032-8/+32
| | | | | Git-Dch: Ignore Reported-By: gcc -fsanitize=address
* use buffered writing for InRelease splittingDavid Kalnischkies2016-04-031-1/+1
| | | | | | Hardly noticeable, but given that we have the option to easily enable it, lets enable it as every newline in the message is written individually by the code.
* consistently add APT_OVERRIDE as method markerDavid Kalnischkies2016-04-031-70/+70
| | | | | | | | Some methods had it missing, some used the keyword directly, which isn't a problem as it is a cc file, but for consistency lets stick to our macro for now. Git-Dch: Ignore
* Use systemd.timer instead of a cron jobMichael Vogt2016-04-019-39/+66
| | | | | | | | | | | | | | | | | | | | | | The rational is that we need to spread the load on the mirrors that apt update and unattended-upgrades cause. To do so, we leverage the RandomizeDelay feature of systemd. The other advantage is that the timer is not run at a fixed daily.daily time but instead every 24h. This also fixes the problem that the randomized deplay in the current apt.cron.daily causes other cron jobs to be deplayed. A compatibility cron job is also provided for systems that do not use systemd. Note that the time is fired two times a day, but the logic inside of apt.systemd.daily will ensure (via stamp files) that the servers are hit at most every 24h. Firing two times a day helps with the worst case update time and it also helps with systems that are not always on. LP: #246381, #727685 Closes: #600262, #709675, #663290
* Allow lowering trust level of a hash via configJulian Andres Klode2016-03-283-17/+26
| | | | | | Introduces APT::Hashes::<NAME> with entries Untrusted and Weak which can be set to true to cause the hash to be treated as untrusted and/or weak.
* test-apt-update-reporting: Make more use of frameworkJulian Andres Klode2016-03-271-12/+16
| | | | | | | Use msgtest and testsuccess with a function instead of failing with a simple exit 1. This looks nicer. Gbp-Dch: ignore
* test-acquire-same-file-multiple-times: Delete files before retryingJulian Andres Klode2016-03-271-0/+1
| | | | | | This gets rid of byte-range requests and 416 responses. Gbp-Dch: ignore
* test-apt-download-progress: Use a larger file for testingJulian Andres Klode2016-03-271-3/+3
| | | | | | | This should make the test less flaky, as with a small file, we might have already received all the data before trying to apply rate limits which is a constant source of failure on the i386 Ubuntu autopkgtest.
* zh_CN.po: update simplified Chinese translation. (100%)Zhou Mo2016-03-271-4/+4
|
* Release 1.2.91.2.9Julian Andres Klode2016-03-2713-13/+25
|
* Do not mark packages for keep that we want to removeJulian Andres Klode2016-03-272-2/+44
| | | | | | | | | | | | | | | | | | | | | | If the package is marked for removal, keep it marked for removal and do not mark it for keep. If we mark it for keep, we some how later get to a different stage where it is marked for unpack instead of removal. In the example in the bug report, we would get a: SmartUnPack maas-region-controller-min:amd64 (replace version 2.0.0~alpha3+bzr4810-0ubuntu1 with Segmentation fault maas-region-controller-min:amd64 was marked for removal, but we changed it to keep and somehow it thinks that this is to be replaced now instead of removed (probably because the InstallVer != CandidateVer [with InstallVer = 0]). This fixes a regression introduced in release 1.2.7, commit: 0390edd5452b081f8efcf412f96d535a1d959457 Reported-by: LaMont Jones on IRC LP: #1562402
* drop confusing comma from no strong hash messageDavid Kalnischkies2016-03-2546-90/+90
|
* Release 1.2.81.2.8Julian Andres Klode2016-03-2457-197/+387
|
* Update symbols fileJulian Andres Klode2016-03-241-1/+14
|
* Set hidden visibility for StringViewJulian Andres Klode2016-03-241-1/+2
| | | | | | | This avoids templates using StringView to be exported, such as std::vector<StringView*>::emplace_back(). Gbp-Dch: ignore
* Japanese manpage translation updateTakuma Yamada2016-03-241-676/+667
| | | | Closes: 818950
* handle gpgv's weak-digests ERRSIGDavid Kalnischkies2016-03-222-23/+95
| | | | | | | | | | | Our own gpgv method can declare a digest algorithm as untrusted and handles these as worthless signatures. If gpgv comes with inbuilt untrusted (which is called weak in official terminology) which it e.g. does for MD5 in recent versions we should handle it in the same way. To check this we use the most uncommon still fully trusted hash as a configureable one via a hidden config option to toggle through all of the three states a hash can be in.
* properly check for "all good sigs are weak"David Kalnischkies2016-03-213-44/+67
| | | | | | | | | | Using erase(pos) is invalid in our case here as pos must be a valid and derefenceable iterator, which isn't the case for an end-iterator (like if we had no good signature). The problem runs deeper still through as VALIDSIG is a keyid while GOODSIG is just a longid so comparing them will always fail. Closes: 818910
* refactor loading of previous release fileDavid Kalnischkies2016-03-191-66/+29
| | | | | | There is really no need to have the same code three times. Git-Dch: Ignore
* tests: reenable basic auth test and add @ in usernameDavid Kalnischkies2016-03-193-7/+17
| | | | | | | | | | On launchpad #1558484 a user reports that @ in the authentication tokens parsing of sources.list isn't working in an older (precise) version. It isn't the recommended way of specifying passwords and co (auth.conf is), but we can at least test for regressions (and in this case test at all… who was that "clever" boy disabling a test with exit……… oh, nevermind. Git-Dch: Ignore
* zh_CN.po: update simplified Chinese translation. (Closes: #818639)Zhou Mo2016-03-191-4/+4
| | | | | 100% translated. Note: this commit contains a message from the future. #818639
* cachefile: Only set members that were initialized successfullyJulian Andres Klode2016-03-193-17/+89
| | | | | | | | | | | Otherwise, things will just start failing later down the stack, because (a) the lazy getters do not check if building was successful and (b) any further getter call would return the invalid object anyway. Also initialize VS in pkgCache to nullptr by default. Closes: #818628
* zh_CN.po: update simplified chinese translation.Zhou Mo2016-03-191-39/+41
| | | | Note, 0 untran, 1 fuzzy, and the fuzzy string remains at Bug#818639.
* test framework: Pass -n to lsof to speed up finding the https portJulian Andres Klode2016-03-171-1/+1
| | | | | | | | There is no point in resolving all addresses to their names, this just seriously slows the setup phase down. So just pass -n to not resolve names anymore. Gbp-Dch: ignore
* test-acquire-same-file-multiple-times: Run failing test up to 10 timesJulian Andres Klode2016-03-171-5/+11
| | | | | | | This should make the test less flaky and hopefully fix the failure on Ubuntu's armhf CI nodes. Gbp-Dch: ignore
* Make test-apt-download-progress less flakyJulian Andres Klode2016-03-171-8/+13
| | | | | | | | | | | | The test is a bit flaky. In order to get it less flaky, reduce the speed in each run. To compensate for issues, start with a higher speed level. Also increase the number of runs to 10. Furthermore, http get the same multiple-run loop, and the log files are changed to indicate the protocol being tested, as it's not obvious which one fails if it fails in quiet mode. Gbp-Dch: ignore
* do not strip epochs from state version stringsDavid Kalnischkies2016-03-164-39/+35
| | | | | | | | | | | The epoch stripping in this code is done since day one, but in other places we show a version epochs are not stripped. If epochs are present in packages they tend to be an important information which we can't just drop and especially can't drop "sometimes" as that confuses users and tools alike – so even if removing code in use for (close to) 18 years feels wrong, it is probably the right choice for consistency. Closes: 818162
* Make the weak signature message less ambigiousJulian Andres Klode2016-03-161-1/+1
| | | | | | | | There was a complaint that, in the previous message, the key fingerprint could be mistaken for a SHA1 digest due to the (SHA1) after it. Gbp-Dch: ignore
* Use descriptive URIs in 104 Warning messagesJulian Andres Klode2016-03-161-1/+1
| | | | | | | | This makes the new GPG related warnings much nicer to read, for example, the second one here replaces the first one: W: gpgv:/var/lib/apt/lists/example.com_dists_stable_InRelease: Weak ... W: http://example.com/dists/stable/InRelease: Weak ...
* methods/gpgv: Rewrite error handling and messageJulian Andres Klode2016-03-161-19/+50
| | | | | | | This should be easy to extend in the future and allow us to simplify the error handling cases somewhat. Thanks: Ron Lee for wording suggestions
* Report non-transient errors as errors, not as warningsJulian Andres Klode2016-03-1611-19/+23
| | | | | This makes it easier to understand what really is an error and what not.
* Get accurate progress reporting in apt update againMichael Vogt2016-03-165-19/+61
| | | | | | | | | | | | For the non-pdiff case, we have can have accurate progress reporting because after fetching the {,In}Release files we know how many IndexFiles will be fetched and what size they have. Therefore init the filesize early (in pkgAcqIndex::Init) and ensure that in Acquire::Pulse() looks at already downloaded bits when calculating the progress in Acquire::Pulse. Also improve debug output of Debug::acquire::progress
* tests: fix parallel execution to be working dir independentDavid Kalnischkies2016-03-161-1/+1
| | | | Git-Dch: Ignore
* Release 1.2.71.2.7Julian Andres Klode2016-03-1557-58/+356
|
* Fix bug where the problemresolve can put a pkg into a heisenstateMichael Vogt2016-03-155-2/+56
| | | | | | | | | | | | | | | | The problemresolver will set the candidate version for pkg P back to the current version if it encounters an impossible to satisfy critical dependency on P. However it did not set the State of the package back as well which lead to a situation where P is neither in Keep,Install,Upgrade,Delete state. Note that this can not be tested via the traditional sh based framework. I added a python-apt based test for this. LP: #1550741 [jak@debian.org: Make the test not fail if apt_pkg cannot be imported]
* methods/gpgv: Warn about SHA1 (and RIPEMD-160)Julian Andres Klode2016-03-151-3/+29
| | | | | | | We will drop support for those in the future. Also adjust the std::array to be a std::vector, as that's easier to maintain.
* apt-pkg/acquire-worker.cc: Introduce 104 Warning messageJulian Andres Klode2016-03-152-0/+12
| | | | | | | | | This can be used by workers to send warnings to the main program. The messages will be passed to _error->Warning() by APT with the URI prepended. We are not going to make that really public now, as the interface might change a bit.
* methods/gpgv: Correctly handle weak signatures with multiple keysJulian Andres Klode2016-03-151-1/+6
| | | | | | | | | | | | We added weak signatures to BadSigners, meaning that a Release file signed by both a weak signature and a strong signature would be rejected; preventing people from migrating from DSA to RSA keys in a sane way. Instead of using BadSigners, treat weak signatures like expired keys: They are no good signatures, and they are worthless. Gbp-Dch: ignore
* zh_CN.po: fix translation bug. (Closes: #818177)Zhou Mo2016-03-151-1/+1
|
* methods/gpgv: Reject weak digest algorithmsJulian Andres Klode2016-03-141-0/+16
| | | | | This keeps a list of weak digest algorithms. For now, only MD5 is disabled, as SHA1 breaks to many repos.
* Revert "Handle ERRSIG in the gpgv method like BADSIG"Julian Andres Klode2016-03-141-7/+0
| | | | | | | | This reverts commit 76a71a1237d22c1990efbc19ce0e02aacf572576. That commit broke the test suite. Gbp-Dch: ignore
* Handle ERRSIG in the gpgv method like BADSIGJulian Andres Klode2016-03-141-0/+7
| | | | | | | | | | | | ERRSIG is created whenever a key uses an unknown/weak digest algorithm, for example. This allows us to report a more useful error than just "unknown apt-key error.": The following signatures were invalid: ERRSIG 13B00F1FD2C19886 1 2 01 1457609403 5 While still not being the best reportable error message, it's better than unknown apt-key error and hopefully redirects users to complain to their repository owners.
* test: Move --weak-digest initialization to the right placeJulian Andres Klode2016-03-141-3/+6
| | | | | | | This was wrong and caused some issues because apt-key invoked host apt-config with our library. Gbp-Dch: ignore
* test: Use SHA512 digests for GPG, reject SHA1-based signaturesJulian Andres Klode2016-03-141-1/+5
| | | | | This makes the test suite safe if we ever need to reject SHA1 signatures in an update.
* Spanish apt-mark translation fixManuel "Venturi" Porras Peralta2016-03-141-1/+1
| | | | | | | | | | | | | | "%s can not be marked as it is not installed." was incorrectly translated as "%s no se puede marcar como no instalado.\n", which means "%s can not be marked as not installed." Thanks to Marcos Del Sol Vives for reporting & to the spanish translation team – and in particular Camaleón and Venturi – for review and correction of this issue! [commit message by commiter] Closes: 817999