Disable http2 in cargo
Since 1.31.0 cargo requires curl to support http2. Enabling http2 in curl results in a dependency loop. This commit disables the use of multiplexing and http2.
This commit is contained in:
@@ -51,18 +51,15 @@ cargo_common_do_configure () {
|
|||||||
EOF
|
EOF
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -n "${http_proxy}" ]; then
|
# Disable multiplexing in order to keep cargo from using http2, which we
|
||||||
|
# can't currently enable because of dependency loops
|
||||||
cat <<- EOF >> ${CARGO_HOME}/config
|
cat <<- EOF >> ${CARGO_HOME}/config
|
||||||
[http]
|
[http]
|
||||||
proxy = "${http_proxy}"
|
multiplexing = false
|
||||||
EOF
|
EOF
|
||||||
fi
|
|
||||||
|
|
||||||
if [ -n "${https_proxy}" ]; then
|
if [ -n "${http_proxy}" ]; then
|
||||||
cat <<- EOF >> ${CARGO_HOME}/config
|
echo "proxy = \"{http_proxy}\"" >> ${CARGO_HOME}/config
|
||||||
[https]
|
|
||||||
proxy = "${https_proxy}"
|
|
||||||
EOF
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "[target.${HOST_SYS}]" >> ${CARGO_HOME}/config
|
echo "[target.${HOST_SYS}]" >> ${CARGO_HOME}/config
|
||||||
|
|||||||
@@ -11,6 +11,8 @@ LIC_FILES_CHKSUM = " \
|
|||||||
file://LICENSE-THIRD-PARTY;md5=892ea68b169e69cfe75097fc38a15b56 \
|
file://LICENSE-THIRD-PARTY;md5=892ea68b169e69cfe75097fc38a15b56 \
|
||||||
"
|
"
|
||||||
|
|
||||||
|
SRC_URI += "file://0001-Disable-http2.patch"
|
||||||
|
|
||||||
S = "${RUSTSRC}/src/tools/cargo"
|
S = "${RUSTSRC}/src/tools/cargo"
|
||||||
CARGO_VENDORING_DIRECTORY = "${RUSTSRC}/vendor"
|
CARGO_VENDORING_DIRECTORY = "${RUSTSRC}/vendor"
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,30 @@
|
|||||||
|
From a66e33d612d2207154de20e24701b0c30056fe7a Mon Sep 17 00:00:00 2001
|
||||||
|
From: Johan Anderholm <johan.anderholm@gmail.com>
|
||||||
|
Date: Sun, 27 Jan 2019 10:19:00 +0100
|
||||||
|
Subject: [PATCH] Disable http2
|
||||||
|
|
||||||
|
http2 requires that curl is build with nghttp2 which in turn depends on
|
||||||
|
many dependencies and ultimately a dependency loop in the case of
|
||||||
|
curl-native. As long as multiplexing is disabled in cargo this should
|
||||||
|
be fine.
|
||||||
|
|
||||||
|
Upstream-Status: Inappropriate
|
||||||
|
---
|
||||||
|
Cargo.toml | 2 +-
|
||||||
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/Cargo.toml b/Cargo.toml
|
||||||
|
index d2d48ff7..d5dff47d 100644
|
||||||
|
--- a/Cargo.toml
|
||||||
|
+++ b/Cargo.toml
|
||||||
|
@@ -22,7 +22,7 @@ bytesize = "1.0"
|
||||||
|
crates-io = { path = "src/crates-io", version = "0.21" }
|
||||||
|
crossbeam-utils = "0.6"
|
||||||
|
crypto-hash = "0.3.1"
|
||||||
|
-curl = { version = "0.4.19", features = ['http2'] }
|
||||||
|
+curl = { version = "0.4.19" }
|
||||||
|
curl-sys = "0.4.15"
|
||||||
|
env_logger = "0.6.0"
|
||||||
|
pretty_env_logger = { version = "0.2", optional = true }
|
||||||
|
--
|
||||||
|
2.17.1
|
||||||
@@ -26,6 +26,6 @@ do_install () {
|
|||||||
# With the incremental build support added in 1.24, the libstd deps directory also includes dependency
|
# With the incremental build support added in 1.24, the libstd deps directory also includes dependency
|
||||||
# files that get installed. Those are really only needed to incrementally rebuild the libstd library
|
# files that get installed. Those are really only needed to incrementally rebuild the libstd library
|
||||||
# itself and don't need to be installed.
|
# itself and don't need to be installed.
|
||||||
rm ${B}/${TARGET_SYS}/${BUILD_DIR}/deps/*.d
|
rm -f ${B}/${TARGET_SYS}/${BUILD_DIR}/deps/*.d
|
||||||
cp ${B}/${TARGET_SYS}/${BUILD_DIR}/deps/* ${D}${rustlibdir}
|
cp ${B}/${TARGET_SYS}/${BUILD_DIR}/deps/* ${D}${rustlibdir}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user