Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mbedtls 3.6 subslotting #9876

Open
wants to merge 4 commits into
base: mbedtls-3.6
Choose a base branch
from

Conversation

winterheart
Copy link

Description

This PR allows to install major versions of MbedTLS simultaneously.

Dependent packages should use find_package(MbedTLS 3 [REQUIRED]) and MbedTLS::<component> in order to use requested libraries. Packages that relies on pkg-config output, should use pkg-config --libs --cflags (mbedtls3|mbedx5093|mbedx5093) output in order to discover actual library names and include paths.

Fixes #8723

PR checklist

Please remove the segment/s on either side of the | symbol as appropriate, and add any relevant link/s to the end of the line.
If the provided content is part of the present PR remove the # symbol.

  • changelog provided
  • development PR provided #
  • 3.6 PR provided
  • 2.28 PR not required because: reaching EOL and don't have appropriate CMake / pkg-config framework
  • tests not required because: no actual changes in code

Notes for the submitter

Please refer to the contributing guidelines, especially the
checklist for PR contributors.

Help make review efficient:

  • Multiple simple commits
    • please structure your PR into a series of small commits, each of which does one thing
  • Avoid force-push
    • please do not force-push to update your PR - just add new commit(s)
  • See our Guidelines for Contributors for more details about the review process.

Use standard `CMAKE_INSTALL_INCLUDEDIR` and `CMAKE_INSTALL_LIBDIR`
location to define headers and library installation. This variable can be
redefined on configuration phase to allow install headers and libraries to
different location (like `include/mbedtls3`, Mbed-TLS#8723).

Additionally removing explicit permission rules as they may broke proper
permissions for system installation (like remove executable bit from
libraries). By default CMake sets permissions correctly on all files and
directories.

See Mbed-TLS#8723 for rationale.

Signed-off-by: Azamat H. Hackimov <[email protected]>
Convert main library targets to slottable versions. This allows to
install major versions of MbedTLS simultaneously.

Dependent packages should use `find_package(MbedTLS 3 [REQUIRED])` and
`MbedTLS::<component>` in order to use requested libraries.

Signed-off-by: Azamat H. Hackimov <[email protected]>
Convert main library targets to slottable versions. This allows to
install major versions of MbedTLS simultaneously.

Dependent packages should use
`pkg-config --libs --cflags (mbedtls3|mbedx5093|mbedx5093)` in order to use
requested libraries.

Signed-off-by: Azamat H. Hackimov <[email protected]>
Signed-off-by: Azamat H. Hackimov <[email protected]>
@winterheart winterheart force-pushed the mbedtls-3.6-subslotting branch from 1221602 to be062f4 Compare January 5, 2025 17:00
@ronald-cron-arm ronald-cron-arm added component-platform Portability layer and build scripts enhancement needs-ci Needs to pass CI tests size-s Estimated task size: small (~2d) priority-medium Medium priority - this can be reviewed as time permits labels Jan 8, 2025
@ronald-cron-arm
Copy link
Contributor

Thank you very much for this contribution. This seems a good improvement and the PR seems in a good shape. I have triggered the CI.

@winterheart
Copy link
Author

Regarding to test failures: I can make version suffix addition optional via cmake option(MBEDTLS_USE_VERSION_SUFFIX "Enable version suffixes in library names" OFF), so unit tests will run as expected before.

@ronald-cron-arm ronald-cron-arm self-assigned this Jan 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component-platform Portability layer and build scripts enhancement needs-ci Needs to pass CI tests priority-medium Medium priority - this can be reviewed as time permits size-s Estimated task size: small (~2d)
Projects
Status: In Development
Development

Successfully merging this pull request may close these issues.

2 participants