mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2025-08-05 13:27:09 +02:00
54 lines
1.7 KiB
Diff
54 lines
1.7 KiB
Diff
Patch-Source: https://github.com/rustic-rs/rustic_core/pull/110 (backported)
|
|
--
|
|
From a5360816832236b814da86cd8518c02b3fc3eb05 Mon Sep 17 00:00:00 2001
|
|
From: Jakub Jirutka <jakub@jirutka.cz>
|
|
Date: Sat, 30 Dec 2023 20:28:47 +0100
|
|
Subject: [PATCH] feat: Add tls-native, tls-rustls features to allow building
|
|
w/o Rustls
|
|
|
|
diff --git a/Cargo.toml b/Cargo.toml
|
|
index 1582c6b..4d60eef 100644
|
|
--- a/vendor/rustic_core/Cargo.toml
|
|
+++ b/vendor/rustic_core/Cargo.toml
|
|
@@ -35,10 +35,13 @@ harness = true
|
|
edition = "2021"
|
|
|
|
[features]
|
|
-default = []
|
|
+default = ["tls-rustls"]
|
|
cli = ["merge", "clap"]
|
|
merge = ["dep:merge"]
|
|
clap = ["dep:clap"]
|
|
+# tls-native and tls-rustls are mutually exclusive.
|
|
+tls-native = ["reqwest/native-tls"]
|
|
+tls-rustls = ["reqwest/rustls-tls-native-roots"]
|
|
|
|
[package.metadata.docs.rs]
|
|
all-features = true
|
|
@@ -96,7 +99,7 @@ walkdir = "2.4.0"
|
|
|
|
# rest backend
|
|
backoff = "0.4.0"
|
|
-reqwest = { version = "0.11.22", default-features = false, features = ["json", "rustls-tls-native-roots", "stream", "blocking"] }
|
|
+reqwest = { version = "0.11.22", default-features = false, features = ["json", "stream", "blocking"] }
|
|
url = "2.4.1"
|
|
|
|
# rclone backend
|
|
diff --git a/src/lib.rs b/src/lib.rs
|
|
index 04bda03..387b218 100644
|
|
--- a/vendor/rustic_core/src/lib.rs
|
|
+++ b/vendor/rustic_core/src/lib.rs
|
|
@@ -139,6 +139,9 @@ This crate exposes a few features for controlling dependency usage.
|
|
#![allow(rustdoc::private_intra_doc_links)]
|
|
#![allow(clippy::needless_raw_string_hashes)]
|
|
|
|
+#[cfg(all(feature = "tls-native", feature = "tls-rustls"))]
|
|
+compile_error!("features \"tls-native\" and \"tls-rustls\" cannot be enabled at the same time. Please disable one of them.");
|
|
+
|
|
pub(crate) mod archiver;
|
|
pub(crate) mod backend;
|
|
pub(crate) mod blob;
|
|
--
|
|
2.43.0
|
|
|