From a07389f4d8a82d4caeaf155ac250d7fcab253506 Mon Sep 17 00:00:00 2001 From: Christian Date: Sat, 7 Sep 2024 13:23:21 +0200 Subject: [PATCH 1/5] feat(appimage): increase compatibility, add tests --- .github/workflows/appimage.yml | 110 ++++++++++++++--- AppImageBuilder.debian-bullseye.yml | 180 ++++++++++++++++++++++++++++ AppImageBuilder.debian.yml | 166 +++++++++++++++++++++++++ AppImageBuilder.test.Dockerfile | 48 ++++++++ AppImageBuilder.ubuntu-focal.yml | 180 ++++++++++++++++++++++++++++ AppImageBuilder.yml | 90 +++++++++----- Dockerfile | 67 ++++++----- 7 files changed, 769 insertions(+), 72 deletions(-) create mode 100644 AppImageBuilder.debian-bullseye.yml create mode 100644 AppImageBuilder.debian.yml create mode 100644 AppImageBuilder.test.Dockerfile create mode 100644 AppImageBuilder.ubuntu-focal.yml diff --git a/.github/workflows/appimage.yml b/.github/workflows/appimage.yml index e0c9b58b..86ba8e4b 100644 --- a/.github/workflows/appimage.yml +++ b/.github/workflows/appimage.yml @@ -5,25 +5,45 @@ on: types: [published] workflow_dispatch: -env: - BASE_OS: ubuntu - APT_PUBKEY: 871920D1991BC93C - jobs: build: runs-on: ubuntu-latest strategy: - fail-fast: true matrix: target: - platform: linux/amd64 arch: amd64 - platform: linux/arm64 arch: arm64 - codename: - - jammy - - noble + base: + - os: ubuntu + codename: focal + pubkey: 871920D1991BC93C + recipe: AppImageBuilder.ubuntu-focal.yml + - os: ubuntu + codename: jammy + pubkey: 871920D1991BC93C + recipe: AppImageBuilder.yml + - os: ubuntu + codename: noble + pubkey: 871920D1991BC93C + recipe: AppImageBuilder.yml + - os: debian + codename: bullseye + pubkey: 0E98404D386FA1D9 + pubkey_security: 54404762BBB6E853 + recipe: AppImageBuilder.debian-bullseye.yml + - os: debian + codename: bookworm + pubkey: 0E98404D386FA1D9 + pubkey_security: 54404762BBB6E853 + recipe: AppImageBuilder.debian.yml + - os: debian + codename: trixie + pubkey: 0E98404D386FA1D9 + pubkey_security: 54404762BBB6E853 + recipe: AppImageBuilder.debian.yml steps: - uses: actions/checkout@v4 @@ -42,8 +62,8 @@ jobs: platforms: ${{ matrix.target.platform }} outputs: build build-args: | - BASE_OS - BASE_CODENAME=${{ matrix.codename }} + BASE_OS=${{ matrix.base.os }} + BASE_CODENAME=${{ matrix.base.codename }} - name: Prepare environment to build AppImage env: @@ -56,31 +76,93 @@ jobs: rm build/.build-metadata.env fi APPIMAGE_SOURCE=build - APPIMAGE_VERSION="${GITHUB_REF_SLUG}-${{ matrix.codename }}" + APPIMAGE_VERSION="${GITHUB_REF_SLUG}-${{ matrix.base.codename }}" APPIMAGE_APT_ARCH="${TARGETARCH}" - APPIMAGE_APT_DISTRO="${{ matrix.codename }}" - APPIMAGE_APT_PUBKEY="${APT_PUBKEY}" + APPIMAGE_APT_DISTRO="${{ matrix.base.codename }}" + APPIMAGE_APT_PUBKEY="${{ matrix.base.pubkey }}" + APPIMAGE_APT_PUBKEY_SECURITY="${{ matrix.base.pubkey_security }}" APPIMAGE_ARCH="${TARGETMACHINE}" printenv | grep ^APPIMAGE_ >>"${GITHUB_ENV}" - name: Build AppImage uses: AppImageCrafters/build-appimage@v1.3 + with: + recipe: "${{ matrix.base.recipe }}" - name: Upload artifacts uses: actions/upload-artifact@v4 with: - name: appimage-${{ matrix.codename }}-${{ matrix.target.arch }} + name: appimage-${{ matrix.base.codename }}-${{ matrix.target.arch }} path: | ./*.AppImage ./*.AppImage.zsync if-no-files-found: error + test: + runs-on: ubuntu-latest + needs: + - build + strategy: + fail-fast: false + matrix: + target: + - platform: linux/amd64 + arch: amd64 + base: + - os: ubuntu + codename: focal + - os: ubuntu + codename: jammy + - os: ubuntu + codename: noble + - os: debian + codename: bullseye + - os: debian + codename: bookworm + - os: debian + codename: trixie + - os: fedora + codename: "39" + - os: fedora + codename: "40" + - os: archlinux + codename: base + + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Download artifacts + uses: actions/download-artifact@v4 + with: + pattern: appimage-*-${{ matrix.target.arch }} + path: appimages + merge-multiple: true + + - name: Setup qemu for docker + uses: docker/setup-qemu-action@v3 + if: matrix.target.platform != 'linux/amd64' + + - name: Setup buildx for docker + uses: docker/setup-buildx-action@v3 + + - name: Test AppImages + uses: docker/build-push-action@v5 + with: + file: AppImageBuilder.test.Dockerfile + context: appimages + platforms: ${{ matrix.target.platform }} + build-args: | + BASE_OS=${{ matrix.base.os }} + BASE_CODENAME=${{ matrix.base.codename }} + release: if: startsWith(github.ref, 'refs/tags/') runs-on: ubuntu-latest needs: - build + - test permissions: contents: write diff --git a/AppImageBuilder.debian-bullseye.yml b/AppImageBuilder.debian-bullseye.yml new file mode 100644 index 00000000..d45f70fa --- /dev/null +++ b/AppImageBuilder.debian-bullseye.yml @@ -0,0 +1,180 @@ +version: 1 + +script: +- | + set -eu + + if [ "{{APPIMAGE_SOURCE}}" != "${TARGET_APPDIR}" ]; then + mv "{{APPIMAGE_SOURCE}}" "${TARGET_APPDIR}" + fi + + # Manual installation of squashfs-tools is required + # until https://github.com/AppImageCrafters/build-appimage/issues/5 is fixed + if ! command -v mksquashfs >/dev/null; then + apt-get update && apt-get install -y --no-install-recommends squashfs-tools + fi + +AppDir: + app_info: + id: org.c0rn3j.sc-controller + name: sc-controller + version: "{{APPIMAGE_VERSION}}" + icon: sc-controller + exec: usr/bin/python3 + exec_args: -c "import os, sys; os.execvp('$APPDIR/usr/bin/scc', ['$APPDIR/usr/bin/scc'] + (sys.argv[1:] if len(sys.argv) > 1 else ['gui']))" $@ + + after_bundle: | + set -eu + + # appimage-builder expects .desktop file to start with appinfo-id + desktop="$(find "${TARGET_APPDIR}/usr" -name sc-controller.desktop)" + sed -i "s:Exec=.*:Exec=./usr/bin/scc gui:g" "${desktop}" + ln -sr "${desktop}" "${TARGET_APPDIR}/usr/share/applications/org.c0rn3j.sc-controller.desktop" + + # appimage-builder expects utf-8 encoding when patching shebangs, + # but pygettext3 has iso-8859-1 encoding + find "${TARGET_APPDIR}/usr/bin" -name 'pygettext*' | while read -r file; do + encoding="ISO-8859-1" + if file -bi "${file}" | grep -iq "${encoding}"; then + <"${file}" iconv -f "${encoding}" -t utf-8 -o "${file}" + sed -i -E '1,2 s|^(\s*#.*coding[=:]\s*)([[:alnum:].-]+)|\1utf-8|g' "${file}" + fi + done + + # install python3-vdf manually if not available as package + if ! apt-cache search --names-only python3-vdf | grep -q .; then + pip install --target "${TARGET_APPDIR}/usr/lib/python3/dist-packages/" vdf + fi + + after_runtime: | + set -eu + + # python3 is linked against 'lib64/ld-linux-x86-64.so.2' + # but 'compat/lib64' is missing for Ubuntu Noble + compat="${TARGET_APPDIR}/runtime/compat" + if [ ! -e "${compat}/lib64" ] && [ -d "${compat}/usr/lib64" ]; then + ln -s "usr/lib64" "${compat}/" + fi + + apt: + arch: + - "{{APPIMAGE_APT_ARCH}}" + sources: + - sourceline: deb http://deb.debian.org/debian {{APPIMAGE_APT_DISTRO}} main + key_url: http://keyserver.ubuntu.com/pks/lookup?op=get&search=0x{{APPIMAGE_APT_PUBKEY}} + - sourceline: deb http://deb.debian.org/debian {{APPIMAGE_APT_DISTRO}}-updates main + - sourceline: deb http://deb.debian.org/debian-security/ {{APPIMAGE_APT_DISTRO}}-security main + key_url: http://keyserver.ubuntu.com/pks/lookup?op=get&search=0x{{APPIMAGE_APT_PUBKEY_SECURITY}} + + include: + - gir1.2-gtk-3.0 + - gir1.2-rsvg-2.0 + - libbluetooth3 + - libgtk-3-0 + - librsvg2-common + - libx11-6 + - libxcb1 + - libxext6 + - libxfixes3 + - python3-evdev + - python3-gi-cairo + - python3-pylibacl + - binutils # required for detection of bluetooth library + - coreutils # provides /usr/bin/env + - shared-mime-info # required for gui if host provides no MIME info, e.g. when XDG_DATA_DIRS is missing + + exclude: + # coreutils + - libacl* # filesystem + - libattr* # filesystem + - libgmp* # arithmetics + + # gir1.2-rsvg-2.0 + - libicu* # i18n + - libstdc* # development + - libxml* # codec + + # libgtk3-0 + - "*-icon-theme" # gui + - "*crypt*" # security + - "*dconf*" # gui configuration + - "*dbus*" # process communication + - "*gcc*" # development + - "*systemd*" # linux core + - libblk* # filesystem + - libcolord* # gui + - libcups* # printing + - libepoxy* # gui + - libfontconfig* # fonts + - libfreetype* # fonts + - libfribidi* # i18n + - libgtk-3-common # gui + - liblz* # codec + - libmount* # filesystem + - libtiff* # codec + - libwebp* # codec + + # python3 + - "*krb*" # security + - "*readline*" # terminal + - "*sqlite*" # database + - libbz* # codec + - libdb* # database + - libmpdec* # arithmetics + - libncurses* # terminal + - libnsl* # network + - libssl* # security + - libtirpc* # development + - libuuid* # development + - media-types # codec + + # Debian Trixie + - libgprofng* # development + - libjansson* # codec + - libsframe* # development + - libcloudproviders* # networking + - netbase # network + - tzdata # date/time + + # Debian Bullseye + - glib-networking* # network + - gsettings* # gui configuration + - libidn2* # codec + - libjson* # codec + - libpsl* # networking + - librest-* # networking + - libsoup* # networking + - libunistring* # unicode + + files: + exclude: + - usr/bin/*gold* # alternative for ld + - usr/bin/*gp-display-html* # requires perl + - usr/lib/*/gconv # unicode + - usr/lib/*/gdk-pixbuf-2.0/*/loaders/libpixbufloader-??[!g].so # only png & svg are required + - usr/lib/*/glib-2.0 + - usr/lib/python*/cgi.py + - usr/lib/python*/email + - usr/lib/python*/test + - usr/lib/python*/unittest + - usr/share/doc + - usr/share/glib-2.0 + - usr/share/gtk-doc + - usr/share/icu + - usr/share/locale + - usr/share/man + - usr/share/python3/runtime.d + - usr/share/thumbnailers + + runtime: + env: + # `usr/lib/python3.*/site-packages` is required in $PYTHONPATH, + # but the python version and hence the actual location is unknown here. + # Fortunately the site-packages directory is on the $PATH, so we add $PATH instead. + # It must precede an existing $PYTHONPATH to work. + PYTHONPATH: "${APPDIR}/usr/lib/python3/dist-packages:${PATH}:${PYTHONPATH}" + SCC_SHARED: "${APPDIR}/usr/share/scc" + +AppImage: + arch: "{{APPIMAGE_ARCH}}" + update-information: "gh-releases-zsync|C0rn3j|sc-controller|latest|sc-controller-*-{{APPIMAGE_APT_DISTRO}}-{{APPIMAGE_ARCH}}.AppImage.zsync" diff --git a/AppImageBuilder.debian.yml b/AppImageBuilder.debian.yml new file mode 100644 index 00000000..6bf7fed4 --- /dev/null +++ b/AppImageBuilder.debian.yml @@ -0,0 +1,166 @@ +version: 1 + +script: +- | + set -eu + + if [ "{{APPIMAGE_SOURCE}}" != "${TARGET_APPDIR}" ]; then + mv "{{APPIMAGE_SOURCE}}" "${TARGET_APPDIR}" + fi + + # Manual installation of squashfs-tools is required + # until https://github.com/AppImageCrafters/build-appimage/issues/5 is fixed + if ! command -v mksquashfs >/dev/null; then + apt-get update && apt-get install -y --no-install-recommends squashfs-tools + fi + +AppDir: + app_info: + id: org.c0rn3j.sc-controller + name: sc-controller + version: "{{APPIMAGE_VERSION}}" + icon: sc-controller + exec: usr/bin/python3 + exec_args: -c "import os, sys; os.execvp('$APPDIR/usr/bin/scc', ['$APPDIR/usr/bin/scc'] + (sys.argv[1:] if len(sys.argv) > 1 else ['gui']))" $@ + + after_bundle: | + set -eu + + # appimage-builder expects .desktop file to start with appinfo-id + desktop="$(find "${TARGET_APPDIR}/usr" -name sc-controller.desktop)" + sed -i "s:Exec=.*:Exec=./usr/bin/scc gui:g" "${desktop}" + ln -sr "${desktop}" "${TARGET_APPDIR}/usr/share/applications/org.c0rn3j.sc-controller.desktop" + + # appimage-builder expects utf-8 encoding when patching shebangs, + # but pygettext3 has iso-8859-1 encoding + find "${TARGET_APPDIR}/usr/bin" -name 'pygettext*' | while read -r file; do + encoding="ISO-8859-1" + if file -bi "${file}" | grep -iq "${encoding}"; then + <"${file}" iconv -f "${encoding}" -t utf-8 -o "${file}" + sed -i -E '1,2 s|^(\s*#.*coding[=:]\s*)([[:alnum:].-]+)|\1utf-8|g' "${file}" + fi + done + + after_runtime: | + set -eu + + # python3 is linked against 'lib64/ld-linux-x86-64.so.2' + # but 'compat/lib64' is missing for Ubuntu Noble + compat="${TARGET_APPDIR}/runtime/compat" + if [ ! -e "${compat}/lib64" ] && [ -d "${compat}/usr/lib64" ]; then + ln -s "usr/lib64" "${compat}/" + fi + + apt: + arch: + - "{{APPIMAGE_APT_ARCH}}" + sources: + - sourceline: deb http://deb.debian.org/debian {{APPIMAGE_APT_DISTRO}} main + key_url: http://keyserver.ubuntu.com/pks/lookup?op=get&search=0x{{APPIMAGE_APT_PUBKEY}} + - sourceline: deb http://deb.debian.org/debian {{APPIMAGE_APT_DISTRO}}-updates main + - sourceline: deb http://deb.debian.org/debian-security/ {{APPIMAGE_APT_DISTRO}}-security main + key_url: http://keyserver.ubuntu.com/pks/lookup?op=get&search=0x{{APPIMAGE_APT_PUBKEY_SECURITY}} + + include: + - gir1.2-gtk-3.0 + - gir1.2-rsvg-2.0 + - libbluetooth3 + - libgtk-3-0 + - librsvg2-common + - libx11-6 + - libxcb1 + - libxext6 + - libxfixes3 + - python3-evdev + - python3-gi-cairo + - python3-pylibacl + - python3-vdf + - binutils # required for detection of bluetooth library + - coreutils # provides /usr/bin/env + - shared-mime-info # required for gui if host provides no MIME info, e.g. when XDG_DATA_DIRS is missing + + exclude: + # coreutils + - libacl* # filesystem + - libattr* # filesystem + - libgmp* # arithmetics + + # gir1.2-rsvg-2.0 + - libicu* # i18n + - libstdc* # development + - libxml* # codec + + # libgtk3-0 + - "*-icon-theme" # gui + - "*crypt*" # security + - "*dconf*" # gui configuration + - "*dbus*" # process communication + - "*gcc*" # development + - "*systemd*" # linux core + - libblk* # filesystem + - libcolord* # gui + - libcups* # printing + - libepoxy* # gui + - libfontconfig* # fonts + - libfreetype* # fonts + - libfribidi* # i18n + - libgtk-3-common # gui + - liblz* # codec + - libmount* # filesystem + - libtiff* # codec + - libwebp* # codec + + # python3 + - "*krb*" # security + - "*readline*" # terminal + - "*sqlite*" # database + - libbz* # codec + - libdb* # database + - libmpdec* # arithmetics + - libncurses* # terminal + - libnsl* # network + - libssl* # security + - libtirpc* # development + - libuuid* # development + - media-types # codec + + # Debian Trixie + - libgprofng* # development + - libjansson* # codec + - libsframe* # development + - libcloudproviders* # networking + - netbase # network + - tzdata # date/time + + files: + exclude: + - usr/bin/*gold* # alternative for ld + - usr/bin/*gp-display-html* # requires perl + - usr/lib/*/gconv # unicode + - usr/lib/*/gdk-pixbuf-2.0/*/loaders/libpixbufloader-??[!g].so # only png & svg are required + - usr/lib/*/glib-2.0 + - usr/lib/python*/cgi.py + - usr/lib/python*/email + - usr/lib/python*/test + - usr/lib/python*/unittest + - usr/share/doc + - usr/share/glib-2.0 + - usr/share/gtk-doc + - usr/share/icu + - usr/share/locale + - usr/share/man + - usr/share/python3/runtime.d + - usr/share/thumbnailers + + runtime: + env: + # `usr/lib/python3.*/site-packages` is required in $PYTHONPATH, + # but the python version and hence the actual location is unknown here. + # Fortunately the site-packages directory is on the $PATH, so we add $PATH instead. + # It must precede an existing $PYTHONPATH to work. + PYTHONPATH: "${APPDIR}/usr/lib/python3/dist-packages:${PATH}:${PYTHONPATH}" + SCC_SHARED: "${APPDIR}/usr/share/scc" + +AppImage: + arch: "{{APPIMAGE_ARCH}}" + update-information: "gh-releases-zsync|C0rn3j|sc-controller|latest|sc-controller-*-{{APPIMAGE_APT_DISTRO}}-{{APPIMAGE_ARCH}}.AppImage.zsync" diff --git a/AppImageBuilder.test.Dockerfile b/AppImageBuilder.test.Dockerfile new file mode 100644 index 00000000..b4dbb424 --- /dev/null +++ b/AppImageBuilder.test.Dockerfile @@ -0,0 +1,48 @@ +# syntax=docker/dockerfile:1 +ARG BASE_OS=ubuntu +ARG BASE_CODENAME=noble +FROM $BASE_OS:$BASE_CODENAME +WORKDIR /tmp +COPY *.AppImage /opt/ +RUN <&2 "${@}" + } + + cancel() { + log "${@}" + return 1 + } + + handle_failure() { + return_code="${1}" + file="${2}" + if [ "${return_code}" = 139 ] && echo "${file}" | grep -q -P -- '-(noble|trixie|bookworm)-'; then + log "Ignoring failure ${return_code} for ${file}" \ + "which is currently known to cause a segmentation fault" + else + return "${return_code}" + fi + } + + main() { + files="$(find /opt/ -maxdepth 1 -type f -name '*.AppImage')" + if [ -z "${files}" ]; then + cancel "Error: No AppImage file found." + fi + echo "${files}" | while read -r file; do + log "${file}" + chmod +x "${file}" + rm -rf squashfs-root/ + "${file}" --appimage-extract >/dev/null + ( + cd squashfs-root/runtime/compat + ../../AppRun dependency-check || handle_failure "$?" "${file}" + ) + rm -f "${file}" + done + } + main "${@}" +EOR diff --git a/AppImageBuilder.ubuntu-focal.yml b/AppImageBuilder.ubuntu-focal.yml new file mode 100644 index 00000000..04dc6509 --- /dev/null +++ b/AppImageBuilder.ubuntu-focal.yml @@ -0,0 +1,180 @@ +version: 1 + +script: +- | + set -eu + + if [ "{{APPIMAGE_SOURCE}}" != "${TARGET_APPDIR}" ]; then + mv "{{APPIMAGE_SOURCE}}" "${TARGET_APPDIR}" + fi + + # Manual installation of squashfs-tools is required + # until https://github.com/AppImageCrafters/build-appimage/issues/5 is fixed + if ! command -v mksquashfs >/dev/null; then + apt-get update && apt-get install -y --no-install-recommends squashfs-tools + fi + +AppDir: + app_info: + id: org.c0rn3j.sc-controller + name: sc-controller + version: "{{APPIMAGE_VERSION}}" + icon: sc-controller + exec: usr/bin/python3 + exec_args: -c "import os, sys; os.execvp('$APPDIR/usr/bin/scc', ['$APPDIR/usr/bin/scc'] + (sys.argv[1:] if len(sys.argv) > 1 else ['gui']))" $@ + + after_bundle: | + set -eu + + # appimage-builder expects .desktop file to start with appinfo-id + desktop="$(find "${TARGET_APPDIR}/usr" -name sc-controller.desktop)" + sed -i "s:Exec=.*:Exec=./usr/bin/scc gui:g" "${desktop}" + ln -sr "${desktop}" "${TARGET_APPDIR}/usr/share/applications/org.c0rn3j.sc-controller.desktop" + + # appimage-builder expects utf-8 encoding when patching shebangs, + # but pygettext3 has iso-8859-1 encoding + find "${TARGET_APPDIR}/usr/bin" -name 'pygettext*' | while read -r file; do + encoding="ISO-8859-1" + if file -bi "${file}" | grep -iq "${encoding}"; then + <"${file}" iconv -f "${encoding}" -t utf-8 -o "${file}" + sed -i -E '1,2 s|^(\s*#.*coding[=:]\s*)([[:alnum:].-]+)|\1utf-8|g' "${file}" + fi + done + + # install python3-vdf manually if not available as package + if ! apt-cache search --names-only python3-vdf | grep -q .; then + pip install --target "${TARGET_APPDIR}/usr/lib/python3/dist-packages/" vdf + fi + + after_runtime: | + set -eu + + # python3 is linked against 'lib64/ld-linux-x86-64.so.2' + # but 'compat/lib64' is missing for Ubuntu Noble + compat="${TARGET_APPDIR}/runtime/compat" + if [ ! -e "${compat}/lib64" ] && [ -d "${compat}/usr/lib64" ]; then + ln -s "usr/lib64" "${compat}/" + fi + + apt: + arch: + - "{{APPIMAGE_APT_ARCH}}" + sources: + - sourceline: deb [arch=amd64] http://archive.ubuntu.com/ubuntu/ {{APPIMAGE_APT_DISTRO}} main universe + key_url: http://keyserver.ubuntu.com/pks/lookup?op=get&search=0x{{APPIMAGE_APT_PUBKEY}} + - sourceline: deb [arch=amd64] http://archive.ubuntu.com/ubuntu/ {{APPIMAGE_APT_DISTRO}}-updates main universe + - sourceline: deb [arch=amd64] http://security.ubuntu.com/ubuntu/ {{APPIMAGE_APT_DISTRO}}-security main universe + - sourceline: deb [arch=arm64] http://ports.ubuntu.com/ubuntu-ports/ {{APPIMAGE_APT_DISTRO}} main universe + - sourceline: deb [arch=arm64] http://ports.ubuntu.com/ubuntu-ports/ {{APPIMAGE_APT_DISTRO}}-updates main universe + - sourceline: deb [arch=arm64] http://ports.ubuntu.com/ubuntu-ports/ {{APPIMAGE_APT_DISTRO}}-security main universe + + include: + - gir1.2-gtk-3.0 + - gir1.2-rsvg-2.0 + - libbluetooth3 + - libgtk-3-0 + - librsvg2-common + - libx11-6 + - libxcb1 + - libxext6 + - libxfixes3 + - python3-evdev + - python3-gi-cairo + - python3-pylibacl + - binutils # required for detection of bluetooth library + - coreutils # provides /usr/bin/env + - shared-mime-info # required for gui if host provides no MIME info, e.g. when XDG_DATA_DIRS is missing + + exclude: + # coreutils + - libacl* # filesystem + - libattr* # filesystem + - libgmp* # arithmetics + + # gir1.2-rsvg-2.0 + - libicu* # i18n + - libstdc* # development + - libxml* # codec + + # libgtk3-0 + - "*-icon-theme" # gui + - "*crypt*" # security + - "*dconf*" # gui configuration + - "*dbus*" # process communication + - "*gcc*" # development + - "*systemd*" # linux core + - libblk* # filesystem + - libcolord* # gui + - libcups* # printing + - libepoxy* # gui + - libfontconfig* # fonts + - libfreetype* # fonts + - libfribidi* # i18n + - libgtk-3-common # gui + - liblz* # codec + - libmount* # filesystem + - libtiff* # codec + - libwebp* # codec + + # python3 + - "*krb*" # security + - "*readline*" # terminal + - "*sqlite*" # database + - libbz* # codec + - libdb* # database + - libmpdec* # arithmetics + - libncurses* # terminal + - libnsl* # network + - libssl* # security + - libtirpc* # development + - libuuid* # development + - media-types # codec + + # Ubuntu Focal + - glib-networking* # network + - gsettings* # gui configuration + - libidn2* # codec + - libjson* # codec + - libsoup* # networking + - libunistring* # unicode + - mime-support # codec + + # Ubuntu Noble + - libgprofng* # development + - libjansson* # codec + - libsframe* # development + - netbase # network + - tzdata # date/time + + files: + exclude: + - usr/bin/*gold* # alternative for ld + - usr/bin/*gp-display-html* # requires perl + - usr/lib/*/gconv # unicode + - usr/lib/*/gdk-pixbuf-2.0/*/loaders/libpixbufloader-??[!g].so # only png & svg are required + - usr/lib/*/glib-2.0 + - usr/lib/python*/cgi.py + - usr/lib/python*/email + - usr/lib/python*/test + - usr/lib/python*/unittest + - usr/share/doc + - usr/share/glib-2.0 + - usr/share/gtk-doc + - usr/share/icu + - usr/share/locale + - usr/share/man + - usr/share/python3/runtime.d + - usr/share/thumbnailers + + runtime: + env: + # `usr/lib/python3.*/site-packages` is required in $PYTHONPATH, + # but the python version and hence the actual location is unknown here. + # Fortunately the site-packages directory is on the $PATH, so we add $PATH instead. + # It must precede an existing $PYTHONPATH to work. + PYTHONPATH: "${APPDIR}/usr/lib/python3/dist-packages:${PATH}:${PYTHONPATH}" + SCC_SHARED: "${APPDIR}/usr/share/scc" + +AppImage: + arch: "{{APPIMAGE_ARCH}}" + update-information: "gh-releases-zsync|C0rn3j|sc-controller|latest|sc-controller-*-{{APPIMAGE_APT_DISTRO}}-{{APPIMAGE_ARCH}}.AppImage.zsync" diff --git a/AppImageBuilder.yml b/AppImageBuilder.yml index ed7da1b2..fc70e60f 100644 --- a/AppImageBuilder.yml +++ b/AppImageBuilder.yml @@ -2,9 +2,12 @@ version: 1 script: - | + set -eu + if [ "{{APPIMAGE_SOURCE}}" != "${TARGET_APPDIR}" ]; then mv "{{APPIMAGE_SOURCE}}" "${TARGET_APPDIR}" fi + # Manual installation of squashfs-tools is required # until https://github.com/AppImageCrafters/build-appimage/issues/5 is fixed if ! command -v mksquashfs >/dev/null; then @@ -38,6 +41,16 @@ AppDir: fi done + after_runtime: | + set -eu + + # python3 is linked against 'lib64/ld-linux-x86-64.so.2' + # but 'compat/lib64' is missing for Ubuntu Noble + compat="${TARGET_APPDIR}/runtime/compat" + if [ ! -e "${compat}/lib64" ] && [ -d "${compat}/usr/lib64" ]; then + ln -s "usr/lib64" "${compat}/" + fi + apt: arch: - "{{APPIMAGE_APT_ARCH}}" @@ -51,9 +64,15 @@ AppDir: - sourceline: deb [arch=arm64] http://ports.ubuntu.com/ubuntu-ports/ {{APPIMAGE_APT_DISTRO}}-security main universe include: + - gir1.2-gtk-3.0 - gir1.2-rsvg-2.0 - libbluetooth3 + - libgtk-3-0 - librsvg2-common + - libx11-6 + - libxcb1 + - libxext6 + - libxfixes3 - python3-evdev - python3-gi-cairo - python3-pylibacl @@ -61,48 +80,65 @@ AppDir: - binutils # required for detection of bluetooth library - coreutils # provides /usr/bin/env - shared-mime-info # required for gui if host provides no MIME info, e.g. when XDG_DATA_DIRS is missing + exclude: - - gcc* # development - - libgcc* # development - - libstdc* # development - - libtirpc* # development - - libuuid* # development + # coreutils + - libacl* # filesystem - libattr* # filesystem - - libblkid* # filesystem - - libmount* # filesystem - - libbz* # codec - - libjpeg* # codec - - liblzma* # codec - - libtiff* # codec + - libgmp* # arithmetics + + # gir1.2-rsvg-2.0 + - libicu* # i18n + - libstdc* # development - libxml* # codec - - libwebp* # codec - - media-types # codec - - libpixman* # X - - libxext* # X - - libxrender* # X + + # libgtk3-0 + - "*-icon-theme" # gui + - "*crypt*" # security + - "*dconf*" # gui configuration + - "*dbus*" # process communication + - "*gcc*" # development + - "*systemd*" # linux core + - libblk* # filesystem + - libcolord* # gui + - libcups* # printing + - libepoxy* # gui - libfontconfig* # fonts - libfreetype* # fonts - libfribidi* # i18n - - libicu* # i18n - - libgmp* # arithmetics - - libmpdec* # arithmetics - - libncurses* # terminal - - libreadline* # terminal - - readline* # terminal - - libssl* # security - - "*crypt*" # security + - libgtk-3-common # gui + - liblz* # codec + - libmount* # filesystem + - libtiff* # codec + - libwebp* # codec + + # python3 - "*krb*" # security - - libdb* # database + - "*readline*" # terminal - "*sqlite*" # database + - libbz* # codec + - libdb* # database + - libmpdec* # arithmetics + - libncurses* # terminal - libnsl* # network + - libssl* # security + - libtirpc* # development + - libuuid* # development + - media-types # codec + # Ubuntu Noble + - libgprofng* # development + - libjansson* # codec + - libsframe* # development + - netbase # network + - tzdata # date/time files: exclude: - usr/bin/*gold* # alternative for ld - - usr/bin/*gp-display-html* # since Ubuntu Lunatic, requires perl + - usr/bin/*gp-display-html* # requires perl - usr/lib/*/gconv # unicode - - usr/lib/*/gdk-pixbuf-2.0/*/loaders/libpixbufloader-[!s]*.so # only svg is required + - usr/lib/*/gdk-pixbuf-2.0/*/loaders/libpixbufloader-??[!g].so # only png & svg are required - usr/lib/*/glib-2.0 - usr/lib/python*/cgi.py - usr/lib/python*/email diff --git a/Dockerfile b/Dockerfile index fb1a2dc8..b3fd299b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,18 +1,21 @@ +# syntax=docker/dockerfile:1 ARG BASE_OS=ubuntu ARG BASE_CODENAME=noble FROM $BASE_OS:$BASE_CODENAME AS build-stage # Download build dependencies RUN < Date: Sat, 21 Sep 2024 06:56:02 +0200 Subject: [PATCH 2/5] fix(appimage): add missing icons --- AppImageBuilder.debian-bullseye.yml | 54 +++++++++++++++++------------ AppImageBuilder.debian.yml | 40 ++++++++++++++++----- AppImageBuilder.test.Dockerfile | 11 ++++++ AppImageBuilder.ubuntu-focal.yml | 50 +++++++++++++++----------- AppImageBuilder.yml | 40 ++++++++++++++++----- 5 files changed, 136 insertions(+), 59 deletions(-) diff --git a/AppImageBuilder.debian-bullseye.yml b/AppImageBuilder.debian-bullseye.yml index eda29976..0984849e 100644 --- a/AppImageBuilder.debian-bullseye.yml +++ b/AppImageBuilder.debian-bullseye.yml @@ -41,24 +41,42 @@ AppDir: fi done - # install python3-vdf manually if not available as package - if ! apt-cache search --names-only python3-vdf | grep -q .; then - pip install --target "${TARGET_APPDIR}/usr/lib/python3/dist-packages/" vdf + # remove unused icons + icons="${TARGET_APPDIR}/usr/share/icons" + keep=$( + # Subset of: `wget -q https://specifications.freedesktop.org/icon-naming-spec/latest -O- | sed -nE 's:.*([^<]+).*:\1:p' | sort` + printf '%s\n' index.theme close- edit- go- list- pan- window- + grep -rhoP '"icon_name">\K[^<]+(?=<)' glade + grep -rhoP 'icon_name *= *"\K[^"]+(?=")' scc + ) + map_item() { echo "${1}" | while read -r item; do printf -- "${2}" "${item}"; done; } + paths=$(find "${icons}" '(' -false $(map_item "${keep}" ' -o -name %s*') ')' -print -type l -printf '%h/%l\n' | sort | uniq) + find "${icons}" \( -type d -empty -or -not -type d $(map_item "${paths}" ' -not -samefile %s') \) -delete + cancel() { echo >&2 "ERROR: ${@}" && return 1; } + if find "${icons}" -xtype l | grep .; then + cancel 'The symlinks shown above are broken.' + fi + if echo "${keep}" | while read -r icon; do echo "${paths}" | grep -q "${icon}[^/]*$" || echo "${icon}"; done | grep .; then + cancel 'The icons above are missing.' fi - after_runtime: | - set -eu + # Enable icon theme + xdg_settings="${TARGET_APPDIR}/etc/xdg/gtk-3.0/settings.ini" + if [ ! -e "${xdg_settings}" ]; then + mkdir -p "$(dirname "${xdg_settings}")" + theme=$(find "${icons}" -mindepth 1 -maxdepth 1 -type d -printf %f -quit) + printf '[Settings]\ngtk-icon-theme-name = %s\n' "${theme}" >"${xdg_settings}" + fi - # python3 is linked against 'lib64/ld-linux-x86-64.so.2' - # but 'compat/lib64' is missing for Ubuntu Noble - compat="${TARGET_APPDIR}/runtime/compat" - if [ ! -e "${compat}/lib64" ] && [ -d "${compat}/usr/lib64" ]; then - ln -s "usr/lib64" "${compat}/" + # install python3-vdf manually if not available as package + if ! apt-cache search --names-only python3-vdf | grep -q .; then + pip install --target "${TARGET_APPDIR}/usr/lib/python3/dist-packages/" vdf fi apt: arch: - "{{APPIMAGE_APT_ARCH}}" + sources: - sourceline: deb http://deb.debian.org/debian {{APPIMAGE_APT_DISTRO}} main key_url: http://keyserver.ubuntu.com/pks/lookup?op=get&search=0x{{APPIMAGE_APT_PUBKEY}} @@ -72,16 +90,13 @@ AppDir: - libbluetooth3 - libgtk-3-0 - librsvg2-common - - libx11-6 - - libxcb1 - - libxext6 - - libxfixes3 - python3-evdev - python3-gi-cairo - python3-pylibacl - python3-usb1 - binutils # required for detection of bluetooth library - coreutils # provides /usr/bin/env + - paper-icon-theme # required for icons - shared-mime-info # required for gui if host provides no MIME info, e.g. when XDG_DATA_DIRS is missing exclude: @@ -128,14 +143,7 @@ AppDir: - libtirpc* # development - libuuid* # development - media-types # codec - - # Debian Trixie - - libgprofng* # development - - libjansson* # codec - - libsframe* # development - - libcloudproviders* # networking - - netbase # network - - tzdata # date/time + - tzdata # Debian Bullseye - glib-networking* # network @@ -152,7 +160,7 @@ AppDir: - usr/bin/*gold* # alternative for ld - usr/bin/*gp-display-html* # requires perl - usr/lib/*/gconv # unicode - - usr/lib/*/gdk-pixbuf-2.0/*/loaders/libpixbufloader-??[!g].so # only png & svg are required + - usr/lib/*/gdk-pixbuf-2.0/*/loaders/libpixbufloader-??[!g]*.so # only png & svg are required - usr/lib/*/glib-2.0 - usr/lib/python*/cgi.py - usr/lib/python*/email diff --git a/AppImageBuilder.debian.yml b/AppImageBuilder.debian.yml index 4ce9287a..2f0cec9d 100644 --- a/AppImageBuilder.debian.yml +++ b/AppImageBuilder.debian.yml @@ -41,11 +41,37 @@ AppDir: fi done + # remove unused icons + icons="${TARGET_APPDIR}/usr/share/icons" + keep=$( + # Subset of: `wget -q https://specifications.freedesktop.org/icon-naming-spec/latest -O- | sed -nE 's:.*([^<]+).*:\1:p' | sort` + printf '%s\n' index.theme close- edit- go- list- pan- window- + grep -rhoP '"icon_name">\K[^<]+(?=<)' glade + grep -rhoP 'icon_name *= *"\K[^"]+(?=")' scc + ) + map_item() { echo "${1}" | while read -r item; do printf -- "${2}" "${item}"; done; } + paths=$(find "${icons}" '(' -false $(map_item "${keep}" ' -o -name %s*') ')' -print -type l -printf '%h/%l\n' | sort | uniq) + find "${icons}" \( -type d -empty -or -not -type d $(map_item "${paths}" ' -not -samefile %s') \) -delete + cancel() { echo >&2 "ERROR: ${@}" && return 1; } + if find "${icons}" -xtype l | grep .; then + cancel 'The symlinks shown above are broken.' + fi + if echo "${keep}" | while read -r icon; do echo "${paths}" | grep -q "${icon}[^/]*$" || echo "${icon}"; done | grep .; then + cancel 'The icons above are missing.' + fi + + # Enable icon theme + xdg_settings="${TARGET_APPDIR}/etc/xdg/gtk-3.0/settings.ini" + if [ ! -e "${xdg_settings}" ]; then + mkdir -p "$(dirname "${xdg_settings}")" + theme=$(find "${icons}" -mindepth 1 -maxdepth 1 -type d -printf %f -quit) + printf '[Settings]\ngtk-icon-theme-name = %s\n' "${theme}" >"${xdg_settings}" + fi + after_runtime: | set -eu - # python3 is linked against 'lib64/ld-linux-x86-64.so.2' - # but 'compat/lib64' is missing for Ubuntu Noble + # python3 is linked against 'lib64/ld-linux-x86-64.so.2' but 'compat/lib64' is missing compat="${TARGET_APPDIR}/runtime/compat" if [ ! -e "${compat}/lib64" ] && [ -d "${compat}/usr/lib64" ]; then ln -s "usr/lib64" "${compat}/" @@ -54,6 +80,7 @@ AppDir: apt: arch: - "{{APPIMAGE_APT_ARCH}}" + sources: - sourceline: deb http://deb.debian.org/debian {{APPIMAGE_APT_DISTRO}} main key_url: http://keyserver.ubuntu.com/pks/lookup?op=get&search=0x{{APPIMAGE_APT_PUBKEY}} @@ -67,17 +94,14 @@ AppDir: - libbluetooth3 - libgtk-3-0 - librsvg2-common - - libx11-6 - - libxcb1 - - libxext6 - - libxfixes3 - python3-evdev - python3-gi-cairo - python3-pylibacl - - python3-vdf - python3-usb1 + - python3-vdf - binutils # required for detection of bluetooth library - coreutils # provides /usr/bin/env + - paper-icon-theme # required for icons - shared-mime-info # required for gui if host provides no MIME info, e.g. when XDG_DATA_DIRS is missing exclude: @@ -138,7 +162,7 @@ AppDir: - usr/bin/*gold* # alternative for ld - usr/bin/*gp-display-html* # requires perl - usr/lib/*/gconv # unicode - - usr/lib/*/gdk-pixbuf-2.0/*/loaders/libpixbufloader-??[!g].so # only png & svg are required + - usr/lib/*/gdk-pixbuf-2.0/*/loaders/libpixbufloader-??[!g]*.so # only png & svg are required - usr/lib/*/glib-2.0 - usr/lib/python*/cgi.py - usr/lib/python*/email diff --git a/AppImageBuilder.test.Dockerfile b/AppImageBuilder.test.Dockerfile index b4dbb424..27c64d29 100644 --- a/AppImageBuilder.test.Dockerfile +++ b/AppImageBuilder.test.Dockerfile @@ -27,11 +27,22 @@ RUN </dev/null; then + apt-get update && apt-get install -y --no-install-recommends libx11-6 + elif command -v pacman >/dev/null; then + pacman -Sy --noconfirm libx11 + elif command -v dnf >/dev/null; then + dnf list updates && dnf install -y libX11 + fi + } + main() { files="$(find /opt/ -maxdepth 1 -type f -name '*.AppImage')" if [ -z "${files}" ]; then cancel "Error: No AppImage file found." fi + prepare echo "${files}" | while read -r file; do log "${file}" chmod +x "${file}" diff --git a/AppImageBuilder.ubuntu-focal.yml b/AppImageBuilder.ubuntu-focal.yml index f97e57a6..ce77ea1a 100644 --- a/AppImageBuilder.ubuntu-focal.yml +++ b/AppImageBuilder.ubuntu-focal.yml @@ -46,19 +46,37 @@ AppDir: pip install --target "${TARGET_APPDIR}/usr/lib/python3/dist-packages/" vdf fi - after_runtime: | - set -eu + # remove unused icons + icons="${TARGET_APPDIR}/usr/share/icons" + keep=$( + # Subset of: `wget -q https://specifications.freedesktop.org/icon-naming-spec/latest -O- | sed -nE 's:.*([^<]+).*:\1:p' | sort` + printf '%s\n' index.theme close- edit- go- list- pan- window- + grep -rhoP '"icon_name">\K[^<]+(?=<)' glade + grep -rhoP 'icon_name *= *"\K[^"]+(?=")' scc + ) + map_item() { echo "${1}" | while read -r item; do printf -- "${2}" "${item}"; done; } + paths=$(find "${icons}" '(' -false $(map_item "${keep}" ' -o -name %s*') ')' -print -type l -printf '%h/%l\n' | sort | uniq) + find "${icons}" \( -type d -empty -or -not -type d $(map_item "${paths}" ' -not -samefile %s') \) -delete + cancel() { echo >&2 "ERROR: ${@}" && return 1; } + if find "${icons}" -xtype l | grep .; then + cancel 'The symlinks shown above are broken.' + fi + if echo "${keep}" | while read -r icon; do echo "${paths}" | grep -q "${icon}[^/]*$" || echo "${icon}"; done | grep .; then + cancel 'The icons above are missing.' + fi - # python3 is linked against 'lib64/ld-linux-x86-64.so.2' - # but 'compat/lib64' is missing for Ubuntu Noble - compat="${TARGET_APPDIR}/runtime/compat" - if [ ! -e "${compat}/lib64" ] && [ -d "${compat}/usr/lib64" ]; then - ln -s "usr/lib64" "${compat}/" + # Enable icon theme + xdg_settings="${TARGET_APPDIR}/etc/xdg/gtk-3.0/settings.ini" + if [ ! -e "${xdg_settings}" ]; then + mkdir -p "$(dirname "${xdg_settings}")" + theme=$(find "${icons}" -mindepth 1 -maxdepth 1 -type d -printf %f -quit) + printf '[Settings]\ngtk-icon-theme-name = %s\n' "${theme}" >"${xdg_settings}" fi apt: arch: - "{{APPIMAGE_APT_ARCH}}" + sources: - sourceline: deb [arch=amd64] http://archive.ubuntu.com/ubuntu/ {{APPIMAGE_APT_DISTRO}} main universe key_url: http://keyserver.ubuntu.com/pks/lookup?op=get&search=0x{{APPIMAGE_APT_PUBKEY}} @@ -67,6 +85,8 @@ AppDir: - sourceline: deb [arch=arm64] http://ports.ubuntu.com/ubuntu-ports/ {{APPIMAGE_APT_DISTRO}} main universe - sourceline: deb [arch=arm64] http://ports.ubuntu.com/ubuntu-ports/ {{APPIMAGE_APT_DISTRO}}-updates main universe - sourceline: deb [arch=arm64] http://ports.ubuntu.com/ubuntu-ports/ {{APPIMAGE_APT_DISTRO}}-security main universe + - sourceline: deb https://ppa.launchpadcontent.net/snwh/ppa/ubuntu focal main + key_url: http://keyserver.ubuntu.com/pks/lookup?op=get&search=0x023634F5E3DE42B7594EB77B9528DA3D98902E4B include: - gir1.2-gtk-3.0 @@ -74,16 +94,13 @@ AppDir: - libbluetooth3 - libgtk-3-0 - librsvg2-common - - libx11-6 - - libxcb1 - - libxext6 - - libxfixes3 - python3-evdev - python3-gi-cairo - - python3-pylibacl - python3-libusb1 + - python3-pylibacl - binutils # required for detection of bluetooth library - coreutils # provides /usr/bin/env + - paper-icon-theme # required for icons - shared-mime-info # required for gui if host provides no MIME info, e.g. when XDG_DATA_DIRS is missing exclude: @@ -140,19 +157,12 @@ AppDir: - libunistring* # unicode - mime-support # codec - # Ubuntu Noble - - libgprofng* # development - - libjansson* # codec - - libsframe* # development - - netbase # network - - tzdata # date/time - files: exclude: - usr/bin/*gold* # alternative for ld - usr/bin/*gp-display-html* # requires perl - usr/lib/*/gconv # unicode - - usr/lib/*/gdk-pixbuf-2.0/*/loaders/libpixbufloader-??[!g].so # only png & svg are required + - usr/lib/*/gdk-pixbuf-2.0/*/loaders/libpixbufloader-??[!g]*.so # only png & svg are required - usr/lib/*/glib-2.0 - usr/lib/python*/cgi.py - usr/lib/python*/email diff --git a/AppImageBuilder.yml b/AppImageBuilder.yml index 52ffc3ee..07e1f8d1 100644 --- a/AppImageBuilder.yml +++ b/AppImageBuilder.yml @@ -41,11 +41,37 @@ AppDir: fi done + # remove unused icons + icons="${TARGET_APPDIR}/usr/share/icons" + keep=$( + # Subset of: `wget -q https://specifications.freedesktop.org/icon-naming-spec/latest -O- | sed -nE 's:.*([^<]+).*:\1:p' | sort` + printf '%s\n' index.theme close- edit- go- list- pan- window- + grep -rhoP '"icon_name">\K[^<]+(?=<)' glade + grep -rhoP 'icon_name *= *"\K[^"]+(?=")' scc + ) + map_item() { echo "${1}" | while read -r item; do printf -- "${2}" "${item}"; done; } + paths=$(find "${icons}" '(' -false $(map_item "${keep}" ' -o -name %s*') ')' -print -type l -printf '%h/%l\n' | sort | uniq) + find "${icons}" \( -type d -empty -or -not -type d $(map_item "${paths}" ' -not -samefile %s') \) -delete + cancel() { echo >&2 "ERROR: ${@}" && return 1; } + if find "${icons}" -xtype l | grep .; then + cancel 'The symlinks shown above are broken.' + fi + if echo "${keep}" | while read -r icon; do echo "${paths}" | grep -q "${icon}[^/]*$" || echo "${icon}"; done | grep .; then + cancel 'The icons above are missing.' + fi + + # Enable icon theme + xdg_settings="${TARGET_APPDIR}/etc/xdg/gtk-3.0/settings.ini" + if [ ! -e "${xdg_settings}" ]; then + mkdir -p "$(dirname "${xdg_settings}")" + theme=$(find "${icons}" -mindepth 1 -maxdepth 1 -type d -printf %f -quit) + printf '[Settings]\ngtk-icon-theme-name = %s\n' "${theme}" >"${xdg_settings}" + fi + after_runtime: | set -eu - # python3 is linked against 'lib64/ld-linux-x86-64.so.2' - # but 'compat/lib64' is missing for Ubuntu Noble + # python3 is linked against 'lib64/ld-linux-x86-64.so.2' but 'compat/lib64' is missing compat="${TARGET_APPDIR}/runtime/compat" if [ ! -e "${compat}/lib64" ] && [ -d "${compat}/usr/lib64" ]; then ln -s "usr/lib64" "${compat}/" @@ -54,6 +80,7 @@ AppDir: apt: arch: - "{{APPIMAGE_APT_ARCH}}" + sources: - sourceline: deb [arch=amd64] http://archive.ubuntu.com/ubuntu/ {{APPIMAGE_APT_DISTRO}} main universe key_url: http://keyserver.ubuntu.com/pks/lookup?op=get&search=0x{{APPIMAGE_APT_PUBKEY}} @@ -69,17 +96,14 @@ AppDir: - libbluetooth3 - libgtk-3-0 - librsvg2-common - - libx11-6 - - libxcb1 - - libxext6 - - libxfixes3 - python3-evdev - python3-gi-cairo - python3-pylibacl + - python3-usb1 - python3-vdf - - python3-libusb1 - binutils # required for detection of bluetooth library - coreutils # provides /usr/bin/env + - paper-icon-theme # required for icons - shared-mime-info # required for gui if host provides no MIME info, e.g. when XDG_DATA_DIRS is missing exclude: @@ -139,7 +163,7 @@ AppDir: - usr/bin/*gold* # alternative for ld - usr/bin/*gp-display-html* # requires perl - usr/lib/*/gconv # unicode - - usr/lib/*/gdk-pixbuf-2.0/*/loaders/libpixbufloader-??[!g].so # only png & svg are required + - usr/lib/*/gdk-pixbuf-2.0/*/loaders/libpixbufloader-??[!g]*.so # only png & svg are required - usr/lib/*/glib-2.0 - usr/lib/python*/cgi.py - usr/lib/python*/email From 5dc87b7c68241410326ffb31e9594dd0727ef495 Mon Sep 17 00:00:00 2001 From: Christian Date: Sat, 21 Sep 2024 06:56:50 +0200 Subject: [PATCH 3/5] chore(appimage): update github release action --- .github/workflows/appimage.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/appimage.yml b/.github/workflows/appimage.yml index 86ba8e4b..470d9e10 100644 --- a/.github/workflows/appimage.yml +++ b/.github/workflows/appimage.yml @@ -182,6 +182,6 @@ jobs: shasum --binary --algorithm "${algo}" "${asset}" >"${asset}.sha${algo}" done - name: Upload artifacts to GitHub release - uses: softprops/action-gh-release@v1 + uses: softprops/action-gh-release@v2 with: files: assets/* From 27f471ea3f974c2ac35f21b08533236af686f6b4 Mon Sep 17 00:00:00 2001 From: Christian Date: Sat, 21 Sep 2024 13:43:59 +0200 Subject: [PATCH 4/5] test(appimage): avoid partial upgrade on archlinux --- AppImageBuilder.test.Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/AppImageBuilder.test.Dockerfile b/AppImageBuilder.test.Dockerfile index 27c64d29..2bc3303f 100644 --- a/AppImageBuilder.test.Dockerfile +++ b/AppImageBuilder.test.Dockerfile @@ -31,7 +31,7 @@ RUN </dev/null; then apt-get update && apt-get install -y --no-install-recommends libx11-6 elif command -v pacman >/dev/null; then - pacman -Sy --noconfirm libx11 + pacman -S --noconfirm libx11 elif command -v dnf >/dev/null; then dnf list updates && dnf install -y libX11 fi From 78628c817e2d112744ac7b701a1df34360278389 Mon Sep 17 00:00:00 2001 From: Christian Date: Sat, 21 Sep 2024 14:11:27 +0200 Subject: [PATCH 5/5] test(appimage): avoid partial upgrade on archlinux --- AppImageBuilder.test.Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/AppImageBuilder.test.Dockerfile b/AppImageBuilder.test.Dockerfile index 2bc3303f..20e4489f 100644 --- a/AppImageBuilder.test.Dockerfile +++ b/AppImageBuilder.test.Dockerfile @@ -31,7 +31,7 @@ RUN </dev/null; then apt-get update && apt-get install -y --no-install-recommends libx11-6 elif command -v pacman >/dev/null; then - pacman -S --noconfirm libx11 + pacman -Syu --noconfirm libx11 elif command -v dnf >/dev/null; then dnf list updates && dnf install -y libX11 fi