Repository navigation
Make website deploy.sh work on stock macOS (openrsync has no --chown) - #126
Merged
Merged
Conversation
macOS ships openrsync, which lacks GNU rsync's --chown, so the deploy died after the build step (issue #99). Probe the local rsync for --chown support: with GNU rsync the invocation is unchanged; with openrsync the flag is dropped and ownership is fixed server-side with sudo chown -R www-data:www-data before the nginx reload — the sequence verified manually on the 2026-07-09 deploy.
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates the website deployment script to work on stock macOS where the bundled rsync is openrsync (which lacks GNU rsync’s --chown), while keeping behavior unchanged on systems that have a compatible GNU rsync. It also adds written execution records (spec + plan) for the change.
Changes:
- Add an
rsync --helpcapability probe for--chownand conditionally include the flag. - For non-supporting rsync implementations (openrsync / older GNU), run a server-side
sudo chown -R www-data:www-dataafter sync and before nginx reload. - Add design and implementation-plan docs under
docs/superpowers/.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
| website/scripts/deploy.sh | Capability-probes local rsync for --chown and adds a server-side ownership-fix fallback. |
| docs/superpowers/specs/2026-07-10-issue-99-openrsync-chown-design.md | Documents the rationale and chosen approach for openrsync compatibility. |
| docs/superpowers/plans/2026-07-10-issue-99-openrsync-chown.md | Step-by-step implementation plan and verification steps for the change. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+55
to
+58
| if [[ -z "$CHOWN_FLAG" ]]; then | ||
| echo "→ Local rsync lacks --chown (openrsync); fixing ownership server-side..." | ||
| ssh -p "$SSH_PORT" "$SSH_TARGET" "sudo chown -R www-data:www-data $DOCROOT" | ||
| fi |
Comment on lines
+126
to
+128
| **Files:** | ||
| - Modify: `/Users/tonibergholm/Developer/github/git.agentic/.wolf/buglog.json` (bug-123 `fix` field — NOTE: main checkout path; `.wolf/` is untracked/gitignored, so this is not a worktree write and is not committed) | ||
|
|
Comment on lines
+136
to
+140
| python3 - <<'EOF' | ||
| import json | ||
| p = '/Users/tonibergholm/Developer/github/git.agentic/.wolf/buglog.json' | ||
| data = json.load(open(p)) | ||
| bugs = data if isinstance(data, list) else data.get('bugs', data) |
Comment on lines
+160
to
+162
| ```bash | ||
| printf '| %s | Implemented issue #99 fix: conditional --chown in deploy.sh | website/scripts/deploy.sh | committed on issue-99-openrsync-chown | ~2k |\n' "$(date +%H:%M)" >> /Users/tonibergholm/Developer/github/git.agentic/.wolf/memory.md | ||
| ``` |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #99.
Why
macOS ships openrsync, which rejects GNU rsync's
--chown, sowebsite/scripts/deploy.shdied right after the build step on any machine without Homebrew rsync (hit during the 2026-07-09 suite-site deploy; the manual recovery sequence is what this PR scripts).What
deploy.shnow capability-probes the local rsync (rsync --help | grep -- --chown):--chownpassed, no extra SSH command (acceptance criterion 3).sudo chown -R www-data:www-dataafter the sync, before the existing nginx test + reload — the exact sequence verified manually on the 2026-07-09 deploy. The fallback announces itself so the operator knows why an extra SSH command ran.The conditional flag is a scalar with
${CHOWN_FLAG:+"$CHOWN_FLAG"}rather than an array because macOS/bin/bash3.2 errors on empty-array expansion underset -u.Also adds the design spec and implementation plan under
docs/superpowers/as execution records.Verification
bash -nandshellcheckclean./usr/bin/rsync(openrsync) → fallback branch; the${CHOWN_FLAG:+…}expansion checked under actual bash 3.2 withset -u(empty → zero args, set → one arg).Not yet claimed: acceptance criteria 1–2 (real deploy to "✓ Deployed." with only openrsync on PATH; served files owned
www-data:www-data) require a production deploy — operator follow-up after merge.https://claude.ai/code/session_01V9TtRvFnDS4eGkcxZhnyf9