update dependencies for proxmox and proxmox-backup

drop chrono depedency as proxmox-backup did

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
Thomas Lamprecht 2020-09-26 12:17:59 +02:00
parent 9de6d63356
commit e410210409
3 changed files with 5 additions and 9 deletions

View File

@ -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" ] }

View File

@ -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()));

View File

@ -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,