summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Release 1.6~alpha21.6_alpha2Julian Andres Klode2017-10-265-6/+17
|
* CMake: Get rid of some debugging messagesJulian Andres Klode2017-10-261-2/+0
| | | | | | | | | | This fixes a regression introduced in commit 43b9eb5bac15666fdc0346aca7031fab0fa5e064 CMake: methods: Cleanup link libraries, use OBJECT libraries Gbp-Dch: ignore
* Print syscall number and arch to stderr when trapped by seccompJulian Andres Klode2017-10-262-0/+34
| | | | | | This should help debugging crashes. The signal handler is a C++11 lambda, yay! Special care has been taken to only use signal handler -safe functions inside there.
* Only warn about seccomp() EINVAL (normal) and EFAULT (qemu) errorsJulian Andres Klode2017-10-251-3/+5
| | | | | | | | | | If seccomp is disabled, we fallback to running without it. Qemu fails in the seccomp() call, returning ENOSYS and libseccomp falls back to prctl() without adjusting the pointer, causing the EFAULT. I hope qemu gets fixed at some point to return EINVAL for seccomp via prctl. Bug-Qemu: https://bugs.launchpad.net/qemu/+bug/1726394
* Don't segfault if receiving a method warning on empty queueJulian Andres Klode2017-10-251-1/+1
| | | | | | | We would like to issue a warning about seccomp support in Configuration(), but since the queue is empty, there is no current item to show the URL for and we get a segfault. Show the protocol instead.
* methods: Enable additional syscalls (SYSV IPC) in fakerootJulian Andres Klode2017-10-251-0/+10
| | | | | | | If FAKED_MODE is set, enable SYSV IPC so we don't crash when running in fakeroot. Closes: #879662
* CMake: methods: Cleanup link libraries, use OBJECT librariesJulian Andres Klode2017-10-233-18/+20
| | | | | | | | | | | | Use OBJECT libraries for http and connect stuff, and move the seccomp link expression into a global link_libraries() call. This also fixes a bug where only the http target pulled in the gnutls header arguments despite gnutls being used in connect.cc, and thus by mirror and ftp as well. Adjust translation support to ignore TARGET_OBJECTS sources and add the OBJECT libraries to the translated files.
* seccomp: Conditionalize statx() whitelistingJulian Andres Klode2017-10-231-0/+2
| | | | | statx was introduced in 4.11, so it fails to build in stretch if we just unconditionally use it.
* Release 1.6~alpha11.6_alpha1Julian Andres Klode2017-10-2348-93/+121
|
* seccomp: Add missing syscalls for ppc64el, i386, and othersJulian Andres Klode2017-10-231-0/+11
| | | | | | | These are a few overlooked syscalls. Also add readv(), writev(), renameat2(), and statx() in case libc uses them. Gbp-Dch: ignore
* Sandbox methods with seccomp-BPF; except cdrom, gpgv, rshJulian Andres Klode2017-10-2215-19/+291
| | | | | | | | | | | | This reduces the number of syscalls to about 140 from about 350 or so, significantly reducing security risks. Also change prepare-release to ignore the architecture lists in the build dependencies when generating the build-depends package for travis. We might want to clean up things a bit more and/or move it somewhere else.
* methods/basehttp.cc: Remove proxy autodetect debugging codeJulian Andres Klode2017-10-221-2/+0
| | | | | | This was a left over from the autodetect move. Gbp-Dch: ignore
* methods/mirror: Enable sandboxing and other aptMethod featuresJulian Andres Klode2017-10-221-1/+1
| | | | | Sandboxing was turned off because we called pkgAcqMethod's Configuration() instead of aptMethod's.
* Run the ProxyAutoDetect script in the sandbox againJulian Andres Klode2017-10-223-1/+13
| | | | | | | | The previous change moved running the proxy detection program from the method to the main process, so it runs as root and not as _apt. This brings it back into the sandbox. Gbp-Dch: ignore
* Run Proxy-Auto-Detect script from main processJulian Andres Klode2017-10-225-7/+48
| | | | | | | This avoids running the Proxy-Auto-Detect script inside the untrusted (well, less trusted for now) sandbox. This will allow us to restrict the http method from fork()ing or exec()ing via seccomp.
* Fix testsuite for and add new fields from dpkg 1.19Julian Andres Klode2017-10-204-6/+13
| | | | | | | | | | | tagfile-order.c: Add missing fields from dpkg 1.19 For binary packages, this is Build-Essential; for source packages, it is Description. test-bug-718329-...: Ignore control.tar.*, changes in dpkg 1.19 test-apt-extracttemplates: Fix for dpkg 1.19
* Dutch program translation updateFrans Spiesschaert2017-10-201-7/+10
| | | | Closes: #879137
* zh_CN.po: Update Simplified Chinese programs translationMo Zhou2017-10-081-6/+6
|
* avoid using NULL in varadic function for cmdline parsingDavid Kalnischkies2017-10-051-20/+13
| | | | | | | | | | | | | | | | | | | cppcheck reports: (portability) Passing NULL after the last typed argument to a variadic function leads to undefined behaviour. We don't ship on any platform which has this as undefined behaviour through – or it would be pretty well defined "bad" behaviour which always works, so even through UB is a trigger word, its hardly noteworthy as a change (and as a bonus the scanners of gcc/clang don't consider it UB). The commonly accepted method of fixing that seems to be (const char*)NULL, but it is in fact much simpler to just switch to the varadic functions C++ provides resolving the warning and reducing code. Reported-By: cppcheck Gbp-Dch: Ignore
* remove pointless va_copy to avoid cleanup danceDavid Kalnischkies2017-10-051-18/+12
| | | | | | | | | | A va_copy call needs to be closed in all branches with va_end, so these functions would need to be reworked slightly, but we don't actually need to copy the va_list as we don't work on it, we just push it forward, so dropping the copy and everyone is happy. Reported-By: cppcheck Gbp-Dch: Ignore
* ignore unsupported key formats in apt-keyDavid Kalnischkies2017-10-053-43/+96
| | | | | | | | | | | | | | | | | | | gpg2 generates keyboxes by default and users end up putting either those or armored files into the trusted.gpg.d directory which apt tools neither expect nor can really work with without fortifying backward compatibility (at least under the ".gpg" extension). A (short) discussion about how to deal with keyboxes happened in https://lists.debian.org/deity/2017/07/msg00083.html As the last message in that thread is this changeset lets go ahead with it and see how it turns out. The idea is here simply that we check the first octal of a gpg file to have one of three accepted values. Testing on my machines has always produced just one of these, but running into those values on invalid files is reasonabily unlikely to not worry too much. Closes: #876508
* send the hashes for alternative file correctlyDavid Kalnischkies2017-10-051-4/+4
| | | | | | | | | This isn't really used by the acquire system at all at the moment and the only method potentially sending this information is file://, but that used to be working correctly before broken in 2013, so better fix it now and worry about maybe using the data some day later. Regression-Of: b3501edb7091ca3aa6c2d6d96dc667b8161dd2b9
* use pkgTagSection::Key in srcRecords parserDavid Kalnischkies2017-09-261-32/+34
| | | | | | | | | Using hardcoded array-indexes in the build-dependency parsing is efficient, but less discoverable and easier to break. We can avoid this by making it even more efficient (not that it would be noticeable) allowing us to do explicitly named comparisons instead. Gbp-Dch: Ignore
* allow empty build-dependency fields in the parserDavid Kalnischkies2017-09-262-1/+5
| | | | | | | | | | | APT used to parse only wellformed files produced by repository creation tools which removed empty files as pointless before apt would see them. Now that apt can be told to parse e.g. debian/control files directly, it needs to be a little more accepting through: We had this with comments already, now let it deal with the far more trivial empty fields. Closes: #875363
* proper error reporting for v3 onion servicesDavid Kalnischkies2017-09-262-7/+27
| | | | | | | | | APT connects just fine to any .onion address given, only if the connect fails somehow it will perform checks on the sanity of which in this case is checking the length as they are well defined and as the strings are arbitrary a user typing them easily mistypes which apt should can be slightly more helpful in figuring out by saying the onion hasn't the required length.
* Drop curl method and apt-transport-https packageJulian Andres Klode2017-09-2411-710/+3
| | | | | This automatically removes any old apt-transport-https, as apt now Breaks it unversioned.
* Drop obsolute Testsuite: autopkgtest headerJulian Andres Klode2017-09-241-1/+0
|
* Drop obsolete dh-systemd build-depJulian Andres Klode2017-09-241-1/+0
|
* Bump Standards-Version to 4.1.0Julian Andres Klode2017-09-241-1/+1
|
* 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