Файл .cargo/config.toml может не содержать \n в конце (https://github.com/libkrun/libkrun/blob/413a011760b7ee61493fb0073f7810319ca6a181/.cargo/config.toml), что ломает сборку при использовании %rust_prep. error: could not load Cargo configuration Caused by: could not parse TOML configuration in `/usr/src/RPM/BUILD/libkrun-1.19.4/.cargo/config.toml` Caused by: TOML parse error at line 5, column 37 | 5 | rustflags = ["--cfg", "musl_v1_2_3"][source.crates-io] | ^ unexpected key or value, expected newline, `#` Исправил у себя так: echo "" >> .cargo/config.toml %rust_prep Но лучше решить это на уровне макроса.
https://packages.altlinux.org/ru/tasks/431040/
rpm-build-rust-0.2.0-alt1 -> sisyphus: Tue Oct 27 2026 Sergey Zhidkih <rx1513@altlinux> 0.2.0-alt1 - Switch the rust-cargo requirement to rust - Add a vendoring option to %rust_prep (Closes: 48459) - Remove RUSTFLAGS from the environment (Closes: 48459) - Synchronize rustflags between stages (Closes: 48459) - Allow %rust_prep to be specified for an arbitrary path - Lower macro's debuginfo priority - Add options to configure optimizations, debuginfo and stripping - Add rust-cargo-c macros: %rust_cbuild, %rust_cinstall and %rust_ctest - Add dependency on rust-cargo-c macros: %rust_cbuild, %rust_cinstall and %rust_ctest - Add support for overriding upstream build profiles - Add %rust_resolve_target_dir to determine the target directory from Cargo configuration - Add %rust_build_dir, containing the default path where Cargo places build artifacts - Prepend empty line to config.toml in %rust_prep (Closes: 60438) - Rename %__cargo macro to %cargo and make use of it - Add %rust_run macro for building intermidiate artifacts