Fix: librespot via git+locked bauen statt crates.io

cargo install von crates.io löst immer die neuesten Abhängigkeiten auf
und zieht vergen-gitcl >=1.0 rein (vergen-lib 9.x), was mit dem
build.rs von librespot-core kollidiert (erwartet vergen-lib 0.1.x).

Mit --git --tag v0.7.0 --locked wird das originale Cargo.lock aus
dem Release-Tag verwendet, das vergen-gitcl 0.x pinnt.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-04-06 13:56:32 +02:00
parent 36dbf0c588
commit 71a0d20638

View File

@@ -9,18 +9,25 @@ RUN apk add --no-cache \
musl-dev \ musl-dev \
pkgconfig \ pkgconfig \
openssl-dev \ openssl-dev \
openssl-libs-static openssl-libs-static \
git
# Librespot ohne Hardware-Audio-Backends kompilieren. # Librespot aus dem Git-Tag mit --locked kompilieren.
# --no-default-features entfernt ALSA/PulseAudio; der Pipe-Backend
# ist immer verfügbar und reicht für diesen Anwendungsfall.
# #
# v0.8.0 hat einen bekannten Build-Bug (vergen/vergen-lib Versionskonflikt), # Hintergrund: `cargo install librespot --version X.Y.Z` (ohne --locked) löst
# daher wird die stabile Version 0.7.0 verwendet. # immer die NEUESTEN kompatiblen Abhängigkeiten auf. Das zieht vergen-gitcl
RUN cargo install librespot \ # >= 1.0 rein, das vergen-lib 9.x benötigt. librespot-core's build.rs erwartet
--version "0.7.0" \ # jedoch vergen-lib 0.1.x → Versionkonflikt → Build-Fehler E0277.
#
# Mit `--git --tag --locked` verwendet cargo das originale Cargo.lock aus dem
# Release-Tag, das vergen-gitcl 0.x pinnt und damit kompatibel ist.
RUN cargo install \
--git https://github.com/librespot-org/librespot \
--tag v0.7.0 \
--locked \
--no-default-features \ --no-default-features \
--root /install --root /install \
librespot
# ============================================================ # ============================================================
# Runtime stage: HA-Basis-Image + ffmpeg + icecast # Runtime stage: HA-Basis-Image + ffmpeg + icecast