From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from firstgate.proxmox.com (firstgate.proxmox.com [212.224.123.68]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by lists.proxmox.com (Postfix) with ESMTPS id 82BCC6180B for ; Wed, 21 Oct 2020 13:50:00 +0200 (CEST) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id 70C1D17A8C for ; Wed, 21 Oct 2020 13:50:00 +0200 (CEST) Received: from proxmox-new.maurer-it.com (proxmox-new.maurer-it.com [212.186.127.180]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by firstgate.proxmox.com (Proxmox) with ESMTPS id 0760117A7F for ; Wed, 21 Oct 2020 13:49:57 +0200 (CEST) Received: from proxmox-new.maurer-it.com (localhost.localdomain [127.0.0.1]) by proxmox-new.maurer-it.com (Proxmox) with ESMTP id BAC2245E93 for ; Wed, 21 Oct 2020 13:49:56 +0200 (CEST) From: =?UTF-8?q?Fabian=20Gr=C3=BCnbichler?= To: pve-devel@lists.proxmox.com Date: Wed, 21 Oct 2020 13:49:50 +0200 Message-Id: <20201021114951.3006517-1-f.gruenbichler@proxmox.com> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-SPAM-LEVEL: Spam detection results: 0 AWL -0.220 Adjusted score from AWL reputation of From: address KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment KAM_NUMSUBJECT 0.5 Subject ends in numbers excluding current years 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 URIBL_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to URIBL was blocked. See http://wiki.apache.org/spamassassin/DnsBlocklists#dnsbl-block for more information. [lib.rs, restore.rs, proxmox.com, backup.rs] Subject: [pve-devel] [PATCH proxmox-backup-qemu 1/2] update to proxmox-backup 0.9.1 X-BeenThere: pve-devel@lists.proxmox.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Proxmox VE development discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Oct 2020 11:50:00 -0000 and pass along any port set in the repository string Signed-off-by: Fabian Grünbichler --- Note: to switch to current proxmox 0.5.0, proxmox-backup needs to be bumped first.. no changes are needed in proxmox-backup-qemu to build with current master. Cargo.toml | 4 ++-- src/backup.rs | 2 +- src/lib.rs | 3 +++ src/restore.rs | 2 +- 4 files changed, 7 insertions(+), 4 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 043ae96..d51ba93 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -23,8 +23,8 @@ lazy_static = "1.4" libc = "0.2" once_cell = "1.3.1" openssl = "0.10" -proxmox = { version = "0.4.1", features = [ "sortable-macro", "api-macro" ] } -proxmox-backup = { git = "git://git.proxmox.com/git/proxmox-backup.git", tag = "v0.8.21" } +proxmox = { version = "0.4.3", features = [ "sortable-macro", "api-macro" ] } +proxmox-backup = { git = "git://git.proxmox.com/git/proxmox-backup.git", tag = "v0.9.1" } #proxmox-backup = { path = "../proxmox-backup" } serde_json = "1.0" tokio = { version = "0.2.9", features = [ "blocking", "fs", "io-util", "macros", "rt-threaded", "signal", "stream", "tcp", "time", "uds" ] } diff --git a/src/backup.rs b/src/backup.rs index 9f8a240..7945575 100644 --- a/src/backup.rs +++ b/src/backup.rs @@ -112,7 +112,7 @@ impl BackupTask { .fingerprint(self.setup.fingerprint.clone()) .password(self.setup.password.clone()); - let http = HttpClient::new(&self.setup.host, &self.setup.user, options)?; + let http = HttpClient::new(&self.setup.host, self.setup.port, &self.setup.user, options)?; let writer = BackupWriter::start( http, self.crypt_config.clone(), &self.setup.store, "vm", &self.setup.backup_id, self.setup.backup_time, false, false).await?; diff --git a/src/lib.rs b/src/lib.rs index 08cac4c..b9ca905 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -114,6 +114,7 @@ pub extern "C" fn proxmox_backup_snapshot_string( #[derive(Clone)] pub(crate) struct BackupSetup { pub host: String, + pub port: u16, pub store: String, pub user: Userid, pub chunk_size: u64, @@ -221,6 +222,7 @@ pub extern "C" fn proxmox_backup_new( let setup = BackupSetup { host: repo.host().to_owned(), + port: repo.port(), user: repo.user().to_owned(), store: repo.store().to_owned(), chunk_size: if chunk_size > 0 { chunk_size } else { PROXMOX_BACKUP_DEFAULT_CHUNK_SIZE }, @@ -693,6 +695,7 @@ pub extern "C" fn proxmox_restore_new( let setup = BackupSetup { host: repo.host().to_owned(), + port: repo.port(), user: repo.user().to_owned(), store: repo.store().to_owned(), chunk_size: PROXMOX_BACKUP_DEFAULT_CHUNK_SIZE, // not used by restore diff --git a/src/restore.rs b/src/restore.rs index fb779ca..4387025 100644 --- a/src/restore.rs +++ b/src/restore.rs @@ -80,7 +80,7 @@ impl RestoreTask { .fingerprint(self.setup.fingerprint.clone()) .password(self.setup.password.clone()); - let http = HttpClient::new(&self.setup.host, &self.setup.user, options)?; + let http = HttpClient::new(&self.setup.host, self.setup.port, &self.setup.user, options)?; let client = BackupReader::start( http, self.crypt_config.clone(), -- 2.20.1