Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

Commit 453411b

Browse files
authored
CP: Fix permissions on macos artifacts (#45598) (#45900)
CP: 0cf5971 [C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
1 parent 5c86194 commit 453411b

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

sky/tools/create_macos_framework.py

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,7 @@ def main():
8181

8282
shutil.rmtree(fat_framework, True)
8383
shutil.copytree(arm64_framework, fat_framework, symlinks=True)
84+
8485
regenerate_symlinks(fat_framework)
8586

8687
fat_framework_binary = os.path.join(
@@ -91,6 +92,21 @@ def main():
9192
subprocess.check_call([
9293
'lipo', arm64_dylib, x64_dylib, '-create', '-output', fat_framework_binary
9394
])
95+
96+
# Add group and other readability to all files.
97+
versions_path = os.path.join(fat_framework, 'Versions')
98+
subprocess.check_call(['chmod', '-R', 'og+r', versions_path])
99+
# Find all the files below the target dir with owner execute permission
100+
find_subprocess = subprocess.Popen([
101+
'find', versions_path, '-perm', '-100', '-print0'
102+
],
103+
stdout=subprocess.PIPE)
104+
# Add execute permission for other and group for all files that had it for owner.
105+
xargs_subprocess = subprocess.Popen(['xargs', '-0', 'chmod', 'og+x'],
106+
stdin=find_subprocess.stdout)
107+
find_subprocess.wait()
108+
xargs_subprocess.wait()
109+
94110
process_framework(dst, args, fat_framework, fat_framework_binary)
95111

96112
return 0

0 commit comments

Comments
 (0)