fix(setup): make pods/ readable so the pod image actually rebuilds (#184)

The checkout is written by root under a restrictive umask, so pods/Containerfile
landed 0600 and the rootless podman build (as the service user) failed with
"open /opt/agentbbs/pods/Containerfile: permission denied". setup.sh hides build
output and keeps the old image on failure, so localhost/agentbbs-pod:latest on
bbs stayed 7 weeks old and #183 (c0mpute in pods) never reached members.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Anthony Ettinger 2026-11-30 03:28:43 -08:00 • committed by GitHub
parent e8ac55e27a
commit 2349492a53
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -441,6 +441,11 @@ sudo -u "$SVC_USER" XDG_RUNTIME_DIR="/run/user/$SVC_UID" \
# failure we keep the base image rather than break pod launches.
if [ -f "$SRC_DIR/pods/Containerfile" ]; then
log "building member pod image (localhost/agentbbs-pod:latest)"
# The checkout is written by root under umask 027/077, so pods/ lands 0600
# and the rootless build (as $SVC_USER) failed with "open .../Containerfile:
# permission denied", silently keeping a stale image. The build context holds
# no secrets: make it world-readable before building.
chmod -R a+rX "$SRC_DIR/pods"
if sudo -u "$SVC_USER" XDG_RUNTIME_DIR="/run/user/$SVC_UID" \
podman build -t localhost/agentbbs-pod:latest \
-f "$SRC_DIR/pods/Containerfile" "$SRC_DIR/pods" >/dev/null 2>&1; then