Commit Graph

220 Commits

Author SHA1 Message Date
renovate[bot]
008aa2b38f
GHA: update awslabs/aws-lc to v1.71.0
Closes #21283
2026-04-10 08:21:48 +02:00
renovate[bot]
8a3de6c8ce
GHA: update dependency wolfSSL/wolfssl to v5.9.1
Closes #21272
2026-04-08 23:32:25 +02:00
renovate[bot]
44c19a2cce
GHA: update openssl/openssl to v3.6.2
Closes #21254
2026-04-07 16:09:51 +02:00
Viktor Szakats
596f685da5
GHA: autoreconf downloaded tarballs where missing
To avoid using pre-built `./configure` scripts.

Also: drop unrecognized nettle `./configure` option.

Closes #21240
2026-04-06 18:49:13 +02:00
dependabot[bot]
fcf946e846
GHA: bump actions and pips
- update `actions/cache` from 5.0.3 to 5.0.4
- update `actions/download-artifact` from 7.0.0 to 8.0.1
- update `actions/upload-artifact` from 6.0.0 to 7.0.0
- update `msys2/setup-msys2` from 2.30.0 to 2.31.0
- update pip `ruff` from 0.15.7 to 0.15.8

Closes #21195
Closes #21197
2026-04-01 22:50:11 +02:00
Viktor Szakats
a5838847c4
GHA: try workaround for slow Azure Ubuntu distro server (cont.)
- fail if all retries failed.
- run `dpkg --configure -a` after an aborted slow attempt.

```
Selecting previously unselected package libsys-hostname-long-perl.
Error: slow server, retry
E: dpkg was interrupted, you must manually run 'sudo dpkg --configure -a' to correct the problem.
[...]
```

Bug: https://github.com/curl/curl/pull/21107#issuecomment-4163506100
Follow-up to 5172ba5475 #21107

Closes #21181
2026-03-31 23:39:47 +02:00
renovate[bot]
9dc3c06aa7
GHA: update dependency google/boringssl to v0.20260327.0
Closes #21166
2026-03-31 00:51:04 +02:00
Viktor Szakats
89dbe84fdf
curl_ngtcp2: extend and update callbacks for 1.22.0+
Fixing:
```
lib/vquic/curl_ngtcp2.c:880:1: error: missing field 'recv_stateless_reset2' initializer [-Wmissing-field-initializers]
  880 | };
      | ^
```

Also:
- GHA/http3-linux: bump to ngtcp2 v1.22.0.

Refs:
https://github.com/ngtcp2/ngtcp2/releases/tag/v1.22.0
b7bfe41db8
https://github.com/ngtcp2/ngtcp2/pull/2035

Closes #21152
2026-03-30 10:59:38 +02:00
Viktor Szakats
30462cd66f
GHA/http3-linux: fix openssl4 version in cache keys
Follow-up to 7523de760d #21118

Closes #21132
2026-03-28 00:49:46 +01:00
Viktor Szakats
7523de760d
GHA/http3-linux: add OpenSSL 4 beta jobs, with ECH
Closes #21118
2026-03-27 12:23:12 +01:00
Viktor Szakats
68fefb9f59
GHA/http3-linux: add missing step conditions
To omit unused cache restores. Saving ~7 seconds in jobs not using them.

Closes #21120
2026-03-27 11:53:57 +01:00
Viktor Szakats
5172ba5475
GHA: try workaround for slow Azure Ubuntu distro server
It's been going on for almost a year, chances seem slim to have this
fixed upstream.

The observed issue is that on GitHub-supplied CI runner images,
sometimes, `apt-get install` using the stock distro server
`http://azure.archive.ubuntu.com/ubuntu` sees extreme slowness while
downloading data, then reaching the job timeout and aborting, making CI
red and necessitating a manual restart of the failed job(s).

In majority of cases the install step takes no longer than 8-40 seconds
(download + install), while in the failing case it takes 10-20+ minutes
just to download.

Earlier I slimmed down installs to avoid unnecessary packages, which
mitigated, but did not completely fix the issue.

Example:
https://github.com/curl/curl/actions/runs/23599596928/job/68725576899?pr=21105

Follow-up to 0455d8772a #18509

