Keep Flutter.framework binaries writable so they can be code signed#39539
Keep Flutter.framework binaries writable so they can be code signed#39539jmagman merged 2 commits intoflutter:masterfrom
Conversation
|
This is a bit speculative. See #39507 (comment).
|
|
First add2app-macos test passed. Will keep rebasing to see if it's still flaky. |
Passed a second time. |
add2app-macos test failed, but got way past signing permissions to a flaky unit test? So not from this change (though still concerning). |
// Verify that there are two Flutter views with the expected marquee text. // Verify that there are two Flutter views with the expected marquee text. [[EarlGrey selectElementWithMatcher:grey_buttonTitle(@"Full Screen (Cold)")] [[EarlGrey selectElementWithMatcher:grey_buttonTitle(@"Full Screen (Cold)")] [[EarlGrey selectElementWithMatcher:grey_buttonTitle(@"Hybrid View (Warm)")] [[EarlGrey selectElementWithMatcher:grey_buttonTitle(@"Hybrid View (Warm)")] |
Passed (the step in question) a fourth time. Removing WIP. @cbracken Does any of this make sense to you? #39539 (comment) |
| mkdir "${derived_dir}/engine" | ||
| RunCommand cp -r -- "${flutter_podspec}" "${derived_dir}/engine" | ||
| RunCommand cp -r -- "${flutter_framework}" "${derived_dir}/engine" | ||
| RunCommand find "${derived_dir}/engine/Flutter.framework" -type f -exec chmod a-w "{}" \; |
There was a problem hiding this comment.
Maybe add a comment noting this is marking all non-binary files as read-only so that we can code-sign the binaries.
There was a problem hiding this comment.
I also wonder if there's any way to get the same list using only options to find rather than feeding it through grep -Il then into xargs.
Looking at the manpage, I don't see anything promising though.
There was a problem hiding this comment.
That was my first thought but I couldn't find any such flag.
|
Even though I can't prove this will fix the flaky add-to-app test, I'm going to merge it since I still think it's a good change. If we continue to see the flakes we can try to gather more info about the environments where this is reproducing. |
|
This broke devicelab, because now we can't delete the flutter repo anymore. |

Description
Flutter.framework files were made read-only to "Provide a strong hint to developers that editing Flutter framework headers isn't supported" (cb2b89c) However this is making the Flutter binary readonly, which is being copied into the final embedded Frameworks directories, then can't be codesigned.
Related Issues
Fixes #39507.
Tests
Turn back on add2app shard.
Checklist
///).flutter analyze --flutter-repo) does not report any problems on my PR.Breaking Change