From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from gate001.proxmox.com (gate001.proxmox.com [45.144.208.40]) by lore.proxmox.com (Postfix) with ESMTPS id 5B3361FF0B7 for ; Tue, 25 Aug 2026 11:19:04 +0200 (CEST) Received: from gate001.proxmox.com (localhost.localdomain [127.0.0.1]) by gate001.proxmox.com (Proxmox) with ESMTP id D9FE821781; Tue, 25 Aug 2026 11:18:09 +0200 (CEST) From: Christian Ebner To: pbs-devel@lists.proxmox.com, pve-devel@lists.proxmox.com Subject: [PATCH proxmox-backup-qemu 4/8] submodules: bump proxmox-backup submodule to 4.2.5 and fix api changes Date: Tue, 25 Aug 2026 11:17:36 +0200 Message-ID: <20260825091741.162883-5-c.ebner@proxmox.com> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20260825091741.162883-1-c.ebner@proxmox.com> References: <20260825091741.162883-1-c.ebner@proxmox.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Bm-Milter-Handled: 55990f41-d878-4baa-be0a-ee34c49e34d2 X-Bm-Transport-Timestamp: 1787649451922 X-SPAM-LEVEL: Spam detection results: 0 AWL 0.568 Adjusted score from AWL reputation of From: address DMARC_MISSING 0.1 Missing DMARC policy KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment (newer systems) POISEN_SPAM_PILL 0.1 Meta: its spam POISEN_SPAM_PILL_2 0.1 random spam to be learned in bayes POISEN_SPAM_PILL_4 0.1 random spam to be learned in bayes RCVD_IN_DNSWL_MED -2.3 Sender listed at https://www.dnswl.org/, medium trust SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record Message-ID-Hash: ICHQJNH3ASABIKQQBVQZJXFUDWAYULBU X-Message-ID-Hash: ICHQJNH3ASABIKQQBVQZJXFUDWAYULBU X-MailFrom: c.ebner@proxmox.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; emergency; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.10 Precedence: list List-Id: Proxmox Backup Server development discussion List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: Bump the submodule to the latest version 4.2.5 and adapt to recent api changes, which cover in particular: - The archive name for guest configs which now has the stricter BackupArchiveName type as introduced in [0]. - Keeping the signature check of a downloaded previous manifest, made optional via a flag in [1]. Due to the stricter checks, add_config() now allows only client side extensions for blobs and auto-expands the server side `.blob` extension when required. While at it, make sure to always use the latest stricter check by depending on version 1.0.20, which is not strictly required here but the submodule already depends on it as well and it protects against building future versions with the still more relaxed archive name parsing. The api type changes affect internal API's only, public API's types remain unchanged. [0] https://git.proxmox.com/?p=proxmox-backup.git;a=commit;h=b57274a5a64791e7245bc0655ce0f133668db145 [1] https://git.proxmox.com/?p=proxmox-backup.git;a=commit;h=b80847b554be38f7a9bcae9bf09e14dfb64afa22 Signed-off-by: Christian Ebner --- Cargo.toml | 2 +- src/backup.rs | 6 ++++-- src/commands.rs | 17 +++++------------ submodules/proxmox-backup | 2 +- 4 files changed, 11 insertions(+), 16 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 2719a80..81c46b3 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -37,7 +37,7 @@ proxmox-schema = { version = "5", features = [ "api-macro" ] } proxmox-sortable-macro = "1" proxmox-sys = "1" -pbs-api-types = { version = "1" } +pbs-api-types = { version = "1.0.20" } pbs-client = { path = "submodules/proxmox-backup/pbs-client" } pbs-datastore = { path = "submodules/proxmox-backup/pbs-datastore" } diff --git a/src/backup.rs b/src/backup.rs index cf1806a..9f1848b 100644 --- a/src/backup.rs +++ b/src/backup.rs @@ -2,6 +2,7 @@ use anyhow::{bail, format_err, Error}; use once_cell::sync::OnceCell; use std::collections::HashSet; use std::os::raw::c_int; +use std::str::FromStr; use std::sync::{Arc, Mutex}; use futures::future::{Either, Future, FutureExt}; @@ -10,7 +11,7 @@ use tokio::runtime::Runtime; use proxmox_async::runtime::get_runtime_with_builder; use proxmox_sys::fs::file_get_contents; -use pbs_api_types::{BackupType, CryptMode}; +use pbs_api_types::{BackupArchiveName, BackupType, CryptMode}; use pbs_client::{BackupWriter, BackupWriterOptions, HttpClient, HttpClientOptions}; use pbs_datastore::BackupManifest; use pbs_key_config::{load_and_decrypt_key, rsa_encrypt_key_config, KeyConfig}; @@ -157,7 +158,7 @@ impl BackupTask { ) .await?; - let last_manifest = writer.download_previous_manifest().await; + let last_manifest = writer.download_previous_manifest(true).await; let mut result = 0; if let Ok(last_manifest) = last_manifest { result = 1; @@ -186,6 +187,7 @@ impl BackupTask { pub async fn add_config(&self, name: String, data: Vec) -> Result { self.check_aborted()?; + let name = BackupArchiveName::from_str(&name)?; let command_future = add_config( self.need_writer()?, diff --git a/src/commands.rs b/src/commands.rs index 9b84966..3c2726c 100644 --- a/src/commands.rs +++ b/src/commands.rs @@ -94,15 +94,13 @@ async fn register_zero_chunk( pub(crate) async fn add_config( client: Arc, manifest: Arc>, - name: String, + config_blob_name: BackupArchiveName, data: Vec, compress: bool, crypt_mode: CryptMode, ) -> Result { //println!("add config {} size {}", name, size); - let blob_name = format!("{}.blob", name); - let options = UploadOptions { compress, encrypt: crypt_mode == CryptMode::Encrypt, @@ -110,12 +108,11 @@ pub(crate) async fn add_config( }; let stats = client - .upload_blob_from_data(data, &blob_name, options) + .upload_blob_from_data(data, &config_blob_name, options) .await?; - let blob_name: BackupArchiveName = blob_name.parse()?; let mut guard = manifest.lock().unwrap(); - guard.add_file(&blob_name, stats.size, stats.csum, crypt_mode)?; + guard.add_file(&config_blob_name, stats.size, stats.csum, crypt_mode)?; Ok(0) } @@ -481,7 +478,7 @@ pub(crate) async fn finish_backup( ..UploadOptions::default() }; let stats = client - .upload_blob_from_data(rsa_encrypted_key, &target.to_string(), options) + .upload_blob_from_data(rsa_encrypted_key, target, options) .await?; manifest .lock() @@ -515,11 +512,7 @@ pub(crate) async fn finish_backup( }; client - .upload_blob_from_data( - manifest.into_bytes(), - &MANIFEST_BLOB_NAME.to_string(), - options, - ) + .upload_blob_from_data(manifest.into_bytes(), &MANIFEST_BLOB_NAME, options) .await?; client.finish().await?; diff --git a/submodules/proxmox-backup b/submodules/proxmox-backup index b48af88..5f890fc 160000 --- a/submodules/proxmox-backup +++ b/submodules/proxmox-backup @@ -1 +1 @@ -Subproject commit b48af880bee8c654dff29ec2d64b977e224896bb +Subproject commit 5f890fcb6dc07148c22568ad03bf9c079bcad249 -- 2.47.3