Closes #21107
2026-03-26 23:05:59 +01:00
Viktor Szakats
62d77b12fc
spacecheck: check long lines and repeat spaces, fix fallouts
Verify if lines are not longer than 192 characters. Also verify if lines
have less than 79 repeat spaces (and fix one fallout).

To improve readability by avoiding long lines and to prevent adding
overly long lines with text that may go unnoticed in an editor or diff
viewer.

In addition to pre-existing line length limits: 79 for C, 132 for CMake
sources.

Also:
- spacecheck: fix/harden allowlist regexes.
- spacecheck: tidy-up quotes and simplify escaping.
- spacecheck: allow folding strings with repeat spaces.
- GHA: fix a suppressed shellcheck warning.
- GHA/macos: simplify by dropping brew bundle.
- test1119.pl: precompile a regex.
- FAQ.md: delete very long link to a Windows 7/2008 support article
  that's lost it relevance.

Closes #21087
2026-03-25 11:02:08 +01:00
Daniel Stenberg
aef8fd00c8
GHA: add NTLM to lots of builds 2026-03-21 15:30:04 +01:00
renovate[bot]
e9c3dacc5e
GHA: update dependency wolfSSL/wolfssl to v5.9.0
Closes #20998
2026-03-19 12:02:10 +01:00
renovate[bot]
ad9836dfa4
GHA: update dependency nghttp2/nghttp2 to v1.68.1
Closes #20982
2026-03-18 15:06:44 +01:00
Viktor Szakats
38107d3354
configure: fix --with-ngtcp2=<path> option for crypto libs
ngtcp2 1.14.0 added module dependencies to `ngtcp2_crypto_*.pc` files.
This broke certain build cases in curl, because configure was is
querying pkg-config modules by setting `PKG_CONFIG_LIBDIR` to the
directory specified via `--with-*=` options, including `--with-ngtcp2=`.
Setting `PKG_CONFIG_LIBDIR` tells pkg-config (and pkgconf) to ignore
system locations. This caused that `ngtcp2_crypto_gnutls.pc` could no
longer find its indirect dependencies, if those were present at system
locations (where they typically are). Another fallout was BoringSSL,
because it does not provide `openssl.pc` on its own, and successful
detection relied on finding a non-BoringSSL copy, typically at a system
location (also fixed in ngtcp2 main branch).

Fix `ngtcp2_crypto_*` detections to not touch `PKG_CONFIG_LIBDIR` and
instead prepend `<path>` set via `--with-ngtcp2=` to `PKG_CONFIG_PATH`.
This ensures to pick up any dependent modules from system locations.

Note the side-effect is that potentially undesired modules may be
detected this way from system locations, i.e. it makes this particular
detection less "hermetic" than the rest used in curl configure.

(Configurations using a bare `--with-ngtcp2` with no path were not
affected, and served as a workaround before this patch. It remains a
valid way of configuration after.)

Both `pkgconf` and `pkg-config` use this logic to calculate their search
directory list:
```pseudo
search = {}
if PKG_CONFIG_PATH is set
  search += PKG_CONFIG_PATH
endif
if PKG_CONFIG_LIBDIR is set (even if empty)
  search += PKG_CONFIG_LIBDIR
else
  search += built-in-pkg-config-dirs
endif
```

Refs:
https://github.com/curl/curl/pull/18028/commits (earlier attempt. Failed due to using `PKG_CONFIG_DIR` instead of the correct `PKG_CONFIG_PATH`)
c0874ce824
https://man.archlinux.org/man/pkgconf.1.en
https://manpages.debian.org/unstable/pkgconf/pkgconf.1.en.html
https://manpages.debian.org/unstable/pkg-config/pkg-config.1.en.html
10e27fd63c

Bug: https://github.com/curl/curl/pull/18022#issuecomment-3120587041
Bug: https://github.com/ngtcp2/ngtcp2/pull/1689#issuecomment-3120593664
Follow-up to 04d90b5deb #20931
Follow-up to 3c64ffaff4 #18415 #18188
Follow-up to 99500660af #18028 #18022

Closes #20920
2026-03-17 14:37:53 +01:00
Viktor Szakats
1e3c2bec7e
GHA/http3-linux: add CI reproducer for --with-ngtcp2=<path> regression
Configure LibreSSL autotools job with `--with-ngtcp=<path>` instead of
adding ngtcp2 to `PKG_CONFIG_PATH`. To test this way of configuration in
CI and test for the regression reported in #20889.

