diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..04f570a --- /dev/null +++ b/.gitignore @@ -0,0 +1,4 @@ +/results_*/ +/*.src.rpm + +/password-hash-0.3.2.crate diff --git a/README.md b/README.md deleted file mode 100644 index 74492b2..0000000 --- a/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# rust-password-hash - -The rust-password-hash package diff --git a/password-hash-fix-metadata.diff b/password-hash-fix-metadata.diff new file mode 100644 index 0000000..29d62a4 --- /dev/null +++ b/password-hash-fix-metadata.diff @@ -0,0 +1,20 @@ +--- password-hash-0.3.2/Cargo.toml 1970-01-01T00:00:01+00:00 ++++ password-hash-0.3.2/Cargo.toml 2021-12-13T17:22:30.987558+00:00 +@@ -25,7 +25,7 @@ + all-features = true + rustc-args = ["--cfg", "docsrs"] + [dependencies.base64ct] +-version = ">=1, <1.1.0" ++version = "1" + + [dependencies.rand_core] + version = "0.6" +@@ -33,7 +33,7 @@ + default-features = false + + [dependencies.subtle] +-version = ">=2, <2.5" ++version = "2" + default-features = false + + [features] diff --git a/rust-password-hash.spec b/rust-password-hash.spec new file mode 100644 index 0000000..cb78530 --- /dev/null +++ b/rust-password-hash.spec @@ -0,0 +1,112 @@ +# Generated by rust2rpm 20 +%bcond_without check +%global debug_package %{nil} + +%global crate password-hash + +Name: rust-%{crate} +Version: 0.3.2 +Release: %autorelease +Summary: Traits which describe password hashing algorithms + +# Upstream license specification: MIT OR Apache-2.0 +License: MIT or ASL 2.0 +URL: https://crates.io/crates/password-hash +Source: %{crates_source} +# Initial patched metadata +# * relax base64ct and subtle dependencies (MSRV is irrelevant in Fedora) +Patch0: password-hash-fix-metadata.diff + +ExclusiveArch: %{rust_arches} + +BuildRequires: rust-packaging + +%global _description %{expand: +Traits which describe the functionality of password hashing algorithms, as well +as a `no_std`-friendly implementation of the PHC string format (a well-defined +subset of the Modular Crypt Format a.k.a. MCF).} + +%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 LICENSE-APACHE LICENSE-MIT +%doc CHANGELOG.md README.md +%{cargo_registry}/%{crate}-%{version_no_tilde}/ + +%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 %{cargo_registry}/%{crate}-%{version_no_tilde}/Cargo.toml + +%package -n %{name}+alloc-devel +Summary: %{summary} +BuildArch: noarch + +%description -n %{name}+alloc-devel %{_description} + +This package contains library source intended for building other packages which +use the "alloc" feature of the "%{crate}" crate. + +%files -n %{name}+alloc-devel +%ghost %{cargo_registry}/%{crate}-%{version_no_tilde}/Cargo.toml + +%package -n %{name}+rand_core-devel +Summary: %{summary} +BuildArch: noarch + +%description -n %{name}+rand_core-devel %{_description} + +This package contains library source intended for building other packages which +use the "rand_core" feature of the "%{crate}" crate. + +%files -n %{name}+rand_core-devel +%ghost %{cargo_registry}/%{crate}-%{version_no_tilde}/Cargo.toml + +%package -n %{name}+std-devel +Summary: %{summary} +BuildArch: noarch + +%description -n %{name}+std-devel %{_description} + +This package contains library source intended for building other packages which +use the "std" feature of the "%{crate}" crate. + +%files -n %{name}+std-devel +%ghost %{cargo_registry}/%{crate}-%{version_no_tilde}/Cargo.toml + +%prep +%autosetup -n %{crate}-%{version_no_tilde} -p1 +%cargo_prep + +%generate_buildrequires +%cargo_generate_buildrequires + +%build +%cargo_build + +%install +%cargo_install + +%if %{with check} +%check +%cargo_test +%endif + +%changelog +%autochangelog diff --git a/sources b/sources new file mode 100644 index 0000000..4ae4cf4 --- /dev/null +++ b/sources @@ -0,0 +1 @@ +SHA512 (password-hash-0.3.2.crate) = 157cf50896c28d5a73670fe2ea9e00ceb10acd3d2c9abb13b86f0b16d3fd8c56767d5732cb997b52702432b0c25d4591d1263e24c312d0fef25a328ea0dd940d