The package rpms/rust-cookie0.15.git has added or updated architecture specific content in
its
spec file (ExclusiveArch/ExcludeArch or %ifarch/%ifnarch) in commit(s):
https://src.fedoraproject.org/cgit/rpms/rust-cookie0.15.git/commit/?id=57....
Change:
+ExclusiveArch: %{rust_arches}
Thanks.
Full change:
============
commit 576efaa584c0ac0b3b1e4c3444c3b9e2ac80adb6
Author: Fabio Valentini <decathorpe(a)gmail.com>
Date: Tue May 24 22:38:46 2022 +0200
Initial import (cookie 0.15 compat package)
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..875470f
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1 @@
+/cookie-0.15.1.crate
diff --git a/0001-port-to-crypto-mac-0.11.patch b/0001-port-to-crypto-mac-0.11.patch
new file mode 100644
index 0000000..da2d358
--- /dev/null
+++ b/0001-port-to-crypto-mac-0.11.patch
@@ -0,0 +1,22 @@
+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::<Sha256>::new_varkey(&self.key).expect("good
key");
++ let mut mac =
Hmac::<Sha256>::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::<Sha256>::new_varkey(&self.key).expect("good
key");
++ let mut mac =
Hmac::<Sha256>::new_from_slice(&self.key).expect("good key");
+ mac.update(value.as_bytes());
+ mac.verify(&digest)
+ .map(|_| value.to_string())
diff --git a/README.md b/README.md
deleted file mode 100644
index 4a30f9c..0000000
--- a/README.md
+++ /dev/null
@@ -1,3 +0,0 @@
-# rust-cookie0.15
-
-The rust-cookie0.15 package
diff --git a/cookie-fix-metadata.diff b/cookie-fix-metadata.diff
new file mode 100644
index 0000000..210219d
--- /dev/null
+++ b/cookie-fix-metadata.diff
@@ -0,0 +1,25 @@
+--- cookie-0.15.1/Cargo.toml 1970-01-01T00:00:01+00:00
++++ cookie-0.15.1/Cargo.toml 2022-05-21T20:05:21.521948+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-cookie0.15.spec b/rust-cookie0.15.spec
new file mode 100644
index 0000000..8903271
--- /dev/null
+++ b/rust-cookie0.15.spec
@@ -0,0 +1,238 @@
+# Generated by rust2rpm 21
+%bcond_without check
+%global debug_package %{nil}
+
+%global crate cookie
+
+Name: rust-%{crate}0.15
+Version: 0.15.1
+Release: %autorelease
+Summary: HTTP cookie parsing and cookie jar management
+
+# Upstream license specification: MIT OR Apache-2.0
+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 >= 21
+
+%global _description %{expand:
+HTTP cookie parsing and cookie jar management. Supports signed and private
+(encrypted, authenticated) jars.}
+
+%description %{_description}
+
+%package devel
+Summary: %{summary}
+BuildArch: noarch
+
+%description devel %{_description}
+
+This package contains library source intended for building other packages which
+use the "%{crate}" crate.
+
+%files devel
+%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}
+BuildArch: noarch
+
+%description -n %{name}+default-devel %{_description}
+
+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 %{crate_instdir}/Cargo.toml
+
+%package -n %{name}+aes-gcm-devel
+Summary: %{summary}
+BuildArch: noarch
+
+%description -n %{name}+aes-gcm-devel %{_description}
+
+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 %{crate_instdir}/Cargo.toml
+
+%package -n %{name}+base64-devel
+Summary: %{summary}
+BuildArch: noarch
+
+%description -n %{name}+base64-devel %{_description}
+
+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 %{crate_instdir}/Cargo.toml
+
+%package -n %{name}+hkdf-devel
+Summary: %{summary}
+BuildArch: noarch
+
+%description -n %{name}+hkdf-devel %{_description}
+
+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 %{crate_instdir}/Cargo.toml
+
+%package -n %{name}+hmac-devel
+Summary: %{summary}
+BuildArch: noarch
+
+%description -n %{name}+hmac-devel %{_description}
+
+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 %{crate_instdir}/Cargo.toml
+
+%package -n %{name}+key-expansion-devel
+Summary: %{summary}
+BuildArch: noarch
+
+%description -n %{name}+key-expansion-devel %{_description}
+
+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 %{crate_instdir}/Cargo.toml
+
+%package -n %{name}+percent-encode-devel
+Summary: %{summary}
+BuildArch: noarch
+
+%description -n %{name}+percent-encode-devel %{_description}
+
+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 %{crate_instdir}/Cargo.toml
+
+%package -n %{name}+percent-encoding-devel
+Summary: %{summary}
+BuildArch: noarch
+
+%description -n %{name}+percent-encoding-devel %{_description}
+
+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 %{crate_instdir}/Cargo.toml
+
+%package -n %{name}+private-devel
+Summary: %{summary}
+BuildArch: noarch
+
+%description -n %{name}+private-devel %{_description}
+
+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 %{crate_instdir}/Cargo.toml
+
+%package -n %{name}+rand-devel
+Summary: %{summary}
+BuildArch: noarch
+
+%description -n %{name}+rand-devel %{_description}
+
+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 %{crate_instdir}/Cargo.toml
+
+%package -n %{name}+secure-devel
+Summary: %{summary}
+BuildArch: noarch
+
+%description -n %{name}+secure-devel %{_description}
+
+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 %{crate_instdir}/Cargo.toml
+
+%package -n %{name}+sha2-devel
+Summary: %{summary}
+BuildArch: noarch
+
+%description -n %{name}+sha2-devel %{_description}
+
+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 %{crate_instdir}/Cargo.toml
+
+%package -n %{name}+signed-devel
+Summary: %{summary}
+BuildArch: noarch
+
+%description -n %{name}+signed-devel %{_description}
+
+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 %{crate_instdir}/Cargo.toml
+
+%package -n %{name}+subtle-devel
+Summary: %{summary}
+BuildArch: noarch
+
+%description -n %{name}+subtle-devel %{_description}
+
+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 %{crate_instdir}/Cargo.toml
+
+%prep
+%autosetup -n %{crate}-%{version_no_tilde} -p1
+%cargo_prep
+
+%generate_buildrequires
+%cargo_generate_buildrequires -a
+
+%build
+%cargo_build -a
+
+%install
+%cargo_install -a
+
+%if %{with check}
+%check
+%cargo_test -a
+%endif
+
+%changelog
+%autochangelog
diff --git a/sources b/sources
new file mode 100644
index 0000000..dd49b8e
--- /dev/null
+++ b/sources
@@ -0,0 +1 @@
+SHA512 (cookie-0.15.1.crate) =
1ea4b8508038860376ea7611928928a8009f4b6d5903a53185ec24b345ba0a16d7f054aeed2dd6e7257962a073670b9c2fd0fcec2d901bcdeca2a65a5ac4ed1a