diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..7cee16a --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +/sequoia-cert-store-0.2.0.crate diff --git a/README.md b/README.md deleted file mode 100644 index a67f747..0000000 --- a/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# rust-sequoia-cert-store - -The rust-sequoia-cert-store package diff --git a/rust-sequoia-cert-store.spec b/rust-sequoia-cert-store.spec new file mode 100644 index 0000000..660cd2c --- /dev/null +++ b/rust-sequoia-cert-store.spec @@ -0,0 +1,105 @@ +# Generated by rust2rpm 24 +%bcond_without check +%global debug_package %{nil} + +%global crate sequoia-cert-store + +Name: rust-sequoia-cert-store +Version: 0.2.0 +Release: %autorelease +Summary: Certificate database interface + +License: LGPL-2.0-or-later +URL: https://crates.io/crates/sequoia-cert-store +Source: %{crates_source} +# Automatically generated patch to strip foreign dependencies +Patch: sequoia-cert-store-fix-metadata-auto.diff +# Manually created patch for downstream crate metadata changes +# * bump sequoia-net dependency from 0.26 to 0.27 +# * expose features for crypto backends without setting a default +# * exclude integration tests, test data, and scripts from installed files +Patch: sequoia-cert-store-fix-metadata.diff + +BuildRequires: rust-packaging >= 21 + +%global _description %{expand: +A certificate database interface.} + +%description %{_description} + +%package devel +Summary: %{summary} +BuildArch: noarch + +%description devel %{_description} + +This package contains library source intended for building other packages which +use the "%{crate}" crate. + +%files devel +%license %{crate_instdir}/LICENSE.txt +%doc %{crate_instdir}/CONTRIBUTING.md +%doc %{crate_instdir}/README.md +%{crate_instdir}/ + +%package -n %{name}+default-devel +Summary: %{summary} +BuildArch: noarch + +%description -n %{name}+default-devel %{_description} + +This package contains library source intended for building other packages which +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 +# ensure all dependencies for building tests are available +%cargo_generate_buildrequires -f crypto-nettle,crypto-openssl + +%build +# build with the default crypto backend (Nettle) +%cargo_build -f crypto-nettle + +%install +%cargo_install -f crypto-nettle + +%if %{with check} +%check +# run tests with the default crypto backend (Nettle) +%cargo_test -f crypto-nettle +# run tests with the OpenSSL crypto backend +%cargo_test -f crypto-openssl +%endif + +%changelog +%autochangelog diff --git a/sequoia-cert-store-fix-metadata-auto.diff b/sequoia-cert-store-fix-metadata-auto.diff new file mode 100644 index 0000000..cf6e9f7 --- /dev/null +++ b/sequoia-cert-store-fix-metadata-auto.diff @@ -0,0 +1,13 @@ +--- sequoia-cert-store-0.2.0/Cargo.toml 1970-01-01T00:00:01+00:00 ++++ sequoia-cert-store-0.2.0/Cargo.toml 2023-05-10T21:34:03.693854+00:00 +@@ -88,10 +88,5 @@ + features = ["crypto-nettle"] + default-features = false + +-[target."cfg(windows)".dev-dependencies.sequoia-openpgp] +-version = "1" +-features = ["crypto-cng"] +-default-features = false +- + [badges.maintenance] + status = "actively-developed" diff --git a/sequoia-cert-store-fix-metadata.diff b/sequoia-cert-store-fix-metadata.diff new file mode 100644 index 0000000..d4f0cd6 --- /dev/null +++ b/sequoia-cert-store-fix-metadata.diff @@ -0,0 +1,32 @@ +--- sequoia-cert-store-0.2.0/Cargo.toml 1970-01-01T00:00:01+00:00 ++++ sequoia-cert-store-0.2.0/Cargo.toml 2023-05-10T21:35:31.582209+00:00 +@@ -36,6 +36,7 @@ + license = "LGPL-2.0-or-later" + repository = "https://gitlab.com/sequoia-pgp/sequoia-cert-store" + resolver = "2" ++exclude = ["/tests/"] + + [package.metadata.docs.rs] + features = ["sequoia-openpgp/default"] +@@ -66,7 +67,7 @@ + version = "1" + + [dependencies.sequoia-net] +-version = "0.26" ++version = "0.27" + default-features = false + + [dependencies.sequoia-openpgp] +@@ -85,8 +86,11 @@ + + [target."cfg(not(windows))".dev-dependencies.sequoia-openpgp] + version = "1" +-features = ["crypto-nettle"] + default-features = false ++ ++[features] ++crypto-nettle = ["sequoia-openpgp/crypto-nettle"] ++crypto-openssl = ["sequoia-openpgp/crypto-openssl"] + + [badges.maintenance] + status = "actively-developed" diff --git a/sources b/sources new file mode 100644 index 0000000..4ddd41b --- /dev/null +++ b/sources @@ -0,0 +1 @@ +SHA512 (sequoia-cert-store-0.2.0.crate) = 805b4880ca03c36dce18b0d5c01398d372129bae8b06aaf0d0472795bef19c3d91fb468fa8316cd99d29575ec7c214d3a669bb9066c70d779baffe620f132386