From 58fd2105f91cc7d55fb4d44ff1ac4e34c05319f4 Mon Sep 17 00:00:00 2001 From: Niels Date: Tue, 14 Jul 2026 20:17:10 +0200 Subject: [PATCH] fix(appimage): place the generated .zsync next to the AppImage MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit appimagetool writes the companion .zsync into the current working directory (by AppImage basename), not next to an absolute output path, so the CI artifact glob (target/*.AppImage.zsync) missed it and the release shipped the AppImage with no .zsync — silently breaking self-update. Move it beside the AppImage after the build; hard-fail if it is unexpectedly absent. Co-Authored-By: Claude Opus 4.8 (1M context) Claude-Session: https://claude.ai/code/session_01CjZYH14th2uGJAMPRRpbsf --- packaging/linux/appimage/build-appimage.sh | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/packaging/linux/appimage/build-appimage.sh b/packaging/linux/appimage/build-appimage.sh index a6d48496..6a8efff5 100755 --- a/packaging/linux/appimage/build-appimage.sh +++ b/packaging/linux/appimage/build-appimage.sh @@ -84,10 +84,21 @@ OUT="$OUTPUT_DIR/PCPanel-${VERSION}-${ARCH}.AppImage" echo ">> Building AppImage with $APPIMAGETOOL" if [ -n "${UPDATE_INFO:-}" ]; then - # -u bakes the update-information into the AppImage and makes appimagetool emit "$OUT.zsync" - # alongside it (the control file the updater fetches). Both must be uploaded to the release. + # -u bakes the update-information into the AppImage and makes appimagetool emit the companion + # ".zsync" control file that the updater fetches. Both must be uploaded to the release. echo ">> Embedding update information: $UPDATE_INFO" "$APPIMAGETOOL" -u "$UPDATE_INFO" "$APPDIR" "$OUT" + # appimagetool writes the .zsync into the CURRENT directory (by AppImage basename), NOT next to an + # absolute $OUT — move it beside the AppImage so the artifact glob (target/*.AppImage.zsync) picks it + # up. Without this the release ships the AppImage but no .zsync, and self-update silently can't run. + zsync_basename="$(basename "$OUT").zsync" + if [ -f "$zsync_basename" ]; then + mv -f "$zsync_basename" "$OUT.zsync" + echo ">> Placed update control file at $OUT.zsync" + elif [ ! -f "$OUT.zsync" ]; then + echo ">> ERROR: appimagetool did not produce '$zsync_basename'; self-update would be broken" >&2 + exit 1 + fi else echo ">> No UPDATE_INFO set; building without self-update information" "$APPIMAGETOOL" "$APPDIR" "$OUT"