Skip to content

Commit

Permalink
Merge pull request #1188 from Luap99/msrv
Browse files Browse the repository at this point in the history
Bump MSRV to v1.77 and bump zbus to v5.5
  • Loading branch information
openshift-merge-bot[bot] authored Feb 24, 2025
2 parents d644f62 + 9a3dcaf commit a2a6339
Show file tree
Hide file tree
Showing 8 changed files with 43 additions and 40 deletions.
2 changes: 1 addition & 1 deletion .cirrus.yml
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ msrv_build_task:
cpu: 2 # Do not increase, will result in scheduling delays
memory: "8Gb"
# When bumping the image always remember to update the README MSRV as well.
image: quay.io/libpod/nv-rust:1.76
image: quay.io/libpod/nv-rust:1.77
script:
- make build

Expand Down
51 changes: 23 additions & 28 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ repository = "https://github.com/containers/netavark"
categories = ["virtualization"]
exclude = ["/.cirrus.yml", "/.github/*", "/hack/*"]
build = "build.rs"
rust-version = "1.76"
rust-version = "1.77"

[package.metadata.vendor-filter]
platforms = ["*-unknown-linux-*"]
Expand Down Expand Up @@ -43,7 +43,7 @@ serde-value = "0.7.0"
serde_json = "1.0.136"
sysctl = "0.6.0"
url = "2.5.3"
zbus = { version = "4.3.1" }
zbus = { version = "5.5.0" }
nix = { version = "0.29.0", features = ["sched", "signal", "user"] }
rand = "0.9.0"
sha2 = "0.10.8"
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ Netavark is a tool for configuring networking for Linux containers. Its features

## MSRV (Minimum Supported Rust Version)

v1.76
v1.77

We test that Netavark can be build on this Rust version and on some newer versions.
All newer versions should also build, and if they do not, the issue should be
Expand Down
2 changes: 1 addition & 1 deletion contrib/container_images/Dockerfile.Rust
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Source for quay.io/libpod/nv-rust
# This version should always match the MSRV, when you update this also update
# the version in the root README.md and Cargo.toml.
FROM docker.io/library/rust:1.76
FROM docker.io/library/rust:1.77
RUN apt-get update && apt-get -y install protobuf-compiler libprotobuf-dev
2 changes: 1 addition & 1 deletion src/commands/firewalld_reload.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ use std::{
path::Path,
};

use zbus::{blocking::Connection, proxy, CacheProperties};
use zbus::{blocking::Connection, proxy, proxy::CacheProperties};

use crate::{
error::{ErrorWrap, NetavarkResult},
Expand Down
8 changes: 8 additions & 0 deletions src/error/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,14 @@ impl From<zbus::zvariant::Error> for NetavarkError {
}
}

// map the new zvariant::signature::Error to a
// NetavarkError::DbusVariant, like zvariant::Error
impl From<zbus::zvariant::signature::Error> for NetavarkError {
fn from(err: zbus::zvariant::signature::Error) -> NetavarkError {
NetavarkError::DbusVariant(err.into())
}
}

impl From<sysctl::SysctlError> for NetavarkError {
fn from(err: sysctl::SysctlError) -> NetavarkError {
NetavarkError::Sysctl(err)
Expand Down
12 changes: 6 additions & 6 deletions src/firewall/firewalld.rs
Original file line number Diff line number Diff line change
Expand Up @@ -191,9 +191,9 @@ impl firewall::FirewallDriver for FirewallD {
))
}
};
let mut port_forwarding_rules: Array = Array::new(sig_ssss);
let mut rich_rules: Array = Array::new(sig_s.clone());
let mut localhost_rich_rules: Array = Array::new(sig_s);
let mut port_forwarding_rules: Array = Array::new(&sig_ssss);
let mut rich_rules: Array = Array::new(&sig_s.clone());
let mut localhost_rich_rules: Array = Array::new(&sig_s);

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

let ipv4 = teardown_pf.config.container_ip_v4.map(|i| i.to_string());
let ipv6 = teardown_pf.config.container_ip_v6.map(|i| i.to_string());
Expand Down Expand Up @@ -481,7 +481,7 @@ impl firewall::FirewallDriver for FirewallD {
))
}
};
let mut new_rich_rules = Array::new(sig);
let mut new_rich_rules = Array::new(&sig);

let ipv4 = teardown_pf.config.container_ip_v4.map(|i| i.to_string());
let ipv6 = teardown_pf.config.container_ip_v6.map(|i| i.to_string());
Expand Down Expand Up @@ -564,7 +564,7 @@ impl firewall::FirewallDriver for FirewallD {
))
}
};
let mut new_rich_rules = Array::new(sig);
let mut new_rich_rules = Array::new(&sig);

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

Expand Down

0 comments on commit a2a6339

Please sign in to comment.