New contributor experience: empty feature RPMs block Rust crate packaging

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.0
  • crate(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:

  1. Is this a known issue? Is there a recommended workaround (other than patching the upstream Cargo.toml)?
  2. 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.

We do more end user support here, so you might have better responses in the devel and rust Matrix channels accessible via chat.fedoraproject.org

There is fedora rust SIG, i think it’s an email list i think.

They would know be the best people to adk about this.

Hi Barry,

Thank you for the pointer! I wasn’t aware of the Fedora Rust SIG.

Could you please share the mailing list address or Matrix channel for the Rust SIG? I’d like to ask them directly about the empty feature RPM issue blocking Rust crate packaging.

Thanks again for your help.

Best regards,
ZUO

See here for information on the Rust SIG: https://forge.fedoraproject.org/rust