Native iCloud apps for Windows and Linux, built in Rust. Notes, Reminders, Calendar, Contacts, Drive and Photos, offline and in sync with your iPhone.
Rust apple-notesapple-reminderscloudkitcrdtdesktop-appicloudicloud-calendaricloud-driveicloud-notesicloud-photosiphonelinuxlinux-desktoplocal-firstoffline-firstprivacyrusttauritauri-appwindows
Build the AppImage on Ubuntu 22.04 so it runs there and on every newer distribution
Yashwanth Kamireddi755adff0cae1
diff --git a/.github/workflows/appimage.yml b/.github/workflows/appimage.ymlnew file mode 100644index 0000000..ba47db3--- /dev/null+++ b/.github/workflows/appimage.yml@@ -0,0 +1,180 @@+# The AppImage, built on the oldest Ubuntu LTS it runs on (22.04, glibc 2.35), so it starts on+# that and everything newer. An AppImage uses the C library and libstdc++ of the computer it+# runs on, never its own: built on 24.04 it needed glibc 2.39 and failed on 22.04 before its+# first line ran. So it is built in a clean ubuntu:22.04 container, and nothing is kept unless+# every ELF file in it asks for at most glibc 2.35 and 22.04's libstdc++ (GLIBCXX 3.4.30,+# CXXABI 1.3.13).+#+# Ubuntu 22.04's libheif is 1.12, older than the 1.17 the app is built for (libheif-rs, v1_17),+# so libheif and its HEVC decoder libde265 are built here from their release tarballs (checked+# against the hashes below) into the multiarch paths tauri.conf.json's appimage.files names,+# and the AppImage carries them, as it carried Ubuntu 24.04's before.+#+# Called by release.yml (signed for the updater) and linux-compat.yml (with the check's probe,+# built on the same base so it runs on 22.04 too).+name: AppImage++on:+ workflow_call:+ inputs:+ # A release: the AppImage signed for the in-app updater, with its .sig.+ updater:+ type: boolean+ default: false+ # linux-compat.yml: the probe's distro_check example, built against the same libraries.+ probe:+ type: boolean+ default: false+ artifact:+ type: string+ required: true+ secrets:+ TAURI_SIGNING_PRIVATE_KEY:+ required: false+ TAURI_SIGNING_PRIVATE_KEY_PASSWORD:+ required: false++permissions:+ contents: read++env:+ LIBDE265_VERSION: "1.0.16"+ LIBDE265_SHA256: b92beb6b53c346db9a8fae968d686ab706240099cdd5aff87777362d668b0de7+ LIBHEIF_VERSION: "1.19.8"+ LIBHEIF_SHA256: 6c4a5b08e6eae66d199977468859dea3b5e059081db8928f7c7c16e53836c906++jobs:+ build:+ runs-on: ubuntu-24.04+ timeout-minutes: 75+ container:+ image: ubuntu:22.04+ defaults:+ run:+ shell: bash+ steps:+ - name: Build dependencies+ env:+ DEBIAN_FRONTEND: noninteractive+ run: |+ apt-get update+ apt-get install -y --no-install-recommends \+ build-essential cmake curl ca-certificates git file patchelf binutils pkg-config \+ libwebkit2gtk-4.1-dev libgtk-3-dev libayatana-appindicator3-dev librsvg2-dev \+ libsecret-1-dev libfuse3-dev \+ libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev \+ gstreamer1.0-plugins-base gstreamer1.0-plugins-good gstreamer1.0-libav+ # The GStreamer plugins are what the AppImage carries (bundleMediaFramework).+ # Ubuntu's own libheif (1.12) must not be here: the one built below takes its place.+ if dpkg-query -W -f '${Status}' libheif1 2>/dev/null | grep -q 'ok installed'; then+ echo "::error::Ubuntu's libheif1 was pulled in; it would clash with the one built here"+ exit 1+ fi+ - uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0+ - name: libde265 and libheif, from their release tarballs+ run: |+ src=$(mktemp -d)+ fetch() { # fetch <url> <sha256>+ curl -fsSL -o "$src/$(basename "$1")" "$1"+ echo "$2 $src/$(basename "$1")" | sha256sum -c -+ tar -xzf "$src/$(basename "$1")" -C "$src"+ }+ fetch "https://github.com/strukturag/libde265/releases/download/v$LIBDE265_VERSION/libde265-$LIBDE265_VERSION.tar.gz" "$LIBDE265_SHA256"+ fetch "https://github.com/strukturag/libheif/releases/download/v$LIBHEIF_VERSION/libheif-$LIBHEIF_VERSION.tar.gz" "$LIBHEIF_SHA256"+ # libde265 with autotools: its CMake build gives the library no soname (libde265.so,+ # not libde265.so.0). Decoder only.+ (cd "$src/libde265-$LIBDE265_VERSION" &&+ ./configure --prefix=/usr --libdir=/usr/lib/x86_64-linux-gnu \+ --disable-static --disable-dec265 --disable-sherlock265 --disable-encoder &&+ make -j"$(nproc)" && make install)+ # libheif decoding HEIC only, with libde265 as a plugin in the directory Debian and+ # Ubuntu use — the one appimage.files copies it from and appimage.rs points it at.+ cmake -S "$src/libheif-$LIBHEIF_VERSION" -B "$src/heif-build" \+ -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr \+ -DCMAKE_INSTALL_LIBDIR=lib/x86_64-linux-gnu \+ -DPLUGIN_DIRECTORY=/usr/lib/x86_64-linux-gnu/libheif/plugins \+ -DWITH_LIBDE265=ON -DWITH_LIBDE265_PLUGIN=ON \+ -DWITH_X265=OFF -DWITH_AOM_DECODER=OFF -DWITH_AOM_ENCODER=OFF \+ -DWITH_OpenH264_DECODER=OFF -DWITH_DAV1D=OFF -DWITH_RAV1E=OFF -DWITH_SvtEnc=OFF \+ -DWITH_JPEG_DECODER=OFF -DWITH_JPEG_ENCODER=OFF \+ -DWITH_OpenJPEG_DECODER=OFF -DWITH_OpenJPEG_ENCODER=OFF \+ -DWITH_LIBSHARPYUV=OFF -DWITH_EXAMPLES=OFF -DWITH_GDK_PIXBUF=OFF -DBUILD_TESTING=OFF+ cmake --build "$src/heif-build" -j"$(nproc)"+ cmake --install "$src/heif-build"+ ldconfig+ pkg-config --modversion libheif libde265+ ls -l /usr/lib/x86_64-linux-gnu/libheif/plugins/libheif-libde265.so /usr/lib/x86_64-linux-gnu/libde265.so.0+ - uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0+ with:+ node-version: 22+ cache: npm+ - uses: dtolnay/rust-toolchain@b725eda525362e7cf34af9a7243cac1e3f01a7ec # stable+ - uses: Swatinem/rust-cache@d1527c8f67ef9af357290475d4af4b0fab8f12e0 # v2.9.3+ with:+ shared-key: appimage-jammy+ - run: npm ci --no-audit --no-fund+ - name: Build the AppImage+ # The build machine's paths are never written into the program. linuxdeploy, which+ # Tauri runs, is an AppImage itself; a container has no FUSE, so it unpacks itself.+ env:+ RUSTFLAGS: --remap-path-prefix=${{ github.workspace }}=skykeep+ APPIMAGE_EXTRACT_AND_RUN: "1"+ UPDATER: ${{ inputs.updater }}+ TAURI_SIGNING_PRIVATE_KEY: ${{ secrets.TAURI_SIGNING_PRIVATE_KEY }}+ TAURI_SIGNING_PRIVATE_KEY_PASSWORD: ${{ secrets.TAURI_SIGNING_PRIVATE_KEY_PASSWORD }}+ run: |+ if [ "$UPDATER" = true ]; then+ if [ -z "$TAURI_SIGNING_PRIVATE_KEY" ]; then+ echo "::error::a release needs the TAURI_SIGNING_PRIVATE_KEY secret to sign its updates"+ exit 1+ fi+ npx tauri build --bundles appimage --config '{"bundle":{"createUpdaterArtifacts":true}}'+ ls target/release/bundle/appimage/*.AppImage.sig+ else+ npx tauri build --bundles appimage+ fi+ - name: Nothing in it needs more than Ubuntu 22.04 has+ # Every ELF file's version needs (objdump -p, "Version References"), against 22.04's+ # glibc 2.35 and libstdc++ (GCC 12's: GLIBCXX 3.4.30, CXXABI 1.3.13).+ run: |+ app=$(ls target/release/bundle/appimage/*.AppImage)+ chmod +x "$app"+ dir=$(mktemp -d)+ (cd "$dir" && "$OLDPWD/$app" --appimage-extract >/dev/null)+ over=0 elfs=0+ ceiling() { # ceiling <prefix> <max> <file> <needs>+ local v+ for v in $(grep -o "^$1_[0-9.]*" <<<"$4" | sed "s/^$1_//" | sort -uV); do+ if [ "$(printf '%s\n%s\n' "$v" "$2" | sort -V | tail -n1)" != "$2" ]; then+ echo "::error::${3#"$dir"/squashfs-root/} needs $1_$v (Ubuntu 22.04 has $1_$2)"+ over=$((over + 1))+ fi+ done+ }+ highest() { grep -o "^$1_[0-9.]*" <<<"$2" | sed "s/^$1_//" | sort -uV | tail -n1; }+ all=+ while IFS= read -r -d '' f; do+ [ "$(head -c4 "$f" | od -An -c | tr -d ' ')" = '177ELF' ] || continue+ elfs=$((elfs + 1))+ needs=$(objdump -p "$f" 2>/dev/null | awk '/^Version References:/ {on=1; next} on && /^[^ \t]/ {on=0} on && NF == 4 {print $4}')+ all+="$needs"$'\n'+ ceiling GLIBC 2.35 "$f" "$needs"+ ceiling GLIBCXX 3.4.30 "$f" "$needs"+ ceiling CXXABI 1.3.13 "$f" "$needs"+ done < <(find "$dir/squashfs-root" -type f -print0)+ echo "$elfs ELF files; the highest needs: GLIBC_$(highest GLIBC "$all"), GLIBCXX_$(highest GLIBCXX "$all"), CXXABI_$(highest CXXABI "$all")"+ rm -rf "$dir"+ [ "$elfs" -gt 0 ] && [ "$over" -eq 0 ]+ - name: Build the check's probe+ if: inputs.probe+ run: |+ cargo build --release --locked -p quince-probe --example distro_check+ cp target/release/examples/distro_check target/release/bundle/appimage/+ - uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2+ with:+ name: ${{ inputs.artifact }}+ path: |+ target/release/bundle/appimage/*.AppImage+ target/release/bundle/appimage/*.AppImage.sig+ target/release/bundle/appimage/distro_check+ if-no-files-found: errordiff --git a/.github/workflows/linux-compat.yml b/.github/workflows/linux-compat.ymlindex 67abe64..cadf275 100644--- a/.github/workflows/linux-compat.yml+++ b/.github/workflows/linux-compat.yml@@ -6,8 +6,10 @@# and the program still up 8 s later, and the launchers, metainfo and icons valid.## Not on every push: by hand (Actions → Linux compatibility → Run workflow), and for a release-# tag. The packages are built the way release.yml builds them, on Ubuntu 24.04 — the oldest-# base whose libheif (1.17) the app accepts; Debian 12 (libheif 1.15, glibc 2.36) cannot run it.+# tag. The packages are built the way release.yml builds them: the .deb and .rpm on Ubuntu 24.04+# — the oldest base whose libheif (1.17) the app accepts; Debian 12 (libheif 1.15, glibc 2.36)+# cannot run them — and the AppImage in an Ubuntu 22.04 container (appimage.yml), carrying a+# libheif of its own, so it runs on 22.04 and newer; there it is also started with no network.# `native` also builds from source on Debian 13, Fedora 42 and openSUSE Tumbleweed (and `arch`# on Arch) with the build dependencies CONTRIBUTING lists, and installs each of those packages# in a clean container of the distribution it was built on.@@ -40,8 +42,7 @@ jobs:libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev \gstreamer1.0-plugins-base gstreamer1.0-plugins-good gstreamer1.0-libav \libheif-plugin-libde265 libheif-examples libheif-plugin-x265- # libheif-plugin-libde265 is the HEVC decoder the AppImage carries for HEIC photos- # (tauri.conf.json, bundle.linux.appimage.files); x265 only encodes the test's HEIC.+ # x265 only encodes the test's HEIC.- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0with:node-version: 22@@ -52,7 +53,7 @@ jobs:- name: Build the packagesenv:RUSTFLAGS: --remap-path-prefix=${{ github.workspace }}=skykeep- run: npx tauri build+ run: npx tauri build --bundles deb,rpm- name: Build the check's proberun: cargo build --release --locked -p quince-probe --example distro_check- name: A HEIC made for the test@@ -69,7 +70,6 @@ jobs:run: |mkdir compatcp target/release/bundle/deb/*.deb target/release/bundle/rpm/*.rpm \- target/release/bundle/appimage/*.AppImage \target/release/examples/distro_check test.heic packaging/linux-compat/check.sh \crates/quince-media/tests/fixtures/black-start.mp4 \crates/quince-media/tests/fixtures/hevc.mov compat/@@ -81,8 +81,16 @@ jobs:if-no-files-found: errorretention-days: 7+ # The AppImage and a probe built beside it, on Ubuntu 22.04: a probe from the 24.04 build would+ # itself need glibc 2.39 there.+ appimage:+ uses: ./.github/workflows/appimage.yml+ with:+ probe: true+ artifact: linux-compat-appimage+install:- needs: build+ needs: [build, appimage]name: ${{ matrix.name }}runs-on: ubuntu-24.04timeout-minutes: 20@@ -98,23 +106,39 @@ jobs:- { name: "Fedora 41 (.rpm)", image: "fedora:41", pkg: "*.rpm" }- { name: "Fedora 42 (.rpm)", image: "fedora:42", pkg: "*.rpm" }- { name: "openSUSE Tumbleweed (.rpm)", image: "opensuse/tumbleweed", pkg: "*.rpm" }- - { name: "Debian 13 (AppImage)", image: "debian:trixie", pkg: "*.AppImage" }- - { name: "Fedora 42 (AppImage)", image: "fedora:42", pkg: "*.AppImage" }+ # The AppImage's launches run with no network (check.sh, unshare -n), which needs+ # CAP_SYS_ADMIN in the container.+ - { name: "Ubuntu 22.04 (AppImage)", image: "ubuntu:22.04", pkg: "*.AppImage", options: "--cap-add=SYS_ADMIN" }+ - { name: "Ubuntu 24.04 (AppImage)", image: "ubuntu:24.04", pkg: "*.AppImage", options: "--cap-add=SYS_ADMIN" }+ - { name: "Debian 13 (AppImage)", image: "debian:trixie", pkg: "*.AppImage", options: "--cap-add=SYS_ADMIN" }+ - { name: "Fedora 42 (AppImage)", image: "fedora:42", pkg: "*.AppImage", options: "--cap-add=SYS_ADMIN" }container:image: ${{ matrix.image }}+ options: ${{ matrix.options || '' }}steps:- uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0with:name: linux-compatpath: /compat+ - uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0+ if: matrix.pkg == '*.AppImage'+ with:+ name: linux-compat-appimage+ path: /appimage- name: Install and runenv:PKG: ${{ matrix.pkg }}run: |chmod +x /compat/check.sh /compat/distro_check- # shellcheck disable=SC2086- bash /compat/check.sh /compat/$PKG /compat/distro_check /compat/test.heic \- /compat/black-start.mp4 /compat/hevc.mov+ if [ "$PKG" = '*.AppImage' ]; then+ chmod +x /appimage/distro_check+ bash /compat/check.sh /appimage/*.AppImage /appimage/distro_check /compat/test.heic \+ /compat/black-start.mp4 /compat/hevc.mov+ else+ # shellcheck disable=SC2086+ bash /compat/check.sh /compat/$PKG /compat/distro_check /compat/test.heic \+ /compat/black-start.mp4 /compat/hevc.mov+ fi# The packages built on each distribution itself, from the build dependencies CONTRIBUTING# lists for it — so a missing or renamed -devel package, a compiler that disagrees or adiff --git a/.github/workflows/release.yml b/.github/workflows/release.ymlindex 43f8d01..a2f78fb 100644--- a/.github/workflows/release.yml+++ b/.github/workflows/release.yml@@ -1,10 +1,14 @@# A release, from one tag: `git tag v0.2.0 && git push origin v0.2.0`.-# linux — .deb, .rpm and .AppImage, built on Ubuntu 24.04 (its libheif is new enough). None-# is kept unless it runs: the .deb is installed on the build machine and started-# headless under Xvfb; the .rpm is installed with dnf in a clean Fedora 41 container-# and started the same way; the .AppImage is started with-# --appimage-extract-and-run (no FUSE needed) after the .deb is removed. "Started"-# means the program is still running 8 s later — not merely that it links;+# appimage — the .AppImage, built in an Ubuntu 22.04 container (appimage.yml), so it runs on+# 22.04 and everything newer; nothing in it may need more than 22.04's glibc 2.35;+# linux — .deb and .rpm, built on Ubuntu 24.04 (its libheif is new enough). None is kept+# unless it runs: the .deb is installed on the build machine and started headless+# under Xvfb; the .rpm is installed with dnf in a clean Fedora 41 container and+# started the same way; the .AppImage is started with --appimage-extract-and-run+# (no FUSE needed) after the .deb is removed, then with no network at all in clean+# Ubuntu 22.04 and Fedora 41 containers, as the AppImage catalog starts it.+# "Started" means the program is still running some seconds later — not merely+# that it links;# windows — the Windows pipeline (windows.yml): its tests, the .msi and .exe, the smoke test;# publish — every file in one draft release with its checksums, for a person to read over# and publish. Nothing is published by itself. Each installer is also attached@@ -30,7 +34,17 @@ permissions:contents: readjobs:+ appimage:+ uses: ./.github/workflows/appimage.yml+ with:+ updater: true+ artifact: skykeep-appimage+ secrets:+ TAURI_SIGNING_PRIVATE_KEY: ${{ secrets.TAURI_SIGNING_PRIVATE_KEY }}+ TAURI_SIGNING_PRIVATE_KEY_PASSWORD: ${{ secrets.TAURI_SIGNING_PRIVATE_KEY_PASSWORD }}+linux:+ needs: appimageruns-on: ubuntu-24.04timeout-minutes: 60steps:@@ -65,19 +79,15 @@ jobs:- uses: Swatinem/rust-cache@d1527c8f67ef9af357290475d4af4b0fab8f12e0 # v2.9.3- run: npm ci- name: Build the packages- # The build machine's paths are never written into the program. The AppImage is signed- # for the updater; the key is the release's own secret.+ # The build machine's paths are never written into the program. The .deb and .rpm are+ # updated by package managers, so nothing here is signed; the AppImage is (appimage).env:RUSTFLAGS: --remap-path-prefix=${{ github.workspace }}=skykeep- TAURI_SIGNING_PRIVATE_KEY: ${{ secrets.TAURI_SIGNING_PRIVATE_KEY }}- TAURI_SIGNING_PRIVATE_KEY_PASSWORD: ${{ secrets.TAURI_SIGNING_PRIVATE_KEY_PASSWORD }}- run: |- if [ -z "$TAURI_SIGNING_PRIVATE_KEY" ]; then- echo "::error::a release needs the TAURI_SIGNING_PRIVATE_KEY secret to sign its updates"- exit 1- fi- npx tauri build --config '{"bundle":{"createUpdaterArtifacts":true}}'- ls target/release/bundle/appimage/*.AppImage.sig+ run: npx tauri build --bundles deb,rpm+ - uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0+ with:+ name: skykeep-appimage+ path: target/release/bundle/appimage# One check for every package: the program is started headless with --background (no# window is asked for unless sign-in needs one), on its own session bus, in an empty home,# and must still be running 8 s later. `timeout` ending it (124) is the pass; any other@@ -86,19 +96,20 @@ jobs:run: |cat > "$RUNNER_TEMP/stays-up.sh" <<'SH'#!/bin/bash- # stays-up.sh <label> <command…>: the command must still be running after 8 s.+ # stays-up.sh <label> <command…>: the command must still be running after $SECS s (8).set -ulabel=$1; shift+ secs=${SECS:-8}HOME=$(mktemp -d); XDG_RUNTIME_DIR=$(mktemp -d)export HOME XDG_RUNTIME_DIR RUST_BACKTRACE=1chmod 700 "$XDG_RUNTIME_DIR"log=$(mktemp)- timeout --kill-after=5 8 dbus-run-session -- xvfb-run -a -s "-screen 0 1280x800x24" "$@" >"$log" 2>&1+ timeout --kill-after=5 "$secs" dbus-run-session -- xvfb-run -a -s "-screen 0 1280x800x24" "$@" >"$log" 2>&1rc=$?cat "$log"if [ "$rc" -ne 124 ]; then echo "::error::$label exited on start (code $rc)"; exit 1; fiif grep -q "panicked at" "$log"; then echo "::error::$label panicked"; exit 1; fi- echo "$label: still running after 8 s"+ echo "$label: still running after $secs s"SHchmod +x "$RUNNER_TEMP/stays-up.sh"- name: The .deb installs and its program starts@@ -127,6 +138,33 @@ jobs:app=$(ls target/release/bundle/appimage/*.AppImage)chmod +x "$app""$RUNNER_TEMP/stays-up.sh" AppImage "$app" --appimage-extract-and-run --background+ # As the AppImage catalog runs it: no network at all, in clean containers of the oldest+ # Ubuntu LTS it is built for and of a newer distribution, started as a person starts it+ # (no arguments: the window opens) and still up 15 s later. Each container first gets+ # what every desktop has and an AppImage leaves to it (GL, X11, fonts, ALSA: linuxdeploy's+ # excludelist) and the check's own Xvfb and D-Bus, then runs with --network none.+ - name: The .AppImage starts offline, on Ubuntu 22.04 and Fedora 41+ run: |+ app=$(ls target/release/bundle/appimage/*.AppImage)+ chmod +x "$app"+ offline() { # offline <image> <install command>+ docker rm -f desk >/dev/null 2>&1 || true+ docker run --name desk "$1" bash -euc "$2"+ docker commit desk "desk-${1//:/-}" >/dev/null+ docker rm desk >/dev/null+ docker run --rm --network none -e SECS=15 \+ -v "$PWD/$(dirname "$app"):/app:ro" -v "$RUNNER_TEMP:/check:ro" "desk-${1//:/-}" \+ bash -euc 'cd "$(mktemp -d)" && /app/'"$(basename "$app")"' --appimage-extract >/dev/null+ /check/stays-up.sh "AppImage on $(. /etc/os-release && echo "$PRETTY_NAME"), offline" "$PWD/squashfs-root/AppRun"'+ }+ offline ubuntu:22.04 'export DEBIAN_FRONTEND=noninteractive; apt-get update -qq+ apt-get install -y -qq --no-install-recommends xvfb xauth dbus libgl1 libegl1 libgles2 \+ libfontconfig1 fonts-dejavu-core libx11-6 libx11-xcb1 libxcb1 libdrm2 libharfbuzz0b \+ libfribidi0 libfreetype6 libasound2 libgpg-error0 >/dev/null'+ offline fedora:41 'dnf -y -q install --setopt=install_weak_deps=False \+ xorg-x11-server-Xvfb xorg-x11-xauth dbus-daemon which mesa-libGL mesa-libEGL \+ libglvnd-gles fontconfig dejavu-sans-fonts libX11 libX11-xcb libxcb libdrm harfbuzz \+ fribidi freetype alsa-lib libgpg-error'- name: Checksumsrun: |cd target/release/bundle@@ -138,8 +176,6 @@ jobs:path: |target/release/bundle/deb/*.debtarget/release/bundle/rpm/*.rpm- target/release/bundle/appimage/*.AppImage- target/release/bundle/appimage/*.AppImage.sigtarget/release/bundle/SHA256SUMS-linux.txtif-no-files-found: error@@ -154,7 +190,7 @@ jobs:publish:if: startsWith(github.ref, 'refs/tags/v')- needs: [linux, windows]+ needs: [appimage, linux, windows]runs-on: ubuntu-24.04permissions:contents: writediff --git a/packaging/linux-compat/check.sh b/packaging/linux-compat/check.shindex 113397b..8988a1f 100644--- a/packaging/linux-compat/check.sh+++ b/packaging/linux-compat/check.sh@@ -27,6 +27,8 @@# launch started headless under Xvfb on its own session bus, the page draws# (window_ready) and the program is still running 8 s later — with --background,# as the main launcher starts it, and as one app's launcher does (--app notes);+# the AppImage with no network at all (unshare -n, so the container needs+# CAP_SYS_ADMIN), as the AppImage catalog starts it;# relaunch with no tray to click, launching again hands over to the running Skykeep and# its window shows;# desktop the launchers and the metainfo validate, the icon is in hicolor under the name@@ -52,9 +54,12 @@ case "$like" in# container gst-libav (libavcodec links them) does not load and avdec_* looks missing.# libgpg-error too (under libgcrypt, on every system): libavcodec's libraries link it, and# without it gst-libav — every H.264 and HEVC decoder — does not load.+ # ALSA is libasound2t64 from Ubuntu 24.04 and Debian 13 on, libasound2 before.+ asound=libasound2t64+ apt-cache show libasound2t64 >/dev/null 2>&1 || asound=libasound2[[ $pkg == *.AppImage ]] && tools+=" libgl1 libegl1 libgles2 libfontconfig1 fonts-dejavu-core \libx11-6 libx11-xcb1 libxcb1 libxcb-dri3-0 libdrm2 libharfbuzz0b libfribidi0 libfreetype6 \- libasound2t64 libgpg-error0"+ $asound libgpg-error0"# shellcheck disable=SC2086apt-get install -y -qq --no-install-recommends $tools >/dev/null[[ $pkg == *.deb ]] && { apt-get install -y -q --no-install-recommends "$pkg" || exit 1; }@@ -238,7 +243,16 @@ elsefiSHchmod +x /tmp/session.sh-results=$(dbus-run-session -- /tmp/session.sh "$probe" "$prog" "$libs")+# The AppImage offline: the whole session in a network namespace of its own, with no network.+offline=()+if [[ $pkg == *.AppImage ]]; then+ if unshare -n true 2>/dev/null; then+ offline=(unshare -n) && echo "-- launches with no network (unshare -n)"+ else+ fail offline "unshare -n is not allowed here (the container needs CAP_SYS_ADMIN)"+ fi+fi+results=$("${offline[@]}" dbus-run-session -- /tmp/session.sh "$probe" "$prog" "$libs")echo "$results"fails=$((fails + $(grep -c '^FAIL' <<<"$results")))