From a3d3918d5fe969a8aec6bb155de27e9a0c2d93fa Mon Sep 17 00:00:00 2001 From: Josh Stone Date: Jan 28 2020 17:13:55 +0000 Subject: Update to 3.0.7 --- diff --git a/.gitignore b/.gitignore index 6cdb333..e80f711 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ /seahash-3.0.5.crate /seahash-3.0.6.crate +/seahash-3.0.7.crate diff --git a/0001-Fix-read_u64-for-32-bit-platforms.patch b/0001-Fix-read_u64-for-32-bit-platforms.patch deleted file mode 100644 index ce2d6ba..0000000 --- a/0001-Fix-read_u64-for-32-bit-platforms.patch +++ /dev/null @@ -1,50 +0,0 @@ -From e3e13c3bce273a05d7101d174db1d6e0f49a908d Mon Sep 17 00:00:00 2001 -From: Diggory Hardy -Date: Sat, 25 Nov 2017 17:38:40 +0000 -Subject: [PATCH] Fix read_u64 for 32-bit platforms - -(Why you can't rely on .to_le() being correct I don't understand. If compiler -is mixed-endian then to_le ought still do the correct swaps.) ---- - src/buffer.rs | 4 ++-- - src/helper.rs | 2 +- - 2 files changed, 3 insertions(+), 3 deletions(-) - -diff --git a/src/buffer.rs b/src/buffer.rs -index a39be99..af910e2 100644 ---- a/src/buffer.rs -+++ b/src/buffer.rs -@@ -65,7 +65,7 @@ impl State { - - // Calculate the number of excessive bytes. These are bytes that could not be handled - // in the loop above. -- let mut excessive = buf.len() as usize + buf.as_ptr() as usize - end_ptr as usize; -+ let mut excessive = buf.len() % 32; - // Handle the excessive bytes. - match excessive { - 0 => {}, -@@ -73,7 +73,7 @@ impl State { - // 1 or more excessive. - - // Write the last excessive bytes (<8 bytes). -- a ^= helper::read_int(slice::from_raw_parts(ptr as *const u8, excessive)); -+ a ^= helper::read_int(slice::from_raw_parts(ptr, excessive)); - - // Diffuse. - a = helper::diffuse(a); -diff --git a/src/helper.rs b/src/helper.rs -index df379a9..fbb9f6d 100644 ---- a/src/helper.rs -+++ b/src/helper.rs -@@ -60,7 +60,7 @@ pub unsafe fn read_u64(ptr: *const u8) -> u64 { - { - // We cannot be sure about the memory layout of a potentially emulated 64-bit integer, so - // we read it manually. If possible, the compiler should emit proper instructions. -- (*(ptr as *const u32)).to_le() as u64 | ((*(ptr as *const u32)).to_le() as u64) << 32 -+ (*(ptr as *const u32)).to_le() as u64 | ((*(ptr as *const u32).offset(1)).to_le() as u64) << 32 - } - - #[cfg(target_pointer_width = "64")] --- -2.21.0.rc1 - diff --git a/rust-seahash.spec b/rust-seahash.spec index a20ce18..fb67185 100644 --- a/rust-seahash.spec +++ b/rust-seahash.spec @@ -1,27 +1,29 @@ -# Generated by rust2rpm -%bcond_with check +# Generated by rust2rpm 13 +%bcond_without check %global debug_package %{nil} %global crate seahash Name: rust-%{crate} -Version: 3.0.6 -Release: 2%{?dist} +Version: 3.0.7 +Release: 1%{?dist} Summary: Blazingly fast, portable hash function with proven statistical guarantees +# Upstream license specification: MIT # https://github.com/redox-os/tfs/pull/76 License: MIT URL: https://crates.io/crates/seahash Source: %{crates_source} -# https://github.com/redox-os/tfs/pull/74 -Patch0001: 0001-Fix-read_u64-for-32-bit-platforms.patch ExclusiveArch: %{rust_arches} +%if %{__cargo_skip_build} +BuildArch: noarch +%endif BuildRequires: rust-packaging -%global _description \ -A blazingly fast, portable hash function with proven statistical guarantees. +%global _description %{expand: +A blazingly fast, portable hash function with proven statistical guarantees.} %description %{_description} @@ -36,8 +38,8 @@ which use "%{crate}" crate. %files devel %doc README.md -%{cargo_registry}/%{crate}-%{version}/ -%exclude %{cargo_registry}/%{crate}-%{version}/logo.png +%{cargo_registry}/%{crate}-%{version_no_tilde}/ +%exclude %{cargo_registry}/%{crate}-%{version_no_tilde}/logo.png %package -n %{name}+default-devel Summary: %{summary} @@ -49,12 +51,15 @@ This package contains library source intended for building other packages which use "default" feature of "%{crate}" crate. %files -n %{name}+default-devel -%ghost %{cargo_registry}/%{crate}-%{version}/Cargo.toml +%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 @@ -67,6 +72,9 @@ which use "default" feature of "%{crate}" crate. %endif %changelog +* Tue Jan 28 2020 Josh Stone - 3.0.7-1 +- Update to 3.0.7 + * Fri Jul 26 2019 Fedora Release Engineering - 3.0.6-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild diff --git a/sources b/sources index 552410f..d30e0b1 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (seahash-3.0.6.crate) = 21d6fc43c5770145c5fb678c4beb3c0ad23f5de20aaa040cbddea8d12b77479a9cc568ecaccb30c3338a07fe30f626dbf6706efb965bd82da530b713173dbfc2 +SHA512 (seahash-3.0.7.crate) = 03e78c8669c2a20c223772f63df943b173598d8f4714a7bc399c97bd3ec091eda1b5f12dd11f821f45e5178927a4f7621911dc228f5ab5f52f28f9eed12d13c0