From 5a82d48167a4132ffee97f3f9b10ac3744c48394 Mon Sep 17 00:00:00 2001 From: MickLesk <47820557+MickLesk@users.noreply.github.com> Date: Thu, 3 Sep 2026 15:17:17 +0200 Subject: [PATCH 1/2] update helper: follow renamed ct/ scripts instead of curling a 404 A container keeps the slug it was built with. When the ct/ script is renamed the slug goes stale, and run_app_update curled a 404 into bash -c "", which did nothing and still exited 0 -- the update reported success and installed nothing. Reported for pbs, renamed to proxmox-backup-server in ProxmoxVE 0e5f663df. The Alpine merge on 2026-08-18 retired 29 more names the same way, so every container installed from an alpine-* script before that date is affected. Candidates are tried in order and only accepted when the target script really exists, so an unknown slug still fails loudly rather than running some other app's updater. A successful update regenerates /usr/bin/update, so a container is corrected once and stays corrected. Refs community-scripts/ProxmoxVE#16989 --- misc/update.sh | 32 ++++++++++++++++++++++++++++++-- 1 file changed, 30 insertions(+), 2 deletions(-) diff --git a/misc/update.sh b/misc/update.sh index 5bf37c1..53e55bf 100644 --- a/misc/update.sh +++ b/misc/update.sh @@ -49,9 +49,37 @@ json_str() { printf '%s' "$1" | sed -n "s/.*\"$2\"[[:space:]]*:[[:space:]]*\"\([^\"]*\)\".*/\1/p" | head -1 } -# Pull and run the app update script, exactly as the legacy entrypoint did. +script_exists() { + curl -fsSL --connect-timeout 5 --max-time 10 -o /dev/null "${BASE}/ct/${1}.sh" 2>/dev/null +} + +# ct/ scripts get renamed; a container keeps whatever slug it was built with. The +# Alpine merge alone retired 29 names on 2026-08-18. Try the successors, but only +# accept one that actually exists -- guessing wrong would run a foreign app's +# updater. A successful update regenerates /usr/bin/update, so this self-heals. +resolve_script_name() { + local n="$1" c + script_exists "$n" && { printf '%s' "$n"; return 0; } + for c in "${n#alpine-}" "$(printf '%s' "$n" | sed -E 's/-v[0-9]+$//')"; do + [[ -n "$c" && "$c" != "$n" ]] || continue + script_exists "$c" && { printf '%s' "$c"; return 0; } + done + case "$n" in + pbs) script_exists proxmox-backup-server && { printf '%s' proxmox-backup-server; return 0; } ;; + esac + return 1 +} + +# Pull and run the app update script. An unresolvable name used to curl a 404 into +# bash -c "", which did nothing and still exited 0. run_app_update() { - bash -c "$(curl -fsSL "${BASE}/ct/${NAME}.sh")" + local resolved + resolved="$(resolve_script_name "$NAME")" || { + msg_err "No update script found for '${NAME}' (${BASE}/ct/${NAME}.sh)" + return 1 + } + [[ "$resolved" != "$NAME" ]] && msg_info "Script was renamed: ${NAME} -> ${resolved}" + bash -c "$(curl -fsSL "${BASE}/ct/${resolved}.sh")" } # Offer to update addons installed on top of the app. Addons drop an From 9618ce782cb2b825ac39595b7813ccdb291c8b05 Mon Sep 17 00:00:00 2001 From: "CanbiZ (MickLesk)" <47820557+MickLesk@users.noreply.github.com> Date: Fri, 4 Sep 2026 09:05:04 +0200 Subject: [PATCH 2/2] Update misc/update.sh Co-authored-by: Sam Heinz --- misc/update.sh | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/misc/update.sh b/misc/update.sh index 53e55bf..48308a7 100644 --- a/misc/update.sh +++ b/misc/update.sh @@ -53,10 +53,9 @@ script_exists() { curl -fsSL --connect-timeout 5 --max-time 10 -o /dev/null "${BASE}/ct/${1}.sh" 2>/dev/null } -# ct/ scripts get renamed; a container keeps whatever slug it was built with. The -# Alpine merge alone retired 29 names on 2026-08-18. Try the successors, but only -# accept one that actually exists -- guessing wrong would run a foreign app's -# updater. A successful update regenerates /usr/bin/update, so this self-heals. +# ct/ scripts get renamed; a container keeps whatever slug it was built with. +# Try the successors, but only accept one that actually exists. +# A successful update regenerates /usr/bin/update, so this self-heals. resolve_script_name() { local n="$1" c script_exists "$n" && { printf '%s' "$n"; return 0; }