From a6a68d7fd6af0a1946d9bb9e744be699d31a0bac Mon Sep 17 00:00:00 2001 From: Igor Gnatenko Date: Sun, 31 Dec 2017 15:07:51 +0100 Subject: [PATCH] Update to 0.4.0 Signed-off-by: Igor Gnatenko --- .gitignore | 1 + ...e-openssl-dependency-from-0.7-to-0.9.patch | 36 ------------------- rust-sha1.spec | 12 +++---- sha1-0.2.0-fix-metadata.diff | 9 ----- sources | 2 +- 5 files changed, 7 insertions(+), 53 deletions(-) delete mode 100644 0001-Update-openssl-dependency-from-0.7-to-0.9.patch delete mode 100644 sha1-0.2.0-fix-metadata.diff diff --git a/.gitignore b/.gitignore index cc68abe..27708a8 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ /sha1-0.2.0.crate +/sha1-0.4.0.crate diff --git a/0001-Update-openssl-dependency-from-0.7-to-0.9.patch b/0001-Update-openssl-dependency-from-0.7-to-0.9.patch deleted file mode 100644 index e777b0f..0000000 --- a/0001-Update-openssl-dependency-from-0.7-to-0.9.patch +++ /dev/null @@ -1,36 +0,0 @@ -From 04c65ea41ddd2fb20ae56517ed6ce9be2e5d3d8f Mon Sep 17 00:00:00 2001 -From: Casey Rodarmor -Date: Fri, 24 Feb 2017 17:07:53 -0800 -Subject: [PATCH] Update openssl dependency from 0.7 to 0.9 - ---- - src/lib.rs | 6 +++--- - 1 file changed, 3 insertions(+), 3 deletions(-) - -diff --git a/src/lib.rs b/src/lib.rs -index 33f24d1..738f95c 100644 ---- a/src/lib.rs -+++ b/src/lib.rs -@@ -319,8 +319,8 @@ mod tests { - let mut bytes = [0; 512]; - - for _ in 0..20 { -- let ty = openssl::crypto::hash::Type::SHA1; -- let mut r = openssl::crypto::hash::Hasher::new(ty); -+ let ty = openssl::hash::MessageDigest::sha1(); -+ let mut r = openssl::hash::Hasher::new(ty).unwrap(); - m.reset(); - for _ in 0..50 { - let len = rng.gen::() % bytes.len(); -@@ -328,7 +328,7 @@ mod tests { - m.update(&bytes[..len]); - r.write(&bytes[..len]).unwrap(); - } -- assert_eq!(r.finish(), m.digest().bytes()); -+ assert_eq!(r.finish().unwrap(), m.digest().bytes()); - } - } - } --- -2.15.0 - diff --git a/rust-sha1.spec b/rust-sha1.spec index 6fd50d5..403138b 100644 --- a/rust-sha1.spec +++ b/rust-sha1.spec @@ -5,18 +5,13 @@ %global crate sha1 Name: rust-%{crate} -Version: 0.2.0 -Release: 3%{?dist} +Version: 0.4.0 +Release: 1%{?dist} Summary: Minimal implementation of SHA1 for Rust License: BSD URL: https://crates.io/crates/sha1 Source0: https://crates.io/api/v1/crates/%{crate}/%{version}/download#/%{crate}-%{version}.crate -# Initial patched metadata -# * Bump openssl to 0.9, https://github.com/mitsuhiko/rust-sha1/pull/19 -Patch0: sha1-0.2.0-fix-metadata.diff -# Make it work with new openssl -Patch1: 0001-Update-openssl-dependency-from-0.7-to-0.9.patch ExclusiveArch: %{rust_arches} @@ -61,6 +56,9 @@ which use %{crate} from crates.io. %{cargo_registry}/%{crate}-%{version}/ %changelog +* Sun Dec 31 2017 Igor Gnatenko - 0.4.0-1 +- Update to 0.4.0 + * Wed Nov 29 2017 Igor Gnatenko - 0.2.0-3 - Update patch diff --git a/sha1-0.2.0-fix-metadata.diff b/sha1-0.2.0-fix-metadata.diff deleted file mode 100644 index efa3bba..0000000 --- a/sha1-0.2.0-fix-metadata.diff +++ /dev/null @@ -1,9 +0,0 @@ ---- sha1-0.2.0/Cargo.toml 2016-07-13T16:22:04+02:00 -+++ sha1-0.2.0/Cargo.toml 2017-11-29T18:04:05.810482+01:00 -@@ -8,5 +8,5 @@ - repository = "https://github.com/mitsuhiko/rust-sha1" - - [dev-dependencies] --openssl = "0.7" -+openssl = "0.9" - rand = "0.3" diff --git a/sources b/sources index a5e883f..5d44c23 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (sha1-0.2.0.crate) = 2b0a48e1c0e498e2148b6c78245a3db3e2d825fc76257f78d85dcc730235c415a25943b9ab639e10e11d0a5c18528fea81830314c685bc120e8e8b613d27e8ac +SHA512 (sha1-0.4.0.crate) = 4ed4fd956e652b3dc42ea1cb476db12e312f288f641b2ecadfb7312d88c3a04d227b1d0f17547b0989e082854aec4f5889ae3c51ec1201b9abaaee89bafd9378