Skip to content

Commit a2a6339

Browse files
Merge pull request #1188 from Luap99/msrv
Bump MSRV to v1.77 and bump zbus to v5.5
2 parents d644f62 + 9a3dcaf commit a2a6339

File tree

8 files changed

+43
-40
lines changed

8 files changed

+43
-40
lines changed

.cirrus.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,7 @@ msrv_build_task:
233233
cpu: 2 # Do not increase, will result in scheduling delays
234234
memory: "8Gb"
235235
# When bumping the image always remember to update the README MSRV as well.
236-
image: quay.io/libpod/nv-rust:1.76
236+
image: quay.io/libpod/nv-rust:1.77
237237
script:
238238
- make build
239239

Cargo.lock

Lines changed: 23 additions & 28 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ repository = "https://github.com/containers/netavark"
1111
categories = ["virtualization"]
1212
exclude = ["/.cirrus.yml", "/.github/*", "/hack/*"]
1313
build = "build.rs"
14-
rust-version = "1.76"
14+
rust-version = "1.77"
1515

1616
[package.metadata.vendor-filter]
1717
platforms = ["*-unknown-linux-*"]
@@ -43,7 +43,7 @@ serde-value = "0.7.0"
4343
serde_json = "1.0.136"
4444
sysctl = "0.6.0"
4545
url = "2.5.3"
46-
zbus = { version = "4.3.1" }
46+
zbus = { version = "5.5.0" }
4747
nix = { version = "0.29.0", features = ["sched", "signal", "user"] }
4848
rand = "0.9.0"
4949
sha2 = "0.10.8"

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ Netavark is a tool for configuring networking for Linux containers. Its features
2424

2525
## MSRV (Minimum Supported Rust Version)
2626

27-
v1.76
27+
v1.77
2828

2929
We test that Netavark can be build on this Rust version and on some newer versions.
3030
All newer versions should also build, and if they do not, the issue should be
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Source for quay.io/libpod/nv-rust
22
# This version should always match the MSRV, when you update this also update
33
# the version in the root README.md and Cargo.toml.
4-
FROM docker.io/library/rust:1.76
4+
FROM docker.io/library/rust:1.77
55
RUN apt-get update && apt-get -y install protobuf-compiler libprotobuf-dev

src/commands/firewalld_reload.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ use std::{
33
path::Path,
44
};
55

6-
use zbus::{blocking::Connection, proxy, CacheProperties};
6+
use zbus::{blocking::Connection, proxy, proxy::CacheProperties};
77

88
use crate::{
99
error::{ErrorWrap, NetavarkResult},

src/error/mod.rs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -192,6 +192,14 @@ impl From<zbus::zvariant::Error> for NetavarkError {
192192
}
193193
}
194194

195+
// map the new zvariant::signature::Error to a
196+
// NetavarkError::DbusVariant, like zvariant::Error
197+
impl From<zbus::zvariant::signature::Error> for NetavarkError {
198+
fn from(err: zbus::zvariant::signature::Error) -> NetavarkError {
199+
NetavarkError::DbusVariant(err.into())
200+
}
201+
}
202+
195203
impl From<sysctl::SysctlError> for NetavarkError {
196204
fn from(err: sysctl::SysctlError) -> NetavarkError {
197205
NetavarkError::Sysctl(err)

src/firewall/firewalld.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -191,9 +191,9 @@ impl firewall::FirewallDriver for FirewallD {
191191
))
192192
}
193193
};
194-
let mut port_forwarding_rules: Array = Array::new(sig_ssss);
195-
let mut rich_rules: Array = Array::new(sig_s.clone());
196-
let mut localhost_rich_rules: Array = Array::new(sig_s);
194+
let mut port_forwarding_rules: Array = Array::new(&sig_ssss);
195+
let mut rich_rules: Array = Array::new(&sig_s.clone());
196+
let mut localhost_rich_rules: Array = Array::new(&sig_s);
197197

198198
// Create any necessary port forwarding rule(s) and add them to the
199199
// policy config we grabbed above.
@@ -408,7 +408,7 @@ impl firewall::FirewallDriver for FirewallD {
408408
))
409409
}
410410
};
411-
let mut port_forwarding_rules = Array::new(sig);
411+
let mut port_forwarding_rules = Array::new(&sig);
412412

413413
let ipv4 = teardown_pf.config.container_ip_v4.map(|i| i.to_string());
414414
let ipv6 = teardown_pf.config.container_ip_v6.map(|i| i.to_string());
@@ -481,7 +481,7 @@ impl firewall::FirewallDriver for FirewallD {
481481
))
482482
}
483483
};
484-
let mut new_rich_rules = Array::new(sig);
484+
let mut new_rich_rules = Array::new(&sig);
485485

486486
let ipv4 = teardown_pf.config.container_ip_v4.map(|i| i.to_string());
487487
let ipv6 = teardown_pf.config.container_ip_v6.map(|i| i.to_string());
@@ -564,7 +564,7 @@ impl firewall::FirewallDriver for FirewallD {
564564
))
565565
}
566566
};
567-
let mut new_rich_rules = Array::new(sig);
567+
let mut new_rich_rules = Array::new(&sig);
568568

569569
let ipv4 = teardown_pf.config.container_ip_v4.map(|i| i.to_string());
570570

0 commit comments

Comments
 (0)