fix(rpm): build with the baked toolchain (RUSTUP_TOOLCHAIN), avoid EXDEV
rust-toolchain.toml floats `channel = "stable"` + requests rustfmt/clippy. When a
newer stable lands upstream, that makes rustup try to update the baked, minimal-
profile `stable` toolchain in place during %build, and the builder image's
OverlayFS rejects the staging rename with EXDEV ("Invalid cross-device link"),
failing the RPM build (started the day Rust 1.96.1 shipped). A release build needs
no rustfmt/clippy, so pin RUSTUP_TOOLCHAIN=stable to use the installed toolchain
as-is — no channel re-resolve, no component add, no update. Scoped to the RPM
%build; ci.yml/deb.yml (rust-ci image) are unaffected.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -157,6 +157,13 @@ runtime. Enable with `systemctl --user enable --now punktfunk-web`.
|
|||||||
# Release build of the host + client binaries (the workspace also has the core lib).
|
# Release build of the host + client binaries (the workspace also has the core lib).
|
||||||
# cargo fetches crates over the network; COPR build hosts allow this.
|
# cargo fetches crates over the network; COPR build hosts allow this.
|
||||||
export RUSTFLAGS="%{?build_rustflags}"
|
export RUSTFLAGS="%{?build_rustflags}"
|
||||||
|
# Use the toolchain baked into the builder image as-is, ignoring rust-toolchain.toml. The toml
|
||||||
|
# floats `channel = "stable"` and requests rustfmt/clippy (lint-only — not needed for a build); when
|
||||||
|
# a newer stable lands upstream, that combination makes rustup try to UPDATE the baked, minimal-
|
||||||
|
# profile `stable` toolchain in place, and the in-image OverlayFS rejects the staging rename with
|
||||||
|
# EXDEV ("Invalid cross-device link"), failing %build. RUSTUP_TOOLCHAIN bypasses the toml so rustup
|
||||||
|
# neither re-resolves the channel nor adds components — it just builds with what's installed.
|
||||||
|
export RUSTUP_TOOLCHAIN=stable
|
||||||
# Stamp the exact NVR into the binary for --version / mgmt /health provenance (build.rs reads it).
|
# Stamp the exact NVR into the binary for --version / mgmt /health provenance (build.rs reads it).
|
||||||
export PUNKTFUNK_BUILD_VERSION="%{version}-%{release}"
|
export PUNKTFUNK_BUILD_VERSION="%{version}-%{release}"
|
||||||
# --locked: reproducible from (commit + Cargo.lock), matching the .deb build path.
|
# --locked: reproducible from (commit + Cargo.lock), matching the .deb build path.
|
||||||
|
|||||||
Reference in New Issue
Block a user