-From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
-From: Thomas Lamprecht <thomas@lamprecht.org>
-Date: Wed, 18 May 2022 08:41:14 +0200
-Subject: [PATCH] re-route dependencies not available on crates.io to git repos
-
-Signed-off-by: Thomas Lamprecht <thomas@lamprecht.org>
----
- Cargo.toml | 146 ++++++++++++-------------------------------------------------
- 1 file changed, 27 insertions(+), 119 deletions(-)
-
diff --git a/Cargo.toml b/Cargo.toml
-index d14f320a..27fec0ef 100644
--- a/Cargo.toml
+++ b/Cargo.toml
-@@ -41,8 +41,6 @@ members = [
+@@ -41,8 +41,6 @@
"proxmox-backup-banner",
"proxmox-backup-client",
"pxar-bin",
]
-@@ -111,7 +109,6 @@ pbs-tools = { path = "pbs-tools" }
+@@ -115,7 +113,6 @@
# regular crates
anyhow = "1.0"
async-trait = "0.1.56"
-apt-pkg-native = "0.3.2"
- base64 = "0.13"
bitflags = "2.4"
bytes = "1.0"
-@@ -125,7 +122,6 @@ flate2 = "1.0"
+ cidr = "0.3"
+@@ -128,7 +125,6 @@
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" ] }
- hyper = { version = "0.14", features = [ "backports", "deprecated", "full" ] }
-@@ -160,138 +156,50 @@ xdg = "2.2"
- zstd = { version = "0.12", features = [ "bindgen" ] }
- zstd-safe = "6.0"
+ http-body-util = "0.1"
+@@ -165,145 +161,53 @@
+ zstd = "0.13"
+ zstd-safe = "7"
-[dependencies]
-anyhow.workspace = true
-async-trait.workspace = true
--base64.workspace = true
-bytes.workspace = true
-cidr.workspace = true
-const_format.workspace = true
-futures.workspace = true
-h2.workspace = true
-hex.workspace = true
+-http-body-util.workspace = true
-hyper.workspace = true
+-hyper-util = { workspace = true, features = ["server", "server-auto", "server-graceful"] }
-libc.workspace = true
-log.workspace = true
-nix.workspace = true
-proxmox-apt-api-types.workspace = true
-proxmox-async.workspace = true
-proxmox-auth-api = { workspace = true, features = [ "api", "pam-authenticator" ] }
+-proxmox-base64.workspace = true
-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-http = { workspace = true, features = [ "body", "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-network-api = { workspace = true, features = [ "impl" ] }
-proxmox-notify = { workspace = true, features = [ "pbs-context" ] }
-proxmox-openid.workspace = true
+-proxmox-product-config.workspace = true
-proxmox-rest-server = { workspace = true, features = [ "rate-limited-stream" ] }
-proxmox-router = { workspace = true, features = [ "cli", "server"] }
+-proxmox-s3-client.workspace = true
-proxmox-schema = { workspace = true, features = [ "api-macro" ] }
-proxmox-section-config.workspace = true
-proxmox-serde = { workspace = true, features = [ "serde_json" ] }
-#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-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-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-notify = { path = "../proxmox/proxmox-notify" }
#proxmox-openid = { path = "../proxmox/proxmox-openid" }
-#proxmox-serde = { path = "../proxmox/proxmox-serde" }
-#proxmox-shared-memory = { path = "../proxmox/proxmox-shared-memory" }
-#proxmox-sortable-macro = { path = "../proxmox/proxmox-sortable-macro" }
++proxmox-s3-client = { path = "../proxmox/proxmox-s3-client" }
+proxmox-schema = { path = "../proxmox/proxmox-schema" }
+proxmox-section-config = { path = "../proxmox/proxmox-section-config" }
+proxmox-serde = { path = "../proxmox/proxmox-serde" }
-From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
-From: Thomas Lamprecht <thomas@lamprecht.org>
-Date: Tue, 29 Nov 2022 17:20:28 +0100
-Subject: [PATCH] docs: drop all but client man pages
-
-Signed-off-by: Thomas Lamprecht <thomas@lamprecht.org>
----
- docs/Makefile | 19 -------------------
- docs/conf.py | 24 ------------------------
- 2 files changed, 43 deletions(-)
-
diff --git a/docs/Makefile b/docs/Makefile
-index c57cbbc2..9f56e7e0 100644
--- a/docs/Makefile
+++ b/docs/Makefile
@@ -1,27 +1,8 @@
MAN1_PAGES := \
diff --git a/docs/conf.py b/docs/conf.py
-index a7fa1079..345a0170 100644
--- a/docs/conf.py
+++ b/docs/conf.py
-@@ -93,31 +93,7 @@ rst_epilog += f"\n.. |pbs-copyright| replace:: Copyright (C) {copyright}"
+@@ -93,31 +93,7 @@
man_pages = [
# CLI
('proxmox-backup-client/man1', 'proxmox-backup-client', 'Command line tool for Backup and Restore', [author], 1),
('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),
+++ /dev/null
-From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
-From: Thomas Lamprecht <thomas@lamprecht.org>
-Date: Sat, 30 Nov 2024 11:41:27 +0100
-Subject: [PATCH] cargo: downgrade http to 0.2.12
-
-Signed-off-by: Thomas Lamprecht <thomas@lamprecht.org>
----
- Cargo.toml | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/Cargo.toml b/Cargo.toml
-index 34ca3d6..12fc1a8 100644
---- a/Cargo.toml
-+++ b/Cargo.toml
-@@ -45,7 +45,7 @@ futures-sink = { version = "0.3", default-features = false }
- tokio-util = { version = "0.7.1", features = ["codec", "io"] }
- tokio = { version = "1", features = ["io-util"] }
- bytes = "1"
--http = "1"
-+http = "0.2.12"
- tracing = { version = "0.1.35", default-features = false, features = ["std"] }
- fnv = "1.0.5"
- slab = "0.4.2"
---
-2.47.1
-
+++ /dev/null
-From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
-From: Thomas Lamprecht <thomas@lamprecht.org>
-Date: Sat, 30 Nov 2024 11:56:16 +0100
-Subject: [PATCH] cargo: use local patched h2 dependency
-
-Signed-off-by: Thomas Lamprecht <thomas@lamprecht.org>
----
- Cargo.toml | 1 +
- 1 file changed, 1 insertion(+)
-
-diff --git a/Cargo.toml b/Cargo.toml
-index 27fec0ef..98a68309 100644
---- a/Cargo.toml
-+++ b/Cargo.toml
-@@ -161,6 +161,7 @@ zstd-safe = "6.0"
- # Local path overrides
- # NOTE: You must run `cargo update` after changing this for it to take effect!
- [patch.crates-io]
-+h2 = { path = "../h2" }
- pbs-api-types = { path = "../proxmox/pbs-api-types" }
- #proxmox-acme = { path = "../proxmox/proxmox-acme" }
- #proxmox-apt = { path = "../proxmox/proxmox-apt" }
---
-2.47.1
-
+++ /dev/null
-diff -ur proxmox-backup.orig/Cargo.toml proxmox-backup/Cargo.toml
---- proxmox-backup.orig/Cargo.toml 2025-05-16 20:33:13.571733359 +0200
-+++ proxmox-backup/Cargo.toml 2025-05-16 21:00:04.535301120 +0200
-@@ -121,7 +121,7 @@
- flate2 = "1.0"
- foreign-types = "0.3"
- futures = "0.3"
--h2 = { version = "0.4", features = [ "legacy", "stream" ] }
-+h2 = { version = "0.4", features = [ "stream" ] }
- hex = "0.4.3"
- hickory-resolver = { version = "0.24.1", default-features = false, features = [ "system-config", "tokio-runtime" ] }
- hyper = { version = "0.14", features = [ "backports", "deprecated", "full" ] }
-diff -ur proxmox-backup.orig/examples/h2client.rs proxmox-backup/examples/h2client.rs
---- proxmox-backup.orig/examples/h2client.rs 2025-05-16 20:33:09.987725464 +0200
-+++ proxmox-backup/examples/h2client.rs 2025-05-16 20:59:38.179242597 +0200
-@@ -10,7 +10,7 @@
- // 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 @@
- }
-
- 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 @@
- 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 -ur proxmox-backup.orig/examples/h2s-client.rs proxmox-backup/examples/h2s-client.rs
---- proxmox-backup.orig/examples/h2s-client.rs 2025-05-16 20:33:09.987725464 +0200
-+++ proxmox-backup/examples/h2s-client.rs 2025-05-16 20:59:38.179242597 +0200
-@@ -10,7 +10,7 @@
- // 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 @@
- }
-
- 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 @@
- .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 -ur proxmox-backup.orig/pbs-client/src/backup_writer.rs proxmox-backup/pbs-client/src/backup_writer.rs
---- proxmox-backup.orig/pbs-client/src/backup_writer.rs 2025-05-16 20:33:09.987725464 +0200
-+++ proxmox-backup/pbs-client/src/backup_writer.rs 2025-05-16 20:59:38.179242597 +0200
-@@ -56,7 +56,7 @@
- }
-
- struct ChunkUploadResponse {
-- future: h2::legacy::client::ResponseFuture,
-+ future: h2::client::ResponseFuture,
- size: usize,
- }
-
-@@ -143,7 +143,7 @@
- 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 @@
- }
-
- 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 @@
- 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 -ur proxmox-backup.orig/pbs-client/src/http_client.rs proxmox-backup/pbs-client/src/http_client.rs
---- proxmox-backup.orig/pbs-client/src/http_client.rs 2025-05-16 20:33:09.987725464 +0200
-+++ proxmox-backup/pbs-client/src/http_client.rs 2025-05-16 20:59:38.179242597 +0200
-@@ -863,7 +863,7 @@
-
- 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 @@
-
- #[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 @@
- &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 @@
- })
- }
-
-- 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 -ur proxmox-backup.orig/pbs-client/src/pipe_to_stream.rs proxmox-backup/pbs-client/src/pipe_to_stream.rs
---- proxmox-backup.orig/pbs-client/src/pipe_to_stream.rs 2025-05-16 20:33:09.987725464 +0200
-+++ proxmox-backup/pbs-client/src/pipe_to_stream.rs 2025-05-16 20:59:38.179242597 +0200
-@@ -8,7 +8,7 @@
- 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>,
#!/bin/bash
# Name and version of package
-package="proxmox-backup-client-3.4.1"
+package="proxmox-backup-client-4.0.14"
# Source URLs
source_repos=(
- "git://git.proxmox.com/git/proxmox-backup.git#commit=115942267df1a5a55f10a5bdd8477202e7942158"
- "git://git.proxmox.com/git/proxmox.git#commit=f92f773aed3d21c791755a8737a0cce76664b588"
+ "git://git.proxmox.com/git/proxmox-backup.git#commit=8b1b5f8e4d8216a0c45146b426dbfaff01ac0068"
+ "git://git.proxmox.com/git/proxmox.git#commit=84a58afe23a35454a1abbeb6c436ee49d2888d18"
"git://git.proxmox.com/git/proxmox-fuse.git"
"git://git.proxmox.com/git/pathpatterns.git"
"git://git.proxmox.com/git/pxar.git"
- "https://github.com/hyperium/h2.git#tag=v0.4.10"
)
# Function for applying patches to downloaded sources
done
# Apply required patches
-apply_patch h2 0003-cargo-downgrade-http-to-0.2.12.patch
apply_patch proxmox-backup 0001-re-route-dependencies-not-available-on-crates.io-to-.patch
apply_patch proxmox-backup 0002-docs-drop-all-but-client-man-pages.patch
-apply_patch proxmox-backup 0004-cargo-use-local-patched-h2-dependency.patch
-apply_patch proxmox-backup h2-revert-legacy.patch
apply_patch proxmox-fuse fuse-pkgconfig.patch
# Enter proxmox-backup directory
popd
# Remove unused proxmox-* crates
-rm -rf proxmox/proxmox-{acme,apt,daemon,ldap,metrics,openid,rest-server,rrd,rrd-api-types,subscription,tfa}
+rm -rf proxmox/proxmox-{acme,apt,daemon,ldap,metrics,network-api,openid,rest-server,rrd,rrd-api-types,subscription,tfa}
# Remove systemd dependency from proxmox-systemd
rm -f proxmox/proxmox-systemd/src/{journal,notify,sys}.rs
# Remove other not needed stuff
rm -rf \
- h2/{.git,.github,examples,fixtures} \
- pathpatterns/{.git,debian} \
- proxmox/{.git,debian} \
+ pathpatterns/{.git*,debian} \
+ proxmox/{.git*,debian} \
proxmox/proxmox-*/debian \
- proxmox-backup/{.git,debian,examples,www} \
- proxmox-fuse/{.git,debian,examples} \
- pxar/{.git,debian,examples}
+ proxmox-backup/{.git*,debian,examples,www} \
+ proxmox-fuse/{.git*,debian,examples} \
+ pxar/{.git*,debian,examples}
# Leave package directory
popd
#
Summary: Proxmox Backup Client
Name: proxmox-backup-client
-Version: 3.4.1
+Version: 4.0.14
Release: 1
License: AGPL v3
Group: Networking/Utilities
# Created by bundled make_tarball.sh
Source0: %{name}-%{version}.tar.xz
-# Source0-md5: 97c04a73eda607b755efcc7b9b3c5832
+# Source0-md5: bdf7bac1552036f78ba61c5162aff361
URL: https://pbs.proxmox.com/docs/backup-client.html
BuildRequires: cargo
BuildRequires: clang