From: Thomas Lamprecht <t.lamprecht@proxmox.com>
To: pbs-devel@lists.proxmox.com
Subject: [pbs-devel] applied: [PATCH] update dependencies for proxmox and proxmox-backup
Date: Mon, 28 Sep 2020 09:13:00 +0200 [thread overview]
Message-ID: <20200928071300.19887-1-t.lamprecht@proxmox.com> (raw)
drop chrono depedency as proxmox-backup did
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
---
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::<ImageUploadInfo>::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<Utc>,
+ pub backup_time: i64,
pub password: Option<String>,
pub keyfile: Option<std::path::PathBuf>,
pub key_password: Option<String>,
@@ -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
reply other threads:[~2020-09-28 7:13 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200928071300.19887-1-t.lamprecht@proxmox.com \
--to=t.lamprecht@proxmox.com \
--cc=pbs-devel@lists.proxmox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.