Turns out this way of configuration isn't affected by the detection
issue in this particular case.

It also works for other backends except for these two, subject to
separate fixes:
- BoringSSL fix: https://github.com/ngtcp2/ngtcp2/pull/2070
- GnuTLS fix and BoringSSL workaround: #20920

Follow-up to 666db80196 #20891
Follow-up to 8db0e286b3 #18189
Follow-up to 99500660af #18028 #18022

Closes #20926
2026-03-17 02:47:05 +01:00
Viktor Szakats
ec3f198ef0
GHA/http3-linux: prefer contains() over == in job name filters
To allow extending names without breaking logic.

Cherry-picked from #20920

Closes #20941
2026-03-16 18:12:00 +01:00
Viktor Szakats
04d90b5deb
configure: add option to trace pkg-config detection details
To aid debugging cases when dependency detection acts unexpectedly.
Sprung from spending days trying to figure out behavior of ngtcp2 crypto
modules and their dependencies.

You can enable by setting env `CURL_TRACE_PKG_CONFIG` to a non-empty
value. When enabled, details are logged for both successful and
unsuccessful detections. Logging of unsuccessful ones is automatically
enabled when `CURL_CI` env is set, which is the case for all CI jobs.

It works by asking for `--debug` output and grepping for lines that seem
useful for this purpose. Output is different for classic pkg-config and
pkgconf, and may depending on tool version. Also append `--print-errors`
output if any.

Examples (with pkgconf):

Fail, before:
```
checking for libngtcp2_crypto_boringssl options with pkg-config... no
configure: error: --with-ngtcp2 was specified but could not find ngtcp2_crypto_boringssl pkg-config file.
```

