Skip to content

armgit / kwant

Public Imported from GitHub
0

Your own team of AI bots in one self-hosted binary: spaces, every account you have, handoffs, approvals and routines. Open-source, self-hosted alternative to Grok Bot, Claude Duet and OpenAI dots. Rust + React.

Linux: AppImage update information, .zsync and AppStream metainfo (#265)

Oleksandr Ivanchenkocc7dfe8abe19
diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml
index 6facf765..46cda859 100644
--- a/.github/workflows/linux.yml
+++ b/.github/workflows/linux.yml
@@ -10,6 +10,12 @@ name: linux
# Built on ubuntu-22.04 so the AppImage runs on distros with glibc 2.35 or newer. The updater
# artifacts (.AppImage.sig, .deb.sig) are signed with a throwaway key on pull requests and manual
# runs; only tag builds get the release key, so no PR code ever runs with it.
+#
+# For AppImage tools and the AppImage catalog (appimage.github.io), the AppImage carries update
+# information that points at kwant_x86_64.AppImage.zsync in the latest GitHub release, and both
+# packages carry AppStream metainfo (apps/mac/linux/si.kwant.kwant.appdata.xml). The .zsync is made
+# here, under the release file name, so pull requests exercise it too; the "catalog checks" job
+# validates all of it from the uploaded artifact, the way the catalog's own test does.
on:
workflow_call:
workflow_dispatch:
@@ -30,6 +36,8 @@ concurrency:
env:
CARGO_TERM_COLOR: always
CARGO_INCREMENTAL: 0
+ # AppImageUpdate and the catalog read this from the AppImage's .upd_info section
+ APPIMAGE_UPDATE_INFORMATION: "gh-releases-zsync|alexsergivan|kwant|latest|kwant_x86_64.AppImage.zsync"
jobs:
appimage-deb:
@@ -42,7 +50,7 @@ jobs:
run: |
sudo apt-get update
sudo apt-get install -y --no-install-recommends libwebkit2gtk-4.1-dev libgtk-3-dev \
- libayatana-appindicator3-dev librsvg2-dev patchelf xvfb xauth
+ libayatana-appindicator3-dev librsvg2-dev patchelf xvfb xauth zsync
- uses: actions/setup-node@v4
with:
node-version: 20
@@ -69,10 +77,31 @@ jobs:
- name: Release updater key
if: startsWith(github.ref, 'refs/tags/mac-v')
run: python3 -c 'import json; print(json.load(open("apps/mac/tauri.conf.json"))["plugins"]["updater"]["pubkey"])' > "$RUNNER_TEMP/updater.pub"
+ # The packaged metainfo names the version being built, dated by its CHANGELOG section
+ # (today on pull requests that come before one).
+ - name: AppStream release entry
+ run: |
+ set -euo pipefail
+ version=$(python3 -c 'import json; print(json.load(open("apps/mac/tauri.conf.json"))["version"])')
+ date=$(sed -n "s/^## \[Mac ${version//./\\.}\] - \([0-9-]*\).*/\1/p" CHANGELOG.md | head -1)
+ [ -n "$date" ] || date=$(date -u +%F)
+ python3 - "$version" "$date" apps/mac/linux/si.kwant.kwant.appdata.xml <<'PY'
+ import re, sys
+ version, date, path = sys.argv[1:]
+ text = open(path).read()
+ text, n = re.subn(r'<release version="[^"]*" date="[^"]*"/>', f'<release version="{version}" date="{date}"/>', text, count=1)
+ if n != 1:
+ sys.exit(f"no <release> entry in {path}")
+ open(path, "w").write(text)
+ PY
+ grep -n '<release ' apps/mac/linux/si.kwant.kwant.appdata.xml
- name: Build the .deb and AppImage
working-directory: apps/mac
timeout-minutes: 30
env:
+ # linuxdeploy-plugin-appimage embeds it before Tauri signs the AppImage, so the .sig stays valid
+ LDAI_UPDATE_INFORMATION: ${{ env.APPIMAGE_UPDATE_INFORMATION }}
+ UPDATE_INFORMATION: ${{ env.APPIMAGE_UPDATE_INFORMATION }}
IS_TAG: ${{ startsWith(github.ref, 'refs/tags/mac-v') }}
TAURI_SIGNING_PRIVATE_KEY: ${{ startsWith(github.ref, 'refs/tags/mac-v') && secrets.TAURI_SIGNING_PRIVATE_KEY || '' }}
TAURI_SIGNING_PRIVATE_KEY_PASSWORD: ${{ startsWith(github.ref, 'refs/tags/mac-v') && secrets.TAURI_SIGNING_PRIVATE_KEY_PASSWORD || '' }}
@@ -109,6 +138,19 @@ jobs:
done
echo "deb=$PWD/$deb" >> "$GITHUB_OUTPUT"
echo "appimage=$PWD/$appimage" >> "$GITHUB_OUTPUT"
+ # The static AppImage runtime answers this without FUSE
+ - name: AppImage update information
+ env:
+ APPIMAGE: ${{ steps.bundle.outputs.appimage }}
+ run: |
+ set -euo pipefail
+ chmod +x "$APPIMAGE"
+ info=$("$APPIMAGE" --appimage-updateinformation | tr -d '\000' | sed -E 's/^[[:space:]]+//; s/[[:space:]]+$//')
+ echo "update information: $info"
+ if [ "$info" != "$APPIMAGE_UPDATE_INFORMATION" ]; then
+ echo "::error::the AppImage's update information is \"$info\", expected \"$APPIMAGE_UPDATE_INFORMATION\""
+ exit 1
+ fi
- name: Inspect the packages
env:
DEB: ${{ steps.bundle.outputs.deb }}
@@ -120,6 +162,7 @@ jobs:
grep -Eq ' (\./)?usr/bin/kwant$' "$RUNNER_TEMP/deb-files.txt"
grep -Eq ' (\./)?usr/share/applications/kwant\.desktop$' "$RUNNER_TEMP/deb-files.txt"
grep -Eq ' (\./)?usr/share/icons/hicolor/[^/]+/apps/kwant\.png$' "$RUNNER_TEMP/deb-files.txt"
+ grep -Eq ' (\./)?usr/share/metainfo/si\.kwant\.kwant\.appdata\.xml$' "$RUNNER_TEMP/deb-files.txt"
depends=$(dpkg-deb -f "$DEB" Depends)
echo "Depends: $depends"
for dep in libwebkit2gtk-4.1-0 libgtk-3-0 libayatana-appindicator3-1 python3-venv xdg-utils; do
@@ -191,6 +234,18 @@ jobs:
out="$RUNNER_TEMP/linux"
mkdir -p "$out"
cp "$DEB" "$DEB.sig" "$APPIMAGE" "$APPIMAGE.sig" "$out/"
+ # The .zsync AppImageUpdate fetches, made over these exact bytes under the name the release
+ # gives them (any .zsync the bundler wrote has the old name and is ignored)
+ zs="$RUNNER_TEMP/zsync"
+ mkdir -p "$zs"
+ cp "$APPIMAGE" "$zs/kwant_x86_64.AppImage"
+ (cd "$zs" && zsyncmake -u kwant_x86_64.AppImage -o "$out/kwant_x86_64.AppImage.zsync" kwant_x86_64.AppImage)
+ head -c 400 "$out/kwant_x86_64.AppImage.zsync" | sed -n '/^$/q;p'
+ want=$(sha1sum "$APPIMAGE" | cut -d' ' -f1)
+ got=$(sed -n 's/^SHA-1: //p' "$out/kwant_x86_64.AppImage.zsync" | head -1)
+ [ "$got" = "$want" ] || { echo "::error::the .zsync's SHA-1 $got doesn't match the AppImage's $want"; exit 1; }
+ grep -qx 'Filename: kwant_x86_64.AppImage' "$out/kwant_x86_64.AppImage.zsync"
+ grep -qx 'URL: kwant_x86_64.AppImage' "$out/kwant_x86_64.AppImage.zsync"
cd "$out"
for f in *.deb *.AppImage; do sha256sum "$f" > "$f.sha256"; done
ls -l
@@ -200,3 +255,63 @@ jobs:
path: ${{ runner.temp }}/linux
if-no-files-found: error
retention-days: 14
+
+ # What the AppImage catalog's test checks, on the packages as uploaded: AppStream metainfo
+ # (appstreamcli validate-tree, as the catalog runs it on ubuntu-latest), the desktop file, the
+ # update information and the .zsync next to it.
+ catalog-checks:
+ name: catalog checks
+ needs: appimage-deb
+ runs-on: ubuntu-24.04
+ timeout-minutes: 15
+ steps:
+ - name: Tools
+ run: |
+ sudo apt-get update
+ sudo apt-get install -y --no-install-recommends appstream desktop-file-utils
+ appstreamcli --version
+ - uses: actions/download-artifact@v4
+ with:
+ name: linux
+ path: linux
+ - name: Unpack the packages
+ working-directory: linux
+ run: |
+ set -euo pipefail
+ appimage=$(ls *_amd64.AppImage)
+ deb=$(ls *_amd64.deb)
+ chmod +x "$appimage"
+ "./$appimage" --appimage-extract > /dev/null
+ mv squashfs-root "$RUNNER_TEMP/appdir"
+ dpkg-deb -x "$deb" "$RUNNER_TEMP/debroot"
+ echo "APPIMAGE=$PWD/$appimage" >> "$GITHUB_ENV"
+ - name: AppStream metainfo
+ run: |
+ set -euo pipefail
+ for root in "$RUNNER_TEMP/appdir" "$RUNNER_TEMP/debroot"; do
+ f="$root/usr/share/metainfo/si.kwant.kwant.appdata.xml"
+ test -f "$f"
+ grep -n '<release ' "$f"
+ appstreamcli validate --no-net --pedantic "$f"
+ appstreamcli validate-tree --pedantic "$root"
+ done
+ - name: Desktop file
+ run: |
+ set -euo pipefail
+ for f in "$RUNNER_TEMP/appdir/usr/share/applications/kwant.desktop" "$RUNNER_TEMP/debroot/usr/share/applications/kwant.desktop"; do
+ cat "$f"
+ desktop-file-validate "$f"
+ done
+ - name: Update information and .zsync
+ working-directory: linux
+ run: |
+ set -euo pipefail
+ info=$("$APPIMAGE" --appimage-updateinformation | tr -d '\000' | sed -E 's/^[[:space:]]+//; s/[[:space:]]+$//')
+ echo "update information: $info"
+ [ "$info" = "$APPIMAGE_UPDATE_INFORMATION" ] || { echo "::error::expected \"$APPIMAGE_UPDATE_INFORMATION\""; exit 1; }
+ zsync_file=$(echo "$info" | cut -d'|' -f5)
+ test -f "$zsync_file"
+ want=$(sha1sum "$APPIMAGE" | cut -d' ' -f1)
+ got=$(sed -n 's/^SHA-1: //p' "$zsync_file" | head -1)
+ echo "SHA-1: AppImage $want, .zsync $got"
+ [ "$got" = "$want" ] || { echo "::error::the .zsync's SHA-1 doesn't match the AppImage"; exit 1; }
diff --git a/.github/workflows/mac.yml b/.github/workflows/mac.yml
index f8579904..2fc514ce 100644
--- a/.github/workflows/mac.yml
+++ b/.github/workflows/mac.yml
@@ -394,6 +394,13 @@ jobs:
cp "$appimage.sig" kwant_x86_64.AppImage.sig
for f in kwant_amd64.deb kwant_x86_64.AppImage; do sha256sum "$f" > "$f.sha256"; done
assets+=(kwant_amd64.deb kwant_amd64.deb.sig kwant_amd64.deb.sha256 kwant_x86_64.AppImage kwant_x86_64.AppImage.sig kwant_x86_64.AppImage.sha256)
+ # The AppImage's update information points AppImageUpdate at this file in the latest
+ # release; linux.yml made it over the same bytes, under this name
+ zsync_file=$(find dist -type f -name 'kwant_x86_64.AppImage.zsync' | head -1)
+ test -n "$zsync_file"
+ cp "$zsync_file" kwant_x86_64.AppImage.zsync
+ test "$(sed -n 's/^SHA-1: //p' kwant_x86_64.AppImage.zsync | head -1)" = "$(sha1sum kwant_x86_64.AppImage | cut -d' ' -f1)"
+ assets+=(kwant_x86_64.AppImage.zsync)
dl="https://github.com/$GITHUB_REPOSITORY/releases/download/$TAG"
# Installed apps read releases/latest/download/latest.json, which only ever resolves to the
# newest full release; a prerelease gets no latest.json, so it's never offered as an update
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 6f82ab64..30575154 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -8,6 +8,10 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/).
## Unreleased
+### Added
+
+- **The Linux AppImage updates with AppImage tools and lists in software centers.** The AppImage carries update information for AppImageUpdate, and the release ships `kwant_x86_64.AppImage.zsync` next to it. The AppImage and the .deb carry AppStream metainfo (`si.kwant.kwant`). These were the two warnings from the AppImage catalog's test. The in-app updater is unchanged.
+
## [Mac 0.6.8] - 2026-11-03
### Added
diff --git a/apps/mac/README.md b/apps/mac/README.md
index 084aaad0..4eca7316 100644
--- a/apps/mac/README.md
+++ b/apps/mac/README.md
@@ -77,6 +77,14 @@ throwaway key and checks them, installs the .deb and opens the app and the AppIm
display. Linux isn't released yet: it will ship in the same `mac-v*` GitHub release as the Mac app,
so the one `latest.json` serves both.
+Both packages carry AppStream metainfo, `linux/si.kwant.kwant.appdata.xml`, installed as
+`/usr/share/metainfo/si.kwant.kwant.appdata.xml`. linux.yml stamps its `<release>` entry with the
+version it builds. The AppImage carries the update information
+`gh-releases-zsync|alexsergivan|kwant|latest|kwant_x86_64.AppImage.zsync`, set through
+`LDAI_UPDATE_INFORMATION` before Tauri signs it. The release ships that `.zsync`, which linux.yml
+makes over the AppImage's exact bytes. linux.yml's "catalog checks" job validates the metainfo, the
+desktop file, the update information and the `.zsync`, the same checks the AppImage catalog runs.
+
## Releases and the updater key
`mac.yml` signs the updater bundle on `mac-v*` tags with the repository secrets
diff --git a/apps/mac/linux/si.kwant.kwant.appdata.xml b/apps/mac/linux/si.kwant.kwant.appdata.xml
new file mode 100644
index 00000000..16a3c736
--- /dev/null
+++ b/apps/mac/linux/si.kwant.kwant.appdata.xml
@@ -0,0 +1,46 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ AppStream metainfo for the Linux app, installed as /usr/share/metainfo/si.kwant.kwant.appdata.xml
+ in the AppImage and the .deb (tauri.linux.conf.json). The .appdata.xml suffix is the one the
+ AppImage catalog's linter looks for. linux.yml rewrites the <release> entry to the version it
+ builds and validates the result with appstreamcli.
+-->
+<component type="desktop-application">
+ <id>si.kwant.kwant</id>
+ <metadata_license>CC0-1.0</metadata_license>
+ <project_license>AGPL-3.0-only</project_license>
+ <name>kwant</name>
+ <summary>Your team of AI bots</summary>
+ <developer id="si.kwant">
+ <name>The kwant maintainer</name>
+ </developer>
+ <description>
+ <p>
+ kwant gives you a team of AI bots that share chats, hand work to each other with an
+ @mention and get it done on their own, on a schedule or while you are away. Each message
+ goes to the bot that fits, and the reply says why.
+ </p>
+ <p>
+ Work shows up as cards on a Mission board, and a task turns Verified only when its check
+ passes. The app runs the kwant server and its web app on your computer, with a tray icon,
+ and updates itself with signed updates.
+ </p>
+ </description>
+ <launchable type="desktop-id">kwant.desktop</launchable>
+ <url type="homepage">https://kwant.si</url>
+ <url type="bugtracker">https://github.com/alexsergivan/kwant/issues</url>
+ <url type="vcs-browser">https://github.com/alexsergivan/kwant</url>
+ <screenshots>
+ <screenshot type="default">
+ <caption>A team of bots discussing a question in one channel</caption>
+ <image>https://kwant.si/assets/media/desktop-team-discussion-1440.webp</image>
+ </screenshot>
+ </screenshots>
+ <provides>
+ <binary>kwant</binary>
+ </provides>
+ <content_rating type="oars-1.1"/>
+ <releases>
+ <release version="0.6.8" date="2026-11-03"/>
+ </releases>
+</component>
diff --git a/apps/mac/tauri.linux.conf.json b/apps/mac/tauri.linux.conf.json
index ae0b824a..2cd52cd5 100644
--- a/apps/mac/tauri.linux.conf.json
+++ b/apps/mac/tauri.linux.conf.json
@@ -7,10 +7,16 @@
"deb": {
"depends": ["python3", "python3-venv", "xdg-utils"],
"recommends": ["zenity"],
- "section": "devel"
+ "section": "devel",
+ "files": {
+ "/usr/share/metainfo/si.kwant.kwant.appdata.xml": "linux/si.kwant.kwant.appdata.xml"
+ }
},
"appimage": {
- "bundleMediaFramework": false
+ "bundleMediaFramework": false,
+ "files": {
+ "/usr/share/metainfo/si.kwant.kwant.appdata.xml": "linux/si.kwant.kwant.appdata.xml"
+ }
}
}
}