The tools DumpRenderTree, WebKitTestRunner, LayoutTestHelper, and TestNetscapePlugin get created in WebKit.framework/Versions/A/Resources on non-mac builds. This is incorrect, as those bundles are shallow bundles that don't use the Versions hierarchy. Instead, store these files directly in WebKit.framework. (Note that getting rid of just the "Versions/A" path components and putting the files in WebKit.framework/Resources doesn't work as `codesign` treats this as an invalid layout.)
<rdar://problem/51873261>
Created attachment 372408 [details] Patch
Comment on attachment 372408 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=372408&action=review > Tools/DumpRenderTree/mac/Configurations/Base.xcconfig:116 > +WEBKIT_FRAMEWORK_RESOURCES_PATH = WebKit.framework; > +WEBKIT_FRAMEWORK_RESOURCES_PATH[sdk=macosx*] = WebKit.framework/Versions/A/Resources; I see some other places in WebKit that use the value of $(SHALLOW_BUNDLE) rather than checking for specific SDKs. Can we do that here too?
Not really. I tried that. The value of $(SHALLOW_BUNDLE) bundle that we'd want would be that used by the WebKit.framework build. That's not available when building WebKitTestRunner, et al. And, it turns out $(SHALLOW_BUNDLE) can be set to NO for some of these projects, which are strict executables and not bundles themselves.
Comment on attachment 372408 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=372408&action=review > Tools/DumpRenderTree/DumpRenderTree.xcodeproj/project.pbxproj:-1389 > - WEBKIT_FRAMEWORK_RESOURCES_PATH = WebKit.framework/Versions/A/Resources; It'd be nice to also move INSTALL_PATH from the pbxproj to an .xcconfig file. WEBKIT_FRAMEWORK_RESOURCES_PATH's effect is a little mysterious otherwise (at least it was to me while reviewing).
IIRC the location was chosen for Mac as one that didn't make code signing get unhappy about unexpected or missing binaries. Not sure if this is still relevant as we tend to re-sign a lot more eagerly, but anyway - how did you test this?
> how did you test this? I ran it through spade to create a temporary-install. I modified spade to allow me to specify local roots. See Safari pull request 7255. This is how I found out about codesign complaining about my trying to use a Resources directory.
Created attachment 372495 [details] Patch
Comment on attachment 372495 [details] Patch Clearing flags on attachment: 372495 Committed r246617: <https://trac.webkit.org/changeset/246617>
All reviewed patches have been landed. Closing bug.