proxmox-backup-client: 3.4.2 -> 4.0.13

Changelog: https://git.proxmox.com/?p=proxmox-backup.git;a=blob;f=debian/changelog;h=c664d7146fa50af5ee3fb96aed6eac7fcb079dbe

Signed-off-by: Christoph Heiss <christoph@c8h4.io>
This commit is contained in:
Christoph Heiss 2025-08-12 13:58:06 +02:00
parent 9f53fc2459
commit 84d5334599
No known key found for this signature in database
GPG Key ID: A3D16D4FE64F332A
7 changed files with 2195 additions and 893 deletions

View File

@ -1,185 +1,101 @@
From fe701cc514b479ca01d18d7f1ab1da6acbc93273 Mon Sep 17 00:00:00 2001
From: Christoph Heiss <christoph@c8h4.io>
Date: Thu, 5 Jun 2025 11:26:24 +0200
Subject: [PATCH 1/5] cargo: re-route dependencies not available on crates.io
to git repos
From 552fcf4c45deadbf6b51128d32dd23536af31e9c Mon Sep 17 00:00:00 2001
From: Christoph Heiss <c.heiss@proxmox.com>
Date: Tue, 12 Aug 2025 13:48:48 +0200
Subject: [PATCH proxmox-backup 1/2] cargo: re-route dependencies not available
on crates.io
Signed-off-by: Christoph Heiss <christoph@c8h4.io>
---
Cargo.toml | 146 ++++++++++-------------------------------------------
1 file changed, 27 insertions(+), 119 deletions(-)
Cargo.toml | 83 ++++++++++++++++++++++++++++--------------------------
1 file changed, 43 insertions(+), 40 deletions(-)
diff --git a/Cargo.toml b/Cargo.toml
index d38321e3..99d712da 100644
index 337bb081..0aed1103 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -41,8 +41,6 @@ members = [
"proxmox-backup-banner",
"proxmox-backup-client",
- "proxmox-file-restore",
- "proxmox-restore-daemon",
"pxar-bin",
]
@@ -160,138 +158,48 @@ xdg = "2.2"
zstd = { version = "0.12", features = [ "bindgen" ] }
zstd-safe = "6.0"
-[dependencies]
-anyhow.workspace = true
-async-trait.workspace = true
-base64.workspace = true
-bytes.workspace = true
-cidr.workspace = true
-const_format.workspace = true
-crc32fast.workspace = true
-crossbeam-channel.workspace = true
-endian_trait.workspace = true
-futures.workspace = true
-h2.workspace = true
-hex.workspace = true
-hyper.workspace = true
-libc.workspace = true
-log.workspace = true
-nix.workspace = true
-nom.workspace = true
-num-traits.workspace = true
-once_cell.workspace = true
-openssl.workspace = true
-percent-encoding.workspace = true
-regex.workspace = true
-rustyline.workspace = true
-serde.workspace = true
-serde_json.workspace = true
-syslog.workspace = true
-termcolor.workspace = true
-thiserror.workspace = true
-tokio = { workspace = true, features = [ "fs", "io-util", "io-std", "macros", "net", "parking_lot", "process", "rt", "rt-multi-thread", "signal", "time" ] }
-tokio-openssl.workspace = true
-tokio-stream.workspace = true
-tokio-util = { workspace = true, features = [ "codec" ] }
-tracing.workspace = true
-udev.workspace = true
-url.workspace = true
-walkdir.workspace = true
-zstd.workspace = true
-
-#valgrind_request = { git = "https://github.com/edef1c/libvalgrind_request", version = "1.1.0", optional = true }
-
-# proxmox workspace
-proxmox-apt.workspace = true
-proxmox-apt-api-types.workspace = true
-proxmox-async.workspace = true
-proxmox-auth-api = { workspace = true, features = [ "api", "pam-authenticator" ] }
-proxmox-compression.workspace = true
-proxmox-config-digest.workspace = true
-proxmox-daemon.workspace = true
-proxmox-http = { workspace = true, features = [ "client-trait", "proxmox-async", "rate-limited-stream" ] } # pbs-client doesn't use these
-proxmox-human-byte.workspace = true
-proxmox-io.workspace = true
-proxmox-lang.workspace = true
-proxmox-log.workspace = true
-proxmox-ldap.workspace = true
-proxmox-metrics.workspace = true
-proxmox-notify = { workspace = true, features = [ "pbs-context" ] }
-proxmox-openid.workspace = true
-proxmox-rest-server = { workspace = true, features = [ "rate-limited-stream" ] }
-proxmox-router = { workspace = true, features = [ "cli", "server"] }
-proxmox-schema = { workspace = true, features = [ "api-macro" ] }
-proxmox-section-config.workspace = true
-proxmox-serde = { workspace = true, features = [ "serde_json" ] }
-proxmox-shared-cache.workspace = true
-proxmox-shared-memory.workspace = true
-proxmox-sortable-macro.workspace = true
-proxmox-subscription.workspace = true
-proxmox-sys = { workspace = true, features = [ "timer" ] }
-proxmox-systemd.workspace = true
-proxmox-tfa.workspace = true
-proxmox-time.workspace = true
-proxmox-uuid.workspace = true
-proxmox-worker-task.workspace = true
-pbs-api-types.workspace = true
-
-# in their respective repo
-proxmox-acme.workspace = true
-pxar.workspace = true
-
-# proxmox-backup workspace/internal crates
-pbs-buildcfg.workspace = true
-pbs-client.workspace = true
-pbs-config.workspace = true
-pbs-datastore.workspace = true
-pbs-key-config.workspace = true
-pbs-tape.workspace = true
-pbs-tools.workspace = true
-proxmox-rrd.workspace = true
-proxmox-rrd-api-types.workspace = true
-
@@ -263,47 +263,50 @@ proxmox-rrd-api-types.workspace = true
# Local path overrides
# NOTE: You must run `cargo update` after changing this for it to take effect!
[patch.crates-io]
-#pbs-api-types = { path = "../proxmox/pbs-api-types" }
+pbs-api-types = { path = "../proxmox/pbs-api-types" }
#proxmox-acme = { path = "../proxmox/proxmox-acme" }
#proxmox-apt = { path = "../proxmox/proxmox-apt" }
-#proxmox-acme = { path = "../proxmox/proxmox-acme" }
-#proxmox-apt = { path = "../proxmox/proxmox-apt" }
-#proxmox-apt-api-types = { path = "../proxmox/proxmox-apt-api-types" }
-#proxmox-async = { path = "../proxmox/proxmox-async" }
-#proxmox-auth-api = { path = "../proxmox/proxmox-auth-api" }
-#proxmox-base64 = { path = "../proxmox/proxmox-base64" }
-#proxmox-borrow = { path = "../proxmox/proxmox-borrow" }
-#proxmox-compression = { path = "../proxmox/proxmox-compression" }
-#proxmox-config-digest = { path = "../proxmox/proxmox-config-digest" }
+proxmox-apt-api-types = { path = "../proxmox/proxmox-apt-api-types" }
+proxmox-async = { path = "../proxmox/proxmox-async" }
+proxmox-auth-api = { path = "../proxmox/proxmox-auth-api" }
+proxmox-borrow = { path = "../proxmox/proxmox-borrow" }
+proxmox-compression = { path = "../proxmox/proxmox-compression" }
+proxmox-config-digest = { path = "../proxmox/proxmox-config-digest" }
#proxmox-daemon = { path = "../proxmox/proxmox-daemon" }
-#proxmox-daemon = { path = "../proxmox/proxmox-daemon" }
-#proxmox-fuse = { path = "../proxmox-fuse" }
-#proxmox-http = { path = "../proxmox/proxmox-http" }
-#proxmox-human-byte = { path = "../proxmox/proxmox-human-byte" }
-#proxmox-io = { path = "../proxmox/proxmox-io" }
-#proxmox-lang = { path = "../proxmox/proxmox-lang" }
-#proxmox-log = { path = "../proxmox/proxmox-log" }
-#proxmox-ldap = { path = "../proxmox/proxmox-ldap" }
-#proxmox-metrics = { path = "../proxmox/proxmox-metrics" }
-#proxmox-network-api = { path = "../proxmox/proxmox-network-api" }
-#proxmox-notify = { path = "../proxmox/proxmox-notify" }
-#proxmox-openid = { path = "../proxmox/proxmox-openid" }
-#proxmox-rest-server = { path = "../proxmox/proxmox-rest-server" }
-#proxmox-router = { path = "../proxmox/proxmox-router" }
-#proxmox-rrd = { path = "../proxmox/proxmox-rrd" }
-#proxmox-rrd-api-types = { path = "../proxmox/proxmox-rrd-api-types" }
-#proxmox-schema = { path = "../proxmox/proxmox-schema" }
-#proxmox-section-config = { path = "../proxmox/proxmox-section-config" }
-#proxmox-serde = { path = "../proxmox/proxmox-serde" }
-#proxmox-shared-memory = { path = "../proxmox/proxmox-shared-memory" }
-#proxmox-sortable-macro = { path = "../proxmox/proxmox-sortable-macro" }
-#proxmox-subscription = { path = "../proxmox/proxmox-subscription" }
-#proxmox-sys = { path = "../proxmox/proxmox-sys" }
-#proxmox-systemd = { path = "../proxmox/proxmox-systemd" }
-#proxmox-tfa = { path = "../proxmox/proxmox-tfa" }
-#proxmox-time = { path = "../proxmox/proxmox-time" }
-#proxmox-uuid = { path = "../proxmox/proxmox-uuid" }
-#proxmox-worker-task = { path = "../proxmox/proxmox-worker-task" }
+pbs-api-types = { path = "../proxmox/pbs-api-types" }
+proxmox-acme = { path = "../proxmox/proxmox-acme" }
+proxmox-apt = { path = "../proxmox/proxmox-apt" }
+proxmox-apt-api-types = { path = "../proxmox/proxmox-apt-api-types" }
+proxmox-async = { path = "../proxmox/proxmox-async" }
+proxmox-auth-api = { path = "../proxmox/proxmox-auth-api" }
+proxmox-base64 = { path = "../proxmox/proxmox-base64" }
+proxmox-borrow = { path = "../proxmox/proxmox-borrow" }
+proxmox-compression = { path = "../proxmox/proxmox-compression" }
+proxmox-config-digest = { path = "../proxmox/proxmox-config-digest" }
+proxmox-daemon = { path = "../proxmox/proxmox-daemon" }
+proxmox-fuse = { path = "../proxmox-fuse" }
+proxmox-http = { path = "../proxmox/proxmox-http" }
+proxmox-human-byte = { path = "../proxmox/proxmox-human-byte" }
+proxmox-io = { path = "../proxmox/proxmox-io" }
+proxmox-lang = { path = "../proxmox/proxmox-lang" }
+proxmox-log = { path = "../proxmox/proxmox-log" }
#proxmox-ldap = { path = "../proxmox/proxmox-ldap" }
#proxmox-metrics = { path = "../proxmox/proxmox-metrics" }
-#proxmox-notify = { path = "../proxmox/proxmox-notify" }
+proxmox-ldap = { path = "../proxmox/proxmox-ldap" }
+proxmox-metrics = { path = "../proxmox/proxmox-metrics" }
+proxmox-network-api = { path = "../proxmox/proxmox-network-api" }
+proxmox-notify = { path = "../proxmox/proxmox-notify" }
#proxmox-openid = { path = "../proxmox/proxmox-openid" }
#proxmox-rest-server = { path = "../proxmox/proxmox-rest-server" }
-#proxmox-router = { path = "../proxmox/proxmox-router" }
+proxmox-openid = { path = "../proxmox/proxmox-openid" }
+proxmox-rest-server = { path = "../proxmox/proxmox-rest-server" }
+proxmox-router = { path = "../proxmox/proxmox-router" }
#proxmox-rrd = { path = "../proxmox/proxmox-rrd" }
#proxmox-rrd-api-types = { path = "../proxmox/proxmox-rrd-api-types" }
-#proxmox-schema = { path = "../proxmox/proxmox-schema" }
-#proxmox-section-config = { path = "../proxmox/proxmox-section-config" }
-#proxmox-serde = { path = "../proxmox/proxmox-serde" }
-#proxmox-shared-memory = { path = "../proxmox/proxmox-shared-memory" }
-#proxmox-sortable-macro = { path = "../proxmox/proxmox-sortable-macro" }
+proxmox-rrd = { path = "../proxmox/proxmox-rrd" }
+proxmox-rrd-api-types = { path = "../proxmox/proxmox-rrd-api-types" }
+proxmox-schema = { path = "../proxmox/proxmox-schema" }
+proxmox-section-config = { path = "../proxmox/proxmox-section-config" }
+proxmox-serde = { path = "../proxmox/proxmox-serde" }
+proxmox-shared-memory = { path = "../proxmox/proxmox-shared-memory" }
+proxmox-sortable-macro = { path = "../proxmox/proxmox-sortable-macro" }
#proxmox-subscription = { path = "../proxmox/proxmox-subscription" }
-#proxmox-sys = { path = "../proxmox/proxmox-sys" }
-#proxmox-systemd = { path = "../proxmox/proxmox-systemd" }
+proxmox-subscription = { path = "../proxmox/proxmox-subscription" }
+proxmox-sys = { path = "../proxmox/proxmox-sys" }
+proxmox-systemd = { path = "../proxmox/proxmox-systemd" }
#proxmox-tfa = { path = "../proxmox/proxmox-tfa" }
-#proxmox-time = { path = "../proxmox/proxmox-time" }
-#proxmox-uuid = { path = "../proxmox/proxmox-uuid" }
-#proxmox-worker-task = { path = "../proxmox/proxmox-worker-task" }
+proxmox-tfa = { path = "../proxmox/proxmox-tfa" }
+proxmox-time = { path = "../proxmox/proxmox-time" }
+proxmox-uuid = { path = "../proxmox/proxmox-uuid" }
+proxmox-worker-task = { path = "../proxmox/proxmox-worker-task" }
+proxmox-s3-client = { path = "../proxmox/proxmox-s3-client" }
+proxmox-product-config = { path = "../proxmox/proxmox-product-config" }
+proxmox-shared-cache = { path = "../proxmox/proxmox-shared-cache" }
-#pathpatterns = {path = "../pathpatterns" }
-#pxar = { path = "../pxar" }
@ -189,5 +105,5 @@ index d38321e3..99d712da 100644
[features]
default = []
--
2.49.0
2.50.1

