Compare commits

...

3 Commits

Author SHA1 Message Date
Thomas Lamprecht
edc876c58e bump version to 2.0.12-1
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-10-19 10:48:54 +02:00
Wolfgang Bumiller
ac383beb0a bump d/control
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2021-10-19 10:45:23 +02:00
Wolfgang Bumiller
716753f1a8 pbs-tools: drop borrow module
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2021-10-19 10:45:23 +02:00
11 changed files with 20 additions and 67 deletions

View File

@ -1,6 +1,6 @@
[package] [package]
name = "proxmox-backup" name = "proxmox-backup"
version = "2.0.11" version = "2.0.12"
authors = [ authors = [
"Dietmar Maurer <dietmar@proxmox.com>", "Dietmar Maurer <dietmar@proxmox.com>",
"Dominik Csapak <d.csapak@proxmox.com>", "Dominik Csapak <d.csapak@proxmox.com>",

9
debian/changelog vendored
View File

@ -1,3 +1,12 @@
rust-proxmox-backup (2.0.12-1) bullseye; urgency=medium
* proxmox-backup-proxy: clean up old tasks when their reference was rotated
out of the task-log index
* api daemons: fix sending log-reopen command
-- Proxmox Support Team <support@proxmox.com> Tue, 19 Oct 2021 10:48:28 +0200
rust-proxmox-backup (2.0.11-1) bullseye; urgency=medium rust-proxmox-backup (2.0.11-1) bullseye; urgency=medium
* drop aritifical limits for task-UPID length * drop aritifical limits for task-UPID length

3
debian/control vendored
View File

@ -42,6 +42,7 @@ Build-Depends: debhelper (>= 12),
librust-proxmox-0.14+sortable-macro-dev, librust-proxmox-0.14+sortable-macro-dev,
librust-proxmox-acme-rs-0.2+default-dev (>= 0.2.1-~~), librust-proxmox-acme-rs-0.2+default-dev (>= 0.2.1-~~),
librust-proxmox-apt-0.8+default-dev, librust-proxmox-apt-0.8+default-dev,
librust-proxmox-borrow-1+default-dev,
librust-proxmox-fuse-0.1+default-dev (>= 0.1.1-~~), librust-proxmox-fuse-0.1+default-dev (>= 0.1.1-~~),
librust-proxmox-http-0.5+client-dev, librust-proxmox-http-0.5+client-dev,
librust-proxmox-http-0.5+default-dev , librust-proxmox-http-0.5+default-dev ,
@ -50,7 +51,7 @@ Build-Depends: debhelper (>= 12),
librust-proxmox-io-1+tokio-dev, librust-proxmox-io-1+tokio-dev,
librust-proxmox-lang-1+default-dev, librust-proxmox-lang-1+default-dev,
librust-proxmox-openid-0.8+default-dev, librust-proxmox-openid-0.8+default-dev,
librust-proxmox-router-1+cli-dev, librust-proxmox-router-1+cli-dev (>= 1.1.0-~~),
librust-proxmox-schema-1+api-macro-dev, librust-proxmox-schema-1+api-macro-dev,
librust-proxmox-section-config-1+default-dev, librust-proxmox-section-config-1+default-dev,
librust-proxmox-tfa-1+u2f-dev, librust-proxmox-tfa-1+u2f-dev,

View File

@ -1,6 +1,6 @@
[package] [package]
name = "pbs-buildcfg" name = "pbs-buildcfg"
version = "2.0.11" version = "2.0.12"
authors = ["Proxmox Support Team <support@proxmox.com>"] authors = ["Proxmox Support Team <support@proxmox.com>"]
edition = "2018" edition = "2018"
description = "macros used for pbs related paths such as configdir and rundir" description = "macros used for pbs related paths such as configdir and rundir"

View File

@ -26,6 +26,7 @@ pathpatterns = "0.1.2"
pxar = "0.10.1" pxar = "0.10.1"
proxmox = "0.14.0" proxmox = "0.14.0"
proxmox-borrow = "1"
proxmox-io = "1" proxmox-io = "1"
proxmox-lang = "1" proxmox-lang = "1"
proxmox-schema = { version = "1", features = [ "api-macro" ] } proxmox-schema = { version = "1", features = [ "api-macro" ] }

View File

@ -2,7 +2,8 @@ use anyhow::{Error};
use std::sync::Arc; use std::sync::Arc;
use std::io::Read; use std::io::Read;
use pbs_tools::borrow::Tied; use proxmox_borrow::Tied;
use pbs_tools::crypt_config::CryptConfig; use pbs_tools::crypt_config::CryptConfig;
pub struct ChecksumReader<R> { pub struct ChecksumReader<R> {

View File

@ -3,7 +3,8 @@ use std::io::Write;
use anyhow::{Error}; use anyhow::{Error};
use pbs_tools::borrow::Tied; use proxmox_borrow::Tied;
use pbs_tools::crypt_config::CryptConfig; use pbs_tools::crypt_config::CryptConfig;
pub struct ChecksumWriter<W> { pub struct ChecksumWriter<W> {

View File

@ -33,6 +33,7 @@ walkdir = "2"
zstd = { version = "0.6", features = [ "bindgen" ] } zstd = { version = "0.6", features = [ "bindgen" ] }
proxmox = { version = "0.14.0", default-features = false, features = [ "tokio" ] } proxmox = { version = "0.14.0", default-features = false, features = [ "tokio" ] }
proxmox-borrow = "1"
proxmox-io = { version = "1", features = [ "tokio" ] } proxmox-io = { version = "1", features = [ "tokio" ] }
proxmox-lang = { version = "1" } proxmox-lang = { version = "1" }
proxmox-time = { version = "1" } proxmox-time = { version = "1" }

View File

@ -1,59 +0,0 @@
/// This ties two values T and U together, such that T does not move and cannot be used as long as
/// there's an U. This essentially replaces the borrow checker's job for dependent values which
/// need to be stored together in a struct {}, and is similar to what the 'rental' crate produces.
pub struct Tied<T, U: ?Sized>(Option<Box<T>>, Option<Box<U>>);
impl<T, U: ?Sized> Drop for Tied<T, U> {
fn drop(&mut self) {
// let's be explicit about order here!
std::mem::drop(self.1.take());
}
}
impl<T, U: ?Sized> Tied<T, U> {
/// Takes an owner and a function producing the depending value. The owner will be inaccessible
/// until the tied value is resolved. The dependent value is only accessible by reference.
pub fn new<F>(owner: T, producer: F) -> Self
where
F: FnOnce(*mut T) -> Box<U>,
{
let mut owner = Box::new(owner);
let dep = producer(&mut *owner);
Tied(Some(owner), Some(dep))
}
pub fn into_boxed_inner(mut self) -> Box<T> {
self.1 = None;
self.0.take().unwrap()
}
pub fn into_inner(self) -> T {
*self.into_boxed_inner()
}
}
impl<T, U: ?Sized> AsRef<U> for Tied<T, U> {
fn as_ref(&self) -> &U {
self.1.as_ref().unwrap()
}
}
impl<T, U: ?Sized> AsMut<U> for Tied<T, U> {
fn as_mut(&mut self) -> &mut U {
self.1.as_mut().unwrap()
}
}
impl<T, U: ?Sized> std::ops::Deref for Tied<T, U> {
type Target = U;
fn deref(&self) -> &U {
self.as_ref()
}
}
impl<T, U: ?Sized> std::ops::DerefMut for Tied<T, U> {
fn deref_mut(&mut self) -> &mut U {
self.as_mut()
}
}

View File

@ -18,8 +18,7 @@ use nix::sys::stat::Mode;
use regex::Regex; use regex::Regex;
use proxmox::sys::error::SysError; use proxmox::sys::error::SysError;
use proxmox_borrow::Tied;
use crate::borrow::Tied;
pub type DirLockGuard = Dir; pub type DirLockGuard = Dir;

View File

@ -1,6 +1,5 @@
pub mod acl; pub mod acl;
pub mod blocking; pub mod blocking;
pub mod borrow;
pub mod broadcast_future; pub mod broadcast_future;
pub mod cert; pub mod cert;
pub mod cli; pub mod cli;