From 93b38b86e2212815781db1618e11963a413b61bb Mon Sep 17 00:00:00 2001 From: Fabio Valentini Date: Wed, 3 Jul 2024 23:48:07 +0200 Subject: [PATCH] Update to version 0.12.5; Fixes RHBZ#2292662 --- .gitignore | 1 + reqwest-fix-metadata-auto.diff | 38 ++++++----- reqwest-fix-metadata.diff | 120 ++++++++++++++++++++++++++++++--- rust-reqwest.spec | 92 ++++++++++++++----------- rust2rpm.toml | 18 ++--- sources | 2 +- 6 files changed, 195 insertions(+), 76 deletions(-) diff --git a/.gitignore b/.gitignore index 1a09b43..120cbf4 100644 --- a/.gitignore +++ b/.gitignore @@ -31,3 +31,4 @@ /reqwest-0.11.24.crate /reqwest-0.11.25.crate /reqwest-0.12.4.crate +/reqwest-0.12.5.crate diff --git a/reqwest-fix-metadata-auto.diff b/reqwest-fix-metadata-auto.diff index d1c3011..94a9205 100644 --- a/reqwest-fix-metadata-auto.diff +++ b/reqwest-fix-metadata-auto.diff @@ -1,7 +1,7 @@ ---- reqwest-0.12.4/Cargo.toml 1970-01-01T00:00:01+00:00 -+++ reqwest-0.12.4/Cargo.toml 2024-04-28T14:30:10.095647+00:00 -@@ -228,7 +228,7 @@ - "hyper-util/http2", +--- reqwest-0.12.5/Cargo.toml 1970-01-01T00:00:01+00:00 ++++ reqwest-0.12.5/Cargo.toml 2024-07-03T21:35:00.360343+00:00 +@@ -283,7 +283,7 @@ + "dep:futures-channel", ] json = ["dep:serde_json"] -macos-system-configuration = ["dep:system-configuration"] @@ -9,7 +9,7 @@ multipart = ["dep:mime_guess"] native-tls = ["default-tls"] native-tls-alpn = [ -@@ -254,7 +254,6 @@ +@@ -318,7 +318,6 @@ stream = [ "tokio/fs", "dep:tokio-util", @@ -17,28 +17,28 @@ ] trust-dns = [] zstd = [ -@@ -475,52 +474,3 @@ +@@ -558,57 +557,8 @@ version = "0.13" package = "zstd" --[target."cfg(target_arch = \"wasm32\")".dependencies.js-sys] +-[target.'cfg(target_arch = "wasm32")'.dependencies.js-sys] -version = "0.3.45" - --[target."cfg(target_arch = \"wasm32\")".dependencies.serde_json] +-[target.'cfg(target_arch = "wasm32")'.dependencies.serde_json] -version = "1.0" - --[target."cfg(target_arch = \"wasm32\")".dependencies.wasm-bindgen] +-[target.'cfg(target_arch = "wasm32")'.dependencies.wasm-bindgen] -version = "0.2.68" - --[target."cfg(target_arch = \"wasm32\")".dependencies.wasm-bindgen-futures] +-[target.'cfg(target_arch = "wasm32")'.dependencies.wasm-bindgen-futures] -version = "0.4.18" - --[target."cfg(target_arch = \"wasm32\")".dependencies.wasm-streams] +-[target.'cfg(target_arch = "wasm32")'.dependencies.wasm-streams] -version = "0.4" -optional = true - --[target."cfg(target_arch = \"wasm32\")".dependencies.web-sys] --version = "0.3.25" +-[target.'cfg(target_arch = "wasm32")'.dependencies.web-sys] +-version = "0.3.28" -features = [ - "AbortController", - "AbortSignal", @@ -57,16 +57,22 @@ - "ReadableStream", -] - --[target."cfg(target_arch = \"wasm32\")".dev-dependencies.wasm-bindgen] +-[target.'cfg(target_arch = "wasm32")'.dev-dependencies.wasm-bindgen] -version = "0.2.68" -features = ["serde-serialize"] - --[target."cfg(target_arch = \"wasm32\")".dev-dependencies.wasm-bindgen-test] +-[target.'cfg(target_arch = "wasm32")'.dev-dependencies.wasm-bindgen-test] -version = "0.3" - --[target."cfg(target_os = \"macos\")".dependencies.system-configuration] +-[target.'cfg(target_os = "macos")'.dependencies.system-configuration] -version = "0.5.1" -optional = true - -[target."cfg(windows)".dependencies.winreg] -version = "0.52.0" +- + [lints.rust.unexpected_cfgs] + level = "warn" + priority = 0 + check-cfg = ["cfg(reqwest_unstable)"] ++ diff --git a/reqwest-fix-metadata.diff b/reqwest-fix-metadata.diff index 6ee2e89..a397460 100644 --- a/reqwest-fix-metadata.diff +++ b/reqwest-fix-metadata.diff @@ -1,16 +1,52 @@ ---- reqwest-0.12.4/Cargo.toml 1970-01-01T00:00:01+00:00 -+++ reqwest-0.12.4/Cargo.toml 2024-04-28T14:30:24.227834+00:00 -@@ -159,9 +159,6 @@ - [dependencies.serde_urlencoded] - version = "0.7.1" +--- reqwest-0.12.5/Cargo.toml 1970-01-01T00:00:01+00:00 ++++ reqwest-0.12.5/Cargo.toml 2024-07-03T21:36:21.631788+00:00 +@@ -70,10 +70,6 @@ + path = "examples/form.rs" --[dependencies.sync_wrapper] --version = "0.1.2" + [[example]] +-name = "h3_simple" +-path = "examples/h3_simple.rs" - - [dependencies.tower-service] - version = "0.3" +-[[example]] + name = "json_dynamic" + path = "examples/json_dynamic.rs" + required-features = ["json"] +@@ -100,14 +96,6 @@ + name = "blocking" + path = "tests/blocking.rs" + required-features = ["blocking"] +- +-[[test]] +-name = "brotli" +-path = "tests/brotli.rs" +-required-features = [ +- "brotli", +- "stream", +-] -@@ -203,7 +200,6 @@ + [[test]] + name = "client" +@@ -222,7 +210,6 @@ + "hyper-rustls?/ring", + "tokio-rustls?/ring", + "rustls?/ring", +- "quinn?/ring", + ] + __tls = [ + "dep:rustls-pemfile", +@@ -235,11 +222,6 @@ + "futures-util/sink", + "tokio/sync", + ] +-brotli = [ +- "dep:async-compression", +- "async-compression?/brotli", +- "dep:tokio-util", +-] + charset = ["dep:encoding_rs"] + cookies = [ + "dep:cookie_crate", +@@ -249,7 +231,6 @@ "default-tls", "charset", "http2", @@ -18,11 +54,73 @@ ] default-tls = [ "dep:hyper-tls", -@@ -228,7 +224,6 @@ +@@ -274,16 +255,7 @@ "hyper-util/http2", + "hyper-rustls?/http2", ] +-http3 = [ +- "rustls-tls-manual-roots", +- "dep:h3", +- "dep:h3-quinn", +- "dep:quinn", +- "dep:slab", +- "dep:futures-channel", +-] json = ["dep:serde_json"] -macos-system-configuration = [] multipart = ["dep:mime_guess"] native-tls = ["default-tls"] native-tls-alpn = [ +@@ -291,10 +263,6 @@ + "native-tls-crate?/alpn", + "hyper-tls?/alpn", + ] +-native-tls-vendored = [ +- "native-tls", +- "native-tls-crate?/vendored", +-] + rustls-tls = ["rustls-tls-webpki-roots"] + rustls-tls-manual-roots = [ + "__rustls", +@@ -353,14 +321,6 @@ + version = "0.4" + optional = true + +-[target.'cfg(not(target_arch = "wasm32"))'.dependencies.h3] +-version = "0.0.5" +-optional = true +- +-[target.'cfg(not(target_arch = "wasm32"))'.dependencies.h3-quinn] +-version = "0.0.6" +-optional = true +- + [target.'cfg(not(target_arch = "wasm32"))'.dependencies.hickory-resolver] + version = "0.24" + features = ["tokio-runtime"] +@@ -424,15 +384,6 @@ + [target.'cfg(not(target_arch = "wasm32"))'.dependencies.pin-project-lite] + version = "0.2.11" + +-[target.'cfg(not(target_arch = "wasm32"))'.dependencies.quinn] +-version = "0.11.1" +-features = [ +- "rustls", +- "runtime-tokio", +-] +-optional = true +-default-features = false +- + [target.'cfg(not(target_arch = "wasm32"))'.dependencies.rustls] + version = "0.23.4" + features = [ +@@ -493,10 +444,6 @@ + [target.'cfg(not(target_arch = "wasm32"))'.dependencies.webpki-roots] + version = "0.26.0" + optional = true +- +-[target.'cfg(not(target_arch = "wasm32"))'.dev-dependencies.brotli_crate] +-version = "3.3.0" +-package = "brotli" + + [target.'cfg(not(target_arch = "wasm32"))'.dev-dependencies.doc-comment] + version = "0.3" diff --git a/rust-reqwest.spec b/rust-reqwest.spec index 2a08764..9d6d671 100644 --- a/rust-reqwest.spec +++ b/rust-reqwest.spec @@ -5,7 +5,7 @@ %global crate reqwest Name: rust-reqwest -Version: 0.12.4 +Version: 0.12.5 Release: %autorelease Summary: Higher level HTTP client library @@ -16,8 +16,8 @@ Source: %{crates_source} Patch: reqwest-fix-metadata-auto.diff # Manually created patch for downstream crate metadata changes # * drop macOS-specific features -# * drop unused sync_wrapper dependency; see -# https://github.com/seanmonstar/reqwest/pull/2229 +# * drop unused support for brotli +# * drop unused support for HTTP/3 Patch: reqwest-fix-metadata.diff BuildRequires: cargo-rpm-macros >= 24 @@ -79,40 +79,40 @@ use the "__rustls" feature of the "%{crate}" crate. %files -n %{name}+__rustls-devel %ghost %{crate_instdir}/Cargo.toml -%package -n %{name}+__tls-devel +%package -n %{name}+__rustls-ring-devel Summary: %{summary} BuildArch: noarch -%description -n %{name}+__tls-devel %{_description} +%description -n %{name}+__rustls-ring-devel %{_description} This package contains library source intended for building other packages which -use the "__tls" feature of the "%{crate}" crate. +use the "__rustls-ring" feature of the "%{crate}" crate. -%files -n %{name}+__tls-devel +%files -n %{name}+__rustls-ring-devel %ghost %{crate_instdir}/Cargo.toml -%package -n %{name}+blocking-devel +%package -n %{name}+__tls-devel Summary: %{summary} BuildArch: noarch -%description -n %{name}+blocking-devel %{_description} +%description -n %{name}+__tls-devel %{_description} This package contains library source intended for building other packages which -use the "blocking" feature of the "%{crate}" crate. +use the "__tls" feature of the "%{crate}" crate. -%files -n %{name}+blocking-devel +%files -n %{name}+__tls-devel %ghost %{crate_instdir}/Cargo.toml -%package -n %{name}+brotli-devel +%package -n %{name}+blocking-devel Summary: %{summary} BuildArch: noarch -%description -n %{name}+brotli-devel %{_description} +%description -n %{name}+blocking-devel %{_description} This package contains library source intended for building other packages which -use the "brotli" feature of the "%{crate}" crate. +use the "blocking" feature of the "%{crate}" crate. -%files -n %{name}+brotli-devel +%files -n %{name}+blocking-devel %ghost %{crate_instdir}/Cargo.toml %package -n %{name}+charset-devel @@ -163,18 +163,6 @@ use the "deflate" feature of the "%{crate}" crate. %files -n %{name}+deflate-devel %ghost %{crate_instdir}/Cargo.toml -%package -n %{name}+futures-channel-devel -Summary: %{summary} -BuildArch: noarch - -%description -n %{name}+futures-channel-devel %{_description} - -This package contains library source intended for building other packages which -use the "futures-channel" feature of the "%{crate}" crate. - -%files -n %{name}+futures-channel-devel -%ghost %{crate_instdir}/Cargo.toml - %package -n %{name}+gzip-devel Summary: %{summary} BuildArch: noarch @@ -271,18 +259,6 @@ use the "native-tls-alpn" feature of the "%{crate}" crate. %files -n %{name}+native-tls-alpn-devel %ghost %{crate_instdir}/Cargo.toml -%package -n %{name}+rustls-pki-types-devel -Summary: %{summary} -BuildArch: noarch - -%description -n %{name}+rustls-pki-types-devel %{_description} - -This package contains library source intended for building other packages which -use the "rustls-pki-types" feature of the "%{crate}" crate. - -%files -n %{name}+rustls-pki-types-devel -%ghost %{crate_instdir}/Cargo.toml - %package -n %{name}+rustls-tls-devel Summary: %{summary} BuildArch: noarch @@ -307,6 +283,18 @@ use the "rustls-tls-manual-roots" feature of the "%{crate}" crate. %files -n %{name}+rustls-tls-manual-roots-devel %ghost %{crate_instdir}/Cargo.toml +%package -n %{name}+rustls-tls-manual-roots-no-provider-devel +Summary: %{summary} +BuildArch: noarch + +%description -n %{name}+rustls-tls-manual-roots-no-provider-devel %{_description} + +This package contains library source intended for building other packages which +use the "rustls-tls-manual-roots-no-provider" feature of the "%{crate}" crate. + +%files -n %{name}+rustls-tls-manual-roots-no-provider-devel +%ghost %{crate_instdir}/Cargo.toml + %package -n %{name}+rustls-tls-native-roots-devel Summary: %{summary} BuildArch: noarch @@ -319,6 +307,18 @@ use the "rustls-tls-native-roots" feature of the "%{crate}" crate. %files -n %{name}+rustls-tls-native-roots-devel %ghost %{crate_instdir}/Cargo.toml +%package -n %{name}+rustls-tls-no-provider-devel +Summary: %{summary} +BuildArch: noarch + +%description -n %{name}+rustls-tls-no-provider-devel %{_description} + +This package contains library source intended for building other packages which +use the "rustls-tls-no-provider" feature of the "%{crate}" crate. + +%files -n %{name}+rustls-tls-no-provider-devel +%ghost %{crate_instdir}/Cargo.toml + %package -n %{name}+rustls-tls-webpki-roots-devel Summary: %{summary} BuildArch: noarch @@ -331,6 +331,18 @@ use the "rustls-tls-webpki-roots" feature of the "%{crate}" crate. %files -n %{name}+rustls-tls-webpki-roots-devel %ghost %{crate_instdir}/Cargo.toml +%package -n %{name}+slab-devel +Summary: %{summary} +BuildArch: noarch + +%description -n %{name}+slab-devel %{_description} + +This package contains library source intended for building other packages which +use the "slab" feature of the "%{crate}" crate. + +%files -n %{name}+slab-devel +%ghost %{crate_instdir}/Cargo.toml + %package -n %{name}+socks-devel Summary: %{summary} BuildArch: noarch @@ -382,6 +394,8 @@ use the "zstd" feature of the "%{crate}" crate. %prep %autosetup -n %{crate}-%{version} -p1 %cargo_prep +# drop tests that depend on the dropped brotli support +rm tests/brotli.rs %generate_buildrequires %cargo_generate_buildrequires diff --git a/rust2rpm.toml b/rust2rpm.toml index 534c532..948bc25 100644 --- a/rust2rpm.toml +++ b/rust2rpm.toml @@ -1,15 +1,8 @@ [package] cargo-toml-patch-comments = [ "drop macOS-specific features", - "drop unused sync_wrapper dependency; see https://github.com/seanmonstar/reqwest/pull/2229", -] - -[features] -hide = [ - "h3", - "h3-quinn", - "native-tls-vendored", - "quinn", + "drop unused support for brotli", + "drop unused support for HTTP/3", ] [tests] @@ -21,3 +14,10 @@ skip = [ ] skip-exact = true comments = ["skip tests which require internet access"] + +[scripts] +prep.post = [ + "# drop tests that depend on the dropped brotli support", + "rm tests/brotli.rs", +] + diff --git a/sources b/sources index b5bb14d..6775567 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (reqwest-0.12.4.crate) = fec388a448df03919563c007e83b565a8a88dfa4b208cf5ec9701eaa1d9dd1b6767b03e76b60324598f875f8d5ac971ad2ce3fa3ee032375c0fcc43a731f8cc8 +SHA512 (reqwest-0.12.5.crate) = 19ded1f2251ab7308533b670ed57f33f2f8ad59fd937267e55ff92a15d72efa3c091c4cd2eb1b8d2e8be3a7cb652dcdbd9f6954cfcf218c834107693557a3824