Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[CP-stable]Update file permissions for FlutterMacOS.framework #52960

Conversation

flutteractionsbot
Copy link

@flutteractionsbot flutteractionsbot commented May 21, 2024

Issue Link:

Engine part of flutter/flutter#148354

Cherry-pick of #52930

Changelog Description:

Fix file permissions so macOS apps are not rejected from the App Store with the error "The installer package includes files that are only readable by the root user".

Impact Description:

macOS apps may be rejected from the App Store with the error "The installer package includes files that are only readable by the root user".

Workaround:

Locally, from the Flutter SDK directory, run:

chmod 755 bin/cache/artifacts/engine/darwin-x64-release/FlutterMacOS.xcframework/macos-arm64_x86_64/FlutterMacOS.framework

If using Codemagic to deploy, add this to the pre-build script:

chmod 755 $FLUTTER_ROOT/bin/cache/artifacts/engine/darwin-x64-release/FlutterMacOS.xcframework/macos-arm64_x86_64/FlutterMacOS.framework

Risk:

What is the risk level of this cherry-pick?

  • Low
  • Medium
  • High

Test Coverage:

Are you confident that your fix is well-tested by automated tests?

  • Yes
  • No

This was manually tested. I will be adding a framework integration to prevent future regressions.

Validation Steps:

Before this change, permission is drwx------

$ ls -la bin/cache/artifacts/engine/darwin-x64-release/FlutterMacOS.xcframework/macos-arm64_x86_64/FlutterMacOS.framework
...
drwx------

After, permission is


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 flutter/flutter#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 flutter/flutter#148354

[C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
@flutteractionsbot flutteractionsbot added the cp: review add the cp request to the review queue of release engineers label May 21, 2024
@flutteractionsbot
Copy link
Author

@jmagman please fill out the PR description above, afterwards the release team will review this request.

@jmagman
Copy link
Member

jmagman commented May 21, 2024

Closing, #52930 didn't actually work. I will revert and continue to investigate.

@jmagman jmagman closed this May 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cp: review add the cp request to the review queue of release engineers
Projects
None yet
2 participants