Просмотр исходного кода

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
Brad King 3 лет назад
Родитель
Сommit
2167fce99b

+ 1 - 0
CMakeCPack.cmake

@@ -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)

+ 7 - 0
Help/release/dev/rel-macos-dmg-no-sla.rst

@@ -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.

+ 0 - 9
Utilities/Release/macos/sign-notarize.bash

@@ -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"