Skip to content

Commit 022893f

Browse files
authored
Merge branch 'containers:main' into main
2 parents 66308ff + a2a6339 commit 022893f

File tree

11 files changed

+67
-61
lines changed

11 files changed

+67
-61
lines changed

.cirrus.yml

Lines changed: 1 addition & 3 deletions
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

@@ -257,10 +257,8 @@ success_task:
257257
API_URL_BASE: "https://api.cirrus-ci.com/v1/artifact/build/${CIRRUS_BUILD_ID}"
258258
EXP_BINS: >-
259259
netavark
260-
netavark.debug
261260
netavark.info
262261
netavark.aarch64-unknown-linux-gnu
263-
netavark.debug.aarch64-unknown-linux-gnu
264262
netavark.info.aarch64-unknown-linux-gnu
265263
clone_script: *noop
266264
bin_cache: *ro_bin_cache

Cargo.lock

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

Cargo.toml

Lines changed: 4 additions & 4 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-*"]
@@ -37,13 +37,13 @@ env_logger = "0.11.6"
3737
ipnet = { version = "2.11.0", features = ["serde"] }
3838
iptables = "0.5.2"
3939
libc = "0.2.157"
40-
log = "0.4.24"
40+
log = "0.4.26"
4141
serde = { version = "1.0.213", features = ["derive"], optional = true }
4242
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"
@@ -72,4 +72,4 @@ tonic-build = "0.12.3"
7272
[dev-dependencies]
7373
once_cell = "1.20.3"
7474
rand = "0.9.0"
75-
tempfile = "3.16.0"
75+
tempfile = "3.17.1"

Makefile

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,8 @@ CARGO ?= cargo
2929
CARGO_TARGET_DIR ?= targets
3030
export CARGO_TARGET_DIR # 'cargo' is sensitive to this env. var. value.
3131

32+
SOURCES = src/** Cargo.toml Cargo.lock
33+
3234
ifdef debug
3335
$(info debug is $(debug))
3436
# These affect both $(CARGO_TARGET_DIR) layout and contents
@@ -41,7 +43,7 @@ else
4143
endif
4244

4345
.PHONY: all
44-
all: build
46+
all: build docs
4547

4648
bin:
4749
mkdir -p $@
@@ -50,12 +52,13 @@ $(CARGO_TARGET_DIR):
5052
mkdir -p $@
5153

5254
.PHONY: build
53-
build: build_netavark build_proxy_client
55+
build: bin/netavark
5456

55-
.PHONY: build_netavark
56-
build_netavark: bin $(CARGO_TARGET_DIR)
57+
bin/netavark: $(SOURCES) bin $(CARGO_TARGET_DIR)
5758
$(CARGO) build $(release)
58-
cp $(CARGO_TARGET_DIR)/$(profile)/netavark bin/netavark$(if $(debug),.debug,)
59+
cp $(CARGO_TARGET_DIR)/$(profile)/netavark bin/netavark
60+
cp $(CARGO_TARGET_DIR)/$(profile)/netavark-dhcp-proxy-client bin/netavark-dhcp-proxy-client
61+
5962

6063
.PHONY: examples
6164
examples: bin $(CARGO_TARGET_DIR)
@@ -104,10 +107,12 @@ install: $(NV_UNIT_FILES)
104107

105108
.PHONY: uninstall
106109
uninstall:
110+
$(MAKE) -C docs uninstall
107111
rm -f $(DESTDIR)$(LIBEXECPODMAN)/netavark
108112
rm -f $(PREFIX)/share/man/man1/netavark*.1
109113
rm -f ${DESTDIR}${SYSTEMDDIR}/netavark-dhcp-proxy.service
110114
rm -f ${DESTDIR}${SYSTEMDDIR}/netavark-dhcp-proxy.socket
115+
rm -f ${DESTDIR}${SYSTEMDDIR}/netavark-firewalld-reload.service
111116

112117
.PHONY: test
113118
test: unit integration
@@ -152,8 +157,3 @@ mock-rpm:
152157
.PHONY: help
153158
help:
154159
@echo "usage: make $(prog) [debug=1]"
155-
156-
.PHONY: build_proxy_client
157-
build_proxy_client: bin $(CARGO_TARGET_DIR)
158-
$(CARGO) build --bin netavark-dhcp-proxy-client $(release)
159-
cp $(CARGO_TARGET_DIR)/$(profile)/netavark-dhcp-proxy-client bin/netavark-dhcp-proxy-client$(if $(debug),.debug,)

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

contrib/cirrus/runner.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,9 @@ _run_noarg() {
1919
_run_build() {
2020
# Assume we're on a fast VM, compile everything needed by the
2121
# rest of CI since subsequent tasks may have limited resources.
22-
make all debug=1
2322
make build_unit # reuses some debug binaries
2423
make all # optimized/non-debug binaries
24+
make examples # build the examples binaries needed by the integration tests
2525
# This will get scooped up and become part of the artifact archive.
2626
# Identify where the binary came from to benefit downstream consumers.
2727
cat | tee bin/netavark.info << EOF
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

docs/Makefile

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,17 @@ docs: $(patsubst %.md,%,$(wildcard *.[0-9].md))
1717
$(GO) install github.com/cpuguy83/go-md2man/v2@latest
1818

1919
.PHONY: install
20-
install:
20+
install: docs
2121
install -d ${DESTDIR}/${MANDIR}/man1
2222
install -m 0644 *.1 ${DESTDIR}/${MANDIR}/man1
2323
install -d ${DESTDIR}/${MANDIR}/man7
2424
install -m 0644 *.7 ${DESTDIR}/${MANDIR}/man7
2525

26+
.PHONY: uninstall
27+
uninstall:
28+
rm -f ${DESTDIR}/${MANDIR}/man1/*.1
29+
rm -f ${DESTDIR}/${MANDIR}/man7/*.7
30+
2631
.PHONY: clean
2732
clean:
28-
$(RM) *.1
33+
$(RM) *.1 *.7

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)