Title: [288406] trunk/Source/WebKit
Revision
288406
Author
[email protected]
Date
2022-01-22 12:55:22 -0800 (Sat, 22 Jan 2022)

Log Message

Skip installing webpushd in STP and downlevel builds
https://bugs.webkit.org/show_bug.cgi?id=235464
<rdar://87425138>

Patch by Elliott Williams <[email protected]> on 2022-01-22
Reviewed by Brady Eidson.

We can't ship webpushd as part of STP or builds made for previous versions of macOS. This
change adjusts build settings to skip installing webpushd and its launchd plist outside of a
non-relocatable production build environment.

As a consequence, webpushd will not _install_ in development builds (where all build
products are relocatable). It will continue to build and be runnable from the build
products directory.

* Configurations/BaseTarget.xcconfig: Add WK_SKIP_INSTALL_WEBPUSHD to determine whether to
skip installation.
* Configurations/webpushd.xcconfig: Set SKIP_INSTALL based on WK_SKIP_INSTALL_WEBPUSHD.
* WebKit.xcodeproj/project.pbxproj: Skip installing launchd plists when
WK_SKIP_INSTALL_WEBPUSHD=YES.

Modified Paths

Diff

Modified: trunk/Source/WebKit/ChangeLog (288405 => 288406)


--- trunk/Source/WebKit/ChangeLog	2022-01-22 18:17:10 UTC (rev 288405)
+++ trunk/Source/WebKit/ChangeLog	2022-01-22 20:55:22 UTC (rev 288406)
@@ -1,3 +1,25 @@
+2022-01-22  Elliott Williams  <[email protected]>
+
+        Skip installing webpushd in STP and downlevel builds
+        https://bugs.webkit.org/show_bug.cgi?id=235464
+        <rdar://87425138>
+
+        Reviewed by Brady Eidson.
+
+        We can't ship webpushd as part of STP or builds made for previous versions of macOS. This
+        change adjusts build settings to skip installing webpushd and its launchd plist outside of a
+        non-relocatable production build environment.
+
+        As a consequence, webpushd will not _install_ in development builds (where all build
+        products are relocatable). It will continue to build and be runnable from the build
+        products directory.
+
+        * Configurations/BaseTarget.xcconfig: Add WK_SKIP_INSTALL_WEBPUSHD to determine whether to
+        skip installation.
+        * Configurations/webpushd.xcconfig: Set SKIP_INSTALL based on WK_SKIP_INSTALL_WEBPUSHD.
+        * WebKit.xcodeproj/project.pbxproj: Skip installing launchd plists when
+        WK_SKIP_INSTALL_WEBPUSHD=YES.
+
 2022-01-21  Sihui Liu  <[email protected]>
 
         Disable CFURLCache in WebKit2

Modified: trunk/Source/WebKit/Configurations/BaseTarget.xcconfig (288405 => 288406)


--- trunk/Source/WebKit/Configurations/BaseTarget.xcconfig	2022-01-22 18:17:10 UTC (rev 288405)
+++ trunk/Source/WebKit/Configurations/BaseTarget.xcconfig	2022-01-22 20:55:22 UTC (rev 288406)
@@ -127,6 +127,12 @@
 WK_INSTALL_PATH_PREFIX = $(WK_INSTALL_PATH_PREFIX_DEPLOYMENT_$(DEPLOYMENT_LOCATION)$(WK_MACOS_1015)_USE_STAGING_INSTALL_PATH_$(USE_STAGING_INSTALL_PATH));
 WK_INSTALL_PATH_PREFIX_DEPLOYMENT_YES_MACOS_SINCE_1015_USE_STAGING_INSTALL_PATH_YES = $(PLATFORM_OOB_SYSTEM_CONTENT_DIR);
 
+// webpushd should not be installed when building for downlevel.
+WK_SKIP_INSTALL_WEBPUSHD[sdk=macos*] = $(WK_SKIP_INSTALL_WEBPUSHD_STAGING_$(USE_STAGING_INSTALL_PATH)_RELOCATABLE_$(WK_RELOCATABLE_FRAMEWORKS))
+WK_SKIP_INSTALL_WEBPUSHD_STAGING_YES_RELOCATABLE_YES = YES
+WK_SKIP_INSTALL_WEBPUSHD_STAGING_YES_RELOCATABLE_ = YES
+WK_SKIP_INSTALL_WEBPUSHD_STAGING__RELOCATABLE_YES = YES
+
 WK_HAVE_CORE_PREDICTION = YES;
 
 WK_CORE_PREDICTION_DEFINES = $(WK_CORE_PREDICTION_DEFINES_$(WK_HAVE_CORE_PREDICTION));

Modified: trunk/Source/WebKit/Configurations/webpushd.xcconfig (288405 => 288406)


--- trunk/Source/WebKit/Configurations/webpushd.xcconfig	2022-01-22 18:17:10 UTC (rev 288405)
+++ trunk/Source/WebKit/Configurations/webpushd.xcconfig	2022-01-22 20:55:22 UTC (rev 288406)
@@ -48,3 +48,6 @@
 
 OUTPUT_ALTERNATE_ROOT_PATH = $(OUTPUT_ALTERNATE_ROOT_PATH_$(USE_SYSTEM_CONTENT_PATH));
 OUTPUT_ALTERNATE_ROOT_PATH_YES = $(DSTROOT)$(ALTERNATE_ROOT_PATH)/$(FULL_PRODUCT_NAME);
+
+SKIP_INSTALL = $(WK_SKIP_INSTALL_WEBPUSHD)
+

Modified: trunk/Source/WebKit/WebKit.xcodeproj/project.pbxproj (288405 => 288406)


