diff options
| author | Dave Hibberd <hibby@debian.org> | 2026-07-13 23:25:59 +0100 |
|---|---|---|
| committer | Dave Hibberd <hibby@debian.org> | 2026-07-13 23:25:59 +0100 |
| commit | a81346ed4d598d872474a4b5c9ced5518d6053aa (patch) | |
| tree | e4a78b1a44dbe83ca593548a22e9ec57147d6e3d | |
| parent | 4dfeca51f9dcad91edd255198272e4aa640f4e47 (diff) | |
Try to fix this build error under cron
| -rwxr-xr-x | build-arm64.sh | 12 |
1 files changed, 1 insertions, 11 deletions
diff --git a/build-arm64.sh b/build-arm64.sh index 43c3bfc..4fb8ea2 100755 --- a/build-arm64.sh +++ b/build-arm64.sh @@ -49,23 +49,13 @@ else # ---- RUN YOUR PI-GEN BUILD HERE ---- # Adjust this to your actual invocation - # Prime sudo and keep the credential cache alive for the whole run. The - # pi-gen build runs for far longer than sudo's default timeout, so without - # this the later chown would silently block on a password prompt that has - # been redirected into the logfile. - log_step "arm64: priming sudo credentials" - sudo -v - ( while true; do sudo -n true; sleep 60; kill -0 "$$" 2>/dev/null || exit; done ) & - SUDO_KEEPALIVE_PID=$! - trap 'kill "$SUDO_KEEPALIVE_PID" 2>/dev/null || true' EXIT - log_step "arm64: running pi-gen build" pushd "$PI_GEN_DIR" >/dev/null sudo CLEAN=1 ./build.sh >> "$LOGFILE" 2>&1 popd >/dev/null log_step "arm64: fixing deploy ownership" - sudo chown -R "$USER:$USER" "$BUILD_DIR" >> "$LOGFILE" 2>&1 + sudo chown -R "$(id -un):$(id -gn)" "$BUILD_DIR" >> "$LOGFILE" 2>&1 # Find newest image log_step "arm64: finding newest pi-gen image" |
