From ca79f7f2d2ec2f9d3eb1f4c895c12e8fc5353e77 Mon Sep 17 00:00:00 2001 From: enricobuehler Date: Tue, 30 Jun 2026 20:18:19 +0200 Subject: [PATCH] fix(rpm): build with the baked toolchain (RUSTUP_TOOLCHAIN), avoid EXDEV MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- packaging/rpm/punktfunk.spec | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/packaging/rpm/punktfunk.spec b/packaging/rpm/punktfunk.spec index d186ccd..f816be8 100644 --- a/packaging/rpm/punktfunk.spec +++ b/packaging/rpm/punktfunk.spec @@ -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). # cargo fetches crates over the network; COPR build hosts allow this. 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). export PUNKTFUNK_BUILD_VERSION="%{version}-%{release}" # --locked: reproducible from (commit + Cargo.lock), matching the .deb build path.