Expose features for crypto backends without setting a default

epel9
Fabio Valentini 2 years ago
parent 634dccc5ca
commit ff99beaf9d
No known key found for this signature in database
GPG Key ID: 5AC5F572E5D410AF

@ -14,7 +14,7 @@ Source: %{crates_source}
# Automatically generated patch to strip foreign dependencies
Patch: sequoia-policy-config-fix-metadata-auto.diff
# Manually created patch for downstream crate metadata changes
# * default to the OpenSSL crypto backend of sequoia-openpgp
# * expose features for crypto backends without setting a default
Patch: sequoia-policy-config-fix-metadata.diff
BuildRequires: rust-packaging >= 23
@ -73,24 +73,48 @@ use the "default" feature of the "%{crate}" crate.
%files -n %{name}+default-devel
%ghost %{crate_instdir}/Cargo.toml
%package -n %{name}+crypto-nettle-devel
Summary: %{summary}
BuildArch: noarch
%description -n %{name}+crypto-nettle-devel %{_description}
This package contains library source intended for building other packages which
use the "crypto-nettle" feature of the "%{crate}" crate.
%files -n %{name}+crypto-nettle-devel
%ghost %{crate_instdir}/Cargo.toml
%package -n %{name}+crypto-openssl-devel
Summary: %{summary}
BuildArch: noarch
%description -n %{name}+crypto-openssl-devel %{_description}
This package contains library source intended for building other packages which
use the "crypto-openssl" feature of the "%{crate}" crate.
%files -n %{name}+crypto-openssl-devel
%ghost %{crate_instdir}/Cargo.toml
%prep
%autosetup -n %{crate}-%{version_no_tilde} -p1
%cargo_prep
%generate_buildrequires
%cargo_generate_buildrequires
%cargo_generate_buildrequires -f crypto-openssl
%build
%cargo_build
%cargo_license_summary
%{cargo_license} > LICENSE.dependencies
%cargo_build -f crypto-openssl
%cargo_license_summary -f crypto-openssl
%{cargo_license -f crypto-openssl} > LICENSE.dependencies
%install
%cargo_install
%cargo_install -f crypto-openssl
%if %{with check}
%check
%cargo_test
%cargo_test -f crypto-openssl
%endif
%changelog

@ -0,0 +1,3 @@
[DEFAULT]
enabled-features =
crypto-openssl

@ -1,5 +1,5 @@
--- sequoia-policy-config-0.6.0/Cargo.toml 1970-01-01T00:00:01+00:00
+++ sequoia-policy-config-0.6.0/Cargo.toml 2023-03-06T18:28:15.678853+00:00
+++ sequoia-policy-config-0.6.0/Cargo.toml 2023-04-14T14:25:27.053943+00:00
@@ -67,10 +67,5 @@
features = ["crypto-nettle"]
default-features = false

@ -1,19 +1,16 @@
--- sequoia-policy-config-0.6.0/Cargo.toml 1970-01-01T00:00:01+00:00
+++ sequoia-policy-config-0.6.0/Cargo.toml 2023-03-06T18:28:37.885896+00:00
@@ -45,6 +45,7 @@
+++ sequoia-policy-config-0.6.0/Cargo.toml 2023-04-14T14:26:00.154080+00:00
@@ -62,10 +62,9 @@
[dev-dependencies.lazy_static]
version = "1.4.0"
[dependencies.sequoia-openpgp]
version = "1.11"
+features = ["crypto-openssl"]
default-features = false
[dependencies.serde]
@@ -64,7 +65,7 @@
[target."cfg(not(windows))".dev-dependencies.sequoia-openpgp]
version = "1.11"
-[target."cfg(not(windows))".dev-dependencies.sequoia-openpgp]
-version = "1.11"
-features = ["crypto-nettle"]
+features = ["crypto-openssl"]
default-features = false
-default-features = false
+[features]
+crypto-nettle = ["sequoia-openpgp/crypto-nettle"]
+crypto-openssl = ["sequoia-openpgp/crypto-openssl"]
[badges.maintenance]
status = "actively-developed"

Loading…
Cancel
Save