From 8cc394c9af07b6e5fb5e8ab3eb5018f201f813d1 Mon Sep 17 00:00:00 2001 From: Peter Michael Green Date: Sat, 25 Jun 2022 17:52:37 +0000 Subject: [PATCH] reqwest - fix dependencies. --- src/reqwest/debian/changelog | 6 +++ .../patches/disable-async-compression.patch | 46 ++++++++++++++++++ .../debian/patches/disable-brotli.patch | 15 ++++++ .../debian/patches/disable-hyper-rustls.patch | 43 +++++++++++++++++ .../debian/patches/disable-tokio-rustls.patch | 15 ++++++ .../debian/patches/disable-tokio-socks.patch | 23 +++++++++ .../patches/disable-trust-dns-resolver.patch | 23 +++++++++ .../debian/patches/disable-vendored.patch | 15 ++++++ .../debian/patches/disable-webpki-roots.patch | 33 +++++++++++++ src/reqwest/debian/patches/relax-dep.patch | 22 +++++++++ src/reqwest/debian/patches/remove-wasm.patch | 47 +++++++++++++++++++ .../debian/patches/remove-windows.patch | 11 +++++ src/reqwest/debian/patches/series | 11 +++++ 13 files changed, 310 insertions(+) create mode 100644 src/reqwest/debian/patches/disable-async-compression.patch create mode 100644 src/reqwest/debian/patches/disable-brotli.patch create mode 100644 src/reqwest/debian/patches/disable-hyper-rustls.patch create mode 100644 src/reqwest/debian/patches/disable-tokio-rustls.patch create mode 100644 src/reqwest/debian/patches/disable-tokio-socks.patch create mode 100644 src/reqwest/debian/patches/disable-trust-dns-resolver.patch create mode 100644 src/reqwest/debian/patches/disable-vendored.patch create mode 100644 src/reqwest/debian/patches/disable-webpki-roots.patch create mode 100644 src/reqwest/debian/patches/relax-dep.patch create mode 100644 src/reqwest/debian/patches/remove-wasm.patch create mode 100644 src/reqwest/debian/patches/remove-windows.patch create mode 100644 src/reqwest/debian/patches/series diff --git a/src/reqwest/debian/changelog b/src/reqwest/debian/changelog index 1c83a9ece..3de37121a 100644 --- a/src/reqwest/debian/changelog +++ b/src/reqwest/debian/changelog @@ -3,6 +3,12 @@ rust-reqwest (0.11.11-1) UNRELEASED-FIXME-AUTOGENERATED-DEBCARGO; urgency=medium * Team upload. * Package reqwest 0.11.11 from crates.io using debcargo 2.5.0 (Closes: 984864) * Drop old patches, no longer relavent. + * Switch rustl-tls feature to use native-certs instead of webpki-roots. + (it's disabled right now anway, but if it's re-enabled then native-certs + seems more appropriate for Debian than webpki-roots). + * Disable features/optional dependencies that are not satisfiable in Debian. + * Adjust dev-dependency versions to what is available in Debian. + * Remove wasm and windows-specific dependencies. -- Peter Michael Green Fri, 24 Jun 2022 23:12:21 +0000 diff --git a/src/reqwest/debian/patches/disable-async-compression.patch b/src/reqwest/debian/patches/disable-async-compression.patch new file mode 100644 index 000000000..ebcd165cf --- /dev/null +++ b/src/reqwest/debian/patches/disable-async-compression.patch @@ -0,0 +1,46 @@ +Index: reqwest/Cargo.toml +=================================================================== +--- reqwest.orig/Cargo.toml ++++ reqwest/Cargo.toml +@@ -152,11 +152,6 @@ blocking = [ + "tokio/rt-multi-thread", + "tokio/sync", + ] +-brotli = [ +- "async-compression", +- "async-compression/brotli", +- "tokio-util", +-] + cookies = [ + "cookie_crate", + "cookie_store", +@@ -169,16 +164,6 @@ default-tls = [ + "__tls", + "tokio-native-tls", + ] +-deflate = [ +- "async-compression", +- "async-compression/zlib", +- "tokio-util", +-] +-gzip = [ +- "async-compression", +- "async-compression/gzip", +- "tokio-util", +-] + json = ["serde_json"] + multipart = ["mime_guess"] + native-tls = ["default-tls"] +@@ -199,12 +184,6 @@ stream = [ + ] + trust-dns = ["trust-dns-resolver"] + +-[target."cfg(not(target_arch = \"wasm32\"))".dependencies.async-compression] +-version = "0.3.13" +-features = ["tokio"] +-optional = true +-default-features = false +- + [target."cfg(not(target_arch = \"wasm32\"))".dependencies.cookie_crate] + version = "0.16" + optional = true diff --git a/src/reqwest/debian/patches/disable-brotli.patch b/src/reqwest/debian/patches/disable-brotli.patch new file mode 100644 index 000000000..7afd9c004 --- /dev/null +++ b/src/reqwest/debian/patches/disable-brotli.patch @@ -0,0 +1,15 @@ +Index: reqwest/Cargo.toml +=================================================================== +--- reqwest.orig/Cargo.toml ++++ reqwest/Cargo.toml +@@ -271,10 +271,6 @@ features = [ + optional = true + default-features = false + +-[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/src/reqwest/debian/patches/disable-hyper-rustls.patch b/src/reqwest/debian/patches/disable-hyper-rustls.patch new file mode 100644 index 000000000..2347db7da --- /dev/null +++ b/src/reqwest/debian/patches/disable-hyper-rustls.patch @@ -0,0 +1,43 @@ +Index: reqwest/Cargo.toml +=================================================================== +--- reqwest.orig/Cargo.toml ++++ reqwest/Cargo.toml +@@ -139,13 +139,6 @@ version = "2.2" + + [features] + __internal_proxy_sys_no_cache = [] +-__rustls = [ +- "hyper-rustls", +- "tokio-rustls", +- "rustls", +- "__tls", +- "rustls-pemfile", +-] + __tls = [] + blocking = [ + "futures-util/io", +@@ -171,12 +164,6 @@ native-tls-alpn = [ + "native-tls", + "native-tls-crate/alpn", + ] +-rustls-tls = ["rustls-tls-native-roots"] +-rustls-tls-manual-roots = ["__rustls"] +-rustls-tls-native-roots = [ +- "rustls-native-certs", +- "__rustls", +-] + socks = ["tokio-socks"] + stream = [ + "tokio/fs", +@@ -221,11 +208,6 @@ features = [ + ] + default-features = false + +-[target."cfg(not(target_arch = \"wasm32\"))".dependencies.hyper-rustls] +-version = "0.23" +-optional = true +-default-features = false +- + [target."cfg(not(target_arch = \"wasm32\"))".dependencies.hyper-tls] + version = "0.5" + optional = true diff --git a/src/reqwest/debian/patches/disable-tokio-rustls.patch b/src/reqwest/debian/patches/disable-tokio-rustls.patch new file mode 100644 index 000000000..bcb58c0de --- /dev/null +++ b/src/reqwest/debian/patches/disable-tokio-rustls.patch @@ -0,0 +1,15 @@ +Index: reqwest/Cargo.toml +=================================================================== +--- reqwest.orig/Cargo.toml ++++ reqwest/Cargo.toml +@@ -264,10 +264,6 @@ default-features = false + version = "0.3.0" + optional = true + +-[target."cfg(not(target_arch = \"wasm32\"))".dependencies.tokio-rustls] +-version = "0.23" +-optional = true +- + [target."cfg(not(target_arch = \"wasm32\"))".dependencies.tokio-socks] + version = "0.5.1" + optional = true diff --git a/src/reqwest/debian/patches/disable-tokio-socks.patch b/src/reqwest/debian/patches/disable-tokio-socks.patch new file mode 100644 index 000000000..4e10ef7ff --- /dev/null +++ b/src/reqwest/debian/patches/disable-tokio-socks.patch @@ -0,0 +1,23 @@ +Index: reqwest/Cargo.toml +=================================================================== +--- reqwest.orig/Cargo.toml ++++ reqwest/Cargo.toml +@@ -164,7 +164,6 @@ native-tls-alpn = [ + "native-tls", + "native-tls-crate/alpn", + ] +-socks = ["tokio-socks"] + stream = [ + "tokio/fs", + "tokio-util", +@@ -263,10 +262,6 @@ default-features = false + version = "0.3.0" + optional = true + +-[target."cfg(not(target_arch = \"wasm32\"))".dependencies.tokio-socks] +-version = "0.5.1" +-optional = true +- + [target."cfg(not(target_arch = \"wasm32\"))".dependencies.tokio-util] + version = "0.7.1" + features = [ diff --git a/src/reqwest/debian/patches/disable-trust-dns-resolver.patch b/src/reqwest/debian/patches/disable-trust-dns-resolver.patch new file mode 100644 index 000000000..a125822a1 --- /dev/null +++ b/src/reqwest/debian/patches/disable-trust-dns-resolver.patch @@ -0,0 +1,23 @@ +Index: reqwest/Cargo.toml +=================================================================== +--- reqwest.orig/Cargo.toml ++++ reqwest/Cargo.toml +@@ -168,7 +168,6 @@ stream = [ + "tokio/fs", + "tokio-util", + ] +-trust-dns = ["trust-dns-resolver"] + + [target."cfg(not(target_arch = \"wasm32\"))".dependencies.cookie_crate] + version = "0.16" +@@ -272,10 +271,6 @@ features = [ + optional = true + default-features = false + +-[target."cfg(not(target_arch = \"wasm32\"))".dependencies.trust-dns-resolver] +-version = "0.21" +-optional = true +- + [target."cfg(not(target_arch = \"wasm32\"))".dev-dependencies.brotli_crate] + version = "3.3.0" + package = "brotli" diff --git a/src/reqwest/debian/patches/disable-vendored.patch b/src/reqwest/debian/patches/disable-vendored.patch new file mode 100644 index 000000000..68697e683 --- /dev/null +++ b/src/reqwest/debian/patches/disable-vendored.patch @@ -0,0 +1,15 @@ +Index: reqwest/Cargo.toml +=================================================================== +--- reqwest.orig/Cargo.toml ++++ reqwest/Cargo.toml +@@ -186,10 +186,6 @@ native-tls-alpn = [ + "native-tls", + "native-tls-crate/alpn", + ] +-native-tls-vendored = [ +- "native-tls", +- "native-tls-crate/vendored", +-] + rustls-tls = ["rustls-tls-webpki-roots"] + rustls-tls-manual-roots = ["__rustls"] + rustls-tls-native-roots = [ diff --git a/src/reqwest/debian/patches/disable-webpki-roots.patch b/src/reqwest/debian/patches/disable-webpki-roots.patch new file mode 100644 index 000000000..613d841a9 --- /dev/null +++ b/src/reqwest/debian/patches/disable-webpki-roots.patch @@ -0,0 +1,33 @@ +Index: reqwest/Cargo.toml +=================================================================== +--- reqwest.orig/Cargo.toml ++++ reqwest/Cargo.toml +@@ -186,16 +186,12 @@ native-tls-alpn = [ + "native-tls", + "native-tls-crate/alpn", + ] +-rustls-tls = ["rustls-tls-webpki-roots"] ++rustls-tls = ["rustls-tls-native-roots"] + rustls-tls-manual-roots = ["__rustls"] + rustls-tls-native-roots = [ + "rustls-native-certs", + "__rustls", + ] +-rustls-tls-webpki-roots = [ +- "webpki-roots", +- "__rustls", +-] + socks = ["tokio-socks"] + stream = [ + "tokio/fs", +@@ -328,10 +324,6 @@ default-features = false + version = "0.21" + optional = true + +-[target."cfg(not(target_arch = \"wasm32\"))".dependencies.webpki-roots] +-version = "0.22" +-optional = true +- + [target."cfg(not(target_arch = \"wasm32\"))".dev-dependencies.brotli_crate] + version = "3.3.0" + package = "brotli" diff --git a/src/reqwest/debian/patches/relax-dep.patch b/src/reqwest/debian/patches/relax-dep.patch new file mode 100644 index 000000000..4952a7a7c --- /dev/null +++ b/src/reqwest/debian/patches/relax-dep.patch @@ -0,0 +1,22 @@ +Index: reqwest/Cargo.toml +=================================================================== +--- reqwest.orig/Cargo.toml ++++ reqwest/Cargo.toml +@@ -275,7 +275,7 @@ default-features = false + version = "0.3" + + [target."cfg(not(target_arch = \"wasm32\"))".dev-dependencies.env_logger] +-version = "0.8" ++version = "0.9" + + [target."cfg(not(target_arch = \"wasm32\"))".dev-dependencies.hyper] + version = "0.14" +@@ -291,7 +291,7 @@ features = [ + default-features = false + + [target."cfg(not(target_arch = \"wasm32\"))".dev-dependencies.libflate] +-version = "1.0" ++version = "0.1" + + [target."cfg(not(target_arch = \"wasm32\"))".dev-dependencies.serde] + version = "1.0" diff --git a/src/reqwest/debian/patches/remove-wasm.patch b/src/reqwest/debian/patches/remove-wasm.patch new file mode 100644 index 000000000..506b5b88f --- /dev/null +++ b/src/reqwest/debian/patches/remove-wasm.patch @@ -0,0 +1,47 @@ +Index: reqwest/Cargo.toml +=================================================================== +--- reqwest.orig/Cargo.toml ++++ reqwest/Cargo.toml +@@ -304,42 +304,6 @@ features = [ + "rt-multi-thread", + ] + default-features = false +- +-[target."cfg(target_arch = \"wasm32\")".dependencies.js-sys] +-version = "0.3.45" +- +-[target."cfg(target_arch = \"wasm32\")".dependencies.serde_json] +-version = "1.0" +- +-[target."cfg(target_arch = \"wasm32\")".dependencies.wasm-bindgen] +-version = "0.2.68" +- +-[target."cfg(target_arch = \"wasm32\")".dependencies.wasm-bindgen-futures] +-version = "0.4.18" +- +-[target."cfg(target_arch = \"wasm32\")".dependencies.web-sys] +-version = "0.3.25" +-features = [ +- "Headers", +- "Request", +- "RequestInit", +- "RequestMode", +- "Response", +- "Window", +- "FormData", +- "Blob", +- "BlobPropertyBag", +- "ServiceWorkerGlobalScope", +- "RequestCredentials", +- "File", +-] +- +-[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] +-version = "0.3" + + [target."cfg(windows)".dependencies.winreg] + version = "0.10" diff --git a/src/reqwest/debian/patches/remove-windows.patch b/src/reqwest/debian/patches/remove-windows.patch new file mode 100644 index 000000000..85aec91db --- /dev/null +++ b/src/reqwest/debian/patches/remove-windows.patch @@ -0,0 +1,11 @@ +Index: reqwest/Cargo.toml +=================================================================== +--- reqwest.orig/Cargo.toml ++++ reqwest/Cargo.toml +@@ -304,6 +304,3 @@ features = [ + "rt-multi-thread", + ] + default-features = false +- +-[target."cfg(windows)".dependencies.winreg] +-version = "0.10" diff --git a/src/reqwest/debian/patches/series b/src/reqwest/debian/patches/series new file mode 100644 index 000000000..4a210556c --- /dev/null +++ b/src/reqwest/debian/patches/series @@ -0,0 +1,11 @@ +disable-vendored.patch +disable-webpki-roots.patch +disable-async-compression.patch +disable-hyper-rustls.patch +disable-tokio-rustls.patch +disable-tokio-socks.patch +disable-trust-dns-resolver.patch +disable-brotli.patch +relax-dep.patch +remove-wasm.patch +remove-windows.patch -- 2.39.5