diff --git a/0001-chore-Update-sha-1-to-0.9.patch b/0001-chore-Update-sha-1-to-0.9.patch new file mode 100644 index 0000000..29e1eb0 --- /dev/null +++ b/0001-chore-Update-sha-1-to-0.9.patch @@ -0,0 +1,31 @@ +From 9bb81d8160dc1c16753fdae4a42c1d4746578560 Mon Sep 17 00:00:00 2001 +From: Igor Raits +Date: Fri, 25 Dec 2020 10:28:38 +0100 +Subject: [PATCH] chore: Update sha-1 to 0.9 + +Signed-off-by: Igor Raits +--- + src/handshake.rs | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/src/handshake.rs b/src/handshake.rs +index b7520bd..7d5ca23 100644 +--- a/src/handshake.rs ++++ b/src/handshake.rs +@@ -22,10 +22,10 @@ fn generate_key() -> String { + pub fn hash_key(key: &[u8]) -> String { + let mut hasher = sha1::Sha1::new(); + +- hasher.input(key); +- hasher.input(WS_GUID.as_bytes()); ++ hasher.update(key); ++ hasher.update(WS_GUID.as_bytes()); + +- encode_base64(&hasher.result()) ++ encode_base64(&hasher.finalize()) + } + + // This code is based on rustc_serialize base64 STANDARD +-- +2.30.0.rc2 + diff --git a/rust-ws.spec b/rust-ws.spec index 612eca7..174ce0c 100644 --- a/rust-ws.spec +++ b/rust-ws.spec @@ -1,4 +1,4 @@ -# Generated by rust2rpm 11 +# Generated by rust2rpm 16 # * Tests require network %bcond_with check %global debug_package %{nil} @@ -7,13 +7,18 @@ Name: rust-%{crate} Version: 0.9.1 -Release: 4%{?dist} +Release: 5%{?dist} Summary: Lightweight, event-driven WebSockets for Rust # Upstream license specification: MIT License: MIT URL: https://crates.io/crates/ws Source: %{crates_source} +# Initial patched metadata +# * Update sha-1 to 0.9 +Patch0: ws-fix-metadata.diff +# * Finish update of sha-1 +Patch0001: 0001-chore-Update-sha-1-to-0.9.patch ExclusiveArch: %{rust_arches} %if %{__cargo_skip_build} @@ -39,7 +44,7 @@ which use "%{crate}" crate. %files devel %license LICENSE %doc README.md CHANGELOG.md -%{cargo_registry}/%{crate}-%{version}/ +%{cargo_registry}/%{crate}-%{version_no_tilde}/ %package -n %{name}+default-devel Summary: %{summary} @@ -51,7 +56,7 @@ 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 %package -n %{name}+libc-devel Summary: %{summary} @@ -63,7 +68,7 @@ This package contains library source intended for building other packages which use "libc" feature of "%{crate}" crate. %files -n %{name}+libc-devel -%ghost %{cargo_registry}/%{crate}-%{version}/Cargo.toml +%ghost %{cargo_registry}/%{crate}-%{version_no_tilde}/Cargo.toml %package -n %{name}+libz-sys-devel Summary: %{summary} @@ -75,7 +80,7 @@ This package contains library source intended for building other packages which use "libz-sys" feature of "%{crate}" crate. %files -n %{name}+libz-sys-devel -%ghost %{cargo_registry}/%{crate}-%{version}/Cargo.toml +%ghost %{cargo_registry}/%{crate}-%{version_no_tilde}/Cargo.toml %package -n %{name}+native-tls-devel Summary: %{summary} @@ -87,7 +92,7 @@ This package contains library source intended for building other packages which use "native-tls" feature of "%{crate}" crate. %files -n %{name}+native-tls-devel -%ghost %{cargo_registry}/%{crate}-%{version}/Cargo.toml +%ghost %{cargo_registry}/%{crate}-%{version_no_tilde}/Cargo.toml %package -n %{name}+nativetls-devel Summary: %{summary} @@ -99,7 +104,7 @@ This package contains library source intended for building other packages which use "nativetls" feature of "%{crate}" crate. %files -n %{name}+nativetls-devel -%ghost %{cargo_registry}/%{crate}-%{version}/Cargo.toml +%ghost %{cargo_registry}/%{crate}-%{version_no_tilde}/Cargo.toml %package -n %{name}+openssl-devel Summary: %{summary} @@ -111,7 +116,7 @@ This package contains library source intended for building other packages which use "openssl" feature of "%{crate}" crate. %files -n %{name}+openssl-devel -%ghost %{cargo_registry}/%{crate}-%{version}/Cargo.toml +%ghost %{cargo_registry}/%{crate}-%{version_no_tilde}/Cargo.toml %package -n %{name}+permessage-deflate-devel Summary: %{summary} @@ -123,7 +128,7 @@ This package contains library source intended for building other packages which use "permessage-deflate" feature of "%{crate}" crate. %files -n %{name}+permessage-deflate-devel -%ghost %{cargo_registry}/%{crate}-%{version}/Cargo.toml +%ghost %{cargo_registry}/%{crate}-%{version_no_tilde}/Cargo.toml %package -n %{name}+ssl-devel Summary: %{summary} @@ -135,7 +140,7 @@ This package contains library source intended for building other packages which use "ssl" feature of "%{crate}" crate. %files -n %{name}+ssl-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 @@ -156,6 +161,9 @@ which use "ssl" feature of "%{crate}" crate. %endif %changelog +* Fri Dec 25 10:23:31 CET 2020 Igor Raits - 0.9.1-5 +- Fix FTBFS/FTI + * Sat Aug 01 2020 Fedora Release Engineering - 0.9.1-4 - Second attempt - Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild diff --git a/ws-fix-metadata.diff b/ws-fix-metadata.diff new file mode 100644 index 0000000..6c1ed20 --- /dev/null +++ b/ws-fix-metadata.diff @@ -0,0 +1,11 @@ +--- ws-0.9.1/Cargo.toml 1970-01-01T00:00:00+00:00 ++++ ws-0.9.1/Cargo.toml 2020-12-25T09:29:36.759301+00:00 +@@ -58,7 +58,7 @@ + version = "0.7" + + [dependencies.sha-1] +-version = "0.8.0" ++version = "0.9" + + [dependencies.slab] + version = "0.4"