https://pagure.io/fedora-rust/rust2rpm/c/3781ce3b33f013fcd64ba03fcb5c559d713638c3?branch=main
This commit moved the definition of RUSTFLAGS from the .cargo/config file to the definition of the %__cargo macro. This is a problem for crates that had to reduce debuginfo verbosity because of OOM issues, like cargo, cargo-c, or keylime-agent-rust, with a sed like this one: sed -i "s/debuginfo=2/debuginfo=0/" .cargo/config
sed -i "s/debuginfo=2/debuginfo=0/" .cargo/config
I'll need to figure out how to override the %__cargo macro now at 2AM because one of my builds is stuck because reducing debuginfo level doesn't work anymore. :(
%__cargo
Also, it looks like you removed the only usage of %{__global_rustflags_toml} but didn't actually remove its definition.
%{__global_rustflags_toml}
Looks like it's not possible to move the RUSTFLAGS back into .cargo/config without breaking the linker flag for package notes, because as you note, %buildsubdir is not defined in %prep.
Still, the current approach breaks packages. Can we add the package notes linker flags only during cargo_build / cargo_install / cargo_test instead?
Commit 1b14d44 fixes this issue
Login to comment on this ticket.