View File

@ -1,25 +0,0 @@
From b71b5bab3fadc663d322e3ef2faa8f098423fb03 Mon Sep 17 00:00:00 2001
From: Christoph Heiss <christoph@c8h4.io>
Date: Tue, 24 Dec 2024 17:22:35 +0100
Subject: [PATCH 2/5] docs: add target path fixup variable
Signed-off-by: Christoph Heiss <christoph@c8h4.io>
---
docs/Makefile | 1 +
1 file changed, 1 insertion(+)
diff --git a/docs/Makefile b/docs/Makefile
index c57cbbc2..fa00729e 100644
--- a/docs/Makefile
+++ b/docs/Makefile
@@ -94,6 +94,7 @@ API_VIEWER_FILES := \
SPHINXOPTS = -E
SPHINXBUILD = sphinx-build
BUILDDIR = output
+DEB_HOST_RUST_TYPE ?= $(RUSTC_TARGET)
ifeq ($(BUILD_MODE), release)
COMPILEDIR := ../target/$(DEB_HOST_RUST_TYPE)/release
--
2.49.0

View File

@ -1,7 +1,7 @@
From 846d0b9c8f62340cb0703c59d16414b05a15382a Mon Sep 17 00:00:00 2001
From 732dc6b91299bda441f52c6d7decddfbfd6e5517 Mon Sep 17 00:00:00 2001
From: Thomas Lamprecht <thomas@lamprecht.org>
Date: Tue, 29 Nov 2022 17:20:28 +0100
Subject: [PATCH 4/5] docs: drop all but client man pages
Subject: [PATCH proxmox-backup 2/2] docs: drop all but client man pages
Signed-off-by: Thomas Lamprecht <thomas@lamprecht.org>
Signed-off-by: Christoph Heiss <christoph@c8h4.io>
@ -11,7 +11,7 @@ Signed-off-by: Christoph Heiss <christoph@c8h4.io>
2 files changed, 43 deletions(-)
diff --git a/docs/Makefile b/docs/Makefile
index fa00729e..53a420b5 100644
index 5cf5fc17..85ff3b91 100644
--- a/docs/Makefile
+++ b/docs/Makefile
@@ -1,27 +1,8 @@
@ -43,7 +43,7 @@ index fa00729e..53a420b5 100644
MAN1_PAGES := \
diff --git a/docs/conf.py b/docs/conf.py
index a7fa1079..345a0170 100644
index 64c4f9d4..345a0170 100644
--- a/docs/conf.py
+++ b/docs/conf.py
@@ -93,31 +93,7 @@ rst_epilog += f"\n.. |pbs-copyright| replace:: Copyright (C) {copyright}"
@ -59,7 +59,7 @@ index a7fa1079..345a0170 100644
('pxar/man1', 'pxar', 'Proxmox File Archive CLI Tool', [author], 1),
- ('pmt/man1', 'pmt', 'Control Linux Tape Devices', [author], 1),
- ('pmtx/man1', 'pmtx', 'Control SCSI media changer devices (tape autoloaders)', [author], 1),
- ('pbs2to3/man1', 'pbs2to3', 'Proxmox Backup Server upgrade checker script for 2.4+ to current 3.x major upgrades', [author], 1),
- ('pbs3to4/man1', 'pbs3to4', 'Proxmox Backup Server upgrade checker script for 3.4+ to current 4.x major upgrades', [author], 1),
- # configs
- ('config/acl/man5', 'acl.cfg', 'Access Control Configuration', [author], 5),
- ('config/datastore/man5', 'datastore.cfg', 'Datastore Configuration', [author], 5),
@ -79,5 +79,5 @@ index a7fa1079..345a0170 100644
--
2.49.0
2.50.1

