-
Notifications
You must be signed in to change notification settings - Fork 310
Fix permissions when openrsync is used #2708
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
base: main
Are you sure you want to change the base?
Conversation
| "--delete", | ||
| "--checksum", | ||
| "--chmod=u+w", | ||
| "--perms", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Adding --perms since the man page says it is required when passing --chmod.
Does not have any observable effect at the moment.
2bf6805 to
9e19934
Compare
| minor = int(version_components[1]) | ||
| if major < 15: | ||
| return | ||
| if minor < 4: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| if minor < 4: | |
| if major == 15 and minor < 4: |
For Tahoe support
| minor = int(version_components[1]) | ||
| if major < 15: | ||
| return | ||
| if minor < 4: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| if minor < 4: | |
| if major == 15 and minor < 4: |
For Tahoe support
Fix file permissions when
openrsyncis used on macOS 14.5+.What was changed
Apply write permission using
find&chmodwhen running on macOS 14.5+. To mitigate any previousbazel runinvocations that already left the temporary directory without write permissions, an additional check and call to fix the permissions is added before callingrsync. This is needed whenrsyncneeds to delete or modify any existing files.Why was this changed
macOS 15.4.1 replaced the rsync implementation with openrsync. Apple seems to have added some additional flags like
--chmodto openrsync to match the functionality and interface of rsync. Unfortunately, not there are bugs like--chmodbeing not properly applied when syncing directories.How to test
bazelisk run //examples/ios/HelloWorld --define=apple.experimental.tree_artifact_outputs=1.simctlshould fail with a permission error. (If this steps succeeds, delete the temporary directory and uninstall HelloWorld from the iOS simulator).