Repository navigation
fix(tool): make copied frameworks writable to fix macOS 15.4+ openrsync regression - #189658
Conversation
|
It looks like this pull request may not have tests. Please make sure to add tests or get an explicit test exemption before merging. If you are not sure if you need tests, consider this rule of thumb: the purpose of a test is to make sure someone doesn't accidentally revert the fix. Ask yourself, is there anything in your PR that you feel it is important we not accidentally revert back to how it was before your fix? Reviewers: Read the Tree Hygiene page and make sure this patch meets those guidelines before LGTMing. If you believe this PR qualifies for a test exemption, contact "@test-exemption-reviewer" in the #hackers channel in Discord (don't just cc them here, they won't see it!). The test exemption team is a small volunteer group, so all reviewers should feel empowered to ask for tests, without delegating that responsibility entirely to the test exemption group. |
|
Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). View this failed invocation of the CLA check for more information. For the most up to date status, view the checks section at the bottom of the pull request. |
There was a problem hiding this comment.
Code Review
This pull request adds steps to explicitly make copied frameworks and XCFrameworks writable by running chmod -R u+w on their paths. The feedback suggests wrapping these external process calls in try-catch blocks to prevent potential unhandled ProcessException crashes on non-POSIX host platforms or in restricted environments.
cbracken
left a comment
There was a problem hiding this comment.
Thinks for adding the exception handling susgested by the review bot.
The updated code lgtm modulo my one nit re printTrace vs throwing ToolExit.
As noted by the test checker bot, this will need tests before it can land.
|
This will need a second reviewer. Added @vashworth for a pass once the tests have been added. |
|
I have pushed the requested changes. The |
|
@GhagSagar23 Just checking to see if you saw my comment: #189658 (comment) |
Hello @vashworth, will be pushing the code by tomorrow EOD. |
Hi @vashworth, thanks for the suggestion. I’ve updated the implementation to use printXcodeWarning instead of failing with a ToolExit. Both a non-zero chmod exit and a |
|
Hi @cbracken, can you please review and merge this PR? |
Description
This PR fixes a regression of #147142 where read-only Flutter SDK builds fail on macOS 15.4+.
Root Cause Analysis
Starting in macOS 15.4+, Apple transitioned from GNU
rsyncto BSD-licensedopenrsync. A major behavioral difference is thatopenrsyncsilently ignores the--chmodflag during local directory synchronization.As a result, the
--chmodparameter passed torsyncduring framework copy operations is ignored, and framework binaries inherit the read-only permissions from the read-only SDK cache (e.g. Nix store or system-wide read-only path). Subsequentlipoand codesigning operations fail with aPermission deniederror.Solution
This PR adds an explicit
chmod -R u+wexecution on the copied framework/xcframework target path immediately afterrsynccopy completes to ensure writability, completely decoupling file writability fromrsync's specific parameters.Fixes #189645