33755 Commits

Author SHA1 Message Date
Viktor Szakats
b327a53f09
GHA: use --no-install-suggests --no-install-recommends where missing
It prevents `apt-get install` commands installing unnecessary packages.

Makes the 8 HTTP/3 jobs around 30 seconds faster each.

before: https://github.com/curl/curl/actions/runs/11466168597
after:  https://github.com/curl/curl/actions/runs/11469013245?pr=15373

Closes #15373
2024-10-23 01:29:52 +02:00
Daniel Stenberg
0e18bd3940
mk-lib1521: fix the long return code check
It worked mostly by accident since it checked the variable from the
previous setopt invoke.

Closes #15372
2024-10-23 00:41:05 +02:00
Viktor Szakats
605bc2d2c6
GHA/linux: merge 32-bit Linux workflow
Also:
- tidy up a step condition.

Closes #15370
2024-10-22 23:38:13 +02:00
Yedaya Katsman
acd134cfe1 tests: Fix FILEFORMAT <file name=""> directive
Follow-up to dcc52095

Closes #15371
2024-10-22 13:41:02 -07:00
Viktor Szakats
b6219cd932
GHA/linux: merge torture jobs into the main workflow
They complete in 4 and 7 minutes, and do not hold back the main Linux
workflow.

Also:
- bump default parallelism for `test-torture` target to `-j20`
  (was: `-j2`).
- drop redundant package install from `rustls` jobs.

Closes #15360
2024-10-22 20:20:42 +02:00
Viktor Szakats
52851d3256
GHA/macos: use test-torture target for torture tests
They used `test-ci` before this patch.

Closes #15369
2024-10-22 20:20:42 +02:00
Viktor Szakats
096bfdeff6
cmake/FindCares: fix version detection for c-ares 1.34.1
Due to a regression in c-ares 1.34.1, the non-pkg-config version
detection method broke for this version. c-ares 1.34.2 fixes it,
but update our detection code anyway to also work with 1.34.1.

Ref:
126e274159
https://github.com/c-ares/c-ares/pull/903

Closes #15368
2024-10-22 20:20:42 +02:00
Viktor Szakats
825a800e0e
cmake: use the BSD variable
- use `BSD` in addition to backwards-compatible method.
- add `BSD` to the configuration log and `buildinfo.txt` if detected.
- add `BSD` tag to `buildinfo.txt` also via `./configure`.

The `BSD` variable is supported by CMake 3.25.0 and upper.

Ref: https://cmake.org/cmake/help/latest/variable/BSD.html

Closes #15367
2024-10-22 20:20:41 +02:00
Viktor Szakats
9126eb5a8a
cmake: replace CURL_*_DIR with {PROJECT,CMAKE_CURRENT}_*_DIR
It reduces the number of synonym variables in the code.
Makes it easier to grok and grep.

- replace `CURL_SOURCE_DIR`
  with `PROJECT_SOURCE_DIR`.

- replace `CURL_BINARY_DIR`
  with `PROJECT_BINARY_DIR` or `CMAKE_CURRENT_BINARY_DIR`.

- replace a single use of `CMAKE_BINARY_DIR`
  with `PROJECT_BINARY_DIR`.

- replace `CMAKE_CURRENT_*_DIR`
  with `PROJECT_*_DIR` where it makes the code more uniform.

- quote an argument (formatting).

Closes #15331
2024-10-22 19:13:08 +02:00
Viktor Szakats
c33174d42f
GHA/windows: increase timeout for vcpkg jobs due to slowness
The openssl job no longer fits into 10 minutes since the 20241015.1.0
GHA windows-latest image update. This caused all runs to fail.

The `run tests` step takes ~10 minutes now, up from ~4. This is
6 minutes more than before these updates. It's seen with other vcpkg
jobs too, tests run slower than half speed since.

Bump the timeout to make it, though the headroom is now less than it
was.

Before:
https://github.com/curl/curl/actions/runs/11386748199/job/31679733295
https://github.com/curl/curl/actions/runs/11347976608/job/31560690219

