summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2016-08-10vendor/getinfo: Accept --vendor VENDOR optionJulian Andres Klode
This can be used to query a field for a specific vendor. It also speeds up things a lot if we can cache the current vendor in cmake and pass it to further getinfo invocations. Gbp-Dch: ignore
2016-08-10CMake: Use find_package() for curl instead of pkg_check_modules()Julian Andres Klode
No need to involve pkg-config when CMake has builtin support Gbp-Dch: ignore
2016-08-06releasing package apt version 1.3~pre3+cmake21.3_pre3+cmake2Julian Andres Klode
2016-08-06Build-depend on pkg-configJulian Andres Klode
2016-08-06releasing package apt version 1.3~pre3+cmake11.3_pre3+cmake1Julian Andres Klode
2016-08-06CMake: Adjust abicheck locationsJulian Andres Klode
Look in build/apt-pkg and build/apt-inst instead of build/bin. Gbp-Dch: ignore
2016-08-06CMake: debian: Switch packaging over to CMake and dh 9Julian Andres Klode
This new packaging is much easier to read, although the duplication in the install files is a bit annoying. We should probably also get rid of the movefiles for solvers, planners, and https method; but then we have to keep track of which methods exist in the apt package. Another disadvantage is that building only the documentation packages also requires building the code, as there's no way to turn off code building in the project.
2016-08-06CMake: Switch integration tests and travis overJulian Andres Klode
This early support seems a bit hacky, but it's a hard switch: The integration tests do not understand the old build system anymore afterwards. I don't really like that.
2016-08-06CMake: Add initial support for documentation buildingJulian Andres Klode
Build HTML docbook guides (untranslated) and manual pages (including translations). Also install the examples in the example subdirectory. Translation of docbook guides has not been implemented yet, but should be easy to do. The code also needs some cleanup to automatically detect the available translations.
2016-08-06CMake: Add support for building and installing .mo filesJulian Andres Klode
Introduce support for building translation domain-specific templates, merging them with the translations, and building a language-specific .mo file. The invocation of xgettext is done in the project source directory, not in the current source directory, and all paths are made relative to the project root, in order to have clean templates. This only supports the C++ source code for now, it unfortunately does not handle the shell scripts of deselect yet.
2016-08-06CMake: Add basic CMake build systemJulian Andres Klode
Introduce an initial CMake buildsystem. This build system can build a fully working apt system without translation or documentation. The FindBerkelyDB module is from kdelibs, with some small adjustements to also look in db5 directories. Initial work on this CMake build system started in 2009, and was resumed in August 2016.
2016-08-06prepare-release: Also search for libraries in CMake locationsJulian Andres Klode
With this change, the 'library' command looks for a library libX in the directories: build/bin, */X, X. This allows it to find the library when building with the upcoming CMake backend, which places the libraries in a sub directory of the build tree with the same name as the source tree. For example, if building in 'build/', the apt-pkg library will be available at 'build/apt-pkg/libapt-pkg.so.5.0'. In case there are multiple instances of a library, the newest one will be used. Gbp-Dch: ignore
2016-08-06debian/control: Use versioned provides for same-ver library depsJulian Andres Klode
This simplifies the design a bit, as we do not need to read the major ABI version number from some file / command. Gbp-Dch: ignore
2016-08-06vendor/getinfo: Teach it about sourceslist-list-formatJulian Andres Klode
This makes it easier to write a generic subsitution tool for handling substitutions in apt-key.in and sources.list.in Gbp-Dch: ignore
2016-08-06vendor/getinfo: Provide command to determine vendor to useJulian Andres Klode
Introduce the 'current' command to eventually replace the current symbolic link. The current command does roughly the same as the makefile, the code has just been cleaned up a bit to work better as a shell function. Gbp-Dch: ignore
2016-08-06doc: Fix fuzzy string regressionJulian Andres Klode
Commit b559d4846018c3adac362c6f1d0d697956586208 updated the documentation to refer to apt.systemd.daily instead of the apt cron job, introducing fuzzy strings in all the translations. Gbp-Dch: ignore
2016-08-06test: Pass -maxdepth 1 when running find in methods dirJulian Andres Klode
This fixes a test failures in the cmake branch which contains sub directories in the methods output dir.
2016-08-06configure.ac: Drop broken unused check for ptsname_r()Julian Andres Klode
AC_CHECK_FUNCS() defines HAVE_* variables, but AC_CHECK_FUNC() does not. Anyway: We do not have any code using HAVE_PTSNAME_R, so just remove it.
2016-08-06configure.ac: Re-enable pthread support for thread-local _errorJulian Andres Klode
This was disabled in 1999 by jgg due to "glibc bugs". Let's hope those are fixed now, 17 years later.
2016-08-05Merge pull request Debian/apt#18 from corburn/docJulian Andres Klode
doc: update path to periodic options script
2016-08-05doc: update path to periodic options scriptJason Travis
2016-08-04apt-private: #ifdef HAVE_STRUCT_STATFS_F_TYPE, not #ifJulian Andres Klode
While autotools defines all macros to 1 explicitly, CMake only defines them without a value. In such a case, #if fails with an error and #ifdef works. In preparation for a possible switch to CMake and to clean up the code (rest uses #ifdef), use #ifdef here
2016-08-04Release 1.3~pre31.3_pre3Julian Andres Klode
2016-08-03ExecGPGV: Pass current config state to apt-key via temp fileJulian Andres Klode
Create a temporary configuration file with a dump of our configuration and pass that to apt-key. LP: #1607283
2016-08-03ExecGPGV: Fork in all casesJulian Andres Klode
2016-08-03ExecGPGV: Rework file removal on exit()Julian Andres Klode
Create a local exiter object which cleans up files on exit.
2016-08-03gpgv: Unlink the correct temp file in error caseJulian Andres Klode
Previously, when data could be created and sig not, we would unlink sig, not data (and vice versa).
2016-07-31apt-key: ignore any error produced by gpgconf --killDavid Kalnischkies
gpgconf wasn't always equipped with a --kill option as highlighted by our testcases failing on Travis and co as these use a much older version of gpg2. As this is just for cleaning up slightly faster we ignore any error a call might produce and carry on. Use a recent enough gpg2 version if you need the immediate killing… Gbp-Dch: Ignore Reported-By: Travis CI
2016-07-31apt-key: kill gpg-agent explicitly in cleanupDavid Kalnischkies
apt-key has (usually) no secret key material so it doesn't really need the agent at all, but newer gpgs insist on starting it anyhow. The agents die off rather quickly after the underlying home-directory is cleaned up, but that is still not fast enough for tools like sbuild which want to unmount but can't as the agent is still hanging onto a non-existent homedir. Reported-By: Johannes 'josch' Schauer on IRC
2016-07-30prevent C++ locale number formatting in text APIs (try 2)David Kalnischkies
Followup of b58e2c7c56b1416a343e81f9f80cb1f02c128e25. Still a regression of sorts of 8b79c94af7f7cf2e5e5342294bc6e5a908cacabf. Closes: 832044
2016-07-29edsp: try to read responses even if writing failedDavid Kalnischkies
If a solver/planner exits before apt is done writing we will generate write errors. Solvers like 'dump' can be pretty quick in failing but produce a valid EDSP error report apt should read, parse and display instead of just discarding even through we had write errors.
2016-07-29if the FileFd failed already following calls should fail, tooDavid Kalnischkies
There is no point in trying to perform Write/Read on a FileFd which already failed as they aren't going to work as expected, so we should make sure that they fail early on and hard.
2016-07-27(error) va_list 'args' was opened but not closed by va_end()David Kalnischkies
Reported-By: cppcheck Gbp-Dch: Ignore
2016-07-27eipp: avoid producing file warnings in simulationDavid Kalnischkies
Simulations are frequently run by unprivileged users which naturally don't have the permissions to write to the default location for the eipp file. Either way is bad as running in simulation mode doesn't mean we don't want to run the logging (as EIPP runs the same regardless of simulation or 'real' run), but showing the warnings is relatively pointless in the default setup, so, in case we would produce errors and perform a simulation we will discard the warnings and carry on. Running apt with an external planner wouldn't have generated these messages btw. Closes: 832614
2016-07-27rred: truncate result file before writing to itDavid Kalnischkies
If another file in the transaction fails and hence dooms the transaction we can end in a situation in which a -patched file (= rred writes the result of the patching to it) remains in the partial/ directory. The next apt call will perform the rred patching again and write its result again to the -patched file, but instead of starting with an empty file as intended it will override the content previously in the file which has the same result if the new content happens to be longer than the old content, but if it isn't parts of the old content remain in the file which will pass verification as the new content written to it matches the hashes and if the entire transaction passes the file will be moved the lists/ directory where it might or might not trigger errors depending on if the old content which remained forms a valid file together with the new content. This has no real security implications as no untrusted data is involved: The old content consists of a base file which passed verification and a bunch of patches which all passed multiple verifications as well, so the old content isn't controllable by an attacker and the new one isn't either (as the new content alone passes verification). So the best an attacker can do is letting the user run into the same issue as in the report. Closes: #831762
2016-07-27http: skip requesting if pipeline is fullDavid Kalnischkies
The rewrite in 742f67eaede80d2f9b3631d8697ebd63b8f95427 is based on the assumption that the pipeline will always be at least one item short each time it is called, but the logs in #832113 suggest that this isn't always the case. I fail to see how at the moment, but the old implementation had this behavior, so restoring it can't really hurt, can it?
2016-07-27use proper warning for automatic pipeline disableDavid Kalnischkies
Also fixes message itself to mention the correct option name as noticed in #832113.
2016-07-26verify hash of input file in rredDavid Kalnischkies
We read the entire input file we want to patch anyhow, so we can also calculate the hash for that file and compare it with what he had expected it to be. Note that this isn't really a security improvement as a) the file we patch is trusted & b) if the input is incorrect, the result will hardly be matching, so this is just for failing slightly earlier with a more relevant error message (althrough, in terms of rred its ignored and complete download attempt instead).
2016-07-23call flush on the wrapped writebuffered FileFdDavid Kalnischkies
The flush call is a no-op in most FileFd implementations so this isn't as critical as it might sound as the only non-trivial implementation is in the buffered writer, which tends not be used to buffer another buffer…
2016-07-22report progress for triggered actionsDavid Kalnischkies
APT doesn't know which packages will be triggered in the course of actions, so it can't plan to see them for progress beforehand, but if it sees that dpkg says that a package was triggered we can add additional states. This is pretty much magic – after all it sets back the progress – and there are cornercases in which this will result in incorrect totals (package in partial states may or may not loose trigger states), but the worst which can happen is that the progress is slightly incorrect and doesn't reach 100%, but so be it. Better than being stuck at 100% for a while as apt isn't realizing that a bunch of triggers still need to be processed.
2016-07-22use a configurable location for apport report storageDavid Kalnischkies
Hardcoding /var/crash means we can't test it properly and it isn't really our style.
2016-07-22report progress for removing while purging pkgsDavid Kalnischkies
The progress reporting for a package sheduled for purging only included the states dpkg passes through while actually purging the package – if the package was fully installed before dpkg will pass first through all remove states before purging it, so in the interest of consistent reporting our progress reporting should do that, too.
2016-07-22support dpkg debug mode in APT::StateChangesDavid Kalnischkies
Gbp-Dch: Ignore
2016-07-22create non-existent files in edit-sources with 644 instead of 640David Kalnischkies
If the sources file we want to edit doesn't exist yet GetLock will create it with 640, which for a generic lockfile might be okay, but as this is a sources file more relaxed permissions are in order – and actually required as it wont be readable for unprivileged users causing warnings/errors in apt calls. Reported-By: J. Theede (musca) on IRC
2016-07-22report warnings&errors consistently in edit-sourcesDavid Kalnischkies
After editing the sources it is a good idea to (re)built the caches as they will be out-of-date and doing so helps in reporting higherlevel errors like duplicates sources.list entries, too, instead of just general parsing errors as before.
2016-07-22Turkish program translation updateMert Dirik
Closes: 832039
2016-07-22tests: avoid time-dependent rebuild of cachesDavid Kalnischkies
The tests changes the sources.list and the modification time of this file is considered while figuring out if the cache can be good. Usually this isn't an issue, but in that case we have the cache generation produce warnings which appear twice in this case. Gbp-Dch: Ignore
2016-07-22clean up default-stanzas from extended_states on writeDavid Kalnischkies
The existing cleanup was happening only for packages which had a status change (install -> uninstalled) which is the most frequent but no the only case – you can e.g. set autobits explicitly with apt-mark. This would leave stanzas in the states file declaring a package to be manually installed – which is the default value for a package not listed at all, so we can just as well drop it from the file.
2016-07-22tests: skip over -flags for first option in autotestsDavid Kalnischkies
Otherwise calls like "apt -q install" end up calling "aptautotest_apt_q" instead of "aptautotest_apt_install" Gbp-Dch: Ignore
2016-07-22support "install ./foo.changes"David Kalnischkies
We support installing ./foo.deb (and ./foo.dsc for source) for a while now, but it can be a bit clunky to work with those directly if you e.g. build packages locally in a 'central' build-area. The changes files also include hashsums and can be signed, so this can also be considered an enhancement in terms of security as a user "just" has to verify the signature on the changes file then rather than checking all deb files individually in these manual installation procedures.