diff --git a/.gitignore b/.gitignore index ac16d40..c8cba7d 100644 --- a/.gitignore +++ b/.gitignore @@ -9,3 +9,4 @@ /ahash-0.7.3.crate /ahash-0.7.4.crate /ahash-0.7.6.crate +/ahash-0.8.2.crate diff --git a/ahash-fix-metadata.diff b/ahash-fix-metadata.diff new file mode 100644 index 0000000..a6fa983 --- /dev/null +++ b/ahash-fix-metadata.diff @@ -0,0 +1,70 @@ +--- ahash-0.8.2/Cargo.toml 1970-01-01T00:00:01+00:00 ++++ ahash-0.8.2/Cargo.toml 2022-12-15T18:26:53.700618+00:00 +@@ -48,24 +48,6 @@ + ] + features = ["std"] + +-[profile.bench] +-opt-level = 3 +-lto = "fat" +-codegen-units = 1 +-debug = false +-debug-assertions = false +- +-[profile.release] +-opt-level = 3 +-lto = "fat" +-codegen-units = 1 +-debug = false +-debug-assertions = false +- +-[profile.test] +-opt-level = 2 +-lto = "fat" +- + [lib] + name = "ahash" + path = "src/lib.rs" +@@ -73,20 +55,6 @@ + doctest = true + bench = true + doc = true +- +-[[bench]] +-name = "ahash" +-path = "tests/bench.rs" +-harness = false +- +-[[bench]] +-name = "map" +-path = "tests/map_tests.rs" +-harness = false +- +-[dependencies.atomic-polyfill] +-version = "1.0.1" +-optional = true + + [dependencies.cfg-if] + version = "1.0" +@@ -102,10 +70,6 @@ + [dependencies.serde] + version = "1.0.117" + optional = true +- +-[dev-dependencies.criterion] +-version = "0.3.2" +-features = ["html_reports"] + + [dev-dependencies.fnv] + version = "1.0.5" +@@ -135,10 +99,6 @@ + version = "0.9.4" + + [features] +-atomic-polyfill = [ +- "dep:atomic-polyfill", +- "once_cell/atomic-polyfill", +-] + compile-time-rng = ["const-random"] + default = [ + "std", diff --git a/rust-ahash.spec b/rust-ahash.spec index f95e23d..0dce99b 100644 --- a/rust-ahash.spec +++ b/rust-ahash.spec @@ -1,26 +1,27 @@ -# Generated by rust2rpm 18 -# * disable tests to around compilation issues on some architectures +# Generated by rust2rpm 23 +# * no_panic tests require LTO to work correctly, but LTO causes LLVM crashes: +# https://bugzilla.redhat.com/show_bug.cgi?id=2142648 %bcond_with check %global debug_package %{nil} %global crate ahash -Name: rust-%{crate} -Version: 0.7.6 +Name: rust-ahash +Version: 0.8.2 Release: %autorelease Summary: Non-cryptographic hash function using AES-NI for high performance -# Upstream license specification: MIT OR Apache-2.0 -License: MIT or ASL 2.0 +License: MIT OR Apache-2.0 URL: https://crates.io/crates/ahash Source: %{crates_source} +# Manually created patch for downstream crate metadata changes +# * disable atomic-polyfill support to work around rust-packaging limitations: +# https://bugzilla.redhat.com/show_bug.cgi?id=2152697 +# * drop unused benchmarks and benchmark-only criterion dev-dependency +# * drop profiles which set incompatible compiler flags +Patch: ahash-fix-metadata.diff -ExclusiveArch: %{rust_arches} -%if %{__cargo_skip_build} -BuildArch: noarch -%endif - -BuildRequires: rust-packaging +BuildRequires: rust-packaging >= 21 %global _description %{expand: Non-cryptographic hash function using AES-NI for high performance.} @@ -33,13 +34,15 @@ BuildArch: noarch %description devel %{_description} -This package contains library source intended for building other packages -which use "%{crate}" crate. +This package contains library source intended for building other packages which +use the "%{crate}" crate. %files devel -%license LICENSE-APACHE LICENSE-MIT -%doc README.md -%{cargo_registry}/%{crate}-%{version_no_tilde}/ +%license %{crate_instdir}/LICENSE-APACHE +%license %{crate_instdir}/LICENSE-MIT +%doc %{crate_instdir}/FAQ.md +%doc %{crate_instdir}/README.md +%{crate_instdir}/ %package -n %{name}+default-devel Summary: %{summary} @@ -47,11 +50,11 @@ BuildArch: noarch %description -n %{name}+default-devel %{_description} -This package contains library source intended for building other packages -which use "default" feature of "%{crate}" crate. +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 +%ghost %{crate_instdir}/Cargo.toml %package -n %{name}+compile-time-rng-devel Summary: %{summary} @@ -59,11 +62,11 @@ BuildArch: noarch %description -n %{name}+compile-time-rng-devel %{_description} -This package contains library source intended for building other packages -which use "compile-time-rng" feature of "%{crate}" crate. +This package contains library source intended for building other packages which +use the "compile-time-rng" feature of the "%{crate}" crate. %files -n %{name}+compile-time-rng-devel -%ghost %{cargo_registry}/%{crate}-%{version_no_tilde}/Cargo.toml +%ghost %{crate_instdir}/Cargo.toml %package -n %{name}+const-random-devel Summary: %{summary} @@ -71,11 +74,47 @@ BuildArch: noarch %description -n %{name}+const-random-devel %{_description} -This package contains library source intended for building other packages -which use "const-random" feature of "%{crate}" crate. +This package contains library source intended for building other packages which +use the "const-random" feature of the "%{crate}" crate. %files -n %{name}+const-random-devel -%ghost %{cargo_registry}/%{crate}-%{version_no_tilde}/Cargo.toml +%ghost %{crate_instdir}/Cargo.toml + +%package -n %{name}+getrandom-devel +Summary: %{summary} +BuildArch: noarch + +%description -n %{name}+getrandom-devel %{_description} + +This package contains library source intended for building other packages which +use the "getrandom" feature of the "%{crate}" crate. + +%files -n %{name}+getrandom-devel +%ghost %{crate_instdir}/Cargo.toml + +%package -n %{name}+no-rng-devel +Summary: %{summary} +BuildArch: noarch + +%description -n %{name}+no-rng-devel %{_description} + +This package contains library source intended for building other packages which +use the "no-rng" feature of the "%{crate}" crate. + +%files -n %{name}+no-rng-devel +%ghost %{crate_instdir}/Cargo.toml + +%package -n %{name}+runtime-rng-devel +Summary: %{summary} +BuildArch: noarch + +%description -n %{name}+runtime-rng-devel %{_description} + +This package contains library source intended for building other packages which +use the "runtime-rng" feature of the "%{crate}" crate. + +%files -n %{name}+runtime-rng-devel +%ghost %{crate_instdir}/Cargo.toml %package -n %{name}+serde-devel Summary: %{summary} @@ -83,11 +122,11 @@ BuildArch: noarch %description -n %{name}+serde-devel %{_description} -This package contains library source intended for building other packages -which use "serde" feature of "%{crate}" crate. +This package contains library source intended for building other packages which +use the "serde" feature of the "%{crate}" crate. %files -n %{name}+serde-devel -%ghost %{cargo_registry}/%{crate}-%{version_no_tilde}/Cargo.toml +%ghost %{crate_instdir}/Cargo.toml %package -n %{name}+std-devel Summary: %{summary} @@ -95,15 +134,17 @@ BuildArch: noarch %description -n %{name}+std-devel %{_description} -This package contains library source intended for building other packages -which use "std" feature of "%{crate}" crate. +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 +%ghost %{crate_instdir}/Cargo.toml %prep %autosetup -n %{crate}-%{version_no_tilde} -p1 %cargo_prep +# remove benchmark sources from non-standard path in tests/ +rm tests/{bench.rs,map_tests.rs} %generate_buildrequires %cargo_generate_buildrequires diff --git a/sources b/sources index a6e8233..5aac125 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (ahash-0.7.6.crate) = 61354688b6fb096359faefb6f34be958cd2215d56b88c22c737d24183eaad433f811bc9e64f927e4852c87d2799c22fda82b55cfbef2ed6357ff74f0c4ffec68 +SHA512 (ahash-0.8.2.crate) = efc633b4dcd790e8dbc2da4e103a7ee82c3e0f97d37e15a06fd6fc0b73923d721604708f13435a9dcba50c4d53ca5db498e62f84320d8e966581889c2e9d9722