I’m a Fedora user, and I recently tried to package the x86_64 crate as an RPM (partly to learn, partly to contribute).
I followed the standard flow: rust2rpm x86_64 to generate the spec, then mock to build.
Where it got stuck:
mock reported two missing capabilities:
crate(const_fn/default) >= 0.4.11, < 0.5.0crate(volatile/default) >= 0.4.4, < 0.5.0
I checked, and the main const_fn and volatile packages do exist in the Fedora repos. What’s missing is the subpackage for their default feature.
My understanding:
Fedora’s Rust packaging requires every feature combination to have its own RPM. But the default features of const_fn and volatile appear to be empty (they don’t enable any additional dependencies), so rpmbuild doesn’t generate a +default-devel subpackage. Meanwhile, the upstream x86_64 Cargo.toml explicitly depends on that feature, so the two sides don’t match up, and the build dies.
My questions:
- Is this a known issue? Is there a recommended workaround (other than patching the upstream Cargo.toml)?
- If I wanted to contribute a fix for this kind of “empty feature missing” problem, where should I start? File a bug, patch the existing spec, or something else?
One more thing while I’m here: this isn’t the only place I got stuck. mock doesn’t use the host’s rustup, and the toolchain switches between rust2rpm / mock / rpmbuild, which is a fairly high barrier for a new contributor. But let’s focus on the specific issue above first.