summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Build-depend on pkg-configJulian Andres Klode2016-08-061-1/+1
|
* releasing package apt version 1.3~pre3+cmake11.3_pre3+cmake1Julian Andres Klode2016-08-069-7/+36
|
* CMake: Adjust abicheck locationsJulian Andres Klode2016-08-062-2/+3
| | | | | | Look in build/apt-pkg and build/apt-inst instead of build/bin. Gbp-Dch: ignore
* CMake: debian: Switch packaging over to CMake and dh 9Julian Andres Klode2016-08-0623-376/+102
| | | | | | | | | | | 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.
* CMake: Switch integration tests and travis overJulian Andres Klode2016-08-066-11/+30
| | | | | | 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.
* CMake: Add initial support for documentation buildingJulian Andres Klode2016-08-065-1/+160
| | | | | | | | | | 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.
* CMake: Add support for building and installing .mo filesJulian Andres Klode2016-08-064-1/+78
| | | | | | | | | | | | | | 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.
* CMake: Add basic CMake build systemJulian Andres Klode2016-08-0614-0/+601
| | | | | | | | | | | 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.
* prepare-release: Also search for libraries in CMake locationsJulian Andres Klode2016-08-061-0/+7
| | | | | | | | | | | | | | | | | | 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
* debian/control: Use versioned provides for same-ver library depsJulian Andres Klode2016-08-061-1/+3
| | | | | | | 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
* vendor/getinfo: Teach it about sourceslist-list-formatJulian Andres Klode2016-08-061-1/+1
| | | | | | | This makes it easier to write a generic subsitution tool for handling substitutions in apt-key.in and sources.list.in Gbp-Dch: ignore
* vendor/getinfo: Provide command to determine vendor to useJulian Andres Klode2016-08-061-1/+39
| | | | | | | | | 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
* doc: Fix fuzzy string regressionJulian Andres Klode2016-08-0610-42/+44
| | | | | | | | 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
* test: Pass -maxdepth 1 when running find in methods dirJulian Andres Klode2016-08-063-3/+3
| | | | | This fixes a test failures in the cmake branch which contains sub directories in the methods output dir.
* configure.ac: Drop broken unused check for ptsname_r()Julian Andres Klode2016-08-062-6/+0
| | | | | | | | 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.
* configure.ac: Re-enable pthread support for thread-local _errorJulian Andres Klode2016-08-061-5/+5
| | | | | This was disabled in 1999 by jgg due to "glibc bugs". Let's hope those are fixed now, 17 years later.
* Merge pull request Debian/apt#18 from corburn/docJulian Andres Klode2016-08-051-1/+1
|\ | | | | | | doc: update path to periodic options script
| * doc: update path to periodic options scriptJason Travis2016-08-051-1/+1
|/
* apt-private: #ifdef HAVE_STRUCT_STATFS_F_TYPE, not #ifJulian Andres Klode2016-08-041-1/+1
| | | | | | | | | 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
* Release 1.3~pre31.3_pre3Julian Andres Klode2016-08-0462-498/+2123
|
* ExecGPGV: Pass current config state to apt-key via temp fileJulian Andres Klode2016-08-031-0/+23
| | | | | | | Create a temporary configuration file with a dump of our configuration and pass that to apt-key. LP: #1607283
* ExecGPGV: Fork in all casesJulian Andres Klode2016-08-031-43/+34
|
* ExecGPGV: Rework file removal on exit()Julian Andres Klode2016-08-031-28/+23
| | | | Create a local exiter object which cleans up files on exit.
* gpgv: Unlink the correct temp file in error caseJulian Andres Klode2016-08-031-4/+4
| | | | | Previously, when data could be created and sig not, we would unlink sig, not data (and vice versa).
* apt-key: ignore any error produced by gpgconf --killDavid Kalnischkies2016-07-311-1/+1
| | | | | | | | | | | 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
* apt-key: kill gpg-agent explicitly in cleanupDavid Kalnischkies2016-07-311-1/+13
| | | | | | | | | | | 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
* prevent C++ locale number formatting in text APIs (try 2)David Kalnischkies2016-07-303-4/+4
| | | | | | | Followup of b58e2c7c56b1416a343e81f9f80cb1f02c128e25. Still a regression of sorts of 8b79c94af7f7cf2e5e5342294bc6e5a908cacabf. Closes: 832044
* edsp: try to read responses even if writing failedDavid Kalnischkies2016-07-291-15/+20
| | | | | | | 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.
* if the FileFd failed already following calls should fail, tooDavid Kalnischkies2016-07-291-8/+10
| | | | | | 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.
* (error) va_list 'args' was opened but not closed by va_end()David Kalnischkies2016-07-274-30/+26
| | | | | Reported-By: cppcheck Gbp-Dch: Ignore
* eipp: avoid producing file warnings in simulationDavid Kalnischkies2016-07-271-37/+33
| | | | | | | | | | | | | | | 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
* rred: truncate result file before writing to itDavid Kalnischkies2016-07-274-20/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* http: skip requesting if pipeline is fullDavid Kalnischkies2016-07-271-0/+2
| | | | | | | | | 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?
* use proper warning for automatic pipeline disableDavid Kalnischkies2016-07-271-4/+1
| | | | | Also fixes message itself to mention the correct option name as noticed in #832113.
* verify hash of input file in rredDavid Kalnischkies2016-07-262-19/+47
| | | | | | | | | | | | 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).
* call flush on the wrapped writebuffered FileFdDavid Kalnischkies2016-07-231-2/+1
| | | | | | | 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…
* report progress for triggered actionsDavid Kalnischkies2016-07-221-15/+42
| | | | | | | | | | | | | 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.
* use a configurable location for apport report storageDavid Kalnischkies2016-07-223-2/+7
| | | | | Hardcoding /var/crash means we can't test it properly and it isn't really our style.
* report progress for removing while purging pkgsDavid Kalnischkies2016-07-221-20/+31
| | | | | | | | 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.
* support dpkg debug mode in APT::StateChangesDavid Kalnischkies2016-07-222-59/+121
| | | | Gbp-Dch: Ignore
* create non-existent files in edit-sources with 644 instead of 640David Kalnischkies2016-07-222-1/+54
| | | | | | | | | | 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
* report warnings&errors consistently in edit-sourcesDavid Kalnischkies2016-07-223-26/+42
| | | | | | | 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.
* Turkish program translation updateMert Dirik2016-07-221-82/+154
| | | | Closes: 832039
* tests: avoid time-dependent rebuild of cachesDavid Kalnischkies2016-07-221-0/+4
| | | | | | | | | 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
* clean up default-stanzas from extended_states on writeDavid Kalnischkies2016-07-222-13/+22
| | | | | | | | | | 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.
* tests: skip over -flags for first option in autotestsDavid Kalnischkies2016-07-221-1/+9
| | | | | | | Otherwise calls like "apt -q install" end up calling "aptautotest_apt_q" instead of "aptautotest_apt_install" Gbp-Dch: Ignore
* support "install ./foo.changes"David Kalnischkies2016-07-229-22/+79
| | | | | | | | | | | | 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.
* allow arch=all to override No-Support-for-Architecture-allDavid Kalnischkies2016-07-225-16/+68
| | | | | | | | | | | | | If a user explicitly requests the download of arch:all apt shouldn't get in the way and perform its detection dance if arch:all packages are (also) in arch:any files or not. This e.g. allows setting arch=all on a source with such a field (or one which doesn't support all at all, but has the arch:all files like Debian itself ATM) to get only the arch:all packages from there instead of behaving like a no-op. Reported-By: Helmut Grohne on IRC
* refactor plus/minus sources.list option handlingDavid Kalnischkies2016-07-191-85/+108
| | | | | | | Moving code around into some more dedicated methods, no effective code change itself. Gbp-Dch: Ignore
* don't hardcode /var/lib/dpkg/status as dir::state::statusDavid Kalnischkies2016-07-192-4/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | Theoretically it should be enough to change the Dir setting and have apt pick the dpkg/status file from that. Also, it should be consistently effected by RootDir. Both wasn't really the case through, so a user had to explicitly set it too (or ignore it and have or not have expected sideeffects caused by it). This commit tries to guess better the location of the dpkg/status file by setting dir::state::status to a naive "../dpkg/status", just that this setting would be interpreted as relative to the CWD and not relative to the dir::state directory. Also, the status file isn't really relative to the state files apt has in /var/lib/apt/ as evident if we consider that apt/ could be a symlink to someplace else and "../dpkg" not effected by it, so what we do here is an explicit replace on apt/ – similar to how we create directories if it ends in apt/ – with dpkg/. As this is a change it has the potential to cause regressions in so far as the dpkg/status file of the "host" system is no longer used if you set a "chroot" system via the Dir setting – but that tends to be intended and causes people to painfully figure out that they had to set this explicitly before, so that it now works more in terms of how the other Dir settings work (aka "as expected"). If using the host status file is really intended it is in fact easier to set this explicitely compared to setting the new "magic" location explicitely.