From dff60d8f550a03e0445b96b9c122d9aaf0949c3c 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 (flutter/engine#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 --- engine/src/flutter/sky/tools/create_macos_framework.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/engine/src/flutter/sky/tools/create_macos_framework.py b/engine/src/flutter/sky/tools/create_macos_framework.py index 51020cd08f..72da54ff15 100755 --- a/engine/src/flutter/sky/tools/create_macos_framework.py +++ b/engine/src/flutter/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')