From ad1579c39dd6343760dd8c3835c1615f305cd936 Mon Sep 17 00:00:00 2001 From: Fabio Valentini Date: Fri, 27 Oct 2023 14:27:12 +0200 Subject: [PATCH] Update to version 0.7.7 --- .gitignore | 1 + README.md | 3 --- ahash-fix-metadata-auto.diff | 25 ++++++++++++++----------- ahash-fix-metadata.diff | 36 ++++++------------------------------ rust-ahash0.7.spec | 34 +++++++++++++++++++++------------- sources | 2 +- 6 files changed, 43 insertions(+), 58 deletions(-) delete mode 100644 README.md diff --git a/.gitignore b/.gitignore index 10b6526..53b8ee2 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ /ahash-0.7.6.crate +/ahash-0.7.7.crate diff --git a/README.md b/README.md deleted file mode 100644 index 860b081..0000000 --- a/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# rust-ahash0.7 - -The rust-ahash0.7 package diff --git a/ahash-fix-metadata-auto.diff b/ahash-fix-metadata-auto.diff index c88dd79..ab34a3f 100644 --- a/ahash-fix-metadata-auto.diff +++ b/ahash-fix-metadata-auto.diff @@ -1,18 +1,21 @@ ---- ahash-0.7.6/Cargo.toml 1970-01-01T00:00:01+00:00 -+++ ahash-0.7.6/Cargo.toml 1970-01-01T00:00:01+00:00 -@@ -90,7 +90,7 @@ - version = "0.9" +--- ahash-0.7.7/Cargo.toml 1970-01-01T00:00:01+00:00 ++++ ahash-0.7.7/Cargo.toml 2023-10-27T12:14:14.876617+00:00 +@@ -113,7 +113,6 @@ [features] --compile-time-rng = ["const-random"] -+compile-time-rng = [] - default = ["std"] - std = [] - [target."cfg(any(target_os = \"linux\", target_os = \"android\", target_os = \"windows\", target_os = \"macos\", target_os = \"ios\", target_os = \"freebsd\", target_os = \"openbsd\", target_os = \"netbsd\", target_os = \"dragonfly\", target_os = \"solaris\", target_os = \"illumos\", target_os = \"fuchsia\", target_os = \"redox\", target_os = \"cloudabi\", target_os = \"haiku\", target_os = \"vxworks\", target_os = \"emscripten\", target_os = \"wasi\"))".dependencies.const-random] -@@ -107,10 +107,3 @@ - version = "1.8" + atomic-polyfill = [ +- "dep:atomic-polyfill", + "once_cell/atomic-polyfill", + ] + compile-time-rng = ["const-random"] +@@ -136,14 +135,3 @@ features = ["alloc"] default-features = false + +-[target."cfg(not(any(target_os = \"linux\", target_os = \"android\", target_os = \"windows\", target_os = \"macos\", target_os = \"ios\", target_os = \"freebsd\", target_os = \"openbsd\", target_os = \"netbsd\", target_os = \"dragonfly\", target_os = \"solaris\", target_os = \"illumos\", target_os = \"fuchsia\", target_os = \"redox\", target_os = \"cloudabi\", target_os = \"haiku\", target_os = \"vxworks\", target_os = \"emscripten\", target_os = \"wasi\")))".dependencies.atomic-polyfill] +-version = "1.0.1" +-optional = true +- -[target."cfg(not(any(target_os = \"linux\", target_os = \"android\", target_os = \"windows\", target_os = \"macos\", target_os = \"ios\", target_os = \"freebsd\", target_os = \"openbsd\", target_os = \"netbsd\", target_os = \"dragonfly\", target_os = \"solaris\", target_os = \"illumos\", target_os = \"fuchsia\", target_os = \"redox\", target_os = \"cloudabi\", target_os = \"haiku\", target_os = \"vxworks\", target_os = \"emscripten\", target_os = \"wasi\")))".dependencies.const-random] -version = "0.1.12" -optional = true diff --git a/ahash-fix-metadata.diff b/ahash-fix-metadata.diff index 31852b4..75e5d2f 100644 --- a/ahash-fix-metadata.diff +++ b/ahash-fix-metadata.diff @@ -1,36 +1,12 @@ ---- a/Cargo.toml -+++ b/Cargo.toml -@@ -28,44 +28,15 @@ repository = "https://github.com/tkaitch - features = ["std"] - rustc-args = ["-C", "target-feature=+aes"] - rustdoc-args = ["-C", "target-feature=+aes"] --[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" +--- ahash-0.7.7/Cargo.toml 1970-01-01T00:00:01+00:00 ++++ ahash-0.7.7/Cargo.toml 2023-10-27T12:15:03.243812+00:00 +@@ -71,21 +71,7 @@ path = "src/lib.rs" test = true doctest = true -bench = true -+bench = false doc = true - +- -[[bench]] -name = "ahash" -path = "tests/bench.rs" @@ -40,9 +16,9 @@ -name = "map" -path = "tests/map_tests.rs" -harness = false +- -[dev-dependencies.criterion] -version = "0.3.2" -- + [dev-dependencies.fnv] version = "1.0.5" - diff --git a/rust-ahash0.7.spec b/rust-ahash0.7.spec index 2392890..2eaee68 100644 --- a/rust-ahash0.7.spec +++ b/rust-ahash0.7.spec @@ -1,30 +1,27 @@ -# 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 25 +%bcond_without check %global debug_package %{nil} %global crate ahash Name: rust-ahash0.7 -Version: 0.7.6 +Version: 0.7.7 Release: %autorelease Summary: Non-cryptographic hash function using AES-NI for high performance License: MIT OR Apache-2.0 URL: https://crates.io/crates/ahash Source: %{crates_source} -# Automatically generated patch to strip foreign dependencies +# Automatically generated patch to strip dependencies and normalize metadata Patch: ahash-fix-metadata-auto.diff # Manually created patch for downstream crate metadata changes # * 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 +53,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 @@ -105,11 +114,10 @@ use the "std" feature of the "%{crate}" crate. %ghost %{crate_instdir}/Cargo.toml %prep -%autosetup -n %{crate}-%{version_no_tilde} -p1 -# remove benchmark tests -rm tests/bench.rs -rm tests/map_tests.rs +%autosetup -n %{crate}-%{version} -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..4c65825 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (ahash-0.7.6.crate) = 61354688b6fb096359faefb6f34be958cd2215d56b88c22c737d24183eaad433f811bc9e64f927e4852c87d2799c22fda82b55cfbef2ed6357ff74f0c4ffec68 +SHA512 (ahash-0.7.7.crate) = 9a0c63467be5b1af0a2dbea705f1164607a44975c0e95b7756b889c19b19a9616ac762590170f3a45836edbd8d5b04110d55c387f5d6b13a747f547390d4e04b