From d8ec1587d33cbcf13ad7464a04db1d2c40cb53ec Mon Sep 17 00:00:00 2001 From: Brandon Thomas Date: Mon, 5 Oct 2026 03:08:33 -0400 Subject: [PATCH] Flatpak job: install the SVG pixbuf loader for appstream compose Without librsvg2-common (absent on the x86_64 runner image) the host's appstreamcli compose fails with file-read-error on the scalable icon. Co-Authored-By: Claude Opus 5.5 --- .github/workflows/release.yml | 4 +++- packaging/linux/flatpak-bundle.sh | 7 ++++--- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 1e507029fd..08969062b1 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -226,7 +226,9 @@ jobs: - name: Install flatpak-builder run: | sudo apt-get update - sudo apt-get install -y --no-install-recommends flatpak flatpak-builder + # librsvg2-common: the SVG pixbuf loader. flatpak-builder runs the host's + # `appstreamcli compose`, which renders the scalable icon and fails without it. + sudo apt-get install -y --no-install-recommends flatpak flatpak-builder librsvg2-common # Ubuntu 24.04's AppArmor blocks the unprivileged user namespaces bubblewrap needs. sudo sysctl -w kernel.apparmor_restrict_unprivileged_userns=0 - name: Build the Flatpak bundle diff --git a/packaging/linux/flatpak-bundle.sh b/packaging/linux/flatpak-bundle.sh index e940840626..597866523a 100755 --- a/packaging/linux/flatpak-bundle.sh +++ b/packaging/linux/flatpak-bundle.sh @@ -7,7 +7,8 @@ # # TARBALL defaults to $DIST/photocraft--linux-.tar.gz from package.sh. The bundle # is built for the host architecture (x86_64 or aarch64), which must match the tarball's. -# Needs flatpak and flatpak-builder; the freedesktop runtime and SDK named in the manifest are +# Needs flatpak, flatpak-builder and the SVG pixbuf loader (librsvg2-common) for the host's +# `appstreamcli compose`; the freedesktop runtime and SDK named in the manifest are # installed per-user from Flathub. Unless --no-test, the bundle is then installed per-user and # `photocraft-cli --version` is run inside the sandbox as a smoke test. # Manifest: packaging/linux/flatpak/ai.storyteller.photocraft.bundle.yml. @@ -23,7 +24,7 @@ TARBALL="" while [ $# -gt 0 ]; do case "$1" in --no-test) TEST=0; shift ;; - -h | --help) sed -n '2,13p' "$0"; exit 0 ;; + -h | --help) sed -n '2,14p' "$0"; exit 0 ;; -*) echo "unknown argument: $1" >&2; exit 2 ;; *) TARBALL="$1"; shift ;; esac @@ -39,7 +40,7 @@ BASENAME="photocraft-$VERSION-linux-$ARCH" TARBALL="${TARBALL:-$DIST/$BASENAME.tar.gz}" [ -f "$TARBALL" ] || { echo "error: $TARBALL not found (run packaging/linux/package.sh --formats tar first)" >&2; exit 1; } for tool in flatpak flatpak-builder; do - command -v "$tool" >/dev/null || { echo "error: $tool not found (apt install flatpak flatpak-builder)" >&2; exit 1; } + command -v "$tool" >/dev/null || { echo "error: $tool not found (apt install flatpak flatpak-builder librsvg2-common)" >&2; exit 1; } done echo "==> PhotoCraft $VERSION Flatpak bundle for $ARCH from $(basename "$TARBALL")"