Bug 193799 - Fix XCBuild issue related to codesigning WebContent process
Summary: Fix XCBuild issue related to codesigning WebContent process
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Tools / Tests (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Keith Rollin
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2019-01-24 16:39 PST by Keith Rollin
Modified: 2019-08-01 16:58 PDT (History)
7 users (show)

See Also:


Attachments
Patch (43.25 KB, patch)
2019-02-06 19:14 PST, Keith Rollin
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Keith Rollin 2019-01-24 16:39:21 PST
Building with XCBuild enabled results in the following build error:

----------
CodeSign ${HOME}/Library/Developer/Xcode/DerivedData/Safari-djbsfwsxghzlwwevmsfmutmmwqtx/Build/Products/Debug-iphoneos/com.apple.WebKit.WebContent.xpc (in target: WebContent)
    cd /Volumes/Data/dev/webkit/branches/xcfilelists/OpenSource/Source/WebKit
    export CODESIGN_ALLOCATE=/Applications/Xcode.app/Contents/Developer/Toolchains/iOS.xctoolchain/usr/bin/codesign_allocate
    
Signing Identity:     "-"

    /usr/bin/codesign --force --sign - --entitlements ${HOME}/Library/Developer/Xcode/DerivedData/Safari-djbsfwsxghzlwwevmsfmutmmwqtx/Build/Intermediates.noindex/WebKit.build/Debug-iphoneos/WebContent.build/com.apple.WebKit.WebContent.xpc.xcent --timestamp=none ${HOME}/Library/Developer/Xcode/DerivedData/Safari-djbsfwsxghzlwwevmsfmutmmwqtx/Build/Products/Debug-iphoneos/com.apple.WebKit.WebContent.xpc

${HOME}/Library/Developer/Xcode/DerivedData/Safari-djbsfwsxghzlwwevmsfmutmmwqtx/Build/Intermediates.noindex/WebKit.build/Debug-iphoneos/WebContent.build/com.apple.WebKit.WebContent.xpc.xcent: cannot read entitlement data
Command CodeSign failed with a nonzero exit code
----------

The issue is likely related to re-ordered build steps performed by the new XCBuild rules. The custom step of deleting the .xcent file is probably occurring after Xcode has auto-generated this file for its own purposes. We need to figure out what the appropriate alternative is.
Comment 1 Radar WebKit Bug Importer 2019-01-24 16:39:46 PST
<rdar://problem/47533890>
Comment 2 Keith Rollin 2019-02-06 19:14:03 PST
Created attachment 361368 [details]
Patch
Comment 3 Brent Fulgham 2019-02-07 10:39:30 PST
Comment on attachment 361368 [details]
Patch

Wow! This looks much simpler! r=me
Comment 4 WebKit Commit Bot 2019-02-07 11:26:35 PST
Comment on attachment 361368 [details]
Patch

Clearing flags on attachment: 361368

Committed r241135: <https://trac.webkit.org/changeset/241135>
Comment 5 WebKit Commit Bot 2019-02-07 11:26:37 PST
All reviewed patches have been landed.  Closing bug.