Hello, I have attached a patch, it builds correctly on my end.
Best regards, Simon Quigley [email protected]
diff -Nru netavark-1.17.2/debian/changelog netavark-1.17.2/debian/changelog --- netavark-1.17.2/debian/changelog 2026-09-14 10:55:29.000000000 -0500 +++ netavark-1.17.2/debian/changelog 2026-11-28 12:36:27.000000000 -0600 @@ -1,3 +1,10 @@ +netavark (1.17.2-3.1) unstable; urgency=medium + + * Non-maintainer upload. + * Port to zbus 6 (Closes: #1155352). + + -- Simon Quigley <[email protected]> Sat, 28 Nov 2026 12:36:27 -0600 + netavark (1.17.2-3) unstable; urgency=medium * debian/watch: use version 5 diff -Nru netavark-1.17.2/debian/control netavark-1.17.2/debian/control --- netavark-1.17.2/debian/control 2026-09-14 10:55:29.000000000 -0500 +++ netavark-1.17.2/debian/control 2026-11-28 12:35:58.000000000 -0600 @@ -52,7 +52,7 @@ librust-tonic-prost-build-0.14+default-dev (>= 0.14.2), librust-tower-0.5+default-dev (>= 0.5.2), librust-tower-0.5+util-dev (>= 0.5.2), - librust-zbus-5+default-dev (>= 5.12.0), + librust-zbus-6+default-dev, libstd-rust-dev, rustc:native (>= 1.86) <!nocheck> Build-Conflicts: librust-zbus-1-dev diff -Nru netavark-1.17.2/debian/patches/series netavark-1.17.2/debian/patches/series --- netavark-1.17.2/debian/patches/series 2026-09-14 10:55:29.000000000 -0500 +++ netavark-1.17.2/debian/patches/series 2026-11-28 12:35:40.000000000 -0600 @@ -2,3 +2,4 @@ 0004-Relax-dependency-on-clap.patch 0012-Relax-dependency-on-Rand.patch 0006-Compile-against-netlink-packet-route-0.28.patch +zbus-6.patch diff -Nru netavark-1.17.2/debian/patches/zbus-6.patch netavark-1.17.2/debian/patches/zbus-6.patch --- netavark-1.17.2/debian/patches/zbus-6.patch 1969-12-31 18:00:00.000000000 -0600 +++ netavark-1.17.2/debian/patches/zbus-6.patch 2026-11-28 12:36:13.000000000 -0600 @@ -0,0 +1,252 @@ +Description: Port to zbus 6. + Upstream commit ef11974ccb rewrites the firewall driver and does not + apply onto 1.17.2, so drive the async API with zbus::block_on. +Author: Simon Quigley <[email protected]> +Origin: vendor +Forwarded: not-needed +Reviewed-by: Simon Quigley <[email protected]> +Last-Update: 2026-11-27 +--- +--- a/Cargo.toml ++++ b/Cargo.toml +@@ -42,7 +42,7 @@ libc = "0.2.157" + log = "0.4.28" + serde = { version = "1.0.228", features = ["derive"] } + serde_json = "1.0.145" +-zbus = { version = "5.12.0" } ++zbus = { version = "6" } + nix = { version = "0.30.1", features = ["net", "sched", "signal", "socket", "user"] } + rand = "0.8.5" + sha2 = "0.10.9" +--- a/src/commands/firewall_reload.rs ++++ b/src/commands/firewall_reload.rs +@@ -7,7 +7,7 @@ use std::{ + ffi::{OsStr, OsString}, + path::Path, + }; +-use zbus::blocking::Connection; ++use crate::firewall::Connection; + + pub fn firewall_reload(config_dir: Option<OsString>) -> NetavarkResult<()> { + // Set the path to the directory where Podman stores the container network state. +--- a/src/commands/firewalld_reload.rs ++++ b/src/commands/firewalld_reload.rs +@@ -3,7 +3,10 @@ use std::{ + path::Path, + }; + +-use zbus::{blocking::Connection, proxy, proxy::CacheProperties}; ++use futures_util::StreamExt; ++use zbus::{proxy, proxy::CacheProperties}; ++ ++use crate::firewall::Connection; + + use crate::{ + error::{ErrorWrap, NetavarkResult}, +@@ -29,9 +32,12 @@ pub fn listen(config_dir: Option<OsStrin + log::debug!("looking for firewall configs in {config_dir:?}"); + + let conn = Connection::system()?; +- let proxy = FirewallDDbusProxyBlocking::builder(&conn) +- .cache_properties(CacheProperties::No) +- .build()?; ++ let proxy = zbus::block_on( ++ FirewallDDbusProxy::builder(conn.inner()) ++ .cache_properties(CacheProperties::No) ++ .build(), ++ )?; ++ let mut signals = zbus::block_on(proxy.0.receive_signal(SIGNAL_NAME))?; + + let conn_option = Some(conn); + +@@ -42,7 +48,7 @@ pub fn listen(config_dir: Option<OsStrin + reload_rules(config_dir, &conn_option); + + // This loops forever until the process is killed or there is some dbus error. +- for _ in proxy.0.receive_signal(SIGNAL_NAME)? { ++ while zbus::block_on(signals.next()).is_some() { + log::debug!("got firewalld {SIGNAL_NAME} signal"); + reload_rules(config_dir, &conn_option); + } +--- a/src/firewall/firewalld.rs ++++ b/src/firewall/firewalld.rs +@@ -8,10 +8,8 @@ use log::{debug, info, warn}; + use std::collections::HashMap; + use std::net::IpAddr; + use std::vec::Vec; +-use zbus::{ +- blocking::Connection, +- zvariant::{Array, OwnedValue, Signature, Value}, +-}; ++use super::Connection; ++use zbus::zvariant::{Array, OwnedValue, Signature, Value}; + + const ZONENAME: &str = "netavark_zone"; + const POLICYNAME: &str = "netavark_policy"; +--- a/src/firewall/fwnone.rs ++++ b/src/firewall/fwnone.rs +@@ -19,7 +19,7 @@ impl firewall::FirewallDriver for Fwnone + fn setup_network( + &self, + _network_setup: SetupNetwork, +- _dbus_conn: &Option<zbus::blocking::Connection>, ++ _dbus_conn: &Option<super::Connection>, + ) -> NetavarkResult<()> { + Ok(()) + } +@@ -33,7 +33,7 @@ impl firewall::FirewallDriver for Fwnone + fn setup_port_forward( + &self, + _setup_portfw: PortForwardConfig, +- _dbus_conn: &Option<zbus::blocking::Connection>, ++ _dbus_conn: &Option<super::Connection>, + ) -> NetavarkResult<()> { + Ok(()) + } +--- a/src/firewall/iptables.rs ++++ b/src/firewall/iptables.rs +@@ -44,7 +44,7 @@ impl firewall::FirewallDriver for Iptabl + fn setup_network( + &self, + network_setup: SetupNetwork, +- dbus_con: &Option<zbus::blocking::Connection>, ++ dbus_con: &Option<super::Connection>, + ) -> NetavarkResult<()> { + if let Some(subnet) = network_setup.subnets { + for network in subnet { +@@ -118,7 +118,7 @@ impl firewall::FirewallDriver for Iptabl + fn setup_port_forward( + &self, + setup_portfw: PortForwardConfig, +- dbus_con: &Option<zbus::blocking::Connection>, ++ dbus_con: &Option<super::Connection>, + ) -> NetavarkResult<()> { + firewalld::check_can_forward_ports(dbus_con, &setup_portfw)?; + +--- a/src/firewall/mod.rs ++++ b/src/firewall/mod.rs +@@ -3,7 +3,51 @@ use crate::network::internal_types::{ + PortForwardConfig, SetupNetwork, TearDownNetwork, TeardownPortForward, + }; + use log::{debug, info}; +-use zbus::blocking::Connection; ++ ++/// Synchronous wrapper around a zbus 6 connection. ++/// ++/// zbus 6 has no blocking connection. Each call drives the async API with ++/// `zbus::block_on`. ++#[derive(Clone)] ++pub struct Connection(zbus::Connection); ++ ++impl Connection { ++ pub fn system() -> zbus::Result<Self> { ++ Ok(Self(zbus::block_on(zbus::Connection::system())?)) ++ } ++ ++ pub fn inner(&self) -> &zbus::Connection { ++ &self.0 ++ } ++ ++ pub fn call_method<'d, 'p, 'i, 'm, D, P, I, M, B>( ++ &self, ++ destination: Option<D>, ++ path: P, ++ interface: Option<I>, ++ method_name: M, ++ body: &B, ++ ) -> zbus::Result<zbus::Message> ++ where ++ D: TryInto<zbus::names::BusName<'d>>, ++ P: TryInto<zbus::ObjectPath<'p>>, ++ I: TryInto<zbus::names::InterfaceName<'i>>, ++ M: TryInto<zbus::names::MemberName<'m>>, ++ D::Error: Into<zbus::Error>, ++ P::Error: Into<zbus::Error>, ++ I::Error: Into<zbus::Error>, ++ M::Error: Into<zbus::Error>, ++ B: serde::Serialize + zbus::DynamicType, ++ { ++ zbus::block_on(self.0.call_method( ++ destination, ++ path, ++ interface, ++ method_name, ++ body, ++ )) ++ } ++} + + pub mod firewalld; + pub mod fwnone; +@@ -24,7 +68,7 @@ pub trait FirewallDriver { + fn setup_network( + &self, + network_setup: SetupNetwork, +- dbus_con: &Option<zbus::blocking::Connection>, ++ dbus_con: &Option<Connection>, + ) -> NetavarkResult<()>; + /// Tear down firewall rules for the given network. + fn teardown_network(&self, tear: TearDownNetwork) -> NetavarkResult<()>; +@@ -33,7 +77,7 @@ pub trait FirewallDriver { + fn setup_port_forward( + &self, + setup_pw: PortForwardConfig, +- dbus_con: &Option<zbus::blocking::Connection>, ++ dbus_con: &Option<Connection>, + ) -> NetavarkResult<()>; + /// Tear down port-forwarding firewall rules for a single container. + fn teardown_port_forward(&self, teardown_pf: TeardownPortForward) -> NetavarkResult<()>; +--- a/src/firewall/nft.rs ++++ b/src/firewall/nft.rs +@@ -55,7 +55,7 @@ impl firewall::FirewallDriver for Nftabl + fn setup_network( + &self, + network_setup: internal_types::SetupNetwork, +- dbus_conn: &Option<zbus::blocking::Connection>, ++ dbus_conn: &Option<super::Connection>, + ) -> NetavarkResult<()> { + let mut batch = Batch::new(); + +@@ -576,7 +576,7 @@ impl firewall::FirewallDriver for Nftabl + fn setup_port_forward( + &self, + setup_portfw: internal_types::PortForwardConfig, +- dbus_conn: &Option<zbus::blocking::Connection>, ++ dbus_conn: &Option<super::Connection>, + ) -> NetavarkResult<()> { + firewalld::check_can_forward_ports(dbus_conn, &setup_portfw)?; + +--- a/src/network/bridge.rs ++++ b/src/network/bridge.rs +@@ -517,7 +517,7 @@ impl<'a> Bridge<'a> { + )?; + } + +- let system_dbus = zbus::blocking::Connection::system().ok(); ++ let system_dbus = crate::firewall::Connection::system().ok(); + + self.info.firewall.setup_network(sn, &system_dbus)?; + +--- a/src/error/mod.rs ++++ b/src/error/mod.rs +@@ -180,17 +180,11 @@ impl From<zbus::Error> for NetavarkError + } + } + +-impl From<zbus::zvariant::Error> for NetavarkError { +- fn from(err: zbus::zvariant::Error) -> NetavarkError { +- NetavarkError::DbusVariant(err) +- } +-} +- +-// map the new zvariant::signature::Error to a +-// NetavarkError::DbusVariant, like zvariant::Error ++// zbus 6 merged zvariant::Error into zbus::Error, so the old ++// From<zvariant::Error> impl is the same trait impl as above. + impl From<zbus::zvariant::signature::Error> for NetavarkError { + fn from(err: zbus::zvariant::signature::Error) -> NetavarkError { +- NetavarkError::DbusVariant(err.into()) ++ NetavarkError::Dbus(err.into()) + } + } +
OpenPGP_signature.asc
Description: OpenPGP digital signature

