feat(packaging): ship qbzd binary and user unit in deb/rpm and tarball

cc
This commit is contained in:
vicrodh committed 2026-07-14 21:02:34 -06:00
1 parent 80a20f4322
commit 39eb12fc45
4 files changed
+72

No files matched your search

@@ -157,6 +157,13 @@ jobs:
with:
name: qbz-linux-aarch64
# T14: the slint-free qbzd binary, produced by T15's build job — see
# release-linux.yml's matching step for the rationale.
- name: Download qbzd binary
uses: actions/download-artifact@v4
with:
name: qbzd-linux-aarch64
- name: Install nfpm
run: |
echo 'deb [trusted=yes] https://repo.goreleaser.com/apt/ /' | \
@@ -172,6 +179,7 @@ jobs:
QBZ_BINARY: ./qbz
run: |
chmod +x qbz
chmod +x qbzd
mkdir -p dist
nfpm package -f packaging/nfpm/nfpm.yaml -p deb \
-t "dist/QBZ_${VERSION}_arm64.deb"
@@ -220,6 +228,15 @@ jobs:
cp packaging/icons/128x128.png "tarball-staging/${TARBALL_DIR}/icons/hicolor/128x128/apps/qbz.png"
cp packaging/icons/256x256.png "tarball-staging/${TARBALL_DIR}/icons/hicolor/256x256/apps/qbz.png"
cp packaging/linux/qbz.desktop "tarball-staging/${TARBALL_DIR}/qbz.desktop"
# Additive (T14) — see release-linux.yml's matching block for the
# layout-contract rationale.
cp qbzd "tarball-staging/${TARBALL_DIR}/qbzd"
chmod +x "tarball-staging/${TARBALL_DIR}/qbzd"
cp crates/qbzd/service/qbzd.service "tarball-staging/${TARBALL_DIR}/qbzd.service"
mkdir -p "tarball-staging/${TARBALL_DIR}/completions"
./qbzd completions bash > "tarball-staging/${TARBALL_DIR}/completions/qbzd.bash"
./qbzd completions zsh > "tarball-staging/${TARBALL_DIR}/completions/qbzd.zsh"
./qbzd completions fish > "tarball-staging/${TARBALL_DIR}/completions/qbzd.fish"
tar -czvf "dist/qbz_${VERSION}_aarch64.tar.gz" -C tarball-staging "${TARBALL_DIR}"
ls -la dist
+24
View File
@@ -192,6 +192,17 @@ jobs:
with:
name: qbz-linux-x86_64
# T14: the slint-free qbzd binary, produced by T15's build job
# (extends the `build` job above to also compile `-p qbzd` and
# upload it under this artifact name). Consumed for deb/rpm (nfpm)
# and the main AUR/Gentoo tarball below. T15's own ubuntu-22.04
# lower-glibc-floor build feeds the separate standalone qbzd
# tarball only — not this artifact.
- name: Download qbzd binary
uses: actions/download-artifact@v4
with:
name: qbzd-linux-x86_64
- name: Install nfpm
run: |
echo 'deb [trusted=yes] https://repo.goreleaser.com/apt/ /' | \
@@ -207,6 +218,7 @@ jobs:
QBZ_BINARY: ./qbz
run: |
chmod +x qbz
chmod +x qbzd
mkdir -p dist
nfpm package -f packaging/nfpm/nfpm.yaml -p deb \
-t "dist/QBZ_${VERSION}_amd64.deb"
@@ -265,6 +277,18 @@ jobs:
cp packaging/icons/128x128.png "tarball-staging/${TARBALL_DIR}/icons/hicolor/128x128/apps/qbz.png"
cp packaging/icons/256x256.png "tarball-staging/${TARBALL_DIR}/icons/hicolor/256x256/apps/qbz.png"
cp packaging/linux/qbz.desktop "tarball-staging/${TARBALL_DIR}/qbz.desktop"
# Additive (T14): qbzd + its user unit + shell completions. Every
# entry above is untouched — the layout contract (header lines
# 10-14) forbids renaming/moving existing entries. AUR/Gentoo/flake
# install-line updates to pick these up are P1 (T22, per D13); the
# files are inert there until then.
cp qbzd "tarball-staging/${TARBALL_DIR}/qbzd"
chmod +x "tarball-staging/${TARBALL_DIR}/qbzd"
cp crates/qbzd/service/qbzd.service "tarball-staging/${TARBALL_DIR}/qbzd.service"
mkdir -p "tarball-staging/${TARBALL_DIR}/completions"
./qbzd completions bash > "tarball-staging/${TARBALL_DIR}/completions/qbzd.bash"
./qbzd completions zsh > "tarball-staging/${TARBALL_DIR}/completions/qbzd.zsh"
./qbzd completions fish > "tarball-staging/${TARBALL_DIR}/completions/qbzd.fish"
tar -czvf "dist/qbz_${VERSION}_amd64.tar.gz" -C tarball-staging "${TARBALL_DIR}"
ls -la dist
+21
View File
@@ -0,0 +1,21 @@
# qbzd.service — QBZ headless Qobuz playback daemon (user unit).
#
# REQUIRED on headless boxes: sudo loginctl enable-linger $USER
# Without linger, this unit STOPS when you log out of SSH and the device
# vanishes from the Qobuz app. `qbzd status` warns when linger is off.
#
# Note: user units cannot order against system targets (network-online.target,
# sound.target are system-scope). Boot-order resilience is IN the binary:
# missing network/DAC at start = retry with backoff, never crash-exit.
[Unit]
Description=QBZ headless Qobuz playback daemon
[Service]
Type=simple
ExecStart=/usr/bin/qbzd run
Restart=on-failure
RestartSec=10
NoNewPrivileges=true
[Install]
WantedBy=default.target
+10
View File
@@ -35,6 +35,16 @@ contents:
dst: /usr/bin/qbz
file_info:
mode: 0755
# qbzd (T14): same literal-path rule as ./qbz above — the workflow stages
# the slint-free daemon binary at ./qbzd before invoking nfpm. Ships
# disabled (no scripts: postinstall) — integrations strictly opt-in; the
# unit's own header carries the `loginctl enable-linger` requirement.
- src: ./qbzd
dst: /usr/bin/qbzd
file_info:
mode: 0755
- src: crates/qbzd/service/qbzd.service
dst: /usr/lib/systemd/user/qbzd.service
# Installed as com.blitzfc.qbz.desktop so the AppStream metainfo's
# <launchable> and the MPRIS DesktopEntry both resolve (review fix).
- src: packaging/linux/qbz.desktop