#1 Add `crypto-rust` feature
Closed 2 years ago by decathorpe. Opened 2 years ago by cbeuw.
rpms/ cbeuw/rust-sequoia-openpgp rawhide  into  rawhide

file modified
+12
@@ -136,6 +136,18 @@ 

  %files       -n %{name}+crypto-nettle-devel

  %ghost %{crate_instdir}/Cargo.toml

  

+ %package     -n %{name}+crypto-rust-devel

+ Summary:        %{summary}

+ BuildArch:      noarch

+ 

+ %description -n %{name}+crypto-rust-devel %{_description}

+ 

+ This package contains library source intended for building other packages which

+ use the "crypto-rust" feature of the "%{crate}" crate.

+ 

+ %files       -n %{name}+crypto-rust-devel

+ %ghost %{crate_instdir}/Cargo.toml

+ 

  %package     -n %{name}+flate2-devel

  Summary:        %{summary}

  BuildArch:      noarch

This adds the missing crypto-rust feature to the spec file. Notably, this is a dependency of rustup: https://github.com/rust-lang/rustup/blob/master/Cargo.toml#L54

Also it seems like rust2rpm treats feature dependencies as a separate feature package? We have a +bzip2-devel package but there's no bzip2 feature in https://gitlab.com/sequoia-pgp/sequoia/-/blob/main/openpgp/Cargo.toml, it's just an optional dependency for the compression-bzip2 feature. Not sure if this is the intended behaviour...

Please take a look at
https://src.fedoraproject.org/rpms/rust-sequoia-openpgp/blob/rawhide/f/.rust2rpm.conf
for all the optional dependencies and features that are disabled.

Just adding back the subpackage for the crypto-rust feature without also adding back the subpackages for its optional dependencies will result in a broken package.

The reason why the crypto-rust feature is disabled is that we don't have all the necessary dependencies packages for Fedora yet (or not at the correct version).

I also wonder, what do you need this for? Are you packaging rustup, and if so, why?

And to clarify: rust2rpm treats optional dependencies and features just like cargo itself does. It defines an implicit feature with the same name for all optional dependencies.

Looking at the RustCrypto dependencies, they are all very outdated.

I don't know if this is due to Sequoia's MSRV policy, or if they've just not been bumped to newer versions yet because it's not the default backend and nobody is looking at it.

But this is one of the reasons why the RustCrypto backend is disabled in this package.

This effort is blocked by upstream porting to new versions of the RustCrypto crates:
https://gitlab.com/sequoia-pgp/sequoia/-/issues/910

I will re-evaluate enabling the crypto-rust feature once that work is done (and all dependencies are available in Fedora).

Pull-Request has been closed by decathorpe

2 years ago
Metadata