From 97fd3a0a14d9fe9fb27990e1e57622081743f578 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fabian=20Gr=C3=BCnbichler?= Date: Thu, 2 Jun 2022 14:08:06 +0200 Subject: [PATCH] sys: feature-gate logrotate (and zstd) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit it's not needed everywhere we pull in proxmox-sys. Signed-off-by: Fabian Grünbichler --- proxmox-sys/Cargo.toml | 3 ++- proxmox-sys/src/lib.rs | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/proxmox-sys/Cargo.toml b/proxmox-sys/Cargo.toml index cc7934e3..fa795016 100644 --- a/proxmox-sys/Cargo.toml +++ b/proxmox-sys/Cargo.toml @@ -18,7 +18,7 @@ nix = "0.24.1" regex = "1.2" serde_json = "1.0" serde = { version = "1.0", features = [ "derive" ] } -zstd = { version = "0.6", features = [ "bindgen" ] } +zstd = { version = "0.6", features = [ "bindgen" ], optional = true} # Macro crates: proxmox-sortable-macro = { path = "../proxmox-sortable-macro", optional = true, version = "0.1.2" } @@ -31,3 +31,4 @@ proxmox-time = { path = "../proxmox-time", version = "1.0.0" } [features] default = [] sortable-macro = ["proxmox-sortable-macro"] +logrotate = ["zstd"] \ No newline at end of file diff --git a/proxmox-sys/src/lib.rs b/proxmox-sys/src/lib.rs index 1e21ea60..180f2d3c 100644 --- a/proxmox-sys/src/lib.rs +++ b/proxmox-sys/src/lib.rs @@ -7,6 +7,7 @@ pub mod error; pub mod fd; pub mod fs; pub mod linux; +#[cfg(feature = "logrotate")] pub mod logrotate; pub mod macros; pub mod mmap;