From cbb791590761fb927327f4aa7e67a61da46f42a4 Mon Sep 17 00:00:00 2001 From: Paul Schneider Date: Mon, 17 Aug 2026 17:13:39 +0100 Subject: [PATCH] release.yml: fail-fast on arm64 shlib install + sanity check When the apt-get install of arm64 shlibs fails silently (e.g. because the configured apt sources don't include arm64 for some packages), the next build step still tries to cross-build for arm64 and dpkg-shlibdeps aborts. The Makefile's mv pattern then matches the previous amd64 .deb (same filename prefix), exits 0, and the missing arm64 .deb is only discovered later in the 'Localiser les .deb' step. This adds: - explicit set -e so any failure aborts the step cleanly - `dpkg --add-architecture arm64` with fail-fast on error - pre-flight apt-cache show check for each arm64 package - explicit fail-fast on apt-get install failure - dpkg -l sanity check to confirm the libs are installed If the arm64 packages really are not available from the configured apt sources, the workflow will now fail with a clear message instead of producing a half-broken release. --- .forgejo/workflows/release.yml | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/.forgejo/workflows/release.yml b/.forgejo/workflows/release.yml index d615125..ea64d47 100644 --- a/.forgejo/workflows/release.yml +++ b/.forgejo/workflows/release.yml @@ -83,12 +83,27 @@ jobs: # host. We add arm64 as a foreign architecture and pull # them in. --no-install-recommends keeps the install # surface minimal. - dpkg --add-architecture arm64 + set -e + dpkg --add-architecture arm64 || { echo "::error::dpkg --add-architecture arm64 failed"; exit 1; } apt-get update + # Verify each arm64 package is actually installable. Bail + # early with a clear message if any are missing from the + # configured apt sources — silent apt-get install + # failures are the worst kind of workflow bug. + for pkg in libc6:arm64 libstdc++6:arm64 \ + libfontconfig1:arm64 libfreetype6:arm64 \ + libgtk-3-0:arm64; do + if ! apt-cache show "$pkg" >/dev/null 2>&1; then + echo "::error::arm64 package '$pkg' is not available in apt sources" + exit 1 + fi + done apt-get install -y --no-install-recommends \ libc6:arm64 libstdc++6:arm64 \ libfontconfig1:arm64 libfreetype6:arm64 \ - libgtk-3-0:arm64 + libgtk-3-0:arm64 || { echo "::error::Failed to install arm64 shlibs"; exit 1; } + # Sanity-check: the libs must be visible to dpkg-shlibdeps. + dpkg -l libc6:arm64 libstdc++6:arm64 | tail -3 rm -rf /var/lib/apt/lists/* : > "$STATE_FILE"