2
0
mirror of https://codeberg.org/kiss-community/repo synced 2024-07-04 15:02:27 +00:00

rust: Fix cargo SSL errors.

Cargo uses its own vendored libcurl which it statically links
against. This patches the build configuration to set
CURL_CA_BUNDLE and CURL_CA_PATH.

I am still unsure as to why this broke, why this only affects
KISS with OpenSSL 3.0.0, etc. Will see if the next rust release
improves this else will open a bug report upstream.

Closes #339
This commit is contained in:
Dylan Araps 2021-10-08 08:21:08 +03:00
parent 46c9ec79b9
commit 39d519f9a3
No known key found for this signature in database
GPG Key ID: 13295DAC2CF13B5C
5 changed files with 39 additions and 1 deletions

View File

@ -1,5 +1,8 @@
#!/bin/sh -e
rm -f vendor/curl-sys/.cargo-checksum.json
patch -p1 < fix-curl.patch
# Instruct the compiler to trim absolute paths in resulting binaries and instead
# change them to relative paths ($PWD/... ./...).
export RUSTFLAGS="$RUSTFLAGS --remap-path-prefix=$PWD=."

View File

@ -2,3 +2,4 @@ aec85a7c1f40b7a40818a58ae13632f8a12cfaa4d3e2a10957d0e9d16dfdd556
c2de24eb3e524c0fdd1e8116f578c103035da1ece1e4c06efab67999180eefe8
5cffd160f5daac521652ee67c62947c0d66bdc8e5ebf7dc93114cdff9a934b0b
9a26b73e578227d111b221932d7cbeaf4b41f27a0f7597a49efb81e2bd0791f9
f68fbed74118bff6df74dbdd1507e646e6627c95444fde90a6bb66b51b677cff

View File

@ -0,0 +1,33 @@
diff --git a/Cargo.lock b/Cargo.lock
index 085aae3..ccedf97 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -873,7 +873,7 @@ dependencies = [
name = "curl-sys"
version = "0.4.45+curl-7.78.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "de9e5a72b1c744eb5dd20b2be4d7eb84625070bb5c4ab9b347b70464ab1e62eb"
+checksum = "d8f1e2562c5784ad3348906a9c7e2e435c8bc5c8796a4398d322456d9a2710c1"
dependencies = [
"cc",
"libc",
diff --git a/vendor/curl-sys/.cargo-checksum.json b/vendor/curl-sys/.cargo-checksum.json
new file mode 100644
index 0000000..b3a3efe
--- /dev/null
+++ b/vendor/curl-sys/.cargo-checksum.json
@@ -0,0 +1 @@
+{"files":{},"package":"d8f1e2562c5784ad3348906a9c7e2e435c8bc5c8796a4398d322456d9a2710c1"}
diff --git a/vendor/curl-sys/build.rs b/vendor/curl-sys/build.rs
index 7b66756..a7c7122 100644
--- a/vendor/curl-sys/build.rs
+++ b/vendor/curl-sys/build.rs
@@ -109,6 +109,8 @@ fn main() {
.include("curl/lib")
.include("curl/include")
.define("BUILDING_LIBCURL", None)
+ .define("CURL_CA_BUNDLE", "\"/etc/ssl/cert.pem\"")
+ .define("CURL_CA_PATH", "\"/etc/ssl/certs\"")
.define("CURL_DISABLE_CRYPTO_AUTH", None)
.define("CURL_DISABLE_DICT", None)
.define("CURL_DISABLE_GOPHER", None)

View File

@ -2,3 +2,4 @@ https://static.rust-lang.org/dist/rustc-VERSION-src.tar.xz
https://static.rust-lang.org/dist/2021-07-29/rust-std-1.54.0-x86_64-unknown-linux-musl.tar.xz?no-extract
https://static.rust-lang.org/dist/2021-07-29/rustc-1.54.0-x86_64-unknown-linux-musl.tar.xz?no-extract
https://static.rust-lang.org/dist/2021-07-29/cargo-1.54.0-x86_64-unknown-linux-musl.tar.xz?no-extract
patches/fix-curl.patch

View File

@ -1 +1 @@
1.55.0 1
1.55.0 3