After:
https://github.com/curl/curl/actions/runs/11462332743/job/31893491625?pr=15364

Ref: fcc4cdb1d0
Ref: https://github.com/curl/curl/pull/15335#issuecomment-2423759953
Follow-up to 1e0305973c22b1d84036fe0c4eee34aea5cd40cc #15356
Closes #15364
2024-10-22 19:13:08 +02:00
Daniel Stenberg
dcb27fdd40
GHA: fix the msh3 renovate thing
Follow-up to 943df95ae7

Closes #15363
2024-10-22 15:48:27 +02:00
Stefan Eissing
943df95ae7
CI: run with standard mod_http2
We used to include a special mod_h2 in our CI that supports the
directive H2MaxDataFrameLen for test_02_20. Since then, ubuntu-lastest
includes a more recent apache httpd. Let's see if we can live without
the special.

Closes #15353
2024-10-22 15:31:46 +02:00
Tal Regev
c2e2636773
GHA/windows: add http3 to libressl vcpkg job
Also drop a libressl workaround no longer necessary.

Closes #15338
2024-10-22 14:23:12 +02:00
Viktor Szakats
1e0305973c
GHA/windows: ignore results for test 987
987 is `SMTPS with redundant explicit SSL request`.

Root cause undiscovered.

Started failing after GHA bumping the windows image to `20241015.1.0`:
fcc4cdb1d0
https://github.com/actions/runner-images/pull/10803

vcpkg packages also got bumped as a result. They seem unrelated:
c-ares  1.33.1 -> 1.34.1
nghttp2 1.62.1 -> 1.63.0
nghttp3 1.5.0  -> 1.6.0
(there may be more)

Ref: https://github.com/curl/curl/pull/15335#issuecomment-2423759953

Closes #15356
2024-10-22 14:17:58 +02:00
Viktor Szakats
0978afd7aa
GHA/linux: tidy up and performance
- replace openssl3 default local build with packaged one.
- drop valgrind from IntelC job.
- drop IntelC no-ssl job.
- bump local openssl to 3.3.2.
- disable tests in the cmake variant of a job.
- add comment to the remaining local openssl3 build.
  We can drop the patch after upgrading to upcoming 3.4.0.
- drop gcc-11 from jobs. packaged gcc is now newer at 13.2.0.
  (saves more than 1m install time for each of the 5 jobs.)
  Follow-up to 9cc9a6472c5d2e13a117ca02f432443db2d1be57 #9454

Closes #15349
2024-10-22 13:15:37 +02:00
zjyhjqs
e89491e1f0
cmake: fix compile warnings for clang-cl
clang-cl is an alternative command-line interface to Clang, designed
for compatibility with the Visual C++ compiler, `cl.exe`:
https://clang.llvm.org/docs/UsersManual.html#clang-cl

The way to test clang-cl in CMake:
- `CMAKE_<LANGUAGE>_COMPILER_ID`: "Clang"
- `CMAKE_<LANGUAGE>_COMPILER_FRONTEND_VARIANT`: "MSVC"

Note: `CMAKE_<LANGUAGE>_COMPILER_FRONTEND_VARIANT` was introduced since
CMake 3.14, but the variable `MSVC` works fine here.

https://cmake.org/cmake/help/latest/variable/CMAKE_LANG_COMPILER_FRONTEND_VARIANT.html
https://cmake.org/cmake/help/latest/variable/MSVC.html

Closes #15337
2024-10-21 12:47:47 +02:00
Viktor Szakats
7dd7cbac88
version: say quictls in MSH3 builds
Before: `curl 8.11.0-DEV (x86_64-pc-linux-gnu) libcurl/8.11.0-DEV OpenSSL/3.3.0 zlib/1.3 brotli/1.1.0 zstd/1.5.5 libpsl/0.21.2 msh3/0.6.0.0`
After:  `curl 8.11.0-DEV (x86_64-pc-linux-gnu) libcurl/8.11.0-DEV quictls/3.3.0 zlib/1.3 brotli/1.1.0 zstd/1.5.5 libpsl/0.21.2 msh3/0.6.0.0`

