From b843c2a6fa73b224a10ce3f3017c8207cbab83e2 Mon Sep 17 00:00:00 2001 From: Jorik Cronenberg Date: Wed, 25 Mar 2026 12:42:22 +0100 Subject: [PATCH] Make curl dependency for agama-network optional via feature Due to a dependency chain agama-network pulls in curl via agama-network -> agama-utils -> agama-transfer -> curl. With this comes a dependency on openssl which unfortunately for wicked2nm is a problem, because it fails to build on older SLE 15 SPs. To circumvent this I added a default feature that excludes the affected parts from agama-network so it doesn't depend on agama-transfer. This should have no actual impact on agama itself. --- rust/agama-network/Cargo.toml | 2 +- rust/agama-utils/Cargo.toml | 6 +++++- rust/agama-utils/src/api.rs | 5 +++++ 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/rust/agama-network/Cargo.toml b/rust/agama-network/Cargo.toml index 635f119306..56fbe052c6 100644 --- a/rust/agama-network/Cargo.toml +++ b/rust/agama-network/Cargo.toml @@ -5,7 +5,7 @@ rust-version.workspace = true edition.workspace = true [dependencies] -agama-utils = { path = "../agama-utils" } +agama-utils = { path = "../agama-utils", default-features = false } anyhow = "1.0.98" async-trait = "0.1.88" cidr = { version = "0.3.1", features = ["serde"] } diff --git a/rust/agama-utils/Cargo.toml b/rust/agama-utils/Cargo.toml index a8758816b7..1df57b40f7 100644 --- a/rust/agama-utils/Cargo.toml +++ b/rust/agama-utils/Cargo.toml @@ -4,9 +4,13 @@ version = "0.1.0" rust-version.workspace = true edition.workspace = true +[features] +default = ["curl"] +curl = ["dep:agama-transfer"] + [dependencies] agama-locale-data = { path = "../agama-locale-data" } -agama-transfer = { path = "../agama-transfer" } +agama-transfer = { path = "../agama-transfer", optional = true } async-trait = "0.1.89" camino = "1.2.1" serde = { version = "1.0.228", features = ["derive"] } diff --git a/rust/agama-utils/src/api.rs b/rust/agama-utils/src/api.rs index 194555cd33..e424d87af7 100644 --- a/rust/agama-utils/src/api.rs +++ b/rust/agama-utils/src/api.rs @@ -39,13 +39,17 @@ pub use issue::{Issue, IssueMap, IssueWithScope}; mod system_info; pub use system_info::SystemInfo; +#[cfg(feature = "curl")] pub mod config; +#[cfg(feature = "curl")] pub use config::Config; mod raw_config; pub use raw_config::RawConfig; +#[cfg(feature = "curl")] pub mod patch; +#[cfg(feature = "curl")] pub use patch::Patch; mod proposal; @@ -55,6 +59,7 @@ mod action; pub use {action::Action, action::FinishMethod}; pub mod bootloader; +#[cfg(feature = "curl")] pub mod files; pub mod hostname; pub mod iscsi;