Add a build recipe for qbzd, the Qobuz Connect renderer - #29
Conversation
Builds qbzd from PhilipVinc's moOde-targeted tag (qbzd-v2.0.2.moode49) the same way the librespot recipe works: clone, install the toolchain, build on the host, package with cargo-deb. Upstream packages for Arch, snap and Flatpak but ships no Debian metadata, so the [package.metadata.deb] section is added by a patch. Only the qbzd crate is built -- it is the slint-free column of the workspace, so none of the desktop GUI stack is linked and the build deps stay to ALSA, JACK, D-Bus and TLS. QBZD_BUILD_ID is exported so the binary reports 2.0.2.moode49 rather than the bare crate version: upstream provides that variable for packagers precisely because a four-part id is not valid semver and cannot live in Cargo.toml. cargo jobs are budgeted from RAM rather than core count, 512 MB kept aside for the system and 512 MB per job. This workspace is heavier than librespot and its last crates are the hungry ones: on a 1 GB board two jobs thrash the card until the system stops answering and systemd's watchdog resets it. Measured, building this package: 1 GB peaks at 990 MB of swap with a single job. The resulting choices match what these boards have always needed -- 1 job at 1 GB, 2 at 2 GB, capped at nproc -- and an explicit CARGO_BUILD_JOBS still wins. Build times with that budget: 82m15s on an Orange Pi 3 LTS (2 GB, -j2), 137m14s on a Raspberry Pi 3B (905 MB, -j1), both installing cleanly through the on-demand plugin chain. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
|
One naming question: the package comes out as qbzd_2.0.2-1moode1 while the binary reports 2.0.2.moode49, upstream's build id for the tag we clone. Would you rather they matched -- qbzd_2.0.2.v49-1moode1, say? It's one line here plus one in moode-sqlite3.db.sql, and I'm happy either way -- your call on naming. |
|
I think @PhilipVinc said he wants to create a new repo name and release tag scheme at some point and so I would recommend simplifying things for this initial test package build and not entangling separate version or build vars. Maybe something like this where the build number "49" is in the package name. This will be good for local testing. I'm not planning to release this as an official plugin until the repo name and release tag format is settled. |
|
I will be dropping the .moodeXX flags, and switching to a standard versioning scheme. I've done most changes locally, and testing a new build that is more reliable than the previous one. I'll take care of the build recipe myself when I feel confident enough that things settled. I think mid week, probably. |
|
I think you'll have something like mu-qbzd 3.0.0 when I'm done |
As suggested: qbzd_2.0.2-49-1moode1, with the version and build vars folded into plain literals. cargo-deb composes the package version from the crate version plus a revision, and a Debian revision cannot carry the build number since it may not contain a hyphen, so the whole version is passed with --deb-version instead. That also removes the sed that used to patch the revision into Cargo.toml. Verified with cargo-deb 2.12.1 on arm64: qbzd_2.0.2-49-1moode1_arm64.deb, which dpkg-deb reads back as Version: 2.0.2-49-1moode1. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
349d5c2 to
f7b4b6c
Compare
|
Done, thanks. As a temp solution : Package now builds as qbzd_2.0.2-49-1moode1_arm64.deb. One note: cargo-deb builds the version from the crate version plus a revision, and a revision can't hold the build number (no hyphens), so it goes through --deb-version instead. For local testing, cfg_plugin.version has to match the new name or the plugin looks for the old file. |
Builds qbzd from PhilipVinc's moOde-targeted tag (qbzd-v2.0.2.moode49), same
shape as the librespot recipe.
Upstream packages for Arch, snap and Flatpak but ships no Debian metadata, so
the [package.metadata.deb] section is added by a patch. Only the qbzd crate is
built -- the slint-free column of the workspace -- so none of the desktop GUI
stack is linked.
cargo jobs are budgeted from RAM rather than core count: 512 MB kept aside for
the system, then 512 MB per job, capped at nproc. This workspace is heavier
than librespot and its last crates are the hungry ones -- on a 1 GB board two
jobs thrash the card until the system stops answering and systemd's watchdog
resets it. Measured while building this package: 990 MB of swap at peak with a
single job.
Verified through the on-demand plugin chain, from boxes with no qbzd installed:
Both install cleanly and report qbzd 2.0.2.moode49.
One note on the librespot recipe it is modelled on: its two error paths end on
a bare
exit, which returns 0, so a failed build looks successful to theplugin script. This recipe uses
exit 1.