drb-update: trust INSTALL_DIR so an updater on a user-owned checkout works #36

Merged
logan merged 1 commits from fix/updater-safe-directory into main 2026-10-25 21:09:39 -04:00
Owner

On radio-box every update failed immediately. Its checkout is /home/pi/node-26, owned by pi, while drb-update runs as root, so git refused the repo with fatal: detected dubious ownership. The updater then read origin as '' and refused with git origin '' != configured.

Fix: drb-update.sh now sets safe.directory=$INSTALL_DIR through GIT_CONFIG_* env variables. That counts as command-line config, which safe.directory respects. It applies only to the updater process, trusts only the configured path, and leaves /etc/gitconfig and root's global config alone.

Tested:

  • bash -n passes.
  • git config --show-scope reports command scope for the env-provided value.
  • test_host_updater.py is skipped on macOS (needs flock), so CI is the real run.

🤖 Generated with Claude Code

On `radio-box` every update failed immediately. Its checkout is `/home/pi/node-26`, owned by `pi`, while `drb-update` runs as root, so git refused the repo with `fatal: detected dubious ownership`. The updater then read origin as `''` and refused with `git origin '' != configured`. Fix: `drb-update.sh` now sets `safe.directory=$INSTALL_DIR` through `GIT_CONFIG_*` env variables. That counts as command-line config, which `safe.directory` respects. It applies only to the updater process, trusts only the configured path, and leaves `/etc/gitconfig` and root's global config alone. Tested: - `bash -n` passes. - `git config --show-scope` reports `command` scope for the env-provided value. - `test_host_updater.py` is skipped on macOS (needs flock), so CI is the real run. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
logan added 1 commit 2026-10-04 19:55:37 -04:00
drb-update: trust INSTALL_DIR for git so a user-owned checkout can update
CI / lint (pull_request) Successful in 9s
CI / lint (push) Successful in 10s
CI / test-op25 (pull_request) Successful in 18s
CI / test-op25 (push) Successful in 19s
CI / test (pull_request) Successful in 50s
CI / test (push) Successful in 50s
172f31d7c5
radio-box (INSTALL_DIR=/home/pi/node-26, owned by pi) failed every update:
root's git refused the repo as 'dubious ownership', so origin read as ''
and the origin check refused. Scope safe.directory to INSTALL_DIR via
GIT_CONFIG_* env (command-line scope) for the updater process only.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
logan merged commit 9377a94cba into main 2026-10-25 21:09:39 -04:00
Sign in to join this conversation.
No Reviewers
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: logan/node-26#36