diff --git a/.gitignore b/.gitignore index 5409b19..aa78c81 100644 --- a/.gitignore +++ b/.gitignore @@ -3,3 +3,4 @@ /cookie-0.14.3.crate /cookie-0.14.4.crate /cookie-0.15.1.crate +/cookie-0.16.0.crate diff --git a/0001-port-to-crypto-mac-0.11.patch b/0001-port-to-crypto-mac-0.11.patch deleted file mode 100644 index da2d358..0000000 --- a/0001-port-to-crypto-mac-0.11.patch +++ /dev/null @@ -1,22 +0,0 @@ -diff --git a/src/secure/signed.rs b/src/secure/signed.rs -index 2390f17..954866e 100644 ---- a/src/secure/signed.rs -+++ b/src/secure/signed.rs -@@ -33,7 +33,7 @@ impl<'a> SignedJar<'a> { - /// Signs the cookie's value providing integrity and authenticity. - fn sign_cookie(&self, cookie: &mut Cookie) { - // Compute HMAC-SHA256 of the cookie's value. -- let mut mac = Hmac::::new_varkey(&self.key).expect("good key"); -+ let mut mac = Hmac::::new_from_slice(&self.key).expect("good key"); - mac.update(cookie.value().as_bytes()); - - // Cookie's new value is [MAC | original-value]. -@@ -55,7 +55,7 @@ impl<'a> SignedJar<'a> { - let digest = base64::decode(digest_str).map_err(|_| "bad base64 digest")?; - - // Perform the verification. -- let mut mac = Hmac::::new_varkey(&self.key).expect("good key"); -+ let mut mac = Hmac::::new_from_slice(&self.key).expect("good key"); - mac.update(value.as_bytes()); - mac.verify(&digest) - .map(|_| value.to_string()) diff --git a/cookie-fix-metadata.diff b/cookie-fix-metadata.diff deleted file mode 100644 index 30ec808..0000000 --- a/cookie-fix-metadata.diff +++ /dev/null @@ -1,25 +0,0 @@ ---- cookie-0.15.1/Cargo.toml 1970-01-01T00:00:01+00:00 -+++ cookie-0.15.1/Cargo.toml 2021-12-09T17:47:59.041554+00:00 -@@ -24,7 +24,7 @@ - [package.metadata.docs.rs] - all-features = true - [dependencies.aes-gcm] --version = "0.8.0" -+version = "0.9.0" - optional = true - - [dependencies.base64] -@@ -32,11 +32,11 @@ - optional = true - - [dependencies.hkdf] --version = "0.10.0" -+version = "0.11.0" - optional = true - - [dependencies.hmac] --version = "0.10.0" -+version = "0.11.0" - optional = true - - [dependencies.percent-encoding] diff --git a/rust-cookie.spec b/rust-cookie.spec index d18a651..5acca5f 100644 --- a/rust-cookie.spec +++ b/rust-cookie.spec @@ -1,11 +1,11 @@ -# Generated by rust2rpm 20 +# Generated by rust2rpm 21 %bcond_without check %global debug_package %{nil} %global crate cookie Name: rust-%{crate} -Version: 0.15.1 +Version: 0.16.0 Release: %autorelease Summary: HTTP cookie parsing and cookie jar management @@ -13,18 +13,10 @@ Summary: HTTP cookie parsing and cookie jar management License: MIT or ASL 2.0 URL: https://crates.io/crates/cookie Source: %{crates_source} -# Initial patched metadata -# * bump aes-gcm from 0.8 to 0.9 -# * bump hkdf from 0.10 to 0.11 -# * bump hmac from 0.10 to 0.11 -Patch0: cookie-fix-metadata.diff -# * patch for crypto-mac API changes -# https://github.com/SergioBenitez/cookie-rs/commit/14b053a -Patch1: 0001-port-to-crypto-mac-0.11.patch ExclusiveArch: %{rust_arches} -BuildRequires: rust-packaging +BuildRequires: rust-packaging >= 21 %global _description %{expand: HTTP cookie parsing and cookie jar management. Supports signed and private @@ -42,9 +34,11 @@ This package contains library source intended for building other packages which use the "%{crate}" crate. %files devel -%license LICENSE-APACHE LICENSE-MIT -%doc CHANGELOG.md README.md -%{cargo_registry}/%{crate}-%{version_no_tilde}/ +%license %{crate_instdir}/LICENSE-APACHE +%license %{crate_instdir}/LICENSE-MIT +%doc %{crate_instdir}/CHANGELOG.md +%doc %{crate_instdir}/README.md +%{crate_instdir}/ %package -n %{name}+default-devel Summary: %{summary} @@ -56,7 +50,7 @@ This package contains library source intended for building other packages which use the "default" feature of the "%{crate}" crate. %files -n %{name}+default-devel -%ghost %{cargo_registry}/%{crate}-%{version_no_tilde}/Cargo.toml +%ghost %{crate_instdir}/Cargo.toml %package -n %{name}+aes-gcm-devel Summary: %{summary} @@ -68,7 +62,7 @@ This package contains library source intended for building other packages which use the "aes-gcm" feature of the "%{crate}" crate. %files -n %{name}+aes-gcm-devel -%ghost %{cargo_registry}/%{crate}-%{version_no_tilde}/Cargo.toml +%ghost %{crate_instdir}/Cargo.toml %package -n %{name}+base64-devel Summary: %{summary} @@ -80,7 +74,7 @@ This package contains library source intended for building other packages which use the "base64" feature of the "%{crate}" crate. %files -n %{name}+base64-devel -%ghost %{cargo_registry}/%{crate}-%{version_no_tilde}/Cargo.toml +%ghost %{crate_instdir}/Cargo.toml %package -n %{name}+hkdf-devel Summary: %{summary} @@ -92,7 +86,7 @@ This package contains library source intended for building other packages which use the "hkdf" feature of the "%{crate}" crate. %files -n %{name}+hkdf-devel -%ghost %{cargo_registry}/%{crate}-%{version_no_tilde}/Cargo.toml +%ghost %{crate_instdir}/Cargo.toml %package -n %{name}+hmac-devel Summary: %{summary} @@ -104,7 +98,7 @@ This package contains library source intended for building other packages which use the "hmac" feature of the "%{crate}" crate. %files -n %{name}+hmac-devel -%ghost %{cargo_registry}/%{crate}-%{version_no_tilde}/Cargo.toml +%ghost %{crate_instdir}/Cargo.toml %package -n %{name}+key-expansion-devel Summary: %{summary} @@ -116,7 +110,7 @@ This package contains library source intended for building other packages which use the "key-expansion" feature of the "%{crate}" crate. %files -n %{name}+key-expansion-devel -%ghost %{cargo_registry}/%{crate}-%{version_no_tilde}/Cargo.toml +%ghost %{crate_instdir}/Cargo.toml %package -n %{name}+percent-encode-devel Summary: %{summary} @@ -128,7 +122,7 @@ This package contains library source intended for building other packages which use the "percent-encode" feature of the "%{crate}" crate. %files -n %{name}+percent-encode-devel -%ghost %{cargo_registry}/%{crate}-%{version_no_tilde}/Cargo.toml +%ghost %{crate_instdir}/Cargo.toml %package -n %{name}+percent-encoding-devel Summary: %{summary} @@ -140,7 +134,7 @@ This package contains library source intended for building other packages which use the "percent-encoding" feature of the "%{crate}" crate. %files -n %{name}+percent-encoding-devel -%ghost %{cargo_registry}/%{crate}-%{version_no_tilde}/Cargo.toml +%ghost %{crate_instdir}/Cargo.toml %package -n %{name}+private-devel Summary: %{summary} @@ -152,7 +146,7 @@ This package contains library source intended for building other packages which use the "private" feature of the "%{crate}" crate. %files -n %{name}+private-devel -%ghost %{cargo_registry}/%{crate}-%{version_no_tilde}/Cargo.toml +%ghost %{crate_instdir}/Cargo.toml %package -n %{name}+rand-devel Summary: %{summary} @@ -164,7 +158,7 @@ This package contains library source intended for building other packages which use the "rand" feature of the "%{crate}" crate. %files -n %{name}+rand-devel -%ghost %{cargo_registry}/%{crate}-%{version_no_tilde}/Cargo.toml +%ghost %{crate_instdir}/Cargo.toml %package -n %{name}+secure-devel Summary: %{summary} @@ -176,7 +170,7 @@ This package contains library source intended for building other packages which use the "secure" feature of the "%{crate}" crate. %files -n %{name}+secure-devel -%ghost %{cargo_registry}/%{crate}-%{version_no_tilde}/Cargo.toml +%ghost %{crate_instdir}/Cargo.toml %package -n %{name}+sha2-devel Summary: %{summary} @@ -188,7 +182,7 @@ This package contains library source intended for building other packages which use the "sha2" feature of the "%{crate}" crate. %files -n %{name}+sha2-devel -%ghost %{cargo_registry}/%{crate}-%{version_no_tilde}/Cargo.toml +%ghost %{crate_instdir}/Cargo.toml %package -n %{name}+signed-devel Summary: %{summary} @@ -200,7 +194,7 @@ This package contains library source intended for building other packages which use the "signed" feature of the "%{crate}" crate. %files -n %{name}+signed-devel -%ghost %{cargo_registry}/%{crate}-%{version_no_tilde}/Cargo.toml +%ghost %{crate_instdir}/Cargo.toml %package -n %{name}+subtle-devel Summary: %{summary} @@ -212,7 +206,7 @@ This package contains library source intended for building other packages which use the "subtle" feature of the "%{crate}" crate. %files -n %{name}+subtle-devel -%ghost %{cargo_registry}/%{crate}-%{version_no_tilde}/Cargo.toml +%ghost %{crate_instdir}/Cargo.toml %prep %autosetup -n %{crate}-%{version_no_tilde} -p1 diff --git a/sources b/sources index dd49b8e..a291501 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (cookie-0.15.1.crate) = 1ea4b8508038860376ea7611928928a8009f4b6d5903a53185ec24b345ba0a16d7f054aeed2dd6e7257962a073670b9c2fd0fcec2d901bcdeca2a65a5ac4ed1a +SHA512 (cookie-0.16.0.crate) = 2e4b6c682e6289b6c5b6ad1f7d3a735f04cc984d14bd03f2897c1adb3b1f44ef4d92a864345e160efdf4e942157a8a05015ecfaf61d0088cab799116effbe8d1