View File

@ -1,26 +0,0 @@
From 88f8ac1e5d158ad0a46177b813fd7557cc5e3fbe Mon Sep 17 00:00:00 2001
From: Christoph Heiss <christoph@c8h4.io>
Date: Tue, 24 Dec 2024 17:35:40 +0100
Subject: [PATCH 3/5] cargo: use local patched h2 dependency
Signed-off-by: Christoph Heiss <christoph@c8h4.io>
---
Cargo.toml | 2 ++
1 file changed, 2 insertions(+)
diff --git a/Cargo.toml b/Cargo.toml
index 99d712da..091696f1 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -201,6 +201,8 @@ proxmox-worker-task = { path = "../proxmox/proxmox-worker-task" }
pathpatterns = {path = "../pathpatterns" }
pxar = { path = "../pxar" }
+h2 = { path = "./h2" }
+
[features]
default = []
#valgrind = ["valgrind_request"]
--
2.49.0

View File

@ -1,198 +0,0 @@
From b1a06f6a63a63410f89bd0d2968a6fdb7ce2352d Mon Sep 17 00:00:00 2001
From: Christoph Heiss <christoph@c8h4.io>
Date: Thu, 5 Jun 2025 12:01:10 +0200
Subject: [PATCH 5/5] Revert "h2: switch to legacy feature"
This reverts commit 168ed370263e84a6235968c615b856b9280debe1.
It's a Proxmox-specific workaround (see also the commit description
itself) and does not apply here.
Signed-off-by: Christoph Heiss <christoph@c8h4.io>
---
Cargo.toml | 2 +-
examples/h2client.rs | 6 +++---
examples/h2s-client.rs | 6 +++---
pbs-client/src/backup_writer.rs | 8 ++++----
pbs-client/src/http_client.rs | 12 +++++-------
pbs-client/src/pipe_to_stream.rs | 2 +-
6 files changed, 17 insertions(+), 19 deletions(-)
diff --git a/Cargo.toml b/Cargo.toml
index 091696f1..063f62f8 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -122,7 +122,7 @@ env_logger = "0.11"
flate2 = "1.0"
foreign-types = "0.3"
futures = "0.3"
-h2 = { version = "0.4", features = [ "legacy", "stream" ] }
+h2 = { version = "0.4", features = [ "stream" ] }
handlebars = "3.0"
hex = "0.4.3"
hickory-resolver = { version = "0.24.1", default-features = false, features = [ "system-config", "tokio-runtime" ] }
diff --git a/examples/h2client.rs b/examples/h2client.rs
index e44c43fa..1dcb4498 100644
--- a/examples/h2client.rs
+++ b/examples/h2client.rs
@@ -10,7 +10,7 @@ use tokio::net::TcpStream;
// Simple H2 client to test H2 download speed using h2server.rs
struct Process {
- body: h2::legacy::RecvStream,
+ body: h2::RecvStream,
trailers: bool,
bytes: usize,
}
@@ -50,7 +50,7 @@ impl Future for Process {
}
fn send_request(
- mut client: h2::legacy::client::SendRequest<bytes::Bytes>,
+ mut client: h2::client::SendRequest<bytes::Bytes>,
) -> impl Future<Output = Result<usize, Error>> {
println!("sending request");
@@ -78,7 +78,7 @@ async fn run() -> Result<(), Error> {
let conn = TcpStream::connect(std::net::SocketAddr::from(([127, 0, 0, 1], 8008))).await?;
conn.set_nodelay(true).unwrap();
- let (client, h2) = h2::legacy::client::Builder::new()
+ let (client, h2) = h2::client::Builder::new()
.initial_connection_window_size(1024 * 1024 * 1024)
.initial_window_size(1024 * 1024 * 1024)
.max_frame_size(4 * 1024 * 1024)
diff --git a/examples/h2s-client.rs b/examples/h2s-client.rs
index 86b3a931..a12b5a48 100644
--- a/examples/h2s-client.rs
+++ b/examples/h2s-client.rs
@@ -10,7 +10,7 @@ use tokio::net::TcpStream;
// Simple H2 client to test H2 download speed using h2s-server.rs
struct Process {
- body: h2::legacy::RecvStream,
+ body: h2::RecvStream,
trailers: bool,
bytes: usize,
}
@@ -50,7 +50,7 @@ impl Future for Process {
}
fn send_request(
- mut client: h2::legacy::client::SendRequest<bytes::Bytes>,
+ mut client: h2::client::SendRequest<bytes::Bytes>,
) -> impl Future<Output = Result<usize, Error>> {
println!("sending request");
@@ -94,7 +94,7 @@ async fn run() -> Result<(), Error> {
.await
.map_err(|err| format_err!("connect failed - {}", err))?;
- let (client, h2) = h2::legacy::client::Builder::new()
+ let (client, h2) = h2::client::Builder::new()
.initial_connection_window_size(1024 * 1024 * 1024)
.initial_window_size(1024 * 1024 * 1024)
.max_frame_size(4 * 1024 * 1024)
diff --git a/pbs-client/src/backup_writer.rs b/pbs-client/src/backup_writer.rs
index 32542506..1253ef56 100644
--- a/pbs-client/src/backup_writer.rs
+++ b/pbs-client/src/backup_writer.rs
@@ -56,7 +56,7 @@ pub struct UploadOptions {
}
struct ChunkUploadResponse {
- future: h2::legacy::client::ResponseFuture,
+ future: h2::client::ResponseFuture,
size: usize,
}
@@ -143,7 +143,7 @@ impl BackupWriter {
param: Option<Value>,
content_type: &str,
data: Vec<u8>,
- ) -> Result<h2::legacy::client::ResponseFuture, Error> {
+ ) -> Result<h2::client::ResponseFuture, Error> {
let request =
H2Client::request_builder("localhost", method, path, param, Some(content_type))
.unwrap();
@@ -514,7 +514,7 @@ impl BackupWriter {
}
fn response_queue() -> (
- mpsc::Sender<h2::legacy::client::ResponseFuture>,
+ mpsc::Sender<h2::client::ResponseFuture>,
oneshot::Receiver<Result<(), Error>>,
) {
let (verify_queue_tx, verify_queue_rx) = mpsc::channel(100);
@@ -537,7 +537,7 @@ impl BackupWriter {
tokio::spawn(
ReceiverStream::new(verify_queue_rx)
.map(Ok::<_, Error>)
- .try_for_each(move |response: h2::legacy::client::ResponseFuture| {
+ .try_for_each(move |response: h2::client::ResponseFuture| {
response
.map_err(Error::from)
.and_then(H2Client::h2api_response)
diff --git a/pbs-client/src/http_client.rs b/pbs-client/src/http_client.rs
index c95def07..8f6f8b41 100644
--- a/pbs-client/src/http_client.rs
+++ b/pbs-client/src/http_client.rs
@@ -863,7 +863,7 @@ impl HttpClient {
let max_window_size = (1 << 31) - 2;
- let (h2, connection) = h2::legacy::client::Builder::new()
+ let (h2, connection) = h2::client::Builder::new()
.initial_connection_window_size(max_window_size)
.initial_window_size(max_window_size)
.max_frame_size(4 * 1024 * 1024)
@@ -1008,11 +1008,11 @@ impl Drop for HttpClient {
#[derive(Clone)]
pub struct H2Client {
- h2: h2::legacy::client::SendRequest<bytes::Bytes>,
+ h2: h2::client::SendRequest<bytes::Bytes>,
}
impl H2Client {
- pub fn new(h2: h2::legacy::client::SendRequest<bytes::Bytes>) -> Self {
+ pub fn new(h2: h2::client::SendRequest<bytes::Bytes>) -> Self {
Self { h2 }
}
@@ -1092,7 +1092,7 @@ impl H2Client {
&self,
request: Request<()>,
data: Option<bytes::Bytes>,
- ) -> impl Future<Output = Result<h2::legacy::client::ResponseFuture, Error>> {
+ ) -> impl Future<Output = Result<h2::client::ResponseFuture, Error>> {
self.h2
.clone()
.ready()
@@ -1109,9 +1109,7 @@ impl H2Client {
})
}
- pub async fn h2api_response(
- response: Response<h2::legacy::RecvStream>,
- ) -> Result<Value, Error> {
+ pub async fn h2api_response(response: Response<h2::RecvStream>) -> Result<Value, Error> {
let status = response.status();
let (_head, mut body) = response.into_parts();
diff --git a/pbs-client/src/pipe_to_stream.rs b/pbs-client/src/pipe_to_stream.rs
index 3fc942d3..ae689851 100644
--- a/pbs-client/src/pipe_to_stream.rs
+++ b/pbs-client/src/pipe_to_stream.rs
@@ -8,7 +8,7 @@ use std::task::{Context, Poll};
use anyhow::{format_err, Error};
use bytes::Bytes;
use futures::{ready, Future};
-use h2::legacy::SendStream;
+use h2::SendStream;
pub struct PipeToSendStream {
body_tx: SendStream<Bytes>,
--
2.49.0

File diff suppressed because it is too large Load Diff

View File

@ -1,14 +1,11 @@
{
lib,
fetchgit,
fetchFromGitHub,
rustPlatform,
pkgconf,
openssl,
fuse3,
libuuid,
acl,
libxcrypt,
installShellFiles,
sphinx,
stdenv,
@ -17,50 +14,41 @@
let
pname = "proxmox-backup-client";
version = "3.4.2";
version = "4.0.13";
proxmox-backup_src = fetchgit {
url = "git://git.proxmox.com/git/proxmox-backup.git";
rev = "37f1949335cad801f7cdaa0173cc114590a37e4e";
rev = "de92e3f6a26bfbcc9f8b860e983a85a434a8e3c6";
name = "proxmox-backup";
hash = "sha256-OW6GG/4IcEw8XOSSB5EoN+jyoOaL0ZtavJahnKOuAqI=";
hash = "sha256-09woNnl55zGIeHkX/UdBRg0mlKjD2HraPCjferNe81I=";
};
proxmox_src = fetchgit {
url = "git://git.proxmox.com/git/proxmox.git";
rev = "e47fdf411be61b15382bc3baa3064f1e7cb03fa2";
rev = "84a58afe23a35454a1abbeb6c436ee49d2888d18";
name = "proxmox";
hash = "sha256-jSU00D75sx40VS8rgF+D6h120FMaD1Jfq4e8l+8D5BQ=";
hash = "sha256-p4o72RFuDBpgThJ39ZkIXriUQJZtYdrj9Biyl+XQ2hc=";
};
proxmox-fuse_src = fetchgit {
url = "git://git.proxmox.com/git/proxmox-fuse.git";
rev = "6faec3a52fcdb0df3ca13fee2977683824d62d01"; # 0.1.7-1
rev = "87dbf9bfef9169286263bccffaae3206635ca108"; # 1.0.0
name = "proxmox-fuse";
hash = "sha256-FwkZ5L7gJr9xZTQkdVHmOP8vnzf+To5Wz2SbIEzGUOY=";
hash = "sha256-/8Xy6LTql3gHfHuxT0lK5mhLGc58YAb1W+eyusmEP8Y=";
};
proxmox-pxar_src = fetchgit {
url = "git://git.proxmox.com/git/pxar.git";
rev = "410f326a08ef6c08141af5c7431beb2e16f0c666"; # 0.12.1
rev = "993c66fcb8819770f279cb9fb4d13f58f367606c"; # 1.0.0
name = "pxar";
hash = "sha256-USvtrWTbP3VUiy9MB9Ym6s4wXBNZ4Ooyg4MRDwRVOtU=";
hash = "sha256-V5DkTIyPuopSILQoJt04E5G9ZEylQF1x5oXgWQJuDq8=";
};
proxmox-pathpatterns_src = fetchgit {
url = "git://git.proxmox.com/git/pathpatterns.git";
rev = "5f625aacbd6f81d97a1c6f5476fb38769d069f26"; # 0.3.0
rev = "42e5e96e30297da878a4d4b3a7fa52b65c1be0ab"; # 1.0.0
name = "pathpatterns";
hash = "sha256-717XSlvQdvP0Q516fEx04rsrLCk3QI8frTD5NMmkSr4=";
};
# needs a patched version
h2_src = fetchFromGitHub {
name = "h2";
owner = "hyperium";
repo = "h2";
rev = "v0.4.10";
hash = "sha256-PasHCbU466ByHIbDQpMMgzjg2dMRveOButHeVSknSEQ=";
hash = "sha256-U8EhTg/2iuArQvUNGNYrgVYn1T/jnxxqSKJxfsCMAjs=";
};
in
@ -73,7 +61,6 @@ rustPlatform.buildRustPackage {
proxmox-fuse_src
proxmox-pxar_src
proxmox-pathpatterns_src
h2_src
];
sourceRoot = proxmox-backup_src.name;
@ -85,28 +72,12 @@ rustPlatform.buildRustPackage {
# Debian packages). This patch redirects all these dependencies to a local, relative path, which
# works in combination with the other three repos being checked out.
./0001-cargo-re-route-dependencies-not-available-on-crates..patch
# `make docs` assumes that the binaries are located under `target/{debug,release}`, but due
# to how `buildRustPackage` works, they get put under `target/$RUSTC_TARGET/{debug,release}`.
# This patch simply fixes that up.
./0002-docs-add-target-path-fixup-variable.patch
# Need to use a patched version of the `h2` crate (with a downgraded dependency, see also postPatch).
# This overrides it in the Cargo.toml as needed.
./0003-cargo-use-local-patched-h2-dependency.patch
# This patch prevents the generation of the man-pages for other components inside the repo,
# which would require them too be built too. Thus avoid wasting resources and just skip them.
./0004-docs-drop-all-but-client-man-pages.patch
# Upstream uses a patched version of the h2 crate (see [0]), which does not apply here.
# [0] https://git.proxmox.com/?p=debcargo-conf.git;a=blob;f=src/h2/debian/patches/add-legacy.patch;h=0913da317
./0005-Revert-h2-switch-to-legacy-feature.patch
./0002-docs-drop-all-but-client-man-pages.patch
];
postPatch = ''
# need to downgrade the `http` crate for `h2`
# see https://aur.archlinux.org/cgit/aur.git/tree/0003-cargo-downgrade-http-to-0.2.12.patch?h=proxmox-backup-client
cp -r ../h2 .
chmod u+w ./h2
(cd h2 && sed -i 's/^http = "1"$/http = "0.2.12"/' Cargo.toml)
cp ${./Cargo.lock} Cargo.lock
rm .cargo/config.toml
@ -121,7 +92,7 @@ rustPlatform.buildRustPackage {
postBuild = ''
make -C docs \
DEB_VERSION=${version} DEB_VERSION_UPSTREAM=${version} \
RUSTC_TARGET=${stdenv.targetPlatform.rust.rustcTarget} \
DEB_HOST_RUST_TYPE=${stdenv.targetPlatform.rust.rustcTarget} \
BUILD_MODE=release \
proxmox-backup-client.1 pxar.1
'';