Closes #15335
2024-10-21 12:47:46 +02:00
Gabriel Marin
a58584a881
checksrc: add check for spaces around logical AND operators
Closes #15144
2024-10-21 09:35:00 +02:00
Daniel Stenberg
51724c43e3
curl_ws_recv.md: the 'meta' pointer is only returned on success
Reported-by: Dylam De La Torre
Fixes #15340
Closes #15343
2024-10-20 22:58:27 +02:00
Daniel Stenberg
d6bae1cb8f
curl_ws_recv: return recv 0 and point meta to NULL on all errors
Previously it could accidentally return some errors without having reset
the values.

Closes #15342
2024-10-20 22:57:24 +02:00
Viktor Szakats
2816cba2d7
GHA/linux: bump to quictls 3.3.0
Closes #15334
2024-10-20 01:16:28 +02:00
Jay Satiro
547d600476 curl_multi_perform.md: fix typo
Reported-by: Dylam De La Torre

Fixes https://github.com/curl/curl/issues/15339
2024-10-19 12:34:27 -04:00
Dan Fandrich
6847733191 docs: fix a typo in some cipher options 2024-10-18 14:42:34 -07:00
renovate[bot]
e29629a402
GHA: update ngtcp2/ngtcp2 and awslabs/aws-lc
- update ngtcp2/ngtcp2 to v1.8.1
- update awslabs/aws-lc to v1.37.0

Closes #15318
Closes #15329
2024-10-18 16:43:52 +02:00
renovate[bot]
2c1d83e6a7
Dockerfile: update Docker digest to d830561
Closes #15315
2024-10-18 16:39:26 +02:00
Viktor Szakats
4de627ab09
winbuild: add initial wolfSSL support
Ref: https://datagirl.xyz/posts/wolfssl_curl_w2k.html

Closes #15264
2024-10-18 12:58:50 +02:00
Daniel Stenberg
b4e162566f
KNOWN_BUGS: LDFLAGS passed too late
Makes linking fail on some (ancient) platforms.

Closes #14893
Closes #15306
2024-10-18 11:52:30 +02:00
Daniel Stenberg
5ea61a0b54
hsts: support "implied LWS" properly around max-age
Adjust test 780 to verify.

Reported-by: newfunction
Closes #15330
2024-10-18 11:42:42 +02:00
Daniel Stenberg
288cfcbe38
RELEASE-NOTES: synced 2024-10-18 10:13:38 +02:00
zjyhjqs
fbc0da376f
cmake: set version for project() and add CPack support
Note: the version like `8.11.0-DEV` is not a valid version for
`project()`, so need to extract the major, minor and patch parts.

Previous, manual, `CURL_VERSION` macro is defined by `project()`
after this patch, so rename existing `CURL_VERSION*` variables to
`_curl_version*`.

Closes #15281
2024-10-18 10:00:29 +02:00
Daniel Stenberg
1b155f034a
tool_operate: reuse the schannel backend check
The transfer_per_config is called once per new transfer. It now saves
the result of the first TLS backend check done so that subsequent
invokes are more efficient and reuses the existing knowledge.

This change also splits the logic into several smaller functions.

Closes #15323
2024-10-18 08:13:53 +02:00
Daniel Stenberg
29faa7919b
libcurl/opts: improve phrasing for connection cap related options
Unify, clarify.

Closes #15324
2024-10-17 23:06:33 +02:00
Stefan Eissing
fe2a72029e
http2: auto reset stream on server eos
When a server signals EOS from its side and the curl upload is
unfinished and the server has not given a positive HTTP status response,
auto RST the stream to signal that the upload is incomplete and that the
whole transfer can be stopped.

Fixes the case where the server responds with 413 on an upload but does
not RST the stream from its side, as httpd and others do.

Reported-by: jkamp-aws on github
Fixes #15316
Closes #15325
2024-10-17 23:03:41 +02:00
Daniel Stenberg
2ae8d9b579
libtests: generate the lib1521 atomically
By renaming from a temporary file name to the .c once completed. This
avoids the risk that the checksrc job tries to verify the file before it
is complete, in parallel build setups.

Reported-by: Dan Frandrich
Fixes #15258
Closes #15327
2024-10-17 23:00:24 +02:00
Daniel Stenberg
b9877b74c5
GHA: drop the hyper job
Hyper support is being removed in 2025. No one works on it. Getting
flaky test runs with this job adds nothing to the project.

Closes #15326
2024-10-17 22:56:45 +02:00
Stefan Eissing
b42eb27c1f
openssl: improve retries on shutdown
Once SSL_shutdown() has been called, OpenSSL does not really seem to
like it when it is called again and the other side has some finally data
to deliver.

Instead SSL_read() needs to be used solely, once the close notify has
been sent from curl's side.

Closes #15321
2024-10-17 16:11:06 +02:00
Daniel Stenberg
8cdbaba4bf
tool_operate: break out of loop on error
Follow-up to 69bf530dfd2a

The loop could get stuck there in torture tests/OOM.

Closes #15322
2024-10-17 16:04:09 +02:00
Daniel Stenberg
38bfe1c2aa
GHA: switch off proselint
Because we cannot disable the individual warnings we do not care about,
making this tool almost unusable for our purposes. See
https://github.com/amperser/proselint/issues/1367

Instead, make 'very' a banned word (as recently that has been what
proselint most commonly points out for us).

Closes #15314
2024-10-17 13:36:42 +02:00
Daniel Stenberg
9cc246401e
source: avoid use of 'very' in comments 2024-10-17 13:36:33 +02:00
Daniel Stenberg
d1323839be
DISTROS: avoid use of "very" 2024-10-17 13:36:33 +02:00
Daniel Stenberg
193f1b4841
DISABLED: disable test 1060 with hyper
... as it has started to fail and nobody wants to debug this.

Closes #15319
2024-10-17 13:26:00 +02:00
Stefan Eissing
c97cd82821
tests/http: fix ubuntu GnuTLS CI failures
Override the system default config in test_17_09, since we want to check
all TLS versions. Provide own, empty config file to gnutls, so that any
system wide file has no effect.

The latest ubunu image in GH CI disables TLS 1.0 and 1.1
system wide for GnuTLS. Good intentions.

Closes #15310
2024-10-17 13:25:15 +02:00
Daniel Stenberg
beeeb85a78
tests: update some HTTP/2 over HTTPS tests
- improve descriptions
- require http/2, not h2c, since they are done over HTTPS

Closes #15317
2024-10-17 12:55:05 +02:00
Jay Satiro
fde5326293 winbuild/README: document how to clean a build
- Add a new section explaining that a build can be cleaned by adding the
  keyword "clean" to the build command.

- Add an example of using the "x64 Native Tools" prompt to the VS
  command prompt section.

- Update the Legacy Windows section's lack-of-cipher support warning to
  say "Windows 8 and earlier" instead of "Windows XP and earlier".

Ref: https://github.com/curl/curl/discussions/15277

Closes https://github.com/curl/curl/pull/15291
2024-10-16 18:03:06 -04:00
Viktor Szakats
1e01e2b549
GHA/macos: merge autotools and cmake jobs
To match other workflows and to avoid repetition in rules.

Also:
- fix build example step for cmake. update a job to use it.
- use `cmake` to invoke the builds (instead of ninja directly).
- extend test 2100 exclusion to more jobs.
  It fails with all `!debug gcc-12` jobs with autotools.
  With cmake this only happened for gcc-12 Secure Transport jobs
  for some reason.

Closes #15312
2024-10-16 23:25:18 +02:00
Dan Fandrich
a2f913ef6a CI: explicitly specify the OS version when necessary
Commit 8ea120f6 added --break-system-packages which works in Ubuntu
24.04 but not 22.04, so explicitly specify that version in the runner
instead of relying on ubuntu-latest to provide it.  Some runners have
regressed back to 22.04 for ubuntu-latest, resulting in build failures.
2024-10-16 09:56:14 -07:00
Dan Fandrich
41c980bb0d tests: capture stdin to get the vsftpd version number
vsftpd 3.0 at least writes its version number to stdin (!) instead of
stderr. This works due for backwards compatibility reasons in UNIX, so
we must check stdin for anything written there to reliably parse the
version string.

Closes #15278
2024-10-16 09:21:40 -07:00
Viktor Szakats
6478a36b66
src: guard for double declaration of curl_ca_embed in unity builds
Seen with curl-for-win linux-musl-from-mac build with gcc 9.2.0.

```
n file included from /Users/runner/work/curl-for-win/curl-for-win/curl/_x64-linux-musl-bld/src/CMakeFiles/curl.dir/Unity/unity_0_c.c:136:
/Users/runner/work/curl-for-win/curl-for-win/curl/_x64-linux-musl-bld/src/tool_ca_embed.c:4:28: warning: redundant redeclaration of 'curl_ca_embed' [-Wredundant-decls]
    4 | extern const unsigned char curl_ca_embed[];
      |                            ^~~~~~~~~~~~~
In file included from /Users/runner/work/curl-for-win/curl-for-win/curl/_x64-linux-musl-bld/src/CMakeFiles/curl.dir/Unity/unity_0_c.c:88:
/Users/runner/work/curl-for-win/curl-for-win/curl/src/tool_operate.c:107:28: note: previous declaration of 'curl_ca_embed' was here
  107 | extern const unsigned char curl_ca_embed[];
      |                            ^~~~~~~~~~~~~
```
https://github.com/curl/curl-for-win/actions/runs/11192203640/job/31116070669#step:3:4894

Follow-up to 8a3740bc8e558b9a9d4a652b74cf27a0961d7010 #14059
Closes #15307
2024-10-16 17:27:56 +02:00
Daniel Stenberg
adf2b4fa51
libssh: use CURL_PATH_MAX instead of PATH_MAX
Follow-up to facf59c30e9a6a10c4

Reported-by: Viktor Szakats
Bug: https://github.com/curl/curl/pull/15285#issuecomment-2416947731
Closes #15309
2024-10-16 16:27:59 +02:00
Viktor Szakats
7fbcf4b9b7
vquic: fix compiler warning with gcc + MUSL
```
/Users/runner/work/curl-for-win/curl-for-win/curl/lib/vquic/vquic.c: In function 'msghdr_get_udp_gro':
/Users/runner/work/curl-for-win/curl-for-win/curl/lib/vquic/vquic.c:344: warning: ignoring #pragma clang diagnostic [-Wunknown-pragmas]
  344 | #pragma clang diagnostic push
      |
/Users/runner/work/curl-for-win/curl-for-win/curl/lib/vquic/vquic.c:345: warning: ignoring #pragma clang diagnostic [-Wunknown-pragmas]
  345 | #pragma clang diagnostic ignored "-Wsign-compare"
      |
/Users/runner/work/curl-for-win/curl-for-win/curl/lib/vquic/vquic.c:346: warning: ignoring #pragma clang diagnostic [-Wunknown-pragmas]
  346 | #pragma clang diagnostic ignored "-Wcast-align"
      |
/Users/runner/work/curl-for-win/curl-for-win/curl/lib/vquic/vquic.c:350: warning: ignoring #pragma clang diagnostic [-Wunknown-pragmas]
  350 | #pragma clang diagnostic pop
      |
```
https://github.com/curl/curl-for-win/actions/runs/11356281008/job/31587180874#step:3:9534

Follow-up to a571afc02e11c1ab9a9f59c2150e11acca423fcc #14012
Closes #15303
2024-10-16 12:09:02 +02:00