-
Story
-
Resolution: Unresolved
-
Undefined
-
None
-
None
-
rust-1.89.0-1.el9
-
None
-
2
-
rhel-pt-llvm-rust
-
1
-
False
-
False
-
-
None
-
PT LLVMRust Team 2025 S12, PT LLVMRust Team 2025 S13
-
Pass
-
Automated
-
Unspecified
-
Unspecified
-
Unspecified
-
None
We have a few rpm macros in the rust-toolset subpackage that are meant to be mostly compatible with Fedora's rust-packaging macros, though without the support for split -devel crates.
However, Fedora's macros for %cargo_build, %cargo_install, and %cargo_test are parameterized, and this affects how any pass-through arguments must be presented. We copied Fedora's style when syncing changes during RHEL 10 development, but we chose not to make that change on RHEL 8 and 9 since that's a breaking change in how they're used.
For example, if you want to build with a feature enabled:
- RHEL 8 and 9:
- pass-through: %cargo_build --features foo
- RHEL 10 and Fedora:
- macro flag: %cargo_build -f foo
- pass-through: %cargo_build -- --features foo
There's no single way to use %cargo_build that works everywhere, unless you're simply not using any arguments. We've heard from users that this discrepancy is annoying if you're still developing for RHEL 9 from a Fedora system, or with a spec shared by both, as you need to use something like "%if 0%{?fedora} || 0%{?rhel} >= 10" everywhere with nearly duplicated commands.
The proposal now is that we should make the same change in RHEL 9, tentatively for 9.7, adding the macro flags and requiring "--" to separate pass-through arguments. Rust is part of the rolling appstream, so some changes are expected and allowed when we're rebasing anyway. There's also no subtlety to the way it breaks (if at all), and the fix is simple.
We'll leave the RHEL 8 macros alone though, since that's mostly in maintenance mode now.
- links to
-
RHBA-2025:154574 rust update