1
0
mirror of https://github.com/Kitware/CMake.git synced 2025-05-08 22:37:04 +08:00

Utilities/Release: Drop SLA from CMake macOS DMG package

macOS 12 deprecates the tools needed to attach a SLA to a `.dmg`.
CMake 3.23 added `CPACK_DMG_SLA_USE_RESOURCE_FILE_LICENSE` to
control whether `CPACK_RESOURCE_FILE_LICENSE` is used as the SLA.
CMake 3.24 will add policy CMP0133 to disable the SLA by default.

Explicitly turn off the SLA for CMake's official macOS binaries.
This will allow them to build on future macOS versions that have
no SLA tooling available.

Issue: #22978
This commit is contained in:
Brad King 2022-04-20 11:55:03 -04:00
parent 722e4d4619
commit 2167fce99b
3 changed files with 8 additions and 9 deletions

View File

@ -22,6 +22,7 @@ set(CPACK_PACKAGE_NAME "${CMAKE_PROJECT_NAME}")
set(CPACK_PACKAGE_VERSION "${CMake_VERSION}")
set(CPACK_PACKAGE_INSTALL_DIRECTORY "${CPACK_PACKAGE_NAME}")
set(CPACK_SOURCE_PACKAGE_FILE_NAME "cmake-${CMake_VERSION}")
set(CPACK_DMG_SLA_USE_RESOURCE_FILE_LICENSE OFF)
# Installers for 32- vs. 64-bit CMake:
# - Root install directory (displayed to end user at installer-run time)

View File

@ -0,0 +1,7 @@
rel-macos-dmg-no-sla
--------------------
* The precompiled macOS binaries provided on
`cmake.org <https://cmake.org/download/>`_ no longer attach a SLA
to the ``.dmg`` packages. This was removed because macOS 12 deprecated
the tools used to attach ``.dmg`` resources.

View File

@ -77,12 +77,6 @@ echo '<?xml version="1.0" encoding="UTF-8"?>
</dict>
</plist>' > "$entitlements_xml"
# Extract SLA
readonly sla_xml="$tmpdir/sla.xml"
hdiutil udifderez -xml "$dmg" > "$sla_xml"
plutil -remove 'blkx' "$sla_xml"
plutil -remove 'plst' "$sla_xml"
# Convert from read-only original image to read-write.
readonly udrw_dmg="$tmpdir/udrw.dmg"
hdiutil convert "$dmg" -format UDRW -o "${udrw_dmg}"
@ -112,6 +106,3 @@ hdiutil detach "$vol_path"
# Convert back to read-only, compressed image.
hdiutil convert "${udrw_dmg}" -format UDZO -imagekey zlib-level=9 -ov -o "$dmg"
# Re-insert SLA.
hdiutil udifrez -xml "${sla_xml}" 'FIXME_WHY_IS_THIS_ARGUMENT_NEEDED' "$dmg"