From c2ef01f6f1ab74f59b0ca27d6649f8a425a66d6f Mon Sep 17 00:00:00 2001 From: Jenn Magder Date: Mon, 20 May 2024 14:46:37 -0700 Subject: [PATCH] Update file permissions for FlutterMacOS.framework (#52930) During FlutterMacOS.framework engine universal fat framework creation, make sure the framework is `u=rwx,go=rx` when it's created. There's a framework-side workaround in-flight https://github.com/flutter/flutter/pull/148580. However, this is still a good thing to do engine-side, particularly for add-to-app when they don't go through the `flutter assemble` tooling. I'll also add a test around here, once this rolls https://github.com/flutter/flutter/blob/02a6c91e4d37d28f42c8f8e4d4335b0defed41c1/packages/flutter_tools/test/host_cross_arch.shard/macos_content_validation_test.dart#L30 Fixes https://github.com/flutter/flutter/issues/148354 [C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style --- sky/tools/create_macos_framework.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sky/tools/create_macos_framework.py b/sky/tools/create_macos_framework.py index 51020cd08f312..72da54ff15346 100755 --- a/sky/tools/create_macos_framework.py +++ b/sky/tools/create_macos_framework.py @@ -86,6 +86,8 @@ def main(): subprocess.check_call([ 'lipo', arm64_dylib, x64_dylib, '-create', '-output', fat_framework_binary ]) + # Make the framework readable and executable: u=rwx,go=rx. + subprocess.check_call(['chmod', '755', fat_framework_binary]) # Add group and other readability to all files. versions_path = os.path.join(fat_framework, 'Versions')