summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Release 2.9.132.9.13Julian Andres Klode2024-11-2015-16/+165
|
* tests: Temporarily disable valgrind-if-available on armhf and ppc64elJulian Andres Klode2024-11-201-1/+1
|
* Merge branch 'ftparchive-buffers' into 'main'Julian Andres Klode2024-11-204-28/+97
|\ | | | | | | | | ftparchive: Remove fixed-size buffers See merge request apt-team/apt!388
| * ftparchive: writer: Remove line length limit on file listsJulian Andres Klode2024-11-202-21/+36
| | | | | | | | LP: #2087848
| * ftparchive: cachedb: Remove 600-byte key limitJulian Andres Klode2024-11-202-3/+36
| | | | | | | | | | | | | | | | | | | | Instead of snprintf() into a fixed-size buffer, construct an std::string using assign() and append(). A previous version used strprintf() which would have been hilariously inefficient. LP: #2087848
| * ftparchive: override: Remove fixed-size line buffersJulian Andres Klode2024-11-182-5/+26
| | | | | | | | LP: #2087848
* | Merge branch 'history-comment' into 'main'Julian Andres Klode2024-11-185-0/+50
|\ \ | | | | | | | | | | | | Add a --comment option to record Comment: in history See merge request apt-team/apt!401
| * | Add a --comment option to record Comment: in historyJulian Andres Klode2024-11-185-0/+50
| |/ | | | | | | Suggested-by: mhoye on IRC
* | Merge branch 'glibcxx-assertions' into 'main'Julian Andres Klode2024-11-182-1/+18
|\ \ | |/ |/| | | | | patterns: Safely peek ahead one byte, and enable -Wp,-D_GLIBCXX_ASSERTIONS See merge request apt-team/apt!400
| * Add -Wp,-D_GLIBCXX_ASSERTIONS to CXXFLAGSJulian Andres Klode2024-11-181-0/+1
| | | | | | | | | | | | This ensures some more hardening of all our container accesses, preventing out of bounds. Especially now that we moved a lot of C-style arrays to std::array.
| * patterns: Safely peek ahead one byteJulian Andres Klode2024-11-181-1/+17
|/ | | | | | | | | | | | | | | The pattern tree parser was written using string_views in a no-copy fashion. However, at various places we assume that we can index one byte after the end of the string_view and get a NUL-byte there. This works fine in practice because we only ever pass it zero-terminated string_views, but it fails if you compile with -Wp,-D_GLIBCXX_ASSERTIONS because it will do bounds checks. So instead, do our own bounds checks here and always return '\0' if requesting one byte too many. Reported-by: Christian Heusel <christian@heusel.eu>
* Release 2.9.122.9.12Julian Andres Klode2024-11-185-7/+23
|
* Handle Retry-After by defaultJulian Andres Klode2024-11-181-1/+1
| | | | | | | | | | | | | | Let's get some feedback here. This is capped to 30s per retry, so a maximum of 90s per item that we delay the failure case. In the worst case, we hence have 90n seconds delay for n items. In a more realistic worse case however, the server likely does not collapse per-item, and we end up trying all items in a short burst so it seems more realistic we hit a 90s total delay. The bursty behavior may be suboptimal; we don't quite know, but it seems the specification of Retry-After is per-entity rather than per-host, so technically speaking it seems correct.
* Merge branch 'fm/apt-rate-limit' into 'main'Julian Andres Klode2024-11-188-6/+74
|\ | | | | | | | | http: use Retry-After HTTP header to optimize retries See merge request apt-team/apt!383
| * http: add test for Retry-After handlingFelix Moessbauer2024-11-182-0/+15
| | | | | | | | | | | | | | | | | | | | When enabling Acquire::Retries::HandleRetryAfter, the value of the Retry-After http header is honored and the retry is not executed earlier than this point in time (except if that is longer than the max delay time). The added test checks if the request is delayed at least by the requested time. Signed-off-by: Felix Moessbauer <felix.moessbauer@siemens.com>
| * http: use Retry-After HTTP header to optimize retriesFelix Moessbauer2024-11-186-6/+59
|/ | | | | | | | | | | | | | | | | | | Some mirrors like snapshot.debian.org apply strict http rate limits. While apt already has an exponential backoff mechanism implemented, this is not sufficient due to the following reasons: 1. all retries happen roughly at the same time 2. the retry-after information from the server is not used We fix this by improving the algorithm: First, if present, the timestamp or duration of the Retry-After header is added to the exponential backoff, optimizing for success-on-second-try. Second, a random delay is added (delay += [0, delay]) to distribute the retries to not immediately run into the limit again. To avoid super-long delays, this is capped by the configured maximum delay. This logic only becomes active if the option Acquire::Retries::HandleRetryAfter is enabled. Signed-off-by: Felix Moessbauer <felix.moessbauer@siemens.com>
* string_view: Include missing headersJulian Andres Klode2024-11-171-0/+3
| | | | | | | | | Specifically the lack of the `string_view` include is causing compilation failures for rust-rust-apt. Running iwyu also adds `algorithm` for our use of `std::min`, and `iosfwd` for our use of `std::ostream` none of which seem to be causing build failures so far.
* Merge branch 'reefer' into 'main'Julian Andres Klode2024-11-147-61/+50
|\ | | | | | | | | DEFER See merge request apt-team/apt!392
| * fdopen() failing does not close the fdнаб2024-11-141-0/+2
| |
| * DEFER() moreнаб2024-11-147-60/+45
| |
| * DEFERнаб2024-11-141-4/+6
| |
* | Merge branch 'noref' into 'main'Julian Andres Klode2024-11-146-20/+20
|\ \ | | | | | | | | | | | | std::string_view const & -> std::string_view See merge request apt-team/apt!397
| * | std::string_view const & -> std::string_viewнаб2024-11-146-20/+20
| | | | | | | | | | | | Fixes: 2c03eed649068c8838d971ceeb1a09603dcc8e9c
* | | Merge branch 'append' into 'main'Julian Andres Klode2024-11-144-7/+9
|\ \ \ | | | | | | | | | | | | | | | | (+=)+= -> append().append() See merge request apt-team/apt!398
| * | | (+=)+= -> append().append()наб2024-11-144-7/+9
| | |/ | |/|
* | | Merge branch 'svequiv3everything' into 'main'Julian Andres Klode2024-11-147-43/+79
|\ \ \ | |/ / |/| | | | | | | | Prepare for APT::StringView -> std::string_view, #if APT_PKG_ABI > 600: ABI migrations and using APT::StringView = std::string_view; See merge request apt-team/apt!396
| * | if APT_PKG_ABI > 600: using APT::StringView = std::string_view;наб2024-11-141-0/+6
| | |
| * | pkgTagSection::Tag constructors: std::string const& -> std::string_view ↵наб2024-11-143-14/+36
| | | | | | | | | | | | (always copied) [#if APT_PKG_ABI > 600]
| * | apt-pkg/contrib/hashes.cc, apt-pkg/contrib/hashes.h: APT::StringView -> ↵наб2024-11-142-9/+16
| | | | | | | | | | | | std::string_view in private interface. Take std::string_view instead of std::string const& for HashString::HashString (not reused) [#if APT_PKG_ABI > 600]
| * | Move StringViewCompareFast to strutil.hнаб2024-11-142-18/+19
| | |
| * | apt-pkg/tagfile.h: prepare for APT::StringView -> std::string_viewнаб2024-11-141-2/+2
| |/
* | Merge tag '2.9.11'Julian Andres Klode2024-11-1448-7094/+4948
|\ \ | |/ |/| | | apt Debian release 2.9.11
| * Release 2.9.112.9.11Julian Andres Klode2024-11-1448-7094/+4948
| |
* | Merge branch 'svequiv2ftparchive' into 'main'Julian Andres Klode2024-11-1449-456/+460
|\ \ | |/ |/| | | | | ftparchive/: prepare for APT::StringView -> std::string_view See merge request apt-team/apt!395
| * ftparchive/: prepare for APT::StringView -> std::string_viewнаб2024-11-1449-456/+460
|/
* Merge branch 'svequiv' into 'main'Julian Andres Klode2024-11-1428-485/+485
|\ | | | | | | | | Internally replace APT::StringView with std::string_view where it doesn't affect the ABI, with implementations that support both std::string_view and APT::StringView with new shims. ReportMirrorFailureToCentral: fix use-after-free See merge request apt-team/apt!394
| * apt-pkg/contrib/gpgv.cc: APT::StringView -> std::string_viewнаб2024-11-121-7/+7
| |
| * apt-pkg/deb/deblistparser.h: APT::StringView -> std::string_viewнаб2024-11-121-6/+5
| |
| * apt-pkg/deb/deblistparser.cc: APT::StringView -> std::string_viewнаб2024-11-121-30/+31
| |
| * apt-pkg/deb/debsrcrecords.h: APT::StringView -> std::string_viewнаб2024-11-121-7/+7
| |
| * apt-pkg/deb/debsrcrecords.cc: APT::StringView -> std::string_viewнаб2024-11-121-12/+12
| |
| * apt-pkg/pkgcachegen.cc, apt-pkg/pkgcachegen.h: APT::StringView -> ↵наб2024-11-124-123/+123
| | | | | | | | std::string_view
| * methods/http.cc: APT::StringView -> std::string_viewнаб2024-11-121-4/+3
| |
| * apt-pkg/cachefilter-patterns.h, apt-pkg/cachefilter-patterns.cc: prepare for ↵наб2024-11-122-65/+66
| | | | | | | | APT::StringView -> std::string_view
| * apt-pkg/acquire-item.cc: prepare for APT::StringView -> std::string_viewнаб2024-11-121-7/+7
| |
| * apt-pkg/deb/debrecords.cc: prepare for APT::StringView -> std::string_viewнаб2024-11-121-20/+20
| |
| * apt-pkg/deb/debmetaindex.cc: prepare for APT::StringView -> std::string_viewнаб2024-11-121-7/+7
| |
| * apt-pkg/tagfile.cc: prepare for APT::StringView -> std::string_viewнаб2024-11-121-1/+1
| |
| * apt-pkg/policy.cc: prepare for APT::StringView -> std::string_viewнаб2024-11-121-4/+3
| |
| * cmdline/apt-sortpkgs.cc: prepare for APT::StringView -> std::string_viewнаб2024-11-121-15/+15
| |