Fail, after:
```
checking for libngtcp2_crypto_boringssl options with pkg-config... no
configure: pkg-config --exists libngtcp2_crypto_boringssl trace:
---- begin
trying path: /home/runner/nghttp3/build/lib/pkgconfig for libngtcp2_crypto_boringssl
trying path: /home/runner/ngtcp2-boringssl/build/lib/pkgconfig for libngtcp2_crypto_boringssl
trying path: /home/runner/nghttp3/build/lib/pkgconfig for libngtcp2
trying path: /home/runner/ngtcp2-boringssl/build/lib/pkgconfig for libngtcp2
trying path: /home/runner/nghttp3/build/lib/pkgconfig for openssl
trying path: /home/runner/ngtcp2-boringssl/build/lib/pkgconfig for openssl
trying path: /home/runner/nghttp2/build/lib/pkgconfig for openssl
==== error:
Package openssl was not found in the pkg-config search path.
Perhaps you should add the directory containing `openssl.pc'
to the PKG_CONFIG_PATH environment variable
Package 'openssl', required by 'libngtcp2_crypto_boringssl', not found
---- end
configure: error: --with-ngtcp2 was specified but could not find ngtcp2_crypto_boringssl pkg-config file.
```

Success, after:
```
checking for libngtcp2_crypto_boringssl options with pkg-config... found
configure: pkg-config --exists libngtcp2_crypto_boringssl trace:
---- begin
trying path: /home/runner/awslc/build/lib/pkgconfig for libngtcp2_crypto_boringssl
trying path: /home/runner/nghttp3/build/lib/pkgconfig for libngtcp2_crypto_boringssl
trying path: /home/runner/nghttp2/build/lib/pkgconfig for libngtcp2_crypto_boringssl
trying path: /home/runner/ngtcp2/build/lib/pkgconfig for libngtcp2_crypto_boringssl
trying path: /home/runner/awslc/build/lib/pkgconfig for libngtcp2
trying path: /home/runner/nghttp3/build/lib/pkgconfig for libngtcp2
trying path: /home/runner/nghttp2/build/lib/pkgconfig for libngtcp2
trying path: /home/runner/ngtcp2/build/lib/pkgconfig for libngtcp2
trying path: /home/runner/awslc/build/lib/pkgconfig for openssl
trying path: /home/runner/awslc/build/lib/pkgconfig for libssl
trying path: /home/runner/awslc/build/lib/pkgconfig for libcrypto
---- end
```

More examples:
https://github.com/curl/curl/pull/20926#issuecomment-4064259935

If there is an externally enablable, built-in feature like this in
classic pkg-config or pkgconf, I could not find it.

Also:
- GHA/http3-linux: set `CURL_TRACE_PKG_CONFIG` to log detection details.
  H3 builds are prone to hard-to-debug dependency issues.

Ref: #20920
Follow-up to 3c64ffaff4 #18415 #18188
Follow-up to 99500660af #18028 #18022

Cherry-picked from #20926

Closes #20931
2026-03-16 11:31:01 +01:00
Viktor Szakats
15932f2ac5
GHA: drop installing impacket for curl built without SMB support
Ref: #20846

Closes #20868
2026-03-10 17:45:27 +01:00
renovate[bot]
a4f90969ff
GHA: update awslabs/aws-lc to v1.69.0
Closes #20876
2026-03-10 16:08:44 +01:00
dependabot[bot]
4427e6152a
GHA: bump actions and pip dependencies
- update action `actions/cache` from 5.0.1 to 5.0.3
- update action `github/codeql-action` from 4.31.9 to 4.32.4
- update pip `filelock` from 3.20.3 to 3.24.3
- update pip `ruff` from 0.14.14 to 0.15.2

Closes #20782
Closes #20783
2026-03-01 19:06:39 +01:00
renovate[bot]
e86642909f
GHA: update ngtcp2/ngtcp2 to v1.21.0
Closes #20738
2026-02-26 17:15:22 +01:00
renovate[bot]
aece530e26
GHA: update google/boringssl to v0.20260211.0
Closes #20566
2026-02-12 17:38:35 +01:00
Viktor Szakats
516a0cd382
cmake: add BORINGSSL_VERSION configuration variable, test in CI
To simplify setting BoringSSL version, using:
`-DBORINGSSL_VERSION=0.20260211.0`
or
`-DBORINGSSL_VERSION=${boringssl_version}`

Previously it could be set via C flags, using complicated shell quotes:
`-DCMAKE_C_FLAGS="-DCURL_BORINGSSL_VERSION=\\\"${boringssl_version}\\\""`
(the C flags method remains, also for autotools)

It'd be nice if BoringSSL published its version not just via
`MODULE.bazel` in its source tree, but from its public headers, to make
these workarounds unnecessary.

Also:
- GHA/http3-linux: test both options.

Closes #20571
2026-02-12 16:29:49 +01:00
renovate[bot]
64ea225589
GHA: update awslabs/aws-lc to v1.67.0
Closes #20553
2026-02-10 07:54:12 +01:00
renovate[bot]
7fc12ecae8
GHA: update google/boringssl to v0.20260204.0
Closes #20519
2026-02-05 17:18:55 +01:00
Viktor Szakats
4ad0a022e1
CI: log downloaded file hashes, pin manually bumped ones
To ensure downloaded binaries are the expected ones. Also to document
SHA-256 hashes of all binary packages and source tarballs.

Closes #20517
2026-02-05 03:20:46 +01:00
dependabot[bot]
47734f3244
GHA: bump GHA and pip dependencies
- update `actions/checkout` from 6.0.1 to 6.0.2
- update `ruff` from 0.14.11 to 0.14.14
- update `cryptography` from 46.0.3 to 46.0.4
- update `psutil` from 7.2.1 to 7.2.2
- update `websockets` from 15.0.1 to 16.0

Closes #20490
Closes #20491
2026-02-01 16:40:37 +01:00
renovate[bot]
3b1c2a1510
GHA: update openssl/openssl to v3.6.1
Closes #20449
2026-01-28 08:08:07 +01:00
Viktor Szakats
0f54ca6150
GHA/windows: cache stunnel
To avoid hammering `stunnel.org`.

Follow-up to 7c3a4a4b4c #20410

Closes #20454
2026-01-27 19:58:48 +01:00
Viktor Szakats
63d75de95d
GHA: sync up configure option order across builds
Closes #20423
2026-01-26 12:08:47 +01:00
Viktor Szakats
66ad54e46b
cmake: add CURL_DROP_UNUSED option to reduce binary sizes
To enable known linker options dropping unused, dead, code and data from
the executables built.

Useful to reduce binary sizes for curl, libcurl shared lib and apps
linking static libcurl. It's effective on both "unity" and non-unity
builds. Aligning "unity" build sizes with default, non-unity ones.

Supported platforms: Apple, MSVC, llvm/clang and GCC on all tested
platforms: Linux, BSDs, Windows, MSYS2/Cygwin, Android, MS-DOS.

Notes:
- Static libraries grow 20-30% with non-Apple toolchains.
  This effect is controlled by separate, optional compiler flags on
  non-Apple. This patch enables them automatically for public binaries
  (libcurl and curl tool), and leaves them off for internal/test ones.
- MSVC enables this option by default for 'Release' configurations.
  The curl build option has no effect on it.
- Observed effect on VS2010 is negligible. VS2012+ is recommended.
- Works with LTO, Fil-C.
- No observed/conclusive effect on build speed.
- On Windows with clang/gcc (mingw-w64/MSYS2/Cygwin) it also enables
  `-fno-asynchronous-unwind-tables` as a workaround to make
  the toolchain options actually work.
  Ref: https://sourceware.org/bugzilla/show_bug.cgi?id=11539
  Thanks-to: Andarwinux

Also:
- GHA: enable in Linux and MinGW jobs to test it. Size changes:

  - linux aws-lc H3:
    curl: 2000000 -> 1937152, libcurl.a: 2065724 -> 2716532 bytes
  - macos clang HTTP-only:
    curl: 1364376 -> 128799 bytes, libcurl.a: unchanged
  - macos llvm MultiSSL:
    curl: 410056 -> 405720, libcurl.dylib: 1350336 -> 1348480 bytes
  - mingw schannel c-ares U:
    curl: 1588736 -> 1507328, libcurl-d.a: 3322040 -> 3884746 bytes
    bld: 34 -> 35MB

- GHA: enable in MSVC and Apple jobs to reduce disk footprint, with no
  obvious downside. Size changes:

  - AppVeyor CI VS2019:
    curl: 2339840 -> 1295872, libcurl-d.dll: 3155968 -> 1900544 bytes
    bld: 161 -> 97MB
  - AppVeyor CI VS2022 clang-cl:
    curl: 2933248 -> 2332160, libcurl-d.lib: 4762688 -> 5511330 bytes
    bld: 133 -> 121MB
  - AppVeyor CI VS2022 HTTP-only:
    curl: 3514368 -> 2177024, libcurl-d.lib: 2538420 -> 3151740 bytes
    bld: 137 -> 83MB
  - GHA intel:
    curl: 2629120 -> 2023424, libcurl-d.lib: 4366652 -> 5350670 bytes
    bld: 86 -> 69MB
  - GHA arm64:
    curl: 2832896 -> 2063872, libcurl-d.lib: 4690616 -> 5597250 bytes
    bld: 82 -> 66MB

Refs:
https://maskray.me/blog/2021-02-28-linker-garbage-collection
https://web.archive.org/web/20110811230637/msdn.microsoft.com/en-us/library/bxwfs976.aspx (VS2010)
https://learn.microsoft.com/cpp/build/reference/opt-optimizations
https://learn.microsoft.com/cpp/build/reference/gy-enable-function-level-linking

Closes #20357
2026-01-22 17:08:20 +01:00
renovate[bot]
3d354f55b7
GHA: update ngtcp2/ngtcp2 to v1.20.0
Closes #20372
2026-01-20 16:40:34 +01:00
renovate[bot]
677374d58b
GHA: update ngtcp2/nghttp3 to v1.15.0
Closes #20371
2026-01-20 16:39:45 +01:00
Viktor Szakats
4cf43508e8
CI: show curl tool and libcurl sizes
To see how they change throughout code and/or build changes.

Also:
- improve `file` output.
- tidy-ups.

Closes #20355
2026-01-19 14:12:27 +01:00
Daniel Stenberg
6aaac9dd38
vquic: drop support for OpenSSL-QUIC
- It is slower and uses more memory than the alternatives and is only
  experimental in curl.
- We disable a few tests for OpenSSL-QUIC because of flakiness
- It gets little attention from OpenSSL and we have no expectation of the
  major flaws getting corrected anytime soon.
- No one has spoken up for keeping it
- curl users building with vanilla OpenSSL can still use QUIC through the
  means of ngtcp2

Closes #20226
2026-01-17 22:49:34 +01:00
Viktor Szakats
ac6264366f
tidy-up: miscellaneous
- tool_bname: scope an include.
- `endif` comments.
- Markdown fixes.
- comment tidy-ups.
- whitespace, newlines, indent.

Closes #20309
2026-01-15 13:06:13 +01:00
Viktor Szakats
3ee1d3b573
tidy-up: merge root packages directory into projects
To simplify the directory layout.

- OS400 and vms support move from `packages` to `projects`.

- Windows README and `generate.bat` files move from `projects`
  to `projects/Windows`.

Closes #20271
2026-01-12 23:49:35 +01:00
Viktor Szakats
1b24428d62
GHA: delete disable-man-db hack, runners doing it by default now
Refs:
1f107542ae
https://github.com/actions/runner-images/pull/13268
https://github.com/actions/runner-images/issues/13213

Follow-up to 5acba8bc36 #17181

Closes #20254
2026-01-11 15:40:21 +01:00
Viktor Szakats
a6087d69a9
GHA: delete new apt sources adding the flaky distro source
CI workflows deleted apt package source `microsoft-prod.list` due to
flakiness seen in the past with those sources. Sources are still flaky
and they are now also used from `azure-cli.sources` which is included
by default by the runner images. Add it to the delete list.

Also: remove another new, unnecessary (for curl CI) package source seen
on the `ubuntu-24.04-arm` runner, for good measure, and performance.

Fixing:
```
Reading package lists...
E: Failed to fetch https://packages.microsoft.com/repos/azure-cli/dists/noble/InRelease  403  Forbidden [IP: 13.107.246.66 443]
E: The repository 'https://packages.microsoft.com/repos/azure-cli noble InRelease' is no longer signed.
Error: Process completed with exit code 100.
```
Ref: https://github.com/curl/curl/actions/runs/20896127602/job/60034941964?pr=20142#step:2:79

Follow-up to 303bb8785c #13473

Closes #20253
2026-01-11 15:25:19 +01:00
Viktor Szakats
219245a616
GHA: include runner CPU arch in cache keys (revert)
Turns out in practice the internal cache name contains the arch where it
matters (arm or dual-arch local builds), which is part of the cache key
string. Drop `runner.arch` to avoid two arch strings in the key.

Cache keys without an explicit arch designator mean intel.

Revert ff78af5752 #20234

Closes #20249
2026-01-11 01:42:21 +01:00
Viktor Szakats
ff78af5752
GHA: include runner CPU arch in cache keys
To clarify the arch for cache entries, also to allow building/caching
multiple archs in parallel if necessary.

Closes #20234
2026-01-10 23:03:18 +01:00
Viktor Szakats
bfacfb2355
plan9: drop special build and orphaned references
Would need 64-bit support.

Ref: https://github.com/curl/curl/pull/20233#issuecomment-3732556015
Follow-up to 0159100f4f #20233

Closes #20243
2026-01-10 23:03:17 +01:00
renovate[bot]
f1422960bf
GHA: update awslabs/aws-lc to v1.66.2
Closes #20238
2026-01-10 12:50:39 +01:00
renovate[bot]
1dedcbc35d
GHA: update dependency cloudflare/quiche to v0.24.7
Closes #20224
2026-01-09 17:05:15 +01:00
Viktor Szakats
fecc987ebf
GHA: reduce total timeouts for Linux and macOS jobs
- Linux: 25 -> 15 minutes.
- Linux H3: 45 -> 10 minutes.
- macOS: 25 -> 15 minutes.

On macOS this may catch flaky slowness seen sometimes in pytests:
https://github.com/curl/curl/pull/20187#issuecomment-3711753097

Closes #20192
2026-01-05 23:27:36 +01:00
Viktor Szakats
d057b705fd
GHA: disable autotools static libcurl in many jobs
To avoid building libcurl in both static and shared flavor by default.
It results in 1.5-2.x speed-up for the curl build step in most jobs.
Saving a total of 6-7 minutes. In the Cygwin job alone it saves 1-1.5m.

Also:
- enable static + shared in a Windows job to keep testing this combo.

Follow-up to ff958fc4b2 #20159

Closes #20167
2026-01-02 22:39:28 +01:00
renovate[bot]
cb9db70dbe
GHA: update ngtcp2/nghttp3 to v1.14.0
Closes #20078
2025-12-23 17:09:05 +01:00