summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* travis: ignore profiling warning in test diffsDavid Kalnischkies2016-11-101-1/+14
| | | | | | | | | | | On Travis CI running tests with code coverage enabled sometimes generates lines like: profiling:/path/to/file.gcda:Merge mismatch for function 257 It would be nice if we could resolve this somehow as it garbles the statistics, but until then it is far more annoying that this causes test failures for no good reason. Gbp-Dch: Ignore
* support 'apt build-dep .' (aka: without /)David Kalnischkies2016-11-102-2/+10
| | | | Reported-By: Christoph Berg (Myon) on IRC
* improve SOCKS error messages for http slightlyDavid Kalnischkies2016-11-102-24/+101
| | | | | | | | | The 0.0.0.0:0 tor reports is pretty useless by itself, but even if an IP would be reported it is better to show the user the hostname we wanted the proxy to connect to in the same error message. We improve upon it further by looking for this bind address in particular and remap error messages slightly to give users a better chance of figuring out what went wrong. Upstream Tor can't do that as it is technically wrong.
* rename Checksum-FileSize to Filesize in hashsum mismatchDavid Kalnischkies2016-11-095-54/+57
| | | | | | | | Some people do not recognize the field value with such an arcane name and/or expect it to refer to something different (e.g. #839257). We can't just rename it internally as its an avoidance strategy as such fieldname existed previously with less clear semantics, but we can spare the general public from this implementation detail.
* show the conflicting distribution warning againDavid Kalnischkies2016-11-092-2/+39
| | | | | | | Sometimes you should really act upon your todos. Especially if you have placed them directly in the code. Closes: 841874
* reset HOME, USER(NAME), TMPDIR & SHELL in DropPrivilegesDavid Kalnischkies2016-11-096-4/+85
| | | | | | | | | We can't cleanup the environment like e.g. sudo would do as you usually want the environment to "leak" into these helpers, but some variables like HOME should really not have still the value of the root user – it could confuse the helpers (USER) and HOME isn't accessible anyhow. Closes: 842877
* fix three typos in sources & manpagesChris Leick2016-11-0915-42/+39
|
* add a testcase for support of various build-dependency typesDavid Kalnischkies2016-11-091-0/+70
| | | | | | See also c5f22e483cc0f31f2938874370ac776e40792069 Gbp-Dch: Ignore
* add support for Build-Depends/Conflicts-ArchJohannes Schauer2016-11-095-7/+14
| | | | | | | | | | | | | | These new enum values might cause "interesting" behaviour in tools not expecting them – like an old apt would think a Build-Conflicts-Arch is some sort of Build-Depends – but that can't reasonably be avoided and effects only packages using B-D/C-A so if there is any breakage the tools can easily be adapted. The APT_PKG_RELEASE number is increased so that libapt users can detect the availability of these new enum fields via: #if APT_PKG_ABI > 500 || (APT_PKG_ABI == 500 && APT_PKG_RELEASE >= 1) Closes: #837395
* fix testcase expecting incorrect remove log from dpkgDavid Kalnischkies2016-11-091-1/+21
| | | | | | | | | | dpkg 1.18.11 includes: * Do not log nor print duplicate dpkg removal action. We print “Removing <package> (<version>)” lines and log remove action twice when purging a package from frontends, because they usually first call --remove and then --purge sequentially. When purging a package which is already in config-files (i.e. it has been removed before), do not print nor log the remove action.
* Do not (re)start "apt-daily.system"Michael Vogt2016-11-091-0/+5
| | | | | | | | | This unit runs unattended-upgrades. If apt itself is part of the upgrade a restart of the unit will kill unattended-upgrades. This will lead to an inconsistent dpkg status. Closes: #841763 Thanks: Alexandre Detiste
* keep Release.gpg on untrusted to trusted IMS-HitDavid Kalnischkies2016-11-022-3/+55
| | | | | | | | | | | | | | | A user relying on the deprecated behaviour of apt-get to accept a source with an unknown pubkey to install a package containing the key expects that the following 'apt-get update' causes the source to be considered as trusted, but in case the source hadn't changed in the meantime this wasn't happening: The source kept being untrusted until the Release file was changed. This only effects sources not using InRelease and only apt-get, the apt binary downright refuses this course of actions, but it is a common way of adding external sources. Closes: 838779
* don't install new deps of candidates for kept back pkgsDavid Kalnischkies2016-11-024-96/+58
| | | | | | | | | | | | | | | | | | | | In effect this is an extension of the 6 years old commit a8dfff90aa740889eb99d00fde5d70908d9fd88a which uses the autoremover to remove packages again from the solution which are no longer needed to be there. Commonly these are dependencies of packages we end up not installed due to problem resolver decisions. Slightly less common is the situation we deal with here: a package which we wanted to upgrade sporting a new dependency, but ended up holding back. The problem is that all versions of an installed reverse dependencies can bring back a "garbage" package – we need to do this as there is nothing inherently wrong in having garbage packages installed or upgrade them, which itself would have garbage dependencies, so just blindly killing all new garbage packages would prevent the upgrade (and actually generate errors). What we should be doing is looking only at the version we will have on the system, disregarding all old/new reverse dependencies. Reported-By: Stuart Prescott (themill) on IRC
* Dutch manpages translation updateFrans Spiesschaert2016-11-021-247/+197
| | | | Closes: #840757
* Dutch program translation updateFrans Spiesschaert2016-11-021-33/+35
| | | | Closes: #840552
* fix invalid XML in German manpage translationJames Clarke2016-11-021-1/+1
| | | | Gbp-Dch: Ignore
* Updated German documentation translationChris Leick2016-10-291-1311/+915
|
* Release 1.3.11.3.1Julian Andres Klode2016-10-0418-41/+56
|
* travis: Move codecov from after_success to after_scriptJulian Andres Klode2016-10-041-1/+1
| | | | | | We always want to run codecov test, even if there are spurious failures. We should really work around those failures more, though, it is starting to annoy me.
* Turkish program translation updateMert Dirik2016-10-041-18/+14
| | | | Closes: #838731
* Japanese manpages translation updatevictory2016-10-041-745/+187
|
* Do not read stderr from proxy autodetection scriptsJulian Andres Klode2016-10-045-2/+46
| | | | | | | | | | | | | This fixes a regression introduced in commit 8f858d560e3b7b475c623c4e242d1edce246025a don't leak FD in AutoProxyDetect command return parsing which accidentally made the proxy autodetection code also read the scripts output on stderr, not only on stdout when it switched the code from popen() to Popen(). Reported-By: Tim Small <tim@seoss.co.uk>
* Release 1.31.3Julian Andres Klode2016-09-2018-19/+33
|
* VersionHash: Do not skip too long dependency linesJulian Andres Klode2016-09-185-3/+49
| | | | | | | | | | | | | | | If the dependency line does not contain spaces in the repository but does in the dpkg status file (because dpkg normalized the dependency list), the dpkg line might be longer than the line in the repository. If it now happens to be longer than 1024 characters, it would be skipped, causing the hashes to be out of date. Note that we have to bump the minor cache version again as this changes the format slightly, and we might get mismatches with an older src cache otherwise. Fixes Debian/apt#23
* travis: Add coverage testing using codecov.ioJulian Andres Klode2016-09-111-1/+7
| | | | | | | | | This allows fully automated code coverage testing, which is basically awesome. To allow the methods and solvers and stuff which run as _apt to write to our build directory, we need to adjust the permissions a bit, but otherwise it's OK. Gbp-Dch: ignore
* Coverage: Do not print messages from gcovJulian Andres Klode2016-09-113-0/+57
| | | | | | | We need to ignore messages from gcov. All those messages start with profiling: and are printed using vfprintf(), so the only thing we can do is add a library overriding those functions and linking apt-pkg to it.
* CMake: Add coverage build typeJulian Andres Klode2016-09-111-0/+5
| | | | This allows us to easily test coverage
* travis: use ninja and ccache for buildingJulian Andres Klode2016-09-111-5/+6
| | | | | | | This cleans up the output a bit, it should also improve performance, but unfortunately, this does not really seem to be the case. Gbp-Dch: ignore
* test: Always install dpkg into our tests, regardless of MAJulian Andres Klode2016-09-078-15/+20
| | | | | | | | | | Even if we only configure a single architecture, install dpkg, so dpkg can assert multi arch correctly. This also has the nice side effect of making single architecture and multiple architecture test cases more uniform. This fixes a regression from f878d3a862128bc1385616751ae1d78246b1bd01 ("test: Assert multi-arch in the chroot").
* test: framework: Ensure copied status files have trailing linesJulian Andres Klode2016-09-071-0/+4
| | | | | | | If we copied one of the existing status files, we might not have a trailing newline, so let's add one. Gbp-Dch: ignore
* edsp: try 2 to read responses even if writing failedDavid Kalnischkies2016-09-074-15/+73
| | | | | | | | | | | | | | | | Commit b60c8a89c281f2bb945d426d2215cbf8f5760738 improved the situation, but due to inconsistency mostly for planners, not for solvers. As the idea of hiding errors if we show another error is a bit scary (as the extern error might be a followup of our intern error, rather than the reason for our intern error as it is at the moment) we don't discard the errors, but if we got an extern error we show them directly removing them from the error list at the end of the run – that list will contain the extern error which hopefully gives us the best of both worlds. The problem itself is the same as before: The externals exiting before apt is done talking to them. Reported-By: Johannes 'josch' Schauer on IRC
* abort connection on '.' target replies in SRVDavid Kalnischkies2016-09-041-0/+8
| | | | | | | | | | | | | | | Commit 3af3ac2f5ec007badeded46a94be2bd06b9917a2 (released in 1.3~pre1) implements proper fallback for SRV, but that works actually too good as the RFC defines that such an SRV record should indicate that the server doesn't provide this service and apt should respect this. The solution is hence to fail again as requested even if that isn't what the user (and perhaps even the server admins) wanted. At least we will print a message now explicitly mentioning SRV to point people in the right direction. Reported-In: https://bugs.kali.org/view.php?id=3525 Reported-By: Raphaël Hertzog
* update testing hints in README.mdDavid Kalnischkies2016-09-031-5/+17
| | | | Gbp-Dch: Ignore
* Release 1.3~rc41.3_rc4Julian Andres Klode2016-09-0218-19/+40
|
* debian: Pass -O to make to get readable build logsJulian Andres Klode2016-09-021-0/+3
| | | | | Normally make just lets every job write its output directly, making the log fairly hard to read with high concurrency.
* debian: Move bugscript to old location for overlayfs xdev issueJulian Andres Klode2016-09-021-0/+1
| | | | | | dpkg on overlayfs cannot rename apt/script to apt, because overlayfs will not let it move apt to a backup name, responding with XDEV instead.
* acquire: Use priority queues and a 3 stage pipeline designJulian Andres Klode2016-09-025-6/+60
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Employ a priority queue instead of a normal queue to hold the items; and only add items to the running pipeline if their priority is the same or higher than the priority of items in the queue. The priorities are designed for a 3 stage pipeline system: In stage 1, all Release files and .diff/Index files are fetched. This allows us to determine what files remain to be fetched, and thus ensures a usable progress reporting. In stage 2, all Pdiff patches are fetched, so we can apply them in parallel with fetching other files in stage 3. In stage 3, all other files are fetched (complete index files such as Contents, Packages). Performance improvements, mainly from fetching the pdiff patches before complete files, so they can be applied in parallel: For the 01 Sep 2016 03:35:23 UTC -> 02 Sep 2016 09:25:37 update of Debian unstable and testing with Contents and appstream for amd64 and i386, update time reduced from 37 seconds to 24-28 seconds. Previously, apt would first download new DEP11 icon tarballs and metadata files, causing the CPU to be idle. By fetching the diffs in stage 2, we can now patch our contents and Packages files while we are downloading the DEP11 stuff.
* CMake: apt-pkg: Use correct ICONV_INCLUDE_DIRS variableJulian Andres Klode2016-09-021-1/+1
| | | | | This accidentally used ICONV_DIRECTORIES, which does not even exist. Weird.
* CMake: test/libapt: Use a prebuilt GTest library if availableJulian Andres Klode2016-09-021-15/+26
| | | | | | | If a non-existing source directory is specified, try finding the system gtest library. Debian derived distributions are a bit strange because they only ship the source code and not the library...
* gitignore: Add generated docbook stylesheetsJulian Andres Klode2016-09-021-1/+6
| | | | | | | | I switched them over to generated files in commit 9fb81c6e54a2fe05c0ad0b877fd32f30358e3877, but forgot to add them to the ignore file. Gbp-Dch: ignore
* support long keyid and fingerprint in gpgv's GOODSIGDavid Kalnischkies2016-09-012-4/+97
| | | | | | | | | | | | | | In gpgv1 GOODSIG (and the other messages of status-fd) are documented as sending the long keyid. In gpgv2 it is documented to be either long keyid or the fingerprint. At the moment it is still the long keyid, but the documentation hints at the possibility of changing this. We care about this for Signed-By support as we detect this way if the right fingerprint has signed this file (or not). The check itself is done via VALIDSIG which always is a fingerprint, but there must also be a GOODSIG (as expired sigs are valid, too) found to be accepted which wouldn't be found in the fingerprint-case and the signature hence refused.
* re-add apt breaks/replaces apt-utils (<< 1.3~exp2~)David Kalnischkies2016-09-011-0/+2
| | | | | | | | | The recently added (increased actually) Breaks were accidently dropped while our set of mostly old and outdated breaks was cleaned up. Regression-From: 20d2f4a4f164cd9026dad698e471c95d7c28973b Previously-Add-In: ab07af708e49c9219940ffd3e20a01c763267e03 Closes: #836220
* tests: silence -Wmissing-declarationsDavid Kalnischkies2016-09-013-7/+3
| | | | | Gbp-Dch: Ignore Reported-By: gcc -Wmissing-declarations
* try not to call memcpy with length 0 in hash calculationsDavid Kalnischkies2016-09-019-19/+26
| | | | | | | | | | memcpy is marked as nonnull for its input, but ignores the input anyhow if the declared length is zero. Our SHA2 implementations do this as well, it was "just" MD5 and SHA1 missing, so we add the length check here as well as along the callstack as it is really pointless to do all these method calls for "nothing". Reported-By: gcc -fsanitize=undefined
* test-apt-cdrom: Fix for gnupg 2.1.15Julian Andres Klode2016-09-011-1/+6
| | | | | | | | | | | gpg annoyingly changed its output and broke our test suite again by adding two extra lines about key type and issuer. Really annoying. Those lines also have more than one space after the colon, so let's use \s* there - and also change the other lines to support variable length whitespace in case gpg decides to break things there too.
* Base256ToNum: Fix uninitialized valueJulian Andres Klode2016-08-311-1/+2
| | | | | | | | | | If the inner Base256ToNum() returned false, it did not set Num to a new value, causing it to be uninitialized, and thus might have caused the function to exit despite a good result. Also document why the Res = Num, if (Res != Num) magic is done. Reported-By: valgrind
* TagFile: Fix off-by-one errors in comment strippingJulian Andres Klode2016-08-311-2/+2
| | | | | | | | | | | | | | | | | | | Adding 1 to the value of d->End - current makes restLength one byte too long: If we pass memchr(current, ..., restLength) has thus undefined behavior. Also, reading the value of current has undefined behavior if current >= d->End, not only for current > d->End: Consider a string of length 1, that is d->End = d->Current + 1. We can only read at d->Current + 0, but d->Current + 1 is beyond the end of the string. This probably caused several inexplicable build failures on hurd-i386 in the past, and just now caused a build failure on Ubuntu's amd64 builder. Reported-By: valgrind
* test/integration/test-srcrecord: Make executableJulian Andres Klode2016-08-311-0/+0
| | | | | | | I actually tried to amend the previous commit, but apparently I forgot to add the file mode change. Gbp-Dch: ignore
* Fix segfault and out-of-bounds read in Binary fieldsJulian Andres Klode2016-08-312-3/+41
| | | | | | | | | | | | | | | | | | | | | | | | | | | | If a Binary field contains one or more spaces before a comma, the code produced a segmentation fault, as it accidentally set a pointer to 0 instead of the value of the pointer. If the comma is at the beginning of the field, the code would create a binStartNext that points one element before the start of the string, which is undefined behavior. We also need to check that we do not exit the string during the replacement of spaces before commas: A string of the form " ," would normally exit the boundary of the Buffer: binStartNext = offset 1 ',' binEnd = offset 0 ' ' isspace_ascii(*binEnd) = true => --binEnd => binEnd = - 1 We get rid of the problem by only allowing spaces to be eliminated if they are not the first character of the buffer: binStartNext = offset 1 ',' binEnd = offset 0 ' ' binEnd > buffer = false, isspace_ascii(*binEnd) = true => exit loop => binEnd remains 0
* Release 1.3~rc31.3_rc3Julian Andres Klode2016-08-3061-62/+160
|