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 C189D6185E for ; Mon, 28 Sep 2020 09:13:42 +0200 (CEST) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id AFB2E2A223 for ; Mon, 28 Sep 2020 09:13:12 +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) server-digest SHA256) (No client certificate requested) by firstgate.proxmox.com (Proxmox) with ESMTPS id 56D162A218 for ; Mon, 28 Sep 2020 09:13:11 +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 1B4E345803 for ; Mon, 28 Sep 2020 09:13:11 +0200 (CEST) From: Thomas Lamprecht To: pbs-devel@lists.proxmox.com Date: Mon, 28 Sep 2020 09:13:00 +0200 Message-Id: <20200928071300.19887-1-t.lamprecht@proxmox.com> X-Mailer: git-send-email 2.27.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-SPAM-LEVEL: Spam detection results: 0 AWL -0.173 Adjusted score from AWL reputation of From: address KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment 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 Subject: [pbs-devel] applied: [PATCH] update dependencies for proxmox and proxmox-backup X-BeenThere: pbs-devel@lists.proxmox.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Proxmox Backup Server development discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Sep 2020 07:13:42 -0000 drop chrono depedency as proxmox-backup did Signed-off-by: Thomas Lamprecht --- Cargo.toml | 5 ++--- src/backup.rs | 2 +- src/lib.rs | 7 ++----- 3 files changed, 5 insertions(+), 9 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 0a3bc3c..043ae96 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -17,15 +17,14 @@ cbindgen = "0.14.2" [dependencies] anyhow = "1.0" bytes = "0.5" -chrono = "0.4" # Date and time library for Rust futures = "0.3" h2 = { version = "0.2", features = ["stream"] } lazy_static = "1.4" libc = "0.2" once_cell = "1.3.1" openssl = "0.10" -proxmox = { version = "0.3.5", features = [ "sortable-macro", "api-macro" ] } -proxmox-backup = { git = "git://git.proxmox.com/git/proxmox-backup.git", tag = "v0.8.16" } +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-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 aa65239..9f8a240 100644 --- a/src/backup.rs +++ b/src/backup.rs @@ -59,7 +59,7 @@ impl BackupTask { let (abort, _) = tokio::sync::broadcast::channel(16); - let snapshot = BackupDir::new(&setup.backup_type, &setup.backup_id, setup.backup_time.timestamp())?; + let snapshot = BackupDir::new(&setup.backup_type, &setup.backup_id, setup.backup_time)?; let manifest = Arc::new(Mutex::new(BackupManifest::new(snapshot))); let registry = Arc::new(Mutex::new(Registry::::new())); diff --git a/src/lib.rs b/src/lib.rs index 67f2fe9..08cac4c 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -10,7 +10,6 @@ use proxmox::try_block; use proxmox_backup::api2::types::Userid; use proxmox_backup::backup::{CryptMode, BackupDir}; use proxmox_backup::client::BackupRepository; -use chrono::{DateTime, Utc, TimeZone}; mod capi_types; use capi_types::*; @@ -120,7 +119,7 @@ pub(crate) struct BackupSetup { pub chunk_size: u64, pub backup_type: String, pub backup_id: String, - pub backup_time: DateTime, + pub backup_time: i64, pub password: Option, pub keyfile: Option, pub key_password: Option, @@ -209,8 +208,6 @@ pub extern "C" fn proxmox_backup_new( let backup_id = tools::utf8_c_string(backup_id)? .ok_or_else(|| format_err!("backup_id must not be NULL"))?; - let backup_time = Utc.timestamp(backup_time as i64, 0); - let password = tools::utf8_c_string(password)?; let keyfile = tools::utf8_c_string(keyfile)?.map(std::path::PathBuf::from); let key_password = tools::utf8_c_string(key_password)?; @@ -230,7 +227,7 @@ pub extern "C" fn proxmox_backup_new( backup_type: String::from("vm"), backup_id, password, - backup_time, + backup_time: backup_time as i64, keyfile, key_password, fingerprint, -- 2.27.0