summaryrefslogtreecommitdiff
path: root/apt-pkg/CMakeLists.txt
Commit message (Collapse)AuthorAgeFilesLines
* Remove GnuTLS and gcrypt supportJulian Andres Klode2024-12-221-6/+2
| | | | | OpenSSL is mandatory now, it is no longer possible to build without https support either.
* hashes, methods: Add OpenSSL backendsJulian Andres Klode2024-12-221-0/+2
| | | | | | | | | | | | | | | | | | | | Introduce an OpenSSL::Crypto backend for the hashes library and an OpenSSL::SSL backend for the TLS support in our https method. Many thanks to curl for showing the way with how to handle a CRL file. There are some memory leaks here with the TlsFd itself as well as the proxy support; and we should reorganize the code to generate the ssl object as late as possible. A peculiar aspect of OpenSSL is that SSL_has_pending() returns 1 even if SSL_read() will fail to read anything and return the equivalent of EAGAIN. We work around this here by also peeking ahead 1 byte. I was running a very high RTT connection from Germany to Australia for testing, and with the peeking it's using negligible amounts of CPU; before that, it was busy looping at 100%. Bad OpenSSL!
* hashes: Add GnuTLS backend, make it defaultJulian Andres Klode2024-12-211-0/+2
| | | | | | | The GnuTLS backend avoids the need to link in libgcrypt, and gets us another certified library people will be happy with. This should be an intermediate step on the road to OpenSSL.
* Do not ignore if a cmake execute_process failsDavid Kalnischkies2024-04-241-4/+8
| | | | | | Ignoring errors might lead to failures later on anyhow, but especially with triehash it could also lead to broken builds or other crazy stuff, so lets better be save than sorry.
* Don't reuse filename for in-tree builds of aptDavid Kalnischkies2022-08-081-2/+2
| | | | | | | | | | | | | | A temporary filename is used as a workaround for bugs/missing features in other software dealing with /dev/stdin, but nobody said I have to use the exact same filename…. However in-tree builds are not generally recommended. References: https://salsa.debian.org/debian/sbuild/-/commit/aa4a4326d09969e809f336e1b75cbd7342a77529 https://salsa.debian.org/ci-team/autopkgtest/-/commit/fb0561efc41a117963fa3e31802db6b2664c7aa5 Regression-Of: 701a501fb1c84296d2003c0092e4308742079591 Reported-By: Lance Fredrickson <lancethepants@gmail.com>
* Use temporary file instead of depending on /dev/stdin for triehashDavid Kalnischkies2022-05-111-2/+3
| | | | | | | | /dev might not be populated for example in unshare chroots, so just using a temporary file it is until triehash supports non-file input. Regression-Of: f6438ea9e726a1c13ce8d90ac78cc272346ab0f8 Gbp-Dch: Ignore
* Document tagfile-keys.h as internal to aptDavid Kalnischkies2022-04-011-2/+5
| | | | | | | | | | | | | | | | The previous regime of the file was to sort it on insert, but that changes the values in the generated enum, which is fine as long as we only use it in libapt itself, but breaks on other users. The header was always intended to be private to apt itself, so we just document this here now and lay the ground work to have the file in the future only appended to, so that it remains sufficiently ABI stable that we can use it outside the library in our apt tools. We also remove some fields apt is unlikely to need or only uses in certain cases outside of any (speed) critical path to have enough room to add more fields soon as currently we are limited to 128 fields max and it would be sad if we use up that allowance entirely already.
* Use XXH3 for cache, hash table hashingJulian Andres Klode2020-12-151-0/+2
| | | | | | XXH3 is faster than both our CRC32c implementation as well as DJB hash for hash table hashing, so meh, let's switch to it.
* apt-pkg: default visibility to hiddenJulian Andres Klode2020-02-261-0/+1
|
* hashes: Use Libgcrypt for hashing purposesJulian Andres Klode2020-01-141-0/+2
| | | | | Switch the code of the Hashes class to use libgcrypt, which allows us to use hardware-accelerated implementations of SHA1 and friends.
* Make APT::StringView publicJulian Andres Klode2019-06-111-2/+0
|
* Prevent shutdown while running dpkgJulian Andres Klode2019-05-031-0/+2
| | | | | | | As long as we are running dpkg, keep an inhibitor that blocks us from shutting down. LP: #1820886
* Merge branch 'pkgconfig' into 'master'Julian Andres Klode2019-04-041-0/+3
|\ | | | | | | | | Add PkgConfig on the apt-pkg and apt-inst libraries See merge request apt-team/apt!20
| * Add pkg-config files for the apt-pkg and apt-inst librariesCorentin Noël2019-03-081-0/+3
| | | | | | | | Closes: #439121
* | Use system-provided triehashJulian Andres Klode2019-03-111-1/+1
|/
* CMake: Fix builds without zstdJulian Andres Klode2018-04-201-2/+2
| | | | Only use zstd defined variables if zstd was found.
* apt-pkg: Add support for zstdJulian Andres Klode2018-03-121-0/+2
| | | | | | | zstd is a compression algorithm developed by facebook. At level 19, it is about 6% worse in size than xz -6, but decompression is multiple times faster, saving about 40% install time, especially with eatmydata on cloud instances.
* 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.
* Directly link against libudev on Linux systemsJulian Andres Klode2017-09-091-0/+2
| | | | | | | | | | | | | | | | | | | 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.
* CMake: Document that the globs are expanded during CMakeJulian Andres Klode2017-01-171-1/+3
| | | | | | | This will avoid people from thinking that they have to do nothing when they change the set of files. Gbp-Dch: ignore
* CMake: Find the Perl executable, and use it to run perl scriptsJulian Andres Klode2017-01-171-1/+1
| | | | | | | | This is somewhat more portable than just hardcoding perl or in the triehash case /usr/bin/perl in the shebang. Thanks: Guillem Jover for the hint Gbp-Dch: ignore
* TagSection: Introduce functions for looking up by key idsJulian Andres Klode2016-11-221-1/+14
| | | | | Introduce a new enum class and add functions that can do a lookup with that enum class. This uses triehash.
* Coverage: Do not print messages from gcovJulian Andres Klode2016-09-111-0/+4
| | | | | | | 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: 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: Add missing iconv dependencyJulian Andres Klode2016-08-261-2/+7
| | | | | | | | | | | | FreeBSD has two iconv systems: It ships an iconv.h itself, and symbols for that in the libc. But there's also the port of GNU libiconv, which unfortunately for us, Doxygen depends on. This changes things to prefer a separate libiconv library over the system one; that is, the port on FreeBSD. Gbp-Dch: ignore
* CMake: Do not use -lresolv if res_init exists in libcJulian Andres Klode2016-08-261-1/+1
| | | | Gbp-Dch: ignore
* CMake: Do not hardcode -ldlJulian Andres Klode2016-08-261-1/+1
| | | | | | Does not exist on FreeBSD Gbp-Dch: ignore
* CMake: Fix uninitialized variablesJulian Andres Klode2016-08-201-1/+1
| | | | | | This fixes some actual bugs for PROJECT and BZIP2_INCLUDE_DIR. Gbp-Dch: ignore
* CMake: Add basic CMake build systemJulian Andres Klode2016-08-061-0/+46
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.