diff --git a/Cargo.lock b/Cargo.lock index 54710f0f9..6b5a0afe7 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -226,18 +226,6 @@ dependencies = [ "pin-project-lite", ] -[[package]] -name = "async-channel" -version = "2.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "89b47800b0be77592da0afd425cc03468052844aff33b84e33cc696f64e77b6a" -dependencies = [ - "concurrent-queue", - "event-listener-strategy", - "futures-core", - "pin-project-lite", -] - [[package]] name = "async-compression" version = "0.4.23" @@ -255,69 +243,6 @@ dependencies = [ "zstd-safe", ] -[[package]] -name = "async-executor" -version = "1.13.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bb812ffb58524bdd10860d7d974e2f01cc0950c2438a74ee5ec2e2280c6c4ffa" -dependencies = [ - "async-task", - "concurrent-queue", - "fastrand", - "futures-lite", - "pin-project-lite", - "slab", -] - -[[package]] -name = "async-io" -version = "2.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "43a2b323ccce0a1d90b449fd71f2a06ca7faa7c54c2751f06c9bd851fc061059" -dependencies = [ - "async-lock", - "cfg-if", - "concurrent-queue", - "futures-io", - "futures-lite", - "parking", - "polling", - "rustix 0.38.44", - "slab", - "tracing", - "windows-sys 0.59.0", -] - -[[package]] -name = "async-lock" -version = "3.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ff6e472cdea888a4bd64f342f09b3f50e1886d32afe8df3d663c01140b811b18" -dependencies = [ - "event-listener", - "event-listener-strategy", - "pin-project-lite", -] - -[[package]] -name = "async-process" -version = "2.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "63255f1dc2381611000436537bbedfe83183faa303a5a0edaf191edef06526bb" -dependencies = [ - "async-channel", - "async-io", - "async-lock", - "async-signal", - "async-task", - "blocking", - "cfg-if", - "event-listener", - "futures-lite", - "rustix 0.38.44", - "tracing", -] - [[package]] name = "async-recursion" version = "1.1.1" @@ -329,24 +254,6 @@ dependencies = [ "syn", ] -[[package]] -name = "async-signal" -version = "0.2.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "637e00349800c0bdf8bfc21ebbc0b6524abea702b0da4168ac00d070d0c0b9f3" -dependencies = [ - "async-io", - "async-lock", - "atomic-waker", - "cfg-if", - "futures-core", - "futures-io", - "rustix 0.38.44", - "signal-hook-registry", - "slab", - "windows-sys 0.59.0", -] - [[package]] name = "async-stream" version = "0.3.6" @@ -369,12 +276,6 @@ dependencies = [ "syn", ] -[[package]] -name = "async-task" -version = "4.7.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8b75356056920673b02621b35afd0f7dda9306d03c79a30f5c56c44cf256e3de" - [[package]] name = "async-trait" version = "0.1.88" @@ -612,19 +513,6 @@ dependencies = [ "generic-array 0.14.7", ] -[[package]] -name = "blocking" -version = "1.6.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "703f41c54fc768e63e091340b424302bb1c29ef4aa0c7f10fe849dfb114d29ea" -dependencies = [ - "async-channel", - "async-task", - "futures-io", - "futures-lite", - "piper", -] - [[package]] name = "bon" version = "3.6.3" @@ -1892,12 +1780,6 @@ version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea" -[[package]] -name = "hermit-abi" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fbf6a919d6cf397374f7dfeeea91d974c7c0a7221d0d0f4f20d859d329e53fcc" - [[package]] name = "hex" version = "0.4.3" @@ -2647,10 +2529,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "13dc2df351e3202783a1fe0d44375f7295ffb4049267b0f3018346dc122a1d94" [[package]] -name = "logind-zbus" +name = "logind-zbus-tokio" version = "5.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8adb500c73297d66c7c23ca3436600ea8c5d704f82eb3c65e1373689be965de7" +checksum = "d00713d3a86045e9327a15e8ec5d95887cf28a56b7d70d2698369a00c7655258" dependencies = [ "serde", "zbus", @@ -3339,7 +3221,7 @@ dependencies = [ name = "oma-utils" version = "0.11.2" dependencies = [ - "logind-zbus", + "logind-zbus-tokio", "number_prefix", "oma-console", "os-release", @@ -3555,17 +3437,6 @@ version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" -[[package]] -name = "piper" -version = "0.2.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "96c8c490f422ef9a4efd2cb5b42b76c8613d7e7dfc1caf667b8a3350a5acc066" -dependencies = [ - "atomic-waker", - "fastrand", - "futures-io", -] - [[package]] name = "pkg-config" version = "0.3.32" @@ -3585,21 +3456,6 @@ dependencies = [ "miniz_oxide", ] -[[package]] -name = "polling" -version = "3.7.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a604568c3202727d1507653cb121dbd627a58684eb09a820fd746bee38b4442f" -dependencies = [ - "cfg-if", - "concurrent-queue", - "hermit-abi", - "pin-project-lite", - "rustix 0.38.44", - "tracing", - "windows-sys 0.59.0", -] - [[package]] name = "portable-atomic" version = "1.11.0" @@ -6091,14 +5947,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2522b82023923eecb0b366da727ec883ace092e7887b61d3da5139f26b44da58" dependencies = [ "async-broadcast", - "async-executor", - "async-io", - "async-lock", - "async-process", "async-recursion", - "async-task", "async-trait", - "blocking", "enumflags2", "event-listener", "futures-core", diff --git a/oma-pm/Cargo.toml b/oma-pm/Cargo.toml index 42f87ceba..8ab8fb457 100644 --- a/oma-pm/Cargo.toml +++ b/oma-pm/Cargo.toml @@ -29,7 +29,7 @@ oma-console = { version = "^0.28.0", path = "../oma-console", default-features = fs4 = "0.13" tracing = "0.1" oma-pm-operation-type = { version = "0.9", path = "../oma-pm-operation-type" } -zbus = { version = "5.1", features = ["tokio"] } +zbus = { version = "5.1", default-features = false, features = ["tokio"] } cxx = "1.0.121" ahash = "0.8.11" bon = "3" diff --git a/oma-pm/src/apt.rs b/oma-pm/src/apt.rs index de8738eb7..19c9abd93 100644 --- a/oma-pm/src/apt.rs +++ b/oma-pm/src/apt.rs @@ -36,7 +36,7 @@ use tracing::{debug, error}; use tracing::warn; pub use oma_pm_operation_type::*; -use zbus::Connection; +use oma_utils::zbus::Connection; use crate::{ commit::{CommitNetworkConfig, DoInstall}, diff --git a/oma-pm/src/progress.rs b/oma-pm/src/progress.rs index 00bb77652..9a499121c 100644 --- a/oma-pm/src/progress.rs +++ b/oma-pm/src/progress.rs @@ -1,5 +1,6 @@ use crate::{apt::AptConfig, dbus::change_status}; use oma_apt::progress::DynInstallProgress; +use oma_utils::zbus; use once_cell::sync::OnceCell; use tokio::runtime::Runtime; use zbus::Connection; diff --git a/oma-utils/Cargo.toml b/oma-utils/Cargo.toml index af8c48a5e..a6ef30673 100644 --- a/oma-utils/Cargo.toml +++ b/oma-utils/Cargo.toml @@ -14,14 +14,14 @@ os-release = "0.1" oma-console = { version = "^0.28", path = "../oma-console", optional = true, default-features = false, features = [ "print", ] } -zbus = { version = "5.1", optional = true } +zbus = { version = "5.1", optional = true, default-features = false, features = ["tokio"] } url-escape = { version = "0.1", optional = true } tracing = "0.1" -logind-zbus = "5.1" +logind-zbus = { version = "5.1", optional = true, default-features = false, features = ["tokio"], package = "logind-zbus-tokio" } [features] dpkg = [] -human-bytes = ["number_prefix"] -dbus = ["zbus"] +human-bytes = ["dep:number_prefix"] +dbus = ["dep:zbus", "dep:logind-zbus"] oma = ["dep:oma-console"] -url-no-escape = ["url-escape"] +url-no-escape = ["dep:url-escape"]