diff --git a/.github/workflows/appimage.yml b/.github/workflows/appimage.yml index 470d9e10..bb83d3d8 100644 --- a/.github/workflows/appimage.yml +++ b/.github/workflows/appimage.yml @@ -85,9 +85,15 @@ jobs: printenv | grep ^APPIMAGE_ >>"${GITHUB_ENV}" - name: Build AppImage - uses: AppImageCrafters/build-appimage@v1.3 + uses: git-developer/build-appimage@v1.3 with: - recipe: "${{ matrix.base.recipe }}" + command: ${{ + format('sh -c "set -eu; {0}; {1}; {2}; appimage-builder --recipe {3}"', + 'pip install --upgrade setuptools packaging packaging-legacy', + 'pip install --extra-index-url https://lief.s3-website.fr-par.scw.cloud/latest \"lief>=0.16.0.dev0\"', + 'find /usr/local/lib -name package.py | while read -r file; do sed -i -e \"s/^from.packaging/&_legacy/\" \"${file}\"; done', + matrix.base.recipe) + }} - name: Upload artifacts uses: actions/upload-artifact@v4 diff --git a/AppImageBuilder.debian-bullseye.yml b/AppImageBuilder.debian-bullseye.yml index 02d0eb20..880e39a0 100644 --- a/AppImageBuilder.debian-bullseye.yml +++ b/AppImageBuilder.debian-bullseye.yml @@ -76,6 +76,13 @@ AppDir: pip install --target "${TARGET_APPDIR}/usr/lib/python3/dist-packages/" vdf fi + # python3-usb1 expects 'libusb-1.0.so', see https://github.com/vpelletier/python-libusb1/issues/78 + find "${TARGET_APPDIR}" -name 'libusb-1.0.so.[0-9]' | while read -r file; do + path="$(dirname "${file}")" + link="${file%.[0-9]}" + [ -e "${link}" ] || ln -sr "${file}" "${link}" + done + apt: arch: - "{{APPIMAGE_APT_ARCH}}" @@ -104,8 +111,6 @@ AppDir: exclude: # coreutils - - libacl* # filesystem - - libattr* # filesystem - libgmp* # arithmetics # gir1.2-rsvg-2.0 diff --git a/AppImageBuilder.debian.yml b/AppImageBuilder.debian.yml index 536d0528..b4c4bbe2 100644 --- a/AppImageBuilder.debian.yml +++ b/AppImageBuilder.debian.yml @@ -71,6 +71,21 @@ AppDir: printf '[Settings]\ngtk-icon-theme-name = %s\n' "${theme}" >"${xdg_settings}" fi + # python3-usb1 expects 'libusb-1.0.so', see https://github.com/vpelletier/python-libusb1/issues/78 + find "${TARGET_APPDIR}" -name 'libusb-1.0.so.[0-9]' | while read -r file; do + path="$(dirname "${file}")" + link="${file%.[0-9]}" + [ -e "${link}" ] || ln -sr "${file}" "${link}" + done + + # Trixie expects libpixbufloader libs with a dash suffix, not underscore + # see https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1082676 + find "${TARGET_APPDIR}" -type f -name 'libpixbufloader_*' | while read -r file; do + path="$(dirname "${file}")" + link="${path}/$(echo "$(basename "${file}")" | tr _ -)" + [ -e "${link}" ] || ln -sr "${file}" "${link}" + done + after_runtime: | set -eu @@ -109,8 +124,6 @@ AppDir: exclude: # coreutils - - libacl* # filesystem - - libattr* # filesystem - libgmp* # arithmetics # gir1.2-rsvg-2.0 @@ -134,7 +147,6 @@ AppDir: - libfribidi* # i18n - libgtk-3-common # gui - liblz* # codec - - libmount* # filesystem - libtiff* # codec - libwebp* # codec @@ -156,7 +168,6 @@ AppDir: - libgprofng* # development - libjansson* # codec - libsframe* # development - - libcloudproviders* # networking - netbase # network - tzdata # date/time diff --git a/AppImageBuilder.test.Dockerfile b/AppImageBuilder.test.Dockerfile index a93d0028..2b6e8d3c 100644 --- a/AppImageBuilder.test.Dockerfile +++ b/AppImageBuilder.test.Dockerfile @@ -16,17 +16,6 @@ RUN </dev/null; then apt-get update && apt-get install -y --no-install-recommends libx11-6 @@ -43,15 +32,19 @@ RUN <"${config_path}/config.json" + echo "${files}" | while read -r file; do - log "${file}" + log "Testing ${file}" chmod +x "${file}" rm -rf squashfs-root/ "${file}" --appimage-extract >/dev/null - ( - cd squashfs-root/runtime/compat - { ../../AppRun dependency-check && ../../AppRun daemon --help; } || handle_failure "$?" "${file}" - ) + cd squashfs-root/runtime/compat + ../../AppRun dependency-check + output=$(../../AppRun daemon --help 2>&1 | tee -a /dev/stderr) + if echo "${output}" | grep -q Error; then return 1; fi rm -f "${file}" done } diff --git a/AppImageBuilder.ubuntu-focal.yml b/AppImageBuilder.ubuntu-focal.yml index 6e418ac3..80cf0024 100644 --- a/AppImageBuilder.ubuntu-focal.yml +++ b/AppImageBuilder.ubuntu-focal.yml @@ -76,6 +76,13 @@ AppDir: printf '[Settings]\ngtk-icon-theme-name = %s\n' "${theme}" >"${xdg_settings}" fi + # python3-usb1 expects 'libusb-1.0.so', see https://github.com/vpelletier/python-libusb1/issues/78 + find "${TARGET_APPDIR}" -name 'libusb-1.0.so.[0-9]' | while read -r file; do + path="$(dirname "${file}")" + link="${file%.[0-9]}" + [ -e "${link}" ] || ln -sr "${file}" "${link}" + done + apt: arch: - "{{APPIMAGE_APT_ARCH}}" @@ -108,8 +115,6 @@ AppDir: exclude: # coreutils - - libacl* # filesystem - - libattr* # filesystem - libgmp* # arithmetics # gir1.2-rsvg-2.0 diff --git a/AppImageBuilder.yml b/AppImageBuilder.yml index 8a260567..af0f4120 100644 --- a/AppImageBuilder.yml +++ b/AppImageBuilder.yml @@ -71,6 +71,13 @@ AppDir: printf '[Settings]\ngtk-icon-theme-name = %s\n' "${theme}" >"${xdg_settings}" fi + # python3-usb1 expects 'libusb-1.0.so', see https://github.com/vpelletier/python-libusb1/issues/78 + find "${TARGET_APPDIR}" -name 'libusb-1.0.so.[0-9]' | while read -r file; do + path="$(dirname "${file}")" + link="${file%.[0-9]}" + [ -e "${link}" ] || ln -sr "${file}" "${link}" + done + after_runtime: | set -eu @@ -111,8 +118,6 @@ AppDir: exclude: # coreutils - - libacl* # filesystem - - libattr* # filesystem - libgmp* # arithmetics # gir1.2-rsvg-2.0 @@ -136,7 +141,6 @@ AppDir: - libfribidi* # i18n - libgtk-3-common # gui - liblz* # codec - - libmount* # filesystem - libtiff* # codec - libwebp* # codec