Commit Graph

544 Commits

Author SHA1 Message Date
Daniel Stenberg
c8c64c882c
GHA: trim markdown headers before proselinting
Allow interface.md to use more exclamation marks.

Closes #14645
2024-08-22 23:45:40 +02:00
Daniel Stenberg
23749bfd04
GHA: add a checksrc job
This job unconditionally runs checksrc on ALL .c and .h files present in
git.

checksrc.pl: fixed to look for ".checksrc" in the same directory from
where it loads the file to check so that it an be invoked like this

Closes #14625
2024-08-22 23:43:52 +02:00
Jan Venekamp
a4152864f8
tests: constrain http pytest to tests/http directory
Running the http pytest had to be done from tests directory or above,
because the repeat argument fixture was defined in tests/conftest.py.
However, the repeat argument is not needed because its functionality
can be provided by pytest-repeat as documented in the test's
README.md. So, removed the pytest_addoption function for the repeat
argument and the pytest_report_header function is moved to
tests/http/conftest.py.

TODO: Remove repeat argument from all tests. As a stopgap, a
one-element list is defined for it for now.

Closes #14611
2024-08-22 11:47:10 +02:00
Viktor Szakats
9fff0742b6
GHA/windows: fix indentation in the MSVC section 2024-08-21 16:13:11 +02:00
Viktor Szakats
576b39b6d0
cmake: drop libssh CONFIG-style detection
Drop `find_package(libssh CONFIG)` detection method in favour of
the Find module that supports both `pkg-config`, and CMake-native
(since #14555) detection.

This aligns `libssh` detection with other dependencies. It makes the
build honor custom configuration via `LIBSSH_INCLUDE_DIR`,
`LIBSSH_LIBRARY`.

Also enable libssh in a GHA/macos cmake job for build coverage.

Fixing:
- curl-for-win requiring a hack to configure libssh:
  4f9acbed92/curl.sh (L255-L263)
- after #14555, GHA/windows gnutls vcpkg job no longer auto-detected
  libssh, due to a regression missing to enable libssh when
  found via `find_package(libssh CONFIG)`.
  Ref: https://github.com/curl/curl/actions/runs/10470138955/job/28994650338

Follow-up to 422696f0a4 #14555

Closes #14614
2024-08-21 10:07:13 +02:00
Viktor Szakats
8e9056f8b1
GHA/macos: enable brotli and zstd in autotools and cmake jobs
They were missing from macOS builds:
https://testclutch.curl.se/static/reports/feature-matrix.html

Closes #14619
2024-08-21 07:11:34 +02:00
Viktor Szakats
ae2c753a88
GHA/windows: add missing time limit for msys2 autotools test runs
The new mingw job (the first msys2/mingw job to run tests) is seen
hanging frequently.

Follow-up to 9f23c8f201 #14541
2024-08-20 16:02:15 +02:00
renovate[bot]
e8bfa96393
GHA: update github/codeql-action digest to 883d858
Closes #14608
2024-08-20 12:37:37 +02:00
Viktor Szakats
96b9027f16
GHA/windows: unblock TFTP MQTT WebSockets SMTP FTP tests
Run them now. Also ignore results for now.

Closes #14607
2024-08-20 00:50:24 +02:00
Viktor Szakats
211cbcb4f6
cmake: rename Find modules
- `FindCARES`   -> `FindCares`
- `FindLibPSL`  -> `FindLibpsl`
- `FindLibSSH2` -> `FindLibssh2`
- `FindQUICHE`  -> `FindQuiche`
- `Findrustls`  -> `FindRustls`

Our convention for naming Find modules (the part after the `Find`
prefix, also called as 'package name') is:

Always start with uppercase. Follow with lowercase, unless there is
a clear preference for a stylized name. E.g. the project itself uses it
that way with a matching `<Name>Config.cmake` file, or we use it that
way elsewhere, or the name is an acronym.

Ref: #14580

Closes #14601
2024-08-20 00:50:10 +02:00
Viktor Szakats
c5cb8e7c7e
tidy-up: spelling quiche and Rustls
Closes #14605
2024-08-20 00:44:10 +02:00
renovate[bot]
b2488afb18
GHA: update github/codeql-action digest to 429e197
Closes #14425
2024-08-17 11:03:09 +02:00
renovate[bot]
2c4d04c4d3
GHA: update dependency gnutls/gnutls to v3.8.7
Closes #14554
2024-08-17 10:53:41 +02:00
Daniel Stenberg
f9f2eaaec3
internals/SPLAY.md: internal API documentation
Closes #14563
2024-08-16 17:13:37 +02:00
Viktor Szakats
2bea3892e7
GHA/windows: delete redundant options, tidy up
- delete redundant `-DCURL_USE_LIBPSL=ON`.

- delete redundant `-DUSE_NGHTTP2=ON`.
  Follow-up to 87aa4ebd82 #14136

- reorder options.

Closes #14569
2024-08-16 16:05:36 +02:00
Viktor Szakats
b042d5297d
tidy-up: misc spelling (bit, ASCII)
Closes #14559
2024-08-15 15:30:09 +02:00
Daniel Stenberg
551baf7d64
tests: move the disabling of 500 for hyper from CI to DISABLED
Follow-up to 136504195a

Closes #14551
2024-08-15 14:02:40 +02:00
Viktor Szakats
2401ee68a4
cmake: show warning if libpsl is not found
Also:
- explicitly disable libpsl in CI to avoid configure warning, where
  necessary.
- add TODO to make this warning an error (to match autotools.)

Follow-up to 2998874bb6 #12661

Closes #14533
2024-08-15 10:38:46 +02:00
Viktor Szakats
9f23c8f201
cmake: fix and tidy up c-ares builds, enable in more CI jobs
- set `CARES_NO_DEPRECATED` to avoid c-ares deprecation warnings.
  Like autotools does.

- drop unused c-ares header directory when building libtests and test
  servers.

- disable TrackMemory (aka `CURLDEBUG`) feature for MSVC builds.
  It fails on test 558 and 1330, saying that TrackMemory isn't working.
  Left a FIXME about it.

- GHA/macos: enable c-ares in a cmake job.

- GHA/windows: enable c-ares in MSVC job.
  Fixes #14202

- GHA/windows: add c-ares mingw autotools job with tests.
  (move `--with-windows-unicode` option from 'default' job to
  this one to keep the former "default".)
  Put these tests on ignore for now:
  ```
  FAIL 472: 'aws-sigv4 with query' HTTP, aws-sigv4
  FAIL 1299: 'Send "OPTIONS *" with --request-target' HTTP, --request-target
  FAIL 1613: 'Send "OPTIONS *" with --request-target to a proxy' HTTP, HTTP proxy, --request-target
  ```
  Ref: https://github.com/curl/curl/actions/runs/10388126947/job/28765761441#step:15:5902

  472: fails with mingw despite Unicode enabled.
  1299, 1613: seem like a case of expanding '*' to a filename.

- GHA/windows: enable c-ares in mingw cmake job.

Closes #14541
2024-08-15 09:44:52 +02:00
Viktor Szakats
304a349e8c
GHA/configure-vs-cmake: add macOS build, fix issues
- sync cmake macOS `OS` value manually with the autotools one.
- stop exporting/subst-ing `HAVE_OPENSSL_QUIC` from autotools.
  The variable was only used internally.
- exclude a dependency detection symbol.
- allow to run when the workflow itself was updated.
- simplify cmake command.
- fix indentation.

Closes #14546
2024-08-15 09:29:07 +02:00
Viktor Szakats
2784801977
cmake: add missing pkg-config hints to Find modules
- brotli, c-ares, libpsl, libssh2, mbedtls, rustls:
  Use `pkg-config` for path hints and version info. Syncing them up with
  the rest of Find modules.

- GHA/macos: force-disable libssh2 with cmake to sync with autotools.
  After this patch, cmake auto-detects libssh2 in this job.

Closes #14545
2024-08-15 09:29:06 +02:00
Alex Snast
136504195a
getinfo: add CURLINFO_POSTTRANSFER_TIME_T
Returns the time, in microseconds, from the start until the last byte is
sent by libcurl (i.e. the request is sent off).

Closes #14189
2024-08-15 09:02:58 +02:00
Tal Regev
41a01033b3
GHA/windows: enable HTTP/3 in wolfSSL MSVC job
Closes #14383
2024-08-14 19:00:42 +02:00
Tal Regev
fd662fb3f4
GHA/windows: add GnuTLS to MSVC jobs
- enable GnuTLS in MultiSSL job.

- add new GnuTLS job with HTTP/3 enabled.
  Replacing the `!ssl` job.
  Use `Release` mode to work around a vcpkg package issue, ending up
  depending on both the debug and release versions of the gnutls DLL,
  one of them miss to copy next to the binary.

- cmake: add `pkg-config` detection for GnuTLS.

Co-authored-by: Tal Regev
Fixes #14494
Closes #14495
2024-08-14 18:53:27 +02:00
Jan Venekamp
ed76a23fcc
cmake: add rustls
Closes #14534
2024-08-14 15:05:53 +02:00
Viktor Szakats
d76389d82f
GHA/macos: disable AppleIDN for autotools in combinations jobs
Without libidn2, AppleIDN gets enabled by default in autotools.

To remain minimal and match cmake.

Follow-up to 8de8fe8c98 #14401
2024-08-13 13:35:34 +02:00
Viktor Szakats
fdc3e88bf0
IDN: fix/extend/migrate test exclusion rules
- make sure to exclude failing tests when libidn2 is detected by
  default.

- ignore test 1560 results. Seen to fail with libidn2.
  I'm not sure why this test was not executed earlier:
  https://github.com/curl/curl/actions/runs/10354610889/job/28660309355#step:13:3647

- runtests: recognize `libidn2` as a feature.

- move IDN test exclusions from GHA/windows to `tests/data/DISABLED`.

- GHA/windows: drop default `-DUSE_LIBIDN2=ON` cmake config.

Cherry-picked from #14495
Closes #14519
2024-08-13 09:28:26 +02:00
Jan Venekamp
77d722a052
docs: update CIPHERS.md
Give a more consice overview of curl's cipher options and cipher suites.

Removed long lists of ciphers that were directly copied from the SSL
backends' documentation. Instead present the user a more common aproach
acorss the SSL backends, with notes for backends that do not conform
and/or provide alternate means.

Provide a shorter list of cipher suites that is more relevant for modern
usage and should work mostly across all backends, provide a seperate
list with all cipher suites, and provide links to the SSL backends'
documentation for more information.

Also give examples with modern cipher suites.

Add docs/CIPHERS-TLS12.md for TLS 1.2 ciphers.

Closes #14460
2024-08-12 23:35:56 +02:00
dependabot[bot]
eb6d6fce06
GHA: bump deps: upload-artifact, codeql and spellcheck
- bump actions/upload-artifact from 4.3.5 to 4.3.6

Signed-off-by: dependabot[bot] <support@github.com>

Closes #14506

- bump github/codeql-action from 3.25.15 to 3.26.0

Closes #14507

- bump rojopolis/spellcheck-github-actions digest to a0fba0c

Closes #14518
2024-08-12 23:30:34 +02:00
Viktor Szakats
2cc56eb758
GHA/macos: drop gcc-11
No longer present in macos-12, macos-13 images:
https://github.com/actions/runner-images/blob/macos-12/20240811.1/images/macos/macos-12-Readme.md
https://github.com/actions/runner-images/blob/macos-13/20240811.1/images/macos/macos-13-Readme.md

Closes #14509
2024-08-12 21:00:10 +02:00
Viktor Szakats
9e4a2187e7
autotools: add --with-windows-unicode option
- add `--with-windows-unicode` and `--without-windows-unicode` (default)
  options.

- enable it in a CI job.

Fixes #7229
Closes #14478
2024-08-10 10:02:49 +02:00
Viktor Szakats
2edbc229cb
dist: add CI job to detect files missing from distro
Also:
- delete previous, cmake-specific solution.
- move a CI script under `.github`.

Follow-up to a118a6ecdd #14323
Closes #14463
2024-08-10 10:02:49 +02:00
Daniel Stenberg
9fa0cf9c53
HISTORY: fill in some events from recent years
Closes #14466
2024-08-09 08:17:26 +02:00
Viktor Szakats
d3f6b2ffa7
krb5: add Linux/macOS CI tests, fix cmake GSS detection
- GHA/macos: enable GSS krb5 in a cmake job.
  Uses CMake-native detection.

- GHA/linux: enable GSS krb5 in autotools job and add a cmake job to
  match.
  CMake uses `pkg-config`-based detection.

- GHA/linux: add step to dump configure logs.

- fix and simplify logic digesting FindGSS output.

- cmake: add `heimdal-gssapi` to `libcurl.pc`.

Closes #14447
2024-08-08 13:48:28 +02:00
Viktor Szakats
daf9fdc4ef
GHA/non-native: ignore FTP results in OpenBSD job
They are flaky.
2024-08-08 13:19:57 +02:00
Viktor Szakats
146759716c
cmake: fix pkg-config-based detection in FindGSS.cmake
Before this patch `pkg-config`-based detection was ignored, and used
solely as a path hint for native detection.

- fix `pkg_search_module()` result prefix to match what code expects:
  `_GSS` (was: `_GSS_PKG`). Update variable that were in sync with old
  prefix.

- update the pkg-config codepath to use `_GSS_MODULE_NAME` to detect
  GSS flavour. This requires CMake 3.16.
  Otherwise fall back to the old method. (The old method doesn't seem to
  work anymore (?) as of CMake 3.30.1. Documented
  `<prefix>_<modulename>_VERSION` variable is defined, but empty.)

- update the pkg-config codepath to use `_GSS_VERSION` set by CMake.
  Resort to the old code when this variable is empty. (The old code
  doesn't seem to work anymore (?) as of CMake 3.30.1)

- fix pkg-config codepath to set the documented result variables.

- align native detection variable names with those generated by
  `pkg_search_module()` in the pkg-config codepath.

- GHA/macos: enable GSS Heimdal in a cmake job.
  Uses the native detection.

- GHA/linux: enable GSS Heimdal in cmake and autotools jobs.
  CMake uses `pkg-config`-based detection.

- suppress test 2077 and 2078 results on Linux + Heimdal.
  ```
  FAIL-IGNORED 2077: 'curl --fail --negotiate to unauthenticated service fails' HTTP, HTTP GET, GSS-API
  FAIL-IGNORED 2078: 'curl --negotiate should not send empty POST request only' HTTP, HTTP GET, GSS-API
  ```
  Failing with valgrind errors in both autotools and cmake builds:
  https://github.com/curl/curl/actions/runs/10282222581/job/28453472068?pr=14430#step:38:3638
  https://github.com/curl/curl/actions/runs/10282222581/job/28453473398?pr=14430#step:38:7831

Closes #14430
2024-08-07 15:13:07 +02:00
Viktor Szakats
e20413980c
GHA/macos: tweak toolchain dump steps
- use documented flavour of `xcrun` option.

- show SDK version with a dedicated command.
  (Sometimes the SDK path is a symlink and doesn't tell the version.
  This is not at the moment the case in CI, but handle it anyway.)

- align group header with reality.
  Preinstalled vs. installed Homebrew packages can be recognized
  by their directory timestamps. Installed ones have a current date.

Closes #14434
2024-08-07 15:10:51 +02:00
Viktor Szakats
ada8ebe18c
GHA/macos: enable AppleIDN in autotools job
- make `--with-apple-idn` override libidn2, in sync with cmake and
  `lib/curl_setup.h`.

- sync detection function name with cmake.

- limit AppleIDN feature check to Darwin.
  (also drop !WinIDN precondition check.)

Follow-up to 8de8fe8c98 #14401
Closes #14419
2024-08-06 22:33:05 +02:00
Daniel Stenberg
dcc5209520
GHA: run badwords check on tests/*.md too
With several wording updates accordingly.

Closes #14412
2024-08-06 13:43:25 +02:00
Daniel Stenberg
91fcbc5d1a
dist: drop buildconf
The documented and mandated step has been to not use buildconf but to
invoke 'autoreconf -fi' for four years already.

This change only drops buildconf from the release tarball, it remains
present in git for now.

Follow-up to 85868537d6

Closes #14412
2024-08-06 13:43:20 +02:00
Viktor Szakats
232302f88a
cmake: add Linux CI job, fix pytest with cmake
- extend existing Linux workflow with CMake support.
  Including running pytest the first time with CMake.

- cmake: generate `tests/config` and `tests/http/config.ini`.
  Required for pytest tests.
  Uses basic detection logic. Feel free to take it from here.
  Also dump config files in a CI step for debugging purposes.

- cmake: build `tests/http/clients` programs.

- fix portability issues with `tests/http/clients` programs.
  Some of them use `getopt()`, which is not supported by MSVC.
  Fix the rest to compile in CI (old-mingw-w64, MSVC, Windows).

- GHA/linux: add CMake job matching an existing autotools one.

- GHA/linux: test `-DCURL_LIBCURL_VERSIONED_SYMBOLS=ON`
  in the new CMake job.

- reorder testdeps to build server, client tests first and then
  libtests and units, to catch errors in the more complex/unique
  sources earlier.

- sort list in `tests/http/clients/Makefile.inc`.

Closes #14382
2024-08-06 02:40:32 +02:00
dependabot[bot]
e64e62cc7d
GHA/windows: bump msys2/setup-msys2 from 2.24.0 to 2.24.1
Bumps [msys2/setup-msys2](https://github.com/msys2/setup-msys2) from 2.24.0 to 2.24.1.
- [Release notes](https://github.com/msys2/setup-msys2/releases)
- [Changelog](https://github.com/msys2/setup-msys2/blob/main/CHANGELOG.md)
- [Commits](5df0ca6cbf...ddf331adae)

---
updated-dependencies:
- dependency-name: msys2/setup-msys2
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Closes #14396
2024-08-05 23:35:18 +02:00
Daniel Stenberg
ed2850456c
configure: fail if PSL is not disabled but not found
Regression since 9b3f67e (shipped in 8.7.0)
Reported-by: Ryan Carsten Schmidt
Fixes #14373
Assisted-by: Viktor Szakats
Closes #14379
2024-08-05 08:33:58 +02:00
Daniel Stenberg
7d45b52166
KNOWN_BUGS: mention AppleIDN and WinIDN test problems
Closes #14176
Closes #14387
2024-08-05 08:23:37 +02:00
Viktor Szakats
7b14449790
cmake: add support for versioned symbols option
Implement the `--enable-versioned-symbols` feature available in
`./configure` for CMake.

Enable with `-DCURL_LIBCURL_VERSIONED_SYMBOLS=ON`. Customize the version
prefix with `-DCURL_LIBCURL_VERSIONED_SYMBOLS_PREFIX=MYPREFIX_`. By
default the prefix matches what autotools uses.

When enabled, the feature is detected and a warning shown if
unavailable. (E.g. on Apple and Windows, it isn't.)

Included `HIDDEN {};` to match autotools, though I don't know if it's
necessary, useful or making any difference.

Differences from the autotools implementation:
- soversion is dynamic instead of hard-coded.
- omits referencing non-curl symbols.
- allows prefix/flavour override.
- more universal feature detection.
- doesn't rely on the in-repo `lib/libcurl.vers.in` file.

Also:
- add mbedTLS and BearSSL versioned symbol prefix support to autotools.
- enable this option in an old-linux job.

Follow-up to 7cc2e8b349
Fixes #14349
Closes #14378
2024-08-05 01:44:57 +02:00
Tal Regev
8a95678999
GHA/windows: add mbedTLS MSVC job
Ref: 92e28f2897 #14228
Closes #14203
2024-08-04 19:51:45 +02:00
Viktor Szakats
f81f351b9a
tidy-up: OS names
Use these words and casing more consistently across text, comments and
one curl tool output:
AIX, ALPN, ANSI, BSD, Cygwin, Darwin, FreeBSD, GitHub, HP-UX, Linux,
macOS, MS-DOS, MSYS, MinGW, NTLM, POSIX, Solaris, UNIX, Unix, Unicode,
WINE, WebDAV, Win32, winbind, WinIDN, Windows, Windows CE, Winsock.

Mostly OS names and a few more.

Also a couple of other minor text fixups.

Closes #14360
2024-08-04 19:17:45 +02:00
Viktor Szakats
1556951c4b
GHA/non-native: ignore FreeBSD FTP test results
They are flaky.
2024-08-04 02:08:27 +02:00
Viktor Szakats
2d8464c4cb
GHA/windows: move Cygwin into its own workflow
Cygwin runs stable but slow, while native Windows in the same workflow
runs fast but unreliable (hangs). GHA requires all jobs to finish before
allowing to re-run failed ones. Before this patch this meant waiting for
the slow Cygwin jobs to re-run hung native jobs. After this patch Cygwin
jobs run in their own workflow, allowing to re-run broken Windows jobs
earlier.

Follow-up to 0d12528729 #14236
Closes #14366
2024-08-03 20:21:25 +02:00
Viktor Szakats
fadb2ee6ec
CI: realign cmake build settings (for nghttp2, libidn2)
- nghttp2 is now on by default, adjust build configuration accordingly.
  Follow-up to 87aa4ebd82 #14136

- GHA/macos: disable libidn2 in combination builds, syncing with
  autotools. Otherwise it's now auto-detected via pkg-config by default.
  Follow-up to f43adc2c49 #14137

Closes #14364
2024-08-03 16:12:44 +02:00