--- trunk/Source/WebKit/WebKit.xcodeproj/project.pbxproj	2022-01-22 18:17:10 UTC (rev 288405)
+++ trunk/Source/WebKit/WebKit.xcodeproj/project.pbxproj	2022-01-22 20:55:22 UTC (rev 288406)
@@ -15302,7 +15302,7 @@
 			);
 			runOnlyForDeploymentPostprocessing = 1;
 			shellPath = /bin/sh;
-			shellScript = "if [[ \"${WK_PLATFORM_NAME}\" == iphoneos ]]; then\n    ADATTRIBUTIOND_PLIST_SOURCE=\"${SRCROOT}/Shared/EntryPointUtilities/Cocoa/Daemon/com.apple.webkit.adattributiond.plist\"\n    ADATTRIBUTIOND_PLIST_DESTINATION=\"${DSTROOT}/System/Library/LaunchDaemons/com.apple.webkit.adattributiond.plist\"\n    echo \"copying adattributiond plist\"\n    mkdir -p \"$(dirname \"${ADATTRIBUTIOND_PLIST_DESTINATION}\")\"\n    echo plutil -convert binary1 -o \"${ADATTRIBUTIOND_PLIST_DESTINATION}\" \"${ADATTRIBUTIOND_PLIST_SOURCE}\"\n    plutil -convert binary1 -o \"${ADATTRIBUTIOND_PLIST_DESTINATION}\" \"${ADATTRIBUTIOND_PLIST_SOURCE}\"\nelse\n    echo \"not copying adattributiond plist\"\nfi\n\nif [[ \"${WK_PLATFORM_NAME}\" == iphoneos || \"${WK_PLATFORM_NAME}\" == macosx ]]; then\n    if [[ \"${WK_PLATFORM_NAME}\" == iphoneos
  ]]; then\n        WEBPUSHD_PLIST_SOURCE=\"${SRCROOT}/webpushd/com.apple.webkit.webpushd.ios.plist\"\n        WEBPUSHD_PLIST_DESTINATION=\"${DSTROOT}/System/Library/LaunchDaemons/com.apple.webkit.webpushd.plist\"\n    else\n        WEBPUSHD_PLIST_SOURCE=\"${SRCROOT}/webpushd/com.apple.webkit.webpushd.mac.plist\"\n        WEBPUSHD_PLIST_DESTINATION=\"${DSTROOT}/System/Library/LaunchAgents/com.apple.webkit.webpushd.plist\"\n    fi\n\n    echo \"copying webpushd plist\"\n    mkdir -p \"$(dirname \"${WEBPUSHD_PLIST_DESTINATION}\")\"\n    echo plutil -convert binary1 -o \"${WEBPUSHD_PLIST_DESTINATION}\" \"${WEBPUSHD_PLIST_SOURCE}\"\n    plutil -convert binary1 -o \"${WEBPUSHD_PLIST_DESTINATION}\" \"${WEBPUSHD_PLIST_SOURCE}\"\nelse\n    echo \"not copying webpushd plist\"\nfi\n";
+			shellScript = "if [[ \"${WK_PLATFORM_NAME}\" == iphoneos ]]; then\n    ADATTRIBUTIOND_PLIST_SOURCE=\"${SRCROOT}/Shared/EntryPointUtilities/Cocoa/Daemon/com.apple.webkit.adattributiond.plist\"\n    ADATTRIBUTIOND_PLIST_DESTINATION=\"${DSTROOT}/System/Library/LaunchDaemons/com.apple.webkit.adattributiond.plist\"\n    echo \"copying adattributiond plist\"\n    mkdir -p \"$(dirname \"${ADATTRIBUTIOND_PLIST_DESTINATION}\")\"\n    echo plutil -convert binary1 -o \"${ADATTRIBUTIOND_PLIST_DESTINATION}\" \"${ADATTRIBUTIOND_PLIST_SOURCE}\"\n    plutil -convert binary1 -o \"${ADATTRIBUTIOND_PLIST_DESTINATION}\" \"${ADATTRIBUTIOND_PLIST_SOURCE}\"\nelse\n    echo \"not copying adattributiond plist\"\nfi\n\nif [[ \"${WK_SKIP_INSTALL_WEBPUSHD}\" != \"YES\" && \n        ( \"${WK_PLATFORM_NAME}\" == iphoneos || \"${WK_PLATFORM_NAM
 E}\" == macosx ) ]]; then\n    if [[ \"${WK_PLATFORM_NAME}\" == iphoneos ]]; then\n        WEBPUSHD_PLIST_SOURCE=\"${SRCROOT}/webpushd/com.apple.webkit.webpushd.ios.plist\"\n        WEBPUSHD_PLIST_DESTINATION=\"${DSTROOT}/System/Library/LaunchDaemons/com.apple.webkit.webpushd.plist\"\n    else\n        WEBPUSHD_PLIST_SOURCE=\"${SRCROOT}/webpushd/com.apple.webkit.webpushd.mac.plist\"\n        WEBPUSHD_PLIST_DESTINATION=\"${DSTROOT}/System/Library/LaunchAgents/com.apple.webkit.webpushd.plist\"\n    fi\n\n    echo \"copying webpushd plist\"\n    mkdir -p \"$(dirname \"${WEBPUSHD_PLIST_DESTINATION}\")\"\n    echo plutil -convert binary1 -o \"${WEBPUSHD_PLIST_DESTINATION}\" \"${WEBPUSHD_PLIST_SOURCE}\"\n    plutil -convert binary1 -o \"${WEBPUSHD_PLIST_DESTINATION}\" \"${WEBPUSHD_PLIST_SOURCE}\"\nelse\n    echo \"not copying webpushd plist\"\nfi\n";
 		};
 		E1AC2E2C20F7B95800B0897D /* Unlock Keychain */ = {
 			isa = PBXShellScriptBuildPhase;
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to