[openssl] Finish unified configuration for windows and non-windows - #27261
Conversation
9f57ced to
0ce019f
Compare
There was a problem hiding this comment.
This is a new experimental fast check for PR issues. Please let us know if this bot is helpful!
After committing all other changes, the version database must be updated
git add -u && git commit
git checkout 79fa9d85cb4510b05c2657bd7ec8a6a2cb266dc5 -- versions
./vcpkg x-add-version --allDiff
diff --git a/versions/baseline.json b/versions/baseline.json
index 888ca87..0fe514b 100644
--- a/versions/baseline.json
+++ b/versions/baseline.json
@@ -5474,7 +5474,7 @@
},
"openssl": {
"baseline": "3.0.5",
- "port-version": 5
+ "port-version": 6
},
"openssl-unix": {
"baseline": "1.1.1h",
diff --git a/versions/o-/openssl.json b/versions/o-/openssl.json
index 58def96..e33a631 100644
--- a/versions/o-/openssl.json
+++ b/versions/o-/openssl.json
@@ -1,5 +1,10 @@
{
"versions": [
+ {
+ "git-tree": "505abd97c0b1f95c72b96509bd13fa7d0dc84225",
+ "version": "3.0.5",
+ "port-version": 6
+ },
{
"git-tree": "067a790dfd1559e77d5a199ccbe982322882d667",
"version": "3.0.5",|
|
|
CC @BillyONeal This should really be handled before the next upstream update. |
JavierMatosD
left a comment
There was a problem hiding this comment.
Everything looks great, with some minor changes/feedback. The important one is that it looks like you are using {VERSION} openssl/portfile.cmake but removed vcpkg_minimum_required.
Other than that, it looks good to me. :)
| file(COPY "${CURRENT_PACKAGES_DIR}/${script}" DESTINATION "${CURRENT_PACKAGES_DIR}/tools/${PORT}") | ||
| file(REMOVE "${CURRENT_PACKAGES_DIR}/${script}" "${CURRENT_PACKAGES_DIR}/debug/${script}") | ||
| endforeach() | ||
| vcpkg_copy_tools(TOOL_NAMES openssl AUTO_CLEAN) |
There was a problem hiding this comment.
c_rehash could be added to vcpkg_copy_tools
There was a problem hiding this comment.
I cannot handle scripts with vcpkg_copy_tools because it only handles .exe for windows. And this code runs for native mingw builds.
| file(MAKE_DIRECTORY "${CURRENT_PACKAGES_DIR}/tools/${PORT}") | ||
| foreach(script IN ITEMS "bin/c_rehash") | ||
| file(COPY "${CURRENT_PACKAGES_DIR}/${script}" DESTINATION "${CURRENT_PACKAGES_DIR}/tools/${PORT}") | ||
| file(REMOVE "${CURRENT_PACKAGES_DIR}/${script}" "${CURRENT_PACKAGES_DIR}/debug/${script}") |
There was a problem hiding this comment.
Why not just rename instead of copy and remove?
There was a problem hiding this comment.
It doesn't matter that much. We always have to remove the debug variant. So there will always be two commands.
The loop is obsolete now. OTOH it makes clear that c_rehash is a script. This fact is relevant with regard to vcpkg_copy_tools.
| if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic" AND VCPKG_TARGET_IS_MINGW) | ||
| # For consistency with nmake build | ||
| file(GLOB engines "${CURRENT_PACKAGES_DIR}/lib/ossl-modules/*.dll") | ||
| if(engines) | ||
| file(COPY ${engines} DESTINATION "${CURRENT_PACKAGES_DIR}/bin") | ||
| file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/lib/ossl-modules") | ||
| endif() | ||
| file(GLOB engines "${CURRENT_PACKAGES_DIR}/debug/lib/ossl-modules/*.dll") | ||
| if(engines) | ||
| file(COPY ${engines} DESTINATION "${CURRENT_PACKAGES_DIR}/debug/bin") | ||
| file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/lib/ossl-modules") | ||
| endif() | ||
| endif() |
There was a problem hiding this comment.
Does this need to be guarded by if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic" AND VCPKG_TARGET_IS_MINGW) since you are already checking if there are dll's in ossl-modules? If there are DLLs, they should be moved regardless IMO.
There was a problem hiding this comment.
It seems robust enough to remove the extra guard now. OTOH, it make the purpose very clear.
| @@ -1,31 +1,57 @@ | |||
| vcpkg_minimum_required(VERSION 2022-10-12) # for ${VERSION} | |||
There was a problem hiding this comment.
It looks like you're still using VERSION; should this be kept?
There was a problem hiding this comment.
No. The check is obsolete since the check in scripts/ports.cmake was updated.
dg0yt
left a comment
There was a problem hiding this comment.
I can do the simlifications, but it seems in some spots it is remains necessay to say why it is this way.
| @@ -1,31 +1,57 @@ | |||
| vcpkg_minimum_required(VERSION 2022-10-12) # for ${VERSION} | |||
There was a problem hiding this comment.
No. The check is obsolete since the check in scripts/ports.cmake was updated.
| file(MAKE_DIRECTORY "${CURRENT_PACKAGES_DIR}/tools/${PORT}") | ||
| foreach(script IN ITEMS "bin/c_rehash") | ||
| file(COPY "${CURRENT_PACKAGES_DIR}/${script}" DESTINATION "${CURRENT_PACKAGES_DIR}/tools/${PORT}") | ||
| file(REMOVE "${CURRENT_PACKAGES_DIR}/${script}" "${CURRENT_PACKAGES_DIR}/debug/${script}") |
There was a problem hiding this comment.
It doesn't matter that much. We always have to remove the debug variant. So there will always be two commands.
The loop is obsolete now. OTOH it makes clear that c_rehash is a script. This fact is relevant with regard to vcpkg_copy_tools.
| file(COPY "${CURRENT_PACKAGES_DIR}/${script}" DESTINATION "${CURRENT_PACKAGES_DIR}/tools/${PORT}") | ||
| file(REMOVE "${CURRENT_PACKAGES_DIR}/${script}" "${CURRENT_PACKAGES_DIR}/debug/${script}") | ||
| endforeach() | ||
| vcpkg_copy_tools(TOOL_NAMES openssl AUTO_CLEAN) |
There was a problem hiding this comment.
I cannot handle scripts with vcpkg_copy_tools because it only handles .exe for windows. And this code runs for native mingw builds.
| if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic" AND VCPKG_TARGET_IS_MINGW) | ||
| # For consistency with nmake build | ||
| file(GLOB engines "${CURRENT_PACKAGES_DIR}/lib/ossl-modules/*.dll") | ||
| if(engines) | ||
| file(COPY ${engines} DESTINATION "${CURRENT_PACKAGES_DIR}/bin") | ||
| file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/lib/ossl-modules") | ||
| endif() | ||
| file(GLOB engines "${CURRENT_PACKAGES_DIR}/debug/lib/ossl-modules/*.dll") | ||
| if(engines) | ||
| file(COPY ${engines} DESTINATION "${CURRENT_PACKAGES_DIR}/debug/bin") | ||
| file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/lib/ossl-modules") | ||
| endif() | ||
| endif() |
There was a problem hiding this comment.
It seems robust enough to remove the extra guard now. OTOH, it make the purpose very clear.
b5de6e5
dg0yt
left a comment
There was a problem hiding this comment.
@JavierMatosD Ready to review again.
| file(MAKE_DIRECTORY "${CURRENT_PACKAGES_DIR}/tools/${PORT}") | ||
| foreach(script IN ITEMS "bin/c_rehash") | ||
| file(COPY "${CURRENT_PACKAGES_DIR}/${script}" DESTINATION "${CURRENT_PACKAGES_DIR}/tools/${PORT}") | ||
| file(REMOVE "${CURRENT_PACKAGES_DIR}/${script}" "${CURRENT_PACKAGES_DIR}/debug/${script}") |
| if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic" AND VCPKG_TARGET_IS_MINGW) | ||
| # For consistency with nmake build | ||
| file(GLOB engines "${CURRENT_PACKAGES_DIR}/lib/ossl-modules/*.dll") | ||
| if(engines) | ||
| file(COPY ${engines} DESTINATION "${CURRENT_PACKAGES_DIR}/bin") | ||
| file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/lib/ossl-modules") | ||
| endif() | ||
| file(GLOB engines "${CURRENT_PACKAGES_DIR}/debug/lib/ossl-modules/*.dll") | ||
| if(engines) | ||
| file(COPY ${engines} DESTINATION "${CURRENT_PACKAGES_DIR}/debug/bin") | ||
| file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/lib/ossl-modules") | ||
| endif() | ||
| endif() |
…ndows (microsoft#27261)" This reverts commit 9ccc64c.
What does your PR fix?
Complements [openssl] Revise jom/nmake support #27150 for the unix part, using a similar structure.
Leverages
vcpkg_configure_make/vcpkg_install_makevia a simpleconfigurewrapper script instead of adding indirection via a complex CMake project.Unifies windows and unix feature configuration in the main port file, ensuring consistency. (Inconsistencies was added even by those who should review PRs: [openssl] Add no-ssl3 and no-weak-ssl-ciphers to Configure options #28743)
Retains
etc/ssl.Removes pointless no-ssl2 option which was deprecated years ago.
Improves the linux kernel headers message.
Adds a check and message for Perl's
IPC::Cmdmodule. Cf. [openssl] Build error #27929 et al.Which triplets are supported/not supported? Have you updated the CI baseline?
unchanged, no
Does your PR follow the maintainer guide?
yes
If you have added/updated a port: Have you run
./vcpkg x-add-version --alland committed the result?yes
Tests
This change would benefit from independent testing wrt to all the target triplet particularities.