Skip to content

Commit 967304f

Browse files
Merge pull request #987 from lsm5/rpm-rhel-10
[skip-ci] RPM: switch default firewall to nftables on EL10+
2 parents 8e8148c + c29c09c commit 967304f

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

rpm/netavark.spec

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,15 @@
2222
# Minimum X.Y dep for aardvark-dns
2323
%define major_minor %((v=%{version}; echo ${v%.*}))
2424

25+
# Set default firewall to nftables on CentOS Stream 10+, RHEL 10+
26+
# and default to iptables on all other environments
27+
# The `rhel` macro is defined on CentOS Stream, RHEL as well as Fedora ELN.
28+
%if %{defined rhel} && 0%{?rhel} >= 10
29+
%define default_fw nftables
30+
%else
31+
%define default_fw iptables
32+
%endif
33+
2534
Name: netavark
2635
# Set a different Epoch for copr builds
2736
%if %{defined copr_username}
@@ -101,7 +110,7 @@ EOF
101110
%endif
102111

103112
%build
104-
%{__make} CARGO="%{__cargo}" build
113+
NETAVARK_DEFAULT_FW=%{default_fw} %{__make} CARGO="%{__cargo}" build
105114

106115
cd docs
107116
%{__make}

0 commit comments

Comments
 (0)