Skip to content

Add a build recipe for qbzd, the Qobuz Connect renderer - #29

Open
Gjuju wants to merge 1 commit into
moode-player:mainfrom
Gjuju:contrib/qbzd-build-recipe
Open

Add a build recipe for qbzd, the Qobuz Connect renderer#29
Gjuju wants to merge 1 commit into
moode-player:mainfrom
Gjuju:contrib/qbzd-build-recipe

Conversation

@Gjuju

@Gjuju Gjuju commented Sep 11, 2026

Copy link
Copy Markdown
Contributor

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:

  • Orange Pi 3 LTS (2 GB, -j2): 439 crates, 82m15s
  • Raspberry Pi 3B (905 MB, -j1): 430 crates, 137m14s
    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 the
plugin script. This recipe uses exit 1.

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>
@Gjuju

Gjuju commented Sep 11, 2026

Copy link
Copy Markdown
Contributor Author

@moodeaudio

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant