Update patch to disable http2

This commit is contained in:
Josh Stone 2019-11-07 11:55:31 -08:00
parent 0efd2fede8
commit b229852f1b
3 changed files with 69 additions and 76 deletions

View File

@ -80,7 +80,7 @@ Patch2: rust-pr65474-split-rustc-dev.patch
# libcurl on EL7 doesn't have http2, but since cargo requests it, curl-sys
# will try to build it statically -- instead we turn off the feature.
Patch10: rustc-1.38.0-disable-http2.patch
Patch10: rustc-1.39.0-disable-http2.patch
# Get the Rust triple for any arch.
%{lua: function rust_triple(arch)

View File

@ -1,75 +0,0 @@
--- rustc-1.37.0-src/src/tools/cargo/Cargo.toml.orig 2019-08-12 23:27:40.000000000 -0700
+++ rustc-1.37.0-src/src/tools/cargo/Cargo.toml 2019-08-16 14:21:20.165084813 -0700
@@ -24,7 +24,7 @@ bytesize = "1.0"
crates-io = { path = "crates/crates-io", version = "0.27" }
crossbeam-utils = "0.6"
crypto-hash = "0.3.1"
-curl = { version = "0.4.21", features = ['http2'] }
+curl = { version = "0.4.21", features = [] }
curl-sys = "0.4.18"
env_logger = "0.6.0"
pretty_env_logger = { version = "0.3", optional = true }
--- rustc-1.37.0-src/src/tools/cargo/src/cargo/core/package.rs.orig 2019-08-12 23:27:40.000000000 -0700
+++ rustc-1.37.0-src/src/tools/cargo/src/cargo/core/package.rs 2019-08-16 18:39:56.053468497 -0700
@@ -374,16 +374,8 @@ impl<'cfg> PackageSet<'cfg> {
// Also note that pipelining is disabled as curl authors have indicated
// that it's buggy, and we've empirically seen that it's buggy with HTTP
// proxies.
- let mut multi = Multi::new();
- let multiplexing = config
- .get::<Option<bool>>("http.multiplexing")?
- .unwrap_or(true);
- multi
- .pipelining(false, multiplexing)
- .chain_err(|| "failed to enable multiplexing/pipelining in curl")?;
-
- // let's not flood crates.io with connections
- multi.set_max_host_connections(2)?;
+ let multi = Multi::new();
+ let multiplexing = false;
Ok(PackageSet {
packages: package_ids
@@ -460,7 +452,7 @@ impl<'cfg> PackageSet<'cfg> {
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 {
warn!("ignoring libcurl {} error: {}", $msg, e);
}
--- rustc-1.38.0-src/Cargo.lock.orig 2019-09-23 14:15:52.000000000 -0700
+++ rustc-1.38.0-src/Cargo.lock 2019-09-27 20:48:18.209596817 -0700
@@ -673,7 +673,6 @@ source = "registry+https://github.com/ru
dependencies = [
"cc 1.0.35 (registry+https://github.com/rust-lang/crates.io-index)",
"libc 0.2.60 (registry+https://github.com/rust-lang/crates.io-index)",
- "libnghttp2-sys 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
"libz-sys 1.0.25 (registry+https://github.com/rust-lang/crates.io-index)",
"openssl-sys 0.9.43 (registry+https://github.com/rust-lang/crates.io-index)",
"pkg-config 0.3.14 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -1473,15 +1472,6 @@ dependencies = [
]
[[package]]
-name = "libnghttp2-sys"
-version = "0.1.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-dependencies = [
- "cc 1.0.35 (registry+https://github.com/rust-lang/crates.io-index)",
- "libc 0.2.60 (registry+https://github.com/rust-lang/crates.io-index)",
-]
-
-[[package]]
name = "libssh2-sys"
version = "0.2.11"
source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -4485,7 +4475,6 @@ source = "registry+https://github.com/ru
"checksum libc 0.2.60 (registry+https://github.com/rust-lang/crates.io-index)" = "d44e80633f007889c7eff624b709ab43c92d708caad982295768a7b13ca3b5eb"
"checksum libflate 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)" = "90c6f86f4b0caa347206f916f8b687b51d77c6ef8ff18d52dd007491fd580529"
"checksum libgit2-sys 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)" = "4c179ed6d19cd3a051e68c177fbbc214e79ac4724fac3a850ec9f3d3eb8a5578"
-"checksum libnghttp2-sys 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "d75d7966bda4730b722d1eab8e668df445368a24394bae9fc1e8dc0ab3dbe4f4"
"checksum libssh2-sys 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)" = "126a1f4078368b163bfdee65fbab072af08a1b374a5551b21e87ade27b1fbf9d"
"checksum libz-sys 1.0.25 (registry+https://github.com/rust-lang/crates.io-index)" = "2eb5e43362e38e2bca2fd5f5134c4d4564a23a5c28e9b95411652021a8675ebe"
"checksum lock_api 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "949826a5ccf18c1b3a7c3d57692778d21768b79e46eb9dd07bfc4c2160036c54"

View File

@ -0,0 +1,68 @@
--- rustc-1.39.0-src/Cargo.lock.orig 2019-11-04 07:45:21.000000000 -0800
+++ rustc-1.39.0-src/Cargo.lock 2019-11-07 11:27:09.491588756 -0800
@@ -745,7 +745,6 @@
dependencies = [
"cc",
"libc",
- "libnghttp2-sys",
"libz-sys",
"openssl-sys",
"pkg-config",
@@ -1704,16 +1703,6 @@
]
[[package]]
-name = "libnghttp2-sys"
-version = "0.1.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d75d7966bda4730b722d1eab8e668df445368a24394bae9fc1e8dc0ab3dbe4f4"
-dependencies = [
- "cc",
- "libc",
-]
-
-[[package]]
name = "libssh2-sys"
version = "0.2.11"
source = "registry+https://github.com/rust-lang/crates.io-index"
--- rustc-1.39.0-src/src/tools/cargo/Cargo.toml.orig 2019-11-04 07:45:38.000000000 -0800
+++ rustc-1.39.0-src/src/tools/cargo/Cargo.toml 2019-11-07 11:26:07.619884857 -0800
@@ -24,7 +24,7 @@
crates-io = { path = "crates/crates-io", version = "0.28" }
crossbeam-utils = "0.6"
crypto-hash = "0.3.1"
-curl = { version = "0.4.21", features = ['http2'] }
+curl = { version = "0.4.21", features = [] }
curl-sys = "0.4.18"
env_logger = "0.6.0"
pretty_env_logger = { version = "0.3", optional = true }
--- rustc-1.39.0-src/src/tools/cargo/src/cargo/core/package.rs.orig 2019-11-04 07:45:38.000000000 -0800
+++ rustc-1.39.0-src/src/tools/cargo/src/cargo/core/package.rs 2019-11-07 11:30:17.701646098 -0800
@@ -375,16 +375,8 @@
// Also note that pipelining is disabled as curl authors have indicated
// that it's buggy, and we've empirically seen that it's buggy with HTTP
// proxies.
- let mut multi = Multi::new();
- let multiplexing = config
- .get::<Option<bool>>("http.multiplexing")?
- .unwrap_or(true);
- multi
- .pipelining(false, multiplexing)
- .chain_err(|| "failed to enable multiplexing/pipelining in curl")?;
-
- // let's not flood crates.io with connections
- multi.set_max_host_connections(2)?;
+ let multi = Multi::new();
+ let multiplexing = false;
Ok(PackageSet {
packages: package_ids
@@ -482,7 +474,7 @@
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 {
warn!("ignoring libcurl {} error: {}", $msg, e);
}