From 499d205afc82840500172b7562f4d214d020bc87 Mon Sep 17 00:00:00 2001 From: SRHTNIN Date: Tue, 13 Oct 2026 09:13:50 +0200 Subject: [PATCH] Build AppImages for older glibc Co-Authored-By: Claude Opus 5.5 --- Packaging/BuildAppImage.sh | 26 +++++++++++++++++--------- 1 file changed, 17 insertions(+), 9 deletions(-) diff --git a/Packaging/BuildAppImage.sh b/Packaging/BuildAppImage.sh index 53bc75b..1765ab5 100755 --- a/Packaging/BuildAppImage.sh +++ b/Packaging/BuildAppImage.sh @@ -1,19 +1,27 @@ #!/bin/bash # Builds dist/SaraTune-x86_64.AppImage: a PyInstaller one-file build (with # the font and icon bundled) wrapped by appimagetool, the same way SaraSuite's -# and SaraFem's AppImages are made. Needs appimagetool on PATH. +# and SaraFem's AppImages are made. Needs podman and +# appimagetool on PATH. set -euo pipefail cd "$(dirname "$(readlink -f "$0")")/.." -[ -d .venv ] || python3 -m venv .venv -.venv/bin/pip install --quiet --disable-pip-version-check -r requirements.txt pyinstaller - +# PyInstaller runs in a manylinux_2_28 container (glibc 2.28) with uv's +# portable Python, not with Fedora's: PyInstaller bundles libpython, and +# Fedora's needs a newer glibc than many distros have ("GLIBC_ABI_GNU2_TLS +# not found"). The Python, venv and downloads are cached in build/Container. # --collect-data flet: without it ft.Icons crashes when frozen. -.venv/bin/pyinstaller --noconfirm --clean --log-level WARN \ - --onefile --windowed --name SaraTune --collect-data flet \ - --add-data "$PWD/assets:assets" \ - --distpath build/PyInstaller/dist --workpath build/PyInstaller/work --specpath build/PyInstaller \ - "$PWD/Main.py" +mkdir -p build/Container +podman run --rm --security-opt label=disable -v "$PWD:/src" -w /src \ + -e UV_CACHE_DIR=/src/build/Container/cache -e UV_PYTHON_INSTALL_DIR=/src/build/Container/python \ + quay.io/pypa/manylinux_2_28_x86_64 bash -euo pipefail -c ' + uv venv --quiet --allow-existing --managed-python --python 3.14 build/Container/venv + uv pip install --quiet --python build/Container/venv -r requirements.txt pyinstaller + build/Container/venv/bin/pyinstaller --noconfirm --clean --log-level WARN \ + --onefile --windowed --name SaraTune --collect-data flet \ + --add-data "$PWD/assets:assets" \ + --distpath build/PyInstaller/dist --workpath build/PyInstaller/work --specpath build/PyInstaller \ + "$PWD/Main.py"' AppDir=build/AppDir rm -rf "$AppDir"