diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 13f523b8..a3c6b676 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -169,11 +169,12 @@ jobs: if-no-files-found: error # build-deb.sh renders the hicolor icon sizes with ImageMagick and refuses to build # without it; ubuntu-24.04 runners carry no ImageMagick, rsvg or Inkscape. desktop-file-utils - # is only needed so the script's optional entry validation actually runs in CI. + # and appstream are only needed so the script's optional entry and metainfo validation + # actually runs in CI. - name: Install packaging tools run: | sudo apt-get update - sudo apt-get install -y --no-install-recommends imagemagick desktop-file-utils + sudo apt-get install -y --no-install-recommends imagemagick desktop-file-utils appstream - name: Build .deb env: VERSION: ${{ needs.version.outputs.version }} diff --git a/changelog.d/+appstream-metainfo.fixed.md b/changelog.d/+appstream-metainfo.fixed.md new file mode 100644 index 00000000..1bf06c90 --- /dev/null +++ b/changelog.d/+appstream-metainfo.fixed.md @@ -0,0 +1 @@ +Linux: software centres such as GNOME Software now show the installed `.deb` as MIT-licensed, with a description, screenshots and an age rating, instead of an unknown and possibly proprietary licence (#799). diff --git a/packaging/linux/build-deb.sh b/packaging/linux/build-deb.sh index 4dc6e77a..e0edb8a1 100755 --- a/packaging/linux/build-deb.sh +++ b/packaging/linux/build-deb.sh @@ -157,6 +157,81 @@ if command -v desktop-file-validate >/dev/null 2>&1; then desktop-file-validate "$ROOT/usr/share/applications/$PKG.desktop" fi +# --- AppStream metainfo ---------------------------------------------------------------------- +# What GNOME Software and KDE Discover show on the installed app's page: licence, description, +# screenshots, age rating. Without it they listed Lagebuch as "Unknown License — may be +# proprietary" (#799). The id is the macOS bundle identifier; the launchable ties it to the entry +# above. The screenshots are the README's, fetched from GitHub at this release's tag: the release +# workflow only ever builds from a v-tag, so the URL always exists. +# A .deb opened in a software centre before installing still shows an unknown licence: PackageKit's +# apt backend reports "unknown" for every package, whatever the package carries. +SCREENSHOTS="https://raw.githubusercontent.com/CodeForFire/lagebuch/v${VERSION}/docs/screenshots" +install -d "$ROOT/usr/share/metainfo" +cat > "$ROOT/usr/share/metainfo/de.codeforfire.$PKG.metainfo.xml" < + + de.codeforfire.$PKG + Lagebuch + Einsatztagebuch, Atemschutzüberwachung und Einsatzberichte für den ELW + CC0-1.0 + MIT + + CodeForFire + + +

+ Lagebuch ist das digitale Einsatztagebuch für den Einsatzleitwagen. Ein Einsatz ist eine + Datei auf dem ELW-Laptop – mit Einsatztagebuch, Kräften, Atemschutzüberwachung, Aufgaben, + CO-Messprotokoll und PDF-Bericht. +

+

+ Lagebuch läuft offline: kein Internet, kein Konto, kein Server, keine Telemetrie. Die + optionale Mehrgeräte-Verbindung bleibt im LAN, TLS-gesichert mit PIN. +

+
+ $PKG.desktop + https://codeforfire.github.io/ + https://github.com/CodeForFire/lagebuch/issues + https://github.com/CodeForFire/lagebuch + + application/x-lagebuch + + + + Startseite + ${SCREENSHOTS}/home.png + + + Einsatztagebuch + ${SCREENSHOTS}/etb.png + + + Kräfte + ${SCREENSHOTS}/kraefte.png + + + Atemschutzüberwachung + ${SCREENSHOTS}/atemschutz.png + + + PDF-Bericht + ${SCREENSHOTS}/pdf-export.png + + + + + + +
+METAINFO +chmod 644 "$ROOT/usr/share/metainfo/de.codeforfire.$PKG.metainfo.xml" + +# Optional for the same reason as desktop-file-validate above. --no-net keeps the build from +# depending on GitHub being reachable; it skips only the check that the screenshot URLs load. +if command -v appstreamcli >/dev/null 2>&1; then + appstreamcli validate --no-net "$ROOT/usr/share/metainfo/de.codeforfire.$PKG.metainfo.xml" +fi + # --- control metadata ------------------------------------------------------------------------ # Installed-Size is in KiB, what apt shows before installing. #