Bug 184960

Summary: Fix entitlements and sandbox configurations in WebKit after r230778
Product: WebKit Reporter: Wenson Hsieh <wenson_hsieh>
Component: WebKit Misc.Assignee: Wenson Hsieh <wenson_hsieh>
Status: RESOLVED FIXED    
Severity: Normal CC: commit-queue, dbates, jer.noble, saam, thorton, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
thorton: review-
Patch
none
Patch for landing
none
Patch none

Description Wenson Hsieh 2018-04-24 23:32:49 PDT
<rdar://problem/39662827>
Comment 1 Wenson Hsieh 2018-04-24 23:34:46 PDT
Created attachment 338711 [details]
Patch
Comment 2 Wenson Hsieh 2018-04-25 00:41:06 PDT
Comment on attachment 338711 [details]
Patch

Oops..it seems the recommended way of doing this is to augment the _BASE config instead (e.g. WK_XPC_SERVICE_IOS_ENTITLEMENTS_BASE_… = …).
Comment 3 Wenson Hsieh 2018-04-25 07:31:25 PDT
Created attachment 338735 [details]
Patch
Comment 4 Tim Horton 2018-04-25 12:20:53 PDT
Comment on attachment 338735 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=338735&action=review

> Source/WebKit/Configurations/BaseXPCService.xcconfig:59
> +CODE_SIGN_ENTITLEMENTS_watchos = $(CODE_SIGN_ENTITLEMENTS_IOS_SKIP_INSTALL_$(SKIP_INSTALL));

This one can use WK_COCOA_TOUCH
Comment 5 Wenson Hsieh 2018-04-25 12:28:02 PDT
(In reply to Tim Horton from comment #4)
> Comment on attachment 338735 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=338735&action=review
> 
> > Source/WebKit/Configurations/BaseXPCService.xcconfig:59
> > +CODE_SIGN_ENTITLEMENTS_watchos = $(CODE_SIGN_ENTITLEMENTS_IOS_SKIP_INSTALL_$(SKIP_INSTALL));
> 
> This one can use WK_COCOA_TOUCH

Indeed — changed to use WK_COCOA_TOUCH.

Thanks for the review!
Comment 6 Wenson Hsieh 2018-04-25 12:28:22 PDT
Created attachment 338769 [details]
Patch for landing
Comment 7 WebKit Commit Bot 2018-04-25 13:13:29 PDT
Comment on attachment 338769 [details]
Patch for landing

Clearing flags on attachment: 338769

Committed r231014: <https://trac.webkit.org/changeset/231014>
Comment 8 Wenson Hsieh 2018-05-03 00:33:25 PDT
Comment on attachment 338735 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=338735&action=review

>>> Source/WebKit/Configurations/BaseXPCService.xcconfig:59
>>> +CODE_SIGN_ENTITLEMENTS_watchos = $(CODE_SIGN_ENTITLEMENTS_IOS_SKIP_INSTALL_$(SKIP_INSTALL));
>> 
>> This one can use WK_COCOA_TOUCH
> 
> Indeed — changed to use WK_COCOA_TOUCH.
> 
> Thanks for the review!

.......on second thought, changing to use WK_COCOA_TOUCH here means that CODE_SIGN_ENTITLEMENTS_macos won't apply anymore, since CODE_SIGN_ENTITLEMENTS is no longer $(CODE_SIGN_ENTITLEMENTS_$(WK_PLATFORM_NAME))
Comment 9 Tim Horton 2018-05-03 00:39:58 PDT
(In reply to Wenson Hsieh from comment #8)
> Comment on attachment 338735 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=338735&action=review
> 
> >>> Source/WebKit/Configurations/BaseXPCService.xcconfig:59
> >>> +CODE_SIGN_ENTITLEMENTS_watchos = $(CODE_SIGN_ENTITLEMENTS_IOS_SKIP_INSTALL_$(SKIP_INSTALL));
> >> 
> >> This one can use WK_COCOA_TOUCH
> > 
> > Indeed — changed to use WK_COCOA_TOUCH.
> > 
> > Thanks for the review!
> 
> .......on second thought, changing to use WK_COCOA_TOUCH here means that
> CODE_SIGN_ENTITLEMENTS_macos won't apply anymore, since
> CODE_SIGN_ENTITLEMENTS is no longer
> $(CODE_SIGN_ENTITLEMENTS_$(WK_PLATFORM_NAME))

Right, it ends up being CODE_SIGN_ENTITLEMENTS_ = ...

See also Jer’s IS_COCOA_TOUCH thing. There’s been a whole debate about this
Comment 10 Wenson Hsieh 2018-05-03 00:48:24 PDT
Created attachment 339396 [details]
Patch
Comment 11 Wenson Hsieh 2018-05-03 01:00:03 PDT
Comment on attachment 339396 [details]
Patch

Obsoleting — there's a better way to do this using WK_IS_COCOA_TOUCH.
Comment 12 Tim Horton 2018-05-03 02:08:35 PDT
I did that in https://bugs.webkit.org/show_bug.cgi?id=185241