Skip to content

with get: mbedtls 3.6 fallback, option pins, and per-platform lock (#2757) - #3652

Merged
ehartford merged 1 commit into
mainfrom
tls-backend-2757
Nov 27, 2026
Merged

ehartford merged 1 commit into
mainfrom
tls-backend-2757

Conversation

@ehartford

Copy link
Copy Markdown
Contributor

Closes #2757

Implements Eric's 2026-11-25 ruling on #2757 (Option 1 — mbedtls where openssl cannot be built, with all three conditions):

  1. Per-platform backend recorded in .with/lock.json:

    • Effective package options (including with_ssl even when default, so macOS records "macos-aarch64": "with_ssl=openssl" while linux-aarch64 records "linux-aarch64": "with_ssl=mbedtls") are written to metadata.json ("options") and merged per platform under "options" in .with/lock.json.
    • Cross-platform lock restores (with get) and updates (with get c.libcurl) preserve other platforms' entries, report the exact platform difference, and skip another platform's transitive c.openssl binary when the current platform switched TLS backends.
  2. User option pinning (no silent substitution):

    • [deps.options.c.<name>] in with.toml and with get --option key=value c.<name> pin Conan recipe options (validated against the recipe's declared options choices).
    • An explicit pin to with_ssl = "openssl" never substitutes mbedtls — on platforms where openssl has neither a binary nor a CMake build (linux-aarch64, or --from-source), it refuses with the existing error.
  3. mbedtls moved off 3.5.0 onto the 3.6 LTS line:

    • When a recipe requests mbedtls/3.5.0 (Conan Center's libcurl pin), conan_adjust_requirement_version resolves [>=3.6 <4] (3.6.8), matching with get c.mbedtls.
  4. UAT & docs:

    • Lifts the #1166 linux-aarch64 platform restriction in uat/libcurl.uat (platforms: darwin, linux), updates uat/README.md, uat/first-hour/post-json.md, and documents [deps.options.c.<name>] / --option / per-platform lock options in docs/spec/toolchain/package-management.md.

Verification

  • Unit tests: test/internals/conan_tls_backend_test.with (+ existing lock/recipe/conan internals tests) pass.
  • macOS (macos-aarch64):
    • Default with uat libcurl: pass (7 steps), locks "macos-aarch64": "with_ssl=openssl".
    • with get --from-source --option with_ssl=openssl c.libcurl: refuses cleanly without substitution.
    • Unpinned with get --from-source c.libcurl: falls back to with_ssl=mbedtls, builds mbedtls/3.6.8 + libcurl/8.23.0, and passes libcurl_main.with.
  • Linux (linux-aarch64, with-aarch64-bare:latest, no host cmake/ninja/gcc/clang):
    • with uat libcurl: pass (7 steps, 148.7s), builds mbedtls/3.6.8 + libcurl/8.23.0, locks "linux-aarch64": "with_ssl=mbedtls".
    • with get --option with_ssl=openssl c.libcurl: refuses cleanly without substitution.
    • Cross-platform restore & merge from macOS .with/lock.json: prints the platform difference, skips macOS's transitive c.openssl binary, and merges both "linux-aarch64": "with_ssl=mbedtls" and "macos-aarch64": "with_ssl=openssl".

Draft until the seed-driven battery verdict is posted.

@ehartford

Copy link
Copy Markdown
Contributor Author

Seed-driven battery verdict on 368ca77ff:

  • out/battery/battery.log: rc=0 green (wall=1597s)
  • test/internals/conan_tls_backend_test.with passed
  • Verified end-to-end on both macos-aarch64 (default openssl + pinned refusal + unpinned --from-source fallback to mbedtls/3.6.8) and linux-aarch64 (with-aarch64-bare:latest, with uat libcurl 7/7 pass in 148.7s, pinned openssl refusal, cross-platform macOS-lock -> linux-aarch64 restore & merge).

@ehartford
ehartford marked this pull request as ready for review November 27, 2026 11:18
@ehartford
ehartford merged commit b478402 into main Nov 27, 2026
1 check passed
@ehartford
ehartford deleted the tls-backend-2757 branch November 27, 2026 11:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

linux-aarch64: with get c.libcurl cannot get a TLS backend (openssl needs Perl from source)

1 participant