Skip to content

Mbedtls 4.0 subslotting #9935

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

Open
wants to merge 4 commits into
base: development
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 4 [REQUIRED]) and MbedTLS::<component> in order to use requested libraries. Packages that relies on pkg-config output, should use pkg-config --libs --cflags (mbedtls-4|mbedx509-4) output in order to discover actual library names and include paths.

There are some uncertain about tfpsacrypto library as it now separate library that has own version conventions, and I don't know how it will be tied to mbedtls between major versions.

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 Mbedtls 3.6 subslotting #9876
  • 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 to install headers and libraries to
different location (like `include/mbedtls4`, Mbed-TLS#8723).

Additionally, removing explicit permission rules as they may break 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]>
Add version suffix for all installable targets. Convert main library targets to slottable versions. This allows to install major versions of MbedTLS simultaneously.

Dependent packages should use `find_package(MbedTLS 4 [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 (mbedtls-4|mbedx509-4)` in order to use
requested libraries.
Remove mbedcrypto.pc file as this effectively replaced by tfpsacrypto and has no use.

Signed-off-by: Azamat H. Hackimov <[email protected]>
Signed-off-by: Azamat H. Hackimov <[email protected]>
@winterheart winterheart mentioned this pull request Jan 26, 2025
4 tasks
@winterheart winterheart changed the title Development subslotting Mbedtls 4.0 subslotting Jan 26, 2025
@minosgalanakis minosgalanakis added needs-review Every commit must be reviewed by at least two team members, component-platform Portability layer and build scripts needs-ci Needs to pass CI tests needs-reviewer This PR needs someone to pick it up for review size-s Estimated task size: small (~2d) priority-medium Medium priority - this can be reviewed as time permits labels Apr 24, 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 needs-ci Needs to pass CI tests needs-review Every commit must be reviewed by at least two team members, needs-reviewer This PR needs someone to pick it up for review 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.

Add the ability to install multiple versions (2.*, 3.*, 4.* ...) on the system simultaneously
2 participants