rust/rustc-1.72.0-disable-http2.patch

93 lines
3.7 KiB
Diff
Raw Normal View History

2023-08-24 18:15:39 +00:00
--- rustc-beta-src/src/tools/cargo/Cargo.lock.orig 2023-08-21 11:00:15.341608892 -0700
+++ rustc-beta-src/src/tools/cargo/Cargo.lock 2023-08-21 11:00:46.074984901 -0700
@@ -743,7 +743,6 @@
2022-04-07 17:33:38 +00:00
dependencies = [
"cc",
"libc",
- "libnghttp2-sys",
"libz-sys",
"openssl-sys",
"pkg-config",
2023-08-24 18:15:39 +00:00
@@ -2011,16 +2010,6 @@
checksum = "f7012b1bbb0719e1097c47611d3898568c546d597c2e74d66f6087edd5233ff4"
2022-04-07 17:33:38 +00:00
[[package]]
-name = "libnghttp2-sys"
2023-07-17 16:24:25 +00:00
-version = "0.1.7+1.45.0"
2022-04-07 17:33:38 +00:00
-source = "registry+https://github.com/rust-lang/crates.io-index"
2023-07-17 16:24:25 +00:00
-checksum = "57ed28aba195b38d5ff02b9170cbff627e336a20925e43b4945390401c5dc93f"
2022-04-07 17:33:38 +00:00
-dependencies = [
- "cc",
- "libc",
-]
-
-[[package]]
name = "libz-sys"
2023-08-24 18:15:39 +00:00
version = "1.1.9"
2022-04-07 17:33:38 +00:00
source = "registry+https://github.com/rust-lang/crates.io-index"
2023-08-24 18:15:39 +00:00
--- rustc-beta-src/src/tools/cargo/Cargo.toml.orig 2023-08-21 11:00:15.341608892 -0700
+++ rustc-beta-src/src/tools/cargo/Cargo.toml 2023-08-21 11:00:15.342608871 -0700
2023-07-17 16:24:25 +00:00
@@ -118,7 +118,7 @@
cargo-util.workspace = true
clap = { workspace = true, features = ["wrap_help"] }
crates-io.workspace = true
-curl = { workspace = true, features = ["http2"] }
+curl = { workspace = true, features = [] }
curl-sys.workspace = true
env_logger.workspace = true
filetime.workspace = true
2023-08-24 18:15:39 +00:00
--- rustc-beta-src/src/tools/cargo/src/cargo/core/package.rs.orig 2023-08-17 20:58:39.000000000 -0700
+++ rustc-beta-src/src/tools/cargo/src/cargo/core/package.rs 2023-08-21 11:00:15.343608851 -0700
@@ -408,16 +408,9 @@
sources: SourceMap<'cfg>,
config: &'cfg Config,
) -> CargoResult<PackageSet<'cfg>> {
- // We've enabled the `http2` feature of `curl` in Cargo, so treat
- // failures here as fatal as it would indicate a build-time problem.
2022-04-07 17:33:38 +00:00
- let mut multi = Multi::new();
- let multiplexing = config.http_config()?.multiplexing.unwrap_or(true);
- multi
- .pipelining(false, multiplexing)
- .with_context(|| "failed to enable multiplexing/pipelining in curl")?;
-
- // let's not flood crates.io with connections
- multi.set_max_host_connections(2)?;
+ // Multiplexing is disabled because the system libcurl doesn't support it.
2022-04-07 17:33:38 +00:00
+ let multi = Multi::new();
+ let multiplexing = false;
Ok(PackageSet {
packages: package_ids
2023-08-24 18:15:39 +00:00
--- rustc-beta-src/src/tools/cargo/src/cargo/sources/registry/http_remote.rs.orig 2023-08-17 20:58:39.000000000 -0700
+++ rustc-beta-src/src/tools/cargo/src/cargo/sources/registry/http_remote.rs 2023-08-21 11:00:15.343608851 -0700
@@ -250,16 +250,8 @@
2023-01-26 20:09:44 +00:00
}
self.fetch_started = true;
- // We've enabled the `http2` feature of `curl` in Cargo, so treat
- // failures here as fatal as it would indicate a build-time problem.
- self.multiplexing = self.config.http_config()?.multiplexing.unwrap_or(true);
-
- self.multi
- .pipelining(false, self.multiplexing)
- .with_context(|| "failed to enable multiplexing/pipelining in curl")?;
-
- // let's not flood the server with connections
- self.multi.set_max_host_connections(2)?;
+ // Multiplexing is disabled because the system libcurl doesn't support it.
+ self.multiplexing = false;
2023-06-01 19:46:43 +00:00
if !self.quiet {
self.config
2023-08-24 18:15:39 +00:00
--- rustc-beta-src/src/tools/cargo/src/cargo/util/network/mod.rs.orig 2023-08-21 11:00:15.343608851 -0700
+++ rustc-beta-src/src/tools/cargo/src/cargo/util/network/mod.rs 2023-08-21 11:02:01.969443986 -0700
@@ -27,7 +27,7 @@
2023-03-09 16:52:34 +00:00
macro_rules! try_old_curl {
($e:expr, $msg:expr) => {
let result = $e;
- if cfg!(target_os = "macos") {
+ if cfg!(any(target_os = "linux", target_os = "macos")) {
if let Err(e) = result {
2023-08-24 18:15:39 +00:00
::log::warn!("ignoring libcurl {} error: {}", $msg, e);
2023-03-09 16:52:34 +00:00
}