summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Release 1.51.5Julian Andres Klode2017-09-2448-49/+187
|
* Fix translator comment location for legacy target warningJulian Andres Klode2017-09-131-3/+5
| | | | | In commit Do not warn about duplicate "legacy" targets, we we added an if, that changed the .po files...
* Release 1.5~rc41.5_rc4Julian Andres Klode2017-09-135-6/+16
|
* apt-daily: Do not Wants=network-online, and add some more After=Julian Andres Klode2017-09-112-2/+2
| | | | | | | | | We now wait for being online ourselves, so all we need to wait on is for services we are using to be online first. This avoids severe boot slowdowns by other services having specified an After=network-online.target without a Wants=. Gbp-Dch: Full
* Release 1.5~rc31.5_rc3Julian Andres Klode2017-09-107-8/+16
|
* clang-format: Set ContinuationIndentWidth: 3Julian Andres Klode2017-09-101-0/+1
| | | | | | | This fixes the indentation of struct members, for example, which were previously indented by 4 spaces. Gbp-Dch: ignore
* apt-helper: Add connman support to wait-onlineJulian Andres Klode2017-09-101-1/+3
|
* CMake: Mark BZip2, LZMA, and LZ4 as requiredJulian Andres Klode2017-09-101-3/+3
| | | | | | We do not actually test without these libraries, and it likely would not build without them due to them being NOTFOUND and CMake exiting with an error, so let's just mark them as required.
* CMake: Properly handle Udev missingJulian Andres Klode2017-09-101-2/+2
| | | | | | | When udev is not available, the variables for libraries and include paths are set to NOTFOUND rather than an empty string and CMake exits with an error. Use a generator expression to only use these variables when UDEV_FOUND is true.
* Release 1.5~rc21.5_rc2Julian Andres Klode2017-09-0950-1099/+1174
|
* Directly link against libudev on Linux systemsJulian Andres Klode2017-09-098-52/+63
| | | | | | | | | | | | | | | | | | | We previously dlopen()ed it, but it seems painful to do that without any real gain, except for possibly not having libudev in the address space and not having code #ifdefed for Linux. The latter means that we are a bit more likely to break stuff for non-Linux systems now if we play with udev, but at least we don't end up with it silently breaking because of a libudev ABI break. The existing function pointers in the struct were renamed and kept for compat purposes. Fixes Debian/apt#48 Also adjust prepare-release to strip [linux-any] from build-depends for travis.
* ftparchive: Do not pass through disabled hashes in SourcesJulian Andres Klode2017-09-094-2/+50
| | | | | | | | | | | | | | | | When writing a Sources files hashes that were already present in the .dsc were always copied through (or modified), even if disabled. Remove them instead when they are disabled, otherwise we end up with hashes for tarballs and stuff but not for dsc files (as the dsc obviously does not hash itself). Also adjust the tests: test-compressed-indexes relied on Files being present in showsrc, and test-apt-update-weak-hashes expected the tarball to be downloaded when an archive only has MD5 and we are requiring SHA256 because that used to work because the tarball was always included. Closes: #872963
* cdrom: Don't hardcode "Files" field for copying source filesJulian Andres Klode2017-09-091-1/+15
| | | | | | This fails if no Files field exists anymore, for example, because the Sources index only contains SHA256 hashes. Instead check all hashes.
* Do not warn about duplicate "legacy" targetsJulian Andres Klode2017-09-091-2/+3
| | | | | | | | | | If a source has a legacy Contents file, and two lines mention the same archive but different components, a warning would be issued that is confusing. So, as the field is named Contents-deb-legacy, let's just not print warnings for fields containing "legacy". LP: #1697120 Closes: #839259
* apt-daily: Pull in network-online.target in service, not timerJulian Andres Klode2017-09-092-2/+2
| | | | | There's no real point in pulling it in in the timer already, and it it somewhat saver to do so in the service.
* apt-daily: Wait for network before daily updatesJulian Andres Klode2017-09-092-6/+47
| | | | | | | | | | Introduce a new helper, apt-helper wait-online that uses NetworkManager and/or systemd-networkd to wait for them reporting online, with a time out of 30 seconds; and run that helper before running the daily update script. LP: #1699850 Gbp-Dch: Full
* drop unused/unimplemented & hidden LoadReleaseInfoDavid Kalnischkies2017-09-093-13/+0
| | | | | | | | | | | The relevant calling code as well as the implementation for the deb system was removed 2 years ago with the refactoring of release information storage (b07aeb1a6e24825e534167a737043441e871de9f). This commit removes the the unused remains of this change with no practical effect on anybody (expect codesize) as the methods were declared as hidden and hence only libapt could have called it. Gbp-Dch: Ignore
* don't ask an uninit _system for supported archsDavid Kalnischkies2017-09-091-1/+1
| | | | | | | | | | A libapt user who hasn't initialized _system likely has a reason, so we shouldn't greet back with a segfault usually deep down in the callstack for no reason. If the user had intended to pick up information from the system, _system wouldn't be uninitialized after all. LP: #1613184 SRU: 1.4.y
* add test for bug 870675 (hang on unsupported method)David Kalnischkies2017-09-091-0/+26
| | | | | | | Commit e250a8d8d8ef2f8f8c5e2041f7645c49fba7aa36 implemented the fix and should have included already this testcase for it. Gbp-Dch: Ignore
* don't write & chmod /dev/null log filesDavid Kalnischkies2017-09-091-8/+8
| | | | | | | | | APT by default logs terminal (term.log) and actions (history.log), but if either or Dir::Log directly is set to /dev/null it continues to do so, which isn't too bad – just wasted effort – but term.log is chmodded to protect it from the general public (as it may contain otherwise private data the admin entired in the terminal) which shouldn't happen for /dev/null.
* test: Workaround gpgv warningJulian Andres Klode2017-09-091-2/+2
| | | | gpgv: WARNING: This key is not suitable for signing in --compliance=gnupg mode
* Dutch manpage translation updateFrans Spiesschaert2017-09-041-24/+61
| | | | Closes: #874293
* Dutch program translation updateFrans Spiesschaert2017-09-041-16/+22
| | | | Closes: #874285
* doc: correct '--allow-releaseinfo-change-*' typosChristos Trochalakis2017-09-0111-12/+12
| | | | Closes: #873914
* Actually install apt_auth.conf manual pageJulian Andres Klode2017-09-011-0/+1
| | | | | | | | Seems we forgot to update the packaging when adding the manual page. Once we have translations for it, we need to add them as well... Closes: #873934
* Release 1.5~rc11.5_rc1Julian Andres Klode2017-08-2416-17/+30
|
* Make test-bug-818628-unreadable-source work on !amd64Julian Andres Klode2017-08-241-0/+1
| | | | | It was broken because apt.conf.d was not readable, but that's where the architecture is defined...
* Replace APT_CONST with APT_PURE everywhereJulian Andres Klode2017-08-2421-68/+68
| | | | | As a follow up to the last commit, let's replace APT_CONST with APT_PURE everywhere to clean stuff up.
* Redefine APT_CONST to mean APT_PUREJulian Andres Klode2017-08-241-1/+2
| | | | | | | | | | | | | | | | | | | | | Functions marked with the const attribute may not inspect any global memory. This includes targets of pointers or references passed as arguments. A pure function however is free to inspect memory, but may not have any side effects. The function StringSplit() was marked as const, but took two references to strings. When the second one was passed as a literal as in StringSplit(name, "::") the compiler cleverly figured out that we only inspect the address of "::" (since StringSplit is const) and thus optimized away the "::" content. While patching out individual broken uses of APT_CONST would be possible, this is already the second case, and there might be more, so let's redefine APT_CONST to use the pure attribute, so we don't end up with the same situation again in some time.
* Release 1.5~beta21.5_beta2Julian Andres Klode2017-08-1760-997/+2107
|
* doc: Fix validity error in apt_auth.conf.5.xmlJulian Andres Klode2017-08-171-1/+2
| | | | | | It contained raw text inside a refsect1 Gbp-Dch: ignore
* debian: Update symbols for libapt-pkg5.0Julian Andres Klode2017-08-171-0/+20
| | | | | The version is probably wrong for most, but oh well, let's just pretend we are introducing them now.
* Handle GCC 7 std::string operator ABI breakJulian Andres Klode2017-08-173-0/+3
| | | | | | | | | | We now require gcc 7 on the packaging side, and add an appropriate symbol to our symbols file. Also adjust prepare-release to ignore g++ version requirements when setting up build dependencies on CI. Closes: #871275
* Work around float rounding change in gcc 7 on i386Julian Andres Klode2017-08-121-1/+1
| | | | This caused a build failure in the test suite.
* don't hang if multiple sources use unavailable methodDavid Kalnischkies2017-08-041-3/+6
| | | | | | | | | | | | | | | APT clients always noticed if a method isn't supported and nowadays generate a message of the form: E: The method driver …/foobar could not be found. N: Is the package apt-transport-foobar installed? This only worked if a single source was using such an unavailable method through as we were registering the failed config the first round and the second would try to send requests to the not started method, which wouldn't work and hang instead (+ hiding the error messages as they would be shown only at the end of the execution). Closes: 870675
* don't keep configuration files open needlesslyDavid Kalnischkies2017-08-041-1/+1
| | | | Regression-Of: 3317ad864c997f4897756c0a2989c4199e9cda62
* ftparchive: sort discovered filenames before writing indexesDavid Kalnischkies2017-08-043-23/+103
| | | | | | | | | | | | | | | | | | | If 'apt-ftparchive packages /path/to/files/' (or sources) is used the files to include in the generated index (on stdout) were included in the order in which they were discovered, which isn't a very stable order which could lead to indexes changing without actually changing content causing needless changes in the repository changing hashsums, pdiffs, rsyncs, downloads, …. This does not effect apt-ftparchive calls which already have an order defined via a filelist (like generate) which will still print in the order given by the filelist. Note that a similar effect can be achieved by post-processing index files with apt-sortpkgs. Closes: 869557 Thanks: Chris Lamb for initial patch & Stefan Lippers-Hollmann for testing
* Always warn if --force-yes is validly specified, not just if usedJulian Andres Klode2017-07-273-5/+5
| | | | | | The code only used to warn when it came into a situation where something actually had to be forced. Warn directly after parsing the command-line instead, that's more accurate.
* doc: Add '--allow-unauthenticated' to '--force-yes'Dominik2017-07-271-1/+5
|
* Merge branch 'feature/authconf'David Kalnischkies2017-07-2631-347/+874
|\
| * suggest using auth.conf for sources with passwordsDavid Kalnischkies2017-07-263-1/+32
| | | | | | | | | | | | | | | | The feature exists for a long while even if we get around to document it properly only now, so we should push for its adoption a bit to avoid the problems its supposed to solve like avoiding usage of non-world readable configuration files as they can cause strange behaviour for the unsuspecting user (like different solutions as root and non-root).
| * show a warning for Debian shutting down FTP servicesDavid Kalnischkies2017-07-263-1/+62
| | | | | | | | | | | | | | | | | | | | | | | | We detect the effected sources by matching Release info – that has potential by-catch of repositories which have incorrect field values, but those are better fixed now anyhow. The bigger incorrectness is that this message will not only be printed for the Debian services itself but also for all mirrors not under Debian control but serving Debian like more local/private mirrors which will not (directly) shutdown. It is likely through that many of them will follow suite with less visible announcements or break downright if their upstream source disappears, so having false-positives here seems benefitial for the user in the end.
| * update URI scheme descriptions in sources.list(5)David Kalnischkies2017-07-262-18/+49
| |
| * allow the auth.conf to be root:root ownedDavid Kalnischkies2017-07-268-42/+47
| | | | | | | | | | | | | | | | | | | | | | Opening the file before we drop privileges in the methods allows us to avoid chowning in the acquire main process which can apply to the wrong file (imagine Binary scoped settings) and surprises users as their permission setup is overridden. There are no security benefits as the file is open, so an evil method could as before read the contents of the file, but it isn't worse than before and we avoid permission problems in this setup.
| * lookup login info for proxies in auth.confDavid Kalnischkies2017-07-262-2/+4
| | | | | | | | | | | | | | On HTTP Connect we since recently look into the auth.conf file for login information, so we should really look for all proxies into the file as the argument is the same as for sources entries and it is easier to document (especially as the manpage already mentions it as supported).
| * reimplement and document auth.confDavid Kalnischkies2017-07-2613-195/+499
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We have support for an netrc-like auth.conf file since 0.7.25 (closing 518473), but it was never documented in apt that it even exists and netrc seems to have fallen out of usage as a manpage for it no longer exists making the feature even more arcane. On top of that the code was a bit of a mess (as it is written in c-style) and as a result the matching of machine tokens to URIs also a bit strange by checking for less specific matches (= without path) first. We now do a single pass over the stanzas. In practice early adopters of the undocumented implementation will not really notice the differences and the 'new' behaviour is simpler to document and more usual for an apt user. Closes: #811181
| * show warnings instead of errors if files are unreadableDavid Kalnischkies2017-07-268-77/+79
| | | | | | | | | | | | | | | | | | | | We used to fail on unreadable config/preferences/sources files, but at least for sources we didn't in the past and it seems harsh to refuse to work because of a single file, especially as the error messages are inconsistent and end up being silly (like suggesting to run apt update to fix the problem…). LP: #1701852
| * use FileFd to parse all apt configuration filesDavid Kalnischkies2017-07-268-32/+123
|/ | | | | | Using different ways of opening files means we have different behaviour and error messages for them, so by the same for all we can have more uniformity for users and apt developers alike.
* fail early in http if server answer is too small as wellDavid Kalnischkies2017-07-2613-64/+98
| | | | | | | | | Failing on too much data is good, but we can do better by checking for exact filesizes as we know with hashsums how large a file should be, so if we get a file which has a size we do not expect we can drop it directly, regardless of if the file is larger or smaller than what we expect which should catch most cases which would end up as hashsum errors later now a lot sooner.
* fail earlier if server answers with too much dataDavid Kalnischkies2017-07-265-17/+25
| | | | | | | | | We tend to operate on rather large static files, which means we usually get Content-Length information from the server. If we combine this information with the filesize we are expecting (factoring in pipelining) we can avoid reading a bunch of data we are ending up rejecting anyhow by just closing the connection saving bandwidth and time both for the server as well as the client.