Skip to content

Fix an rsync issue causing "Permission denied" errors #3176

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions xcodeproj/internal/bazel_integration_files/copy_dsyms.sh
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,9 @@ if [[ -n "${BAZEL_OUTPUTS_DSYM:-}" ]]; then
$(xargs -n1 <<< "$BAZEL_OUTPUTS_DSYM") \
"$TARGET_BUILD_DIR"

# Works around an rsync issue causing "Permission denied" errors
chmod +w "$TARGET_BUILD_DIR"
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we want to do this unconditionally or per OS version? Lacking some context about the previous PR adding --perms so wanted to confirm

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cc @luispadron @brentleyjones when you're available I'd appreciate if you could clarify please 🙇

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think we want a version check.


cd "${TARGET_BUILD_DIR}"

export -f patch_dsym
Expand Down
3 changes: 3 additions & 0 deletions xcodeproj/internal/bazel_integration_files/copy_outputs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,9 @@ if [[ "$ACTION" != indexbuild ]]; then
"$BAZEL_OUTPUTS_PRODUCT_BASENAME" \
"$TARGET_BUILD_DIR"

# Works around an rsync issue causing "Permission denied" errors
chmod +w "$TARGET_BUILD_DIR"

if [[ -n "${TEST_HOST:-}" ]]; then
# We need to re-sign test frameworks that Xcode placed into the test
# host un-signed
Expand Down
3 changes: 3 additions & 0 deletions xcodeproj/internal/templates/incremental_installer.sh
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,9 @@ rsync \
--delete \
"$src_xcschemes" "$dest_xcschemes/"

# Works around an rsync issue causing "Permission denied" errors
chmod +w "$dest_xcschemes/"

if [[ $(uname) == "Darwin" ]]; then
is_macos=1
else
Expand Down
3 changes: 3 additions & 0 deletions xcodeproj/internal/templates/legacy_installer.sh
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,9 @@ rsync \
--delete \
"$src/" "$dest/"

# Works around an rsync issue causing "Permission denied" errors
chmod +w "$dest/"

# Copy over the bazel integration files
mkdir -p "$dest/rules_xcodeproj/bazel"
rm -rf "$dest/rules_xcodeproj/bazel"/*
Expand Down
Loading