diff options
author | Deniz Bahadir <deniz@code.bahadir.email> | 2024-05-01 17:20:32 (GMT) |
---|---|---|
committer | Deniz Bahadir <deniz@code.bahadir.email> | 2024-05-01 17:20:32 (GMT) |
commit | a1af593291efecb5204eb7aa745468dc2a1bf1a7 (patch) | |
tree | 432dce8ae55ac182d1541919f3835c59aa68b9ed /Modules/Internal | |
parent | 9e67ad47a99b549ee02bd48ad2d1ae438f9f3181 (diff) | |
download | CMake-a1af593291efecb5204eb7aa745468dc2a1bf1a7.zip CMake-a1af593291efecb5204eb7aa745468dc2a1bf1a7.tar.gz CMake-a1af593291efecb5204eb7aa745468dc2a1bf1a7.tar.bz2 |
CPack: Support arbitrary component name when packaging
CPack no longer blindly tries to create temporary packaging
(sub)directories that contain the verbatim name of a component, which
might contain characters that are not supported on the platform /
filesystem.
Instead, if the component's name contains a (possibly) problematic
character its MD5 hash will be used for that temporary packaging
(sub)directory.
Likewise, if the component's name resembles a reserved device name (e.g.
"COM1" on Windows) then the temporary packaging (sub)directory will get
this name prefixed with an underscore.
Similar, if it ends in a dot (on Windows) then the temporary packaging
(sub)directory will get this name suffixed with an underscore.
Fixes: #23612
Diffstat (limited to 'Modules/Internal')
-rw-r--r-- | Modules/Internal/CPack/CPackRPM.cmake | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Modules/Internal/CPack/CPackRPM.cmake b/Modules/Internal/CPack/CPackRPM.cmake index 23fb823..4998d71 100644 --- a/Modules/Internal/CPack/CPackRPM.cmake +++ b/Modules/Internal/CPack/CPackRPM.cmake @@ -916,7 +916,7 @@ function(cpack_rpm_generate_package) CPACK_RPM_MAIN_COMPONENT_UPPER) if(NOT CPACK_RPM_MAIN_COMPONENT_UPPER STREQUAL CPACK_RPM_PACKAGE_COMPONENT_UPPER) - string(APPEND CPACK_RPM_PACKAGE_NAME "-${CPACK_RPM_PACKAGE_COMPONENT}") + string(APPEND CPACK_RPM_PACKAGE_NAME "-${CPACK_RPM_PACKAGE_COMPONENT_PART_NAME}") cpack_rpm_variable_fallback("CPACK_RPM_PACKAGE_NAME" "CPACK_RPM_${CPACK_RPM_PACKAGE_COMPONENT}_PACKAGE_NAME" |