diff --git a/.gitignore b/.gitignore index 36568ed..6cdb333 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ /seahash-3.0.5.crate +/seahash-3.0.6.crate diff --git a/0001-Fix-read_u64-for-32-bit-platforms.patch b/0001-Fix-read_u64-for-32-bit-platforms.patch index 6ee9aa0..ce2d6ba 100644 --- a/0001-Fix-read_u64-for-32-bit-platforms.patch +++ b/0001-Fix-read_u64-for-32-bit-platforms.patch @@ -1,4 +1,4 @@ -From f578b5f3761f56cb5c5d74ae476006341a5c33c8 Mon Sep 17 00:00:00 2001 +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 @@ -6,24 +6,24 @@ 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.) --- - seahash/src/buffer.rs | 4 ++-- - seahash/src/helper.rs | 2 +- + src/buffer.rs | 4 ++-- + src/helper.rs | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) -diff --git a/seahash/src/buffer.rs b/seahash/src/buffer.rs -index 573273d..eb2193c 100644 ---- a/seahash/src/buffer.rs -+++ b/seahash/src/buffer.rs -@@ -63,7 +63,7 @@ impl State { +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. + // 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 => {}, -@@ -71,7 +71,7 @@ impl State { +@@ -73,7 +73,7 @@ impl State { // 1 or more excessive. // Write the last excessive bytes (<8 bytes). @@ -32,10 +32,10 @@ index 573273d..eb2193c 100644 // Diffuse. a = helper::diffuse(a); -diff --git a/seahash/src/helper.rs b/seahash/src/helper.rs -index a95b89c..d3be89a 100644 ---- a/seahash/src/helper.rs -+++ b/seahash/src/helper.rs +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 @@ -46,5 +46,5 @@ index a95b89c..d3be89a 100644 #[cfg(target_pointer_width = "64")] -- -2.16.2 +2.21.0.rc1 diff --git a/rust-seahash.spec b/rust-seahash.spec index 6274241..8b97fa2 100644 --- a/rust-seahash.spec +++ b/rust-seahash.spec @@ -1,18 +1,18 @@ # Generated by rust2rpm -%bcond_without check +%bcond_with check %global debug_package %{nil} %global crate seahash Name: rust-%{crate} -Version: 3.0.5 -Release: 5%{?dist} +Version: 3.0.6 +Release: 1%{?dist} Summary: Blazingly fast, portable hash function with proven statistical guarantees # https://github.com/redox-os/tfs/pull/76 License: MIT URL: https://crates.io/crates/seahash -Source0: https://crates.io/api/v1/crates/%{crate}/%{version}/download#/%{crate}-%{version}.crate +Source: %{crates_source} # https://github.com/redox-os/tfs/pull/74 Patch0001: 0001-Fix-read_u64-for-32-bit-platforms.patch @@ -20,21 +20,39 @@ ExclusiveArch: %{rust_arches} BuildRequires: rust-packaging -%description -%{summary}. +%global _description \ +A blazingly fast, portable hash function with proven statistical guarantees. + +%description %{_description} %package devel Summary: %{summary} BuildArch: noarch -%description devel -A blazingly fast, portable hash function with proven statistical guarantees. +%description devel %{_description} This package contains library source intended for building other packages -which use %{crate} from crates.io. +which use "%{crate}" crate. + +%files devel +%doc README.md +%{cargo_registry}/%{crate}-%{version}/ +%exclude %{cargo_registry}/%{crate}-%{version}/logo.png + +%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 "default" feature of "%{crate}" crate. + +%files -n %{name}+default-devel +%ghost %{cargo_registry}/%{crate}-%{version}/Cargo.toml %prep -%autosetup -n %{crate}-%{version} -p2 +%autosetup -n %{crate}-%{version_no_tilde} -p1 %cargo_prep %build @@ -48,12 +66,10 @@ which use %{crate} from crates.io. %cargo_test %endif -%files devel -%doc README.md -%{cargo_registry}/%{crate}-%{version}/ -%exclude %{cargo_registry}/%{crate}-%{version}/logo.png - %changelog +* Mon Mar 04 2019 Igor Gnatenko - 3.0.6-1 +- Update to 3.0.6 + * Sat Feb 02 2019 Fedora Release Engineering - 3.0.5-5 - Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild diff --git a/sources b/sources index 41681b2..552410f 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (seahash-3.0.5.crate) = fcb61b267772b552c657c37f85f284596c2e015f0b3fe5f2769b45d471cf57a2342ef0c27ff3248c4940576d4481c2dc40d2175053bf41b36fe8d9b846304abe +SHA512 (seahash-3.0.6.crate) = 21d6fc43c5770145c5fb678c4beb3c0ad23f5de20aaa040cbddea8d12b77479a9cc568ecaccb30c3338a07fe30f626dbf6706efb965bd82da530b713173dbfc2 diff --git a/tests/.fmf/version b/tests/.fmf/version new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/tests/.fmf/version @@ -0,0 +1 @@ +1 diff --git a/tests/provision.fmf b/tests/provision.fmf new file mode 100644 index 0000000..503a97c --- /dev/null +++ b/tests/provision.fmf @@ -0,0 +1,5 @@ +--- +standard-inventory-qcow2: + qemu: + # `cargo test` usually eats more than 1G. + m: 4G diff --git a/tests/tests.yml b/tests/tests.yml new file mode 100644 index 0000000..5cf5a54 --- /dev/null +++ b/tests/tests.yml @@ -0,0 +1,13 @@ +--- +- hosts: localhost + roles: + - role: standard-test-basic + tags: + - classic + repositories: + - repo: "https://src.fedoraproject.org/tests/rust.git" + dest: rust + tests: + - rust/cargo-test + environment: + pkg: rust-seahash