-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[rules_ios] Rebase all changes from #16 onto 5.3.0
Does a few things: - Rebases to 5.3.0 - Updates the rules_apple version to get bazelbuild/rules_apple#2552 - Fix a bug in static_library that was exposed by bazel 8 update
- Loading branch information
1 parent
77c4afa
commit 6f8ea4a
Showing
9 changed files
with
583 additions
and
51 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
diff --git a/apple/internal/ios_rules.bzl b/apple/internal/ios_rules.bzl | ||
index 9b0d1270..73dfb375 100644 | ||
--- a/apple/internal/ios_rules.bzl | ||
+++ b/apple/internal/ios_rules.bzl | ||
@@ -927,6 +927,7 @@ def _ios_extension_impl(ctx): | ||
attr = ctx.attr, | ||
res_attrs = [ | ||
"app_icons", | ||
+ "resources", | ||
"strings", | ||
], | ||
) | ||
diff --git a/tools/plisttool/plisttool.py b/tools/plisttool/plisttool.py | ||
index ecc84f28..2cd295cc 100644 | ||
--- a/tools/plisttool/plisttool.py | ||
+++ b/tools/plisttool/plisttool.py | ||
@@ -294,15 +294,26 @@ ENTITLEMENTS_VALUE_NOT_IN_LIST = ( | ||
|
||
_ENTITLEMENTS_TO_VALIDATE_WITH_PROFILE = ( | ||
'aps-environment', | ||
+ 'com.apple.developer.applesignin', | ||
+ 'com.apple.developer.carplay-audio', | ||
+ 'com.apple.developer.carplay-charging', | ||
+ 'com.apple.developer.carplay-maps', | ||
+ 'com.apple.developer.carplay-messaging', | ||
+ 'com.apple.developer.carplay-parking', | ||
+ 'com.apple.developer.carplay-quick-ordering', | ||
+ 'com.apple.developer.playable-content', | ||
'com.apple.developer.networking.wifi-info', | ||
'com.apple.developer.passkit.pass-presentation-suppression', | ||
'com.apple.developer.payment-pass-provisioning', | ||
+ 'com.apple.developer.proximity-reader.payment.acceptance', | ||
'com.apple.developer.siri', | ||
'com.apple.developer.usernotifications.critical-alerts', | ||
'com.apple.developer.usernotifications.time-sensitive', | ||
# Keys which have a list of potential values in the profile, but only one in | ||
# the entitlements that must be in the profile's list of values | ||
'com.apple.developer.devicecheck.appattest-environment', | ||
+ 'com.apple.storekit.request-data', | ||
+ 'com.apple.developer.storekit.request-data', | ||
) | ||
|
||
ENTITLEMENTS_BETA_REPORTS_ACTIVE_MISMATCH = ( |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
diff --git a/tools/bundletool/bundletool_experimental.py b/tools/bundletool/bundletool_experimental.py | ||
index 78f4923e..ab6d1d19 100644 | ||
--- a/tools/bundletool/bundletool_experimental.py | ||
+++ b/tools/bundletool/bundletool_experimental.py | ||
@@ -46,21 +46,23 @@ following keys: | ||
bundle is complete but before it is signed. | ||
""" | ||
|
||
+import errno | ||
import filecmp | ||
import json | ||
import os | ||
import shutil | ||
import sys | ||
import zipfile | ||
-from ctypes import cdll, c_char_p, c_int | ||
+from ctypes import CDLL, c_char_p, c_int, get_errno | ||
|
||
_CLONEFILE = None | ||
+_USE_CLONEFILE = sys.platform == "darwin" | ||
def _load_clonefile(): | ||
global _CLONEFILE | ||
if _CLONEFILE: | ||
return _CLONEFILE | ||
|
||
- system = cdll.LoadLibrary('/usr/lib/libSystem.dylib') | ||
+ system = CDLL('/usr/lib/libSystem.dylib', use_errno=True) | ||
_CLONEFILE = system.clonefile | ||
_CLONEFILE.argtypes = [c_char_p, c_char_p, c_int] # src, dest, flags | ||
_CLONEFILE.restype = c_int # 0 on success | ||
@@ -212,11 +214,16 @@ class Bundler(object): | ||
raise BundleConflictError(dest) | ||
|
||
self._makedirs_safely(os.path.dirname(full_dest)) | ||
- if sys.platform == "darwin": | ||
+ global _USE_CLONEFILE | ||
+ if _USE_CLONEFILE: | ||
clonefile = _load_clonefile() | ||
result = clonefile(src.encode(), full_dest.encode(), 0) | ||
if result != 0: | ||
- raise Exception(f"failed to clonefile {src} to {full_dest}") | ||
+ if get_errno() in (errno.EXDEV, errno.ENOTSUP): | ||
+ _USE_CLONEFILE = False | ||
+ shutil.copy(src, full_dest) | ||
+ else: | ||
+ raise Exception(f"failed to clonefile {src} to {full_dest}") | ||
else: | ||
shutil.copy(src, full_dest) | ||
os.chmod(full_dest, 0o755 if executable else 0o644) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.