Skip to content

Conversation

@Begasus
Copy link
Contributor

@Begasus Begasus commented Oct 23, 2025

Description

Using a hardcoded path like "include" for headers path doesn't follow GNUInstallDirs method.

PR checklist

@ronald-cron-arm
Copy link
Contributor

Thanks for this. We also have "bin" hard-coded for the installation of program and test executables. We will fix that as well.

@ronald-cron-arm
Copy link
Contributor

And please add a "Signed-off-by:" line to your commit message.

@Begasus
Copy link
Contributor Author

Begasus commented Oct 23, 2025

Thanks for this. We also have "bin" hard-coded for the installation of program and test executables. We will fix that as well.

Hard coded "bin" isn't really a problem as that is covered in our $PATH, so no changes needed there.

And please add a "Signed-off-by:" line to your commit message.

Should I push this in a separate commit or just amend it to this commit?
EDIT: added in amend, don't think it makes much sense to add a separate commit for it.

@ronald-cron-arm
Copy link
Contributor

Should I push this in a separate commit or just amend it to this commit?

Just amend the commit message of your commit.

@Begasus
Copy link
Contributor Author

Begasus commented Oct 23, 2025

For the record, checked a build for 3.6.5 which went fine, test case succeeded with zero errors, I'm just not sure where ts-psa-crypto is used?

@ronald-cron-arm
Copy link
Contributor

For the record, checked a build for 3.6.5 which went fine, test case succeeded with zero errors, I'm just not sure where ts-psa-crypto is used?

There is no tf-psa-crypto submodule in 3.6.5; it was introduced in 4.0.

@ronald-cron-arm
Copy link
Contributor

Our DCO check is still not happy:
Commit sha: 268dbd2, Author: Luc Schrijvers, Committer: Luc Schrijvers; Expected "Luc Schrijvers begasus@gmail.com", but got "Schrijvers Luc begasus@gmail.com".

@Begasus
Copy link
Contributor Author

Begasus commented Oct 23, 2025

Our DCO check is still not happy: Commit sha: 268dbd2, Author: Luc Schrijvers, Committer: Luc Schrijvers; Expected "Luc Schrijvers begasus@gmail.com", but got "Schrijvers Luc begasus@gmail.com".

Haven't used it that much (guess you got that), will update. :)

@Begasus
Copy link
Contributor Author

Begasus commented Oct 23, 2025

I guess this should go into the upstream source repositories?

diff --git a/3rdparty/everest/CMakeLists.txt b/3rdparty/everest/CMakeLists.txt
index e0e5ade..f105c89 100644
--- a/3rdparty/everest/CMakeLists.txt
+++ b/3rdparty/everest/CMakeLists.txt
@@ -29,7 +29,7 @@ endif()
 if(INSTALL_MBEDTLS_HEADERS)
 
   install(DIRECTORY include/everest
-    DESTINATION include
+    DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}
     FILE_PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ
     DIRECTORY_PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE
     FILES_MATCHING PATTERN "*.h")
diff --git a/3rdparty/p256-m/CMakeLists.txt b/3rdparty/p256-m/CMakeLists.txt
index 2ef0d48..884002e 100644
--- a/3rdparty/p256-m/CMakeLists.txt
+++ b/3rdparty/p256-m/CMakeLists.txt
@@ -27,7 +27,7 @@ endif()
 if(INSTALL_MBEDTLS_HEADERS)
 
   install(DIRECTORY :${CMAKE_CURRENT_SOURCE_DIR}
-    DESTINATION include
+    DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}
     FILE_PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ
     DIRECTORY_PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE
     FILES_MATCHING PATTERN "*.h")

@ronald-cron-arm
Copy link
Contributor

Your PR is against the development branch. As you are using 3.6.5, you would need to raise a PR against the mbedtls-3.6 branch. In that PR you indeed need changes in the 3rdparty directory as well (which does not exist anymore in development).

@ronald-cron-arm
Copy link
Contributor

Our DCO check is still not happy: Commit sha: 268dbd2, Author: Luc Schrijvers, Committer: Luc Schrijvers; Expected "Luc Schrijvers begasus@gmail.com", but got "Schrijvers Luc begasus@gmail.com".

Haven't used it that much (guess you got that), will update. :)

Thank you, our DCO check is happy now.

@ronald-cron-arm ronald-cron-arm added enhancement component-platform Portability layer and build scripts needs-ci Needs to pass CI tests size-xs Estimated task size: extra small (a few hours at most) labels Oct 23, 2025
@Begasus
Copy link
Contributor Author

Begasus commented Oct 23, 2025

Your PR is against the development branch. As you are using 3.6.5, you would need to raise a PR against the mbedtls-3.6 branch. In that PR you indeed need changes in the 3rdparty directory as well (which does not exist anymore in development).

For 3.6.5 we can keep the patch downstream, unless branch 3.6 will still see updates (eg 3.6.7 or up) I guess this could go into a separate PR? I also presume development branch targets 4.* releases?

@ronald-cron-arm
Copy link
Contributor

Your PR is against the development branch. As you are using 3.6.5, you would need to raise a PR against the mbedtls-3.6 branch. In that PR you indeed need changes in the 3rdparty directory as well (which does not exist anymore in development).

For 3.6.5 we can keep the patch downstream, unless branch 3.6 will still see updates (eg 3.6.7 or up) I guess this could go into a separate PR? I also presume development branch targets 4.* releases?

Yes, this would be a different PR, targeting the branch mbedtls-3.6.
Yes, the development branch is now the branch from which we will build the 4.* releases.
I am pretty sure we will do a 3.6.6 release thus your changes would make it there.

@Begasus
Copy link
Contributor Author

Begasus commented Oct 23, 2025

I am pretty sure we will do a 3.6.6 release thus your changes would make it there.

PR created, hope I got it right, used to making changes on master branches. :)

@ronald-cron-arm
Copy link
Contributor

I am pretty sure we will do a 3.6.6 release thus your changes would make it there.

PR created, hope I got it right, used to making changes on master branches. :)

Yes this looks good, thanks.

@ronald-cron-arm ronald-cron-arm changed the title Use GNUInstallDirs CMAKE_INSTALL_INCLUDEDDIR path for headers install… Use GNUInstallDirs CMAKE_INSTALL_INCLUDEDDIR path for headers installation Oct 23, 2025
@ronald-cron-arm ronald-cron-arm self-requested a review October 23, 2025 10:13
@Begasus Begasus marked this pull request as draft October 23, 2025 10:37
@Begasus
Copy link
Contributor Author

Begasus commented Oct 23, 2025

Checked a build for 4.0.0, seems some more include path(s) are involved, had to do some python/rust magic (adding requirements on our side) for it also (compared to 3.6.5).

@Begasus Begasus marked this pull request as ready for review October 23, 2025 13:32
@Begasus
Copy link
Contributor Author

Begasus commented Oct 23, 2025

The other part of the patch is for TF-SPA-CRYPTO, should fork and do a PR upstream there.

@ronald-cron-arm ronald-cron-arm removed the needs-ci Needs to pass CI tests label Oct 23, 2025
Copy link
Contributor

@ronald-cron-arm ronald-cron-arm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good to me. We just need a change log, a file *.txt in ChangeLog.d containing something like:

Bugfix
    * CMake now installs headers to `CMAKE_INSTALL_INCLUDEDIR` instead of the hard-coded `include` directory.

@github-project-automation github-project-automation bot moved this from In Review to In Development in Non-roadmap pull requests Oct 23, 2025
@Begasus
Copy link
Contributor Author

Begasus commented Oct 24, 2025

This looks good to me. We just need a change log, a file *.txt in ChangeLog.d containing something like:

Bugfix
    * CMake now installs headers to `CMAKE_INSTALL_INCLUDEDIR` instead of the hard-coded `include` directory.

I'll try to finish up on that today, thanks so far!

…ation

Signed-off-by: Luc Schrijvers <begasus@gmail.com>
@ronald-cron-arm ronald-cron-arm added the needs-ci Needs to pass CI tests label Oct 24, 2025
Copy link
Contributor

@ronald-cron-arm ronald-cron-arm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks.

@ronald-cron-arm ronald-cron-arm added needs-review Every commit must be reviewed by at least two team members, and removed needs-ci Needs to pass CI tests labels Oct 24, 2025
Copy link
Contributor

@minosgalanakis minosgalanakis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@github-project-automation github-project-automation bot moved this from In Development to Has Approval in Non-roadmap pull requests Oct 29, 2025
@minosgalanakis minosgalanakis added this pull request to the merge queue Oct 29, 2025
Merged via the queue into Mbed-TLS:development with commit 32b597b Oct 29, 2025
3 checks passed
@github-project-automation github-project-automation bot moved this from Has Approval to Done in Non-roadmap pull requests Oct 29, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug component-platform Portability layer and build scripts needs-review Every commit must be reviewed by at least two team members, size-xs Estimated task size: extra small (a few hours at most)

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

3 participants