diff --git a/.gitignore b/.gitignore index c8cba7d..2e6343b 100644 --- a/.gitignore +++ b/.gitignore @@ -10,3 +10,4 @@ /ahash-0.7.4.crate /ahash-0.7.6.crate /ahash-0.8.2.crate +/ahash-0.8.3.crate diff --git a/ahash-fix-metadata.diff b/ahash-fix-metadata.diff index a6fa983..bb59a7c 100644 --- a/ahash-fix-metadata.diff +++ b/ahash-fix-metadata.diff @@ -1,12 +1,13 @@ ---- 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 @@ +--- ahash-0.8.3/Cargo.toml 1970-01-01T00:00:01+00:00 ++++ ahash-0.8.3/Cargo.toml 2023-02-21T12:39:50.969193+00:00 +@@ -48,22 +48,10 @@ ] features = ["std"] -[profile.bench] -opt-level = 3 --lto = "fat" ++[profile.release] + lto = "fat" -codegen-units = 1 -debug = false -debug-assertions = false @@ -17,15 +18,13 @@ -codegen-units = 1 -debug = false -debug-assertions = false -- --[profile.test] + + [profile.test] -opt-level = 2 --lto = "fat" -- + lto = "fat" + [lib] - name = "ahash" - path = "src/lib.rs" -@@ -73,20 +55,6 @@ +@@ -73,16 +61,6 @@ doctest = true bench = true doc = true @@ -39,14 +38,10 @@ -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.atomic-polyfill] + version = "1.0.1" +@@ -102,10 +80,6 @@ [dependencies.serde] version = "1.0.117" optional = true @@ -57,14 +52,3 @@ [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 0dce99b..ff7eef7 100644 --- a/rust-ahash.spec +++ b/rust-ahash.spec @@ -1,13 +1,11 @@ -# 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 +# Generated by rust2rpm 24 +%bcond_without check %global debug_package %{nil} %global crate ahash Name: rust-ahash -Version: 0.8.2 +Version: 0.8.3 Release: %autorelease Summary: Non-cryptographic hash function using AES-NI for high performance @@ -15,16 +13,14 @@ 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 -BuildRequires: rust-packaging >= 21 +BuildRequires: cargo-rpm-macros >= 24 %global _description %{expand: -Non-cryptographic hash function using AES-NI for high performance.} +A non-cryptographic hash function using AES-NI for high performance.} %description %{_description} @@ -56,6 +52,18 @@ use the "default" feature of the "%{crate}" crate. %files -n %{name}+default-devel %ghost %{crate_instdir}/Cargo.toml +%package -n %{name}+atomic-polyfill-devel +Summary: %{summary} +BuildArch: noarch + +%description -n %{name}+atomic-polyfill-devel %{_description} + +This package contains library source intended for building other packages which +use the "atomic-polyfill" feature of the "%{crate}" crate. + +%files -n %{name}+atomic-polyfill-devel +%ghost %{crate_instdir}/Cargo.toml + %package -n %{name}+compile-time-rng-devel Summary: %{summary} BuildArch: noarch @@ -157,8 +165,14 @@ rm tests/{bench.rs,map_tests.rs} %if %{with check} %check +%ifarch s390x +# * one test fails only on s390x: +# https://github.com/tkaitchuck/aHash/issues/152 +%cargo_test -- -- --skip operations::test::test_add_length +%else %cargo_test %endif +%endif %changelog %autochangelog diff --git a/sources b/sources index 5aac125..a5fc751 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (ahash-0.8.2.crate) = efc633b4dcd790e8dbc2da4e103a7ee82c3e0f97d37e15a06fd6fc0b73923d721604708f13435a9dcba50c4d53ca5db498e62f84320d8e966581889c2e9d9722 +SHA512 (ahash-0.8.3.crate) = cf2d2f1201ac0969cf4e2a0c47090bee971b2287ac44b5e091c90a9eced03cf6ff56d7900cc0f529d4acedc30bd400261c15e50efabdd1731f79951b449af53e