From b229852f1b7398b1bfc27e450b3395bcccf807e6 Mon Sep 17 00:00:00 2001 From: Josh Stone Date: Thu, 7 Nov 2019 11:55:31 -0800 Subject: [PATCH] Update patch to disable http2 --- rust.spec | 2 +- rustc-1.38.0-disable-http2.patch | 75 -------------------------------- rustc-1.39.0-disable-http2.patch | 68 +++++++++++++++++++++++++++++ 3 files changed, 69 insertions(+), 76 deletions(-) delete mode 100644 rustc-1.38.0-disable-http2.patch create mode 100644 rustc-1.39.0-disable-http2.patch diff --git a/rust.spec b/rust.spec index 48a196a..afdbeb3 100644 --- a/rust.spec +++ b/rust.spec @@ -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) diff --git a/rustc-1.38.0-disable-http2.patch b/rustc-1.38.0-disable-http2.patch deleted file mode 100644 index eefe841..0000000 --- a/rustc-1.38.0-disable-http2.patch +++ /dev/null @@ -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::>("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" diff --git a/rustc-1.39.0-disable-http2.patch b/rustc-1.39.0-disable-http2.patch new file mode 100644 index 0000000..53f7f98 --- /dev/null +++ b/rustc-1.39.0-disable-http2.patch @@ -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::>("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); + }