Update netavark to the latest upstream release

- add -tests subpackage
Resolves: RHEL-187025
This commit is contained in:
Jindrich Novy 2026-06-23 15:27:40 +02:00
parent bb833bb1de
commit f8a744ade8
2 changed files with 40 additions and 10 deletions

View File

@ -14,14 +14,8 @@
# Minimum X.Y dep for aardvark-dns
%define major_minor %((v=%{version}; echo ${v%.*}))
# Set default firewall to nftables on CentOS Stream 10+, RHEL 10+, Fedora 41+
# and default to iptables on all other environments
# The `rhel` macro is defined on CentOS Stream, RHEL as well as Fedora ELN.
%if (%{defined rhel} && 0%{?rhel} >= 10) || (%{defined fedora} && 0%{?fedora} >= 41)
# netavark 2.0.0+ only supports nftables
%define default_fw nftables
%else
%define default_fw iptables
%endif
Name: netavark
# Set a different Epoch for copr builds
@ -30,7 +24,7 @@ Epoch: 102
%else
Epoch: 2
%endif
Version: 1.17.2
Version: 2.0.0
Release: 1%{?dist}
# The `AND` needs to be uppercase in the License for SPDX compatibility
License: Apache-2.0 AND BSD-3-Clause AND MIT
@ -87,6 +81,19 @@ Its features include:
* Support for IPv4 and IPv6
* Support for container DNS resolution via aardvark-dns.
%package tests
Summary: Tests for %{name}
Requires: %{name} = %{epoch}:%{version}-%{release}
Requires: bats
Requires: iproute
Requires: jq
Requires: firewalld
Requires: nftables
Requires: dbus-daemon
%description tests
%{summary}
%prep
%autosetup -Sgit %{name}-%{version}
# Following steps are only required on environments like koji which have no
@ -103,6 +110,8 @@ tar fx %{SOURCE1}
%build
NETAVARK_DEFAULT_FW=%{default_fw} %{__make} CARGO="%{__cargo}" build
# Build examples package for tests
%{__make} CARGO="%{__cargo}" examples
%if (0%{?fedora} || 0%{?rhel} >= 10) && !%{defined copr_username}
%cargo_license_summary
%{cargo_license} > LICENSE.dependencies
@ -114,6 +123,14 @@ cd docs
%install
%{__make} DESTDIR=%{buildroot} PREFIX=%{_prefix} install
# Install tests
install -d %{buildroot}%{_datadir}/%{name}
cp -r examples %{buildroot}%{_datadir}/%{name}/examples
cp -r test %{buildroot}%{_datadir}/%{name}/test
cp -r test-dhcp %{buildroot}%{_datadir}/%{name}/test-dhcp
install -d %{buildroot}%{_libexecdir}/%{name}
install -m 0755 bin/netavark-connection-tester %{buildroot}%{_libexecdir}/%{name}/
install -m 0755 bin/netavark-dhcp-proxy-client %{buildroot}%{_libexecdir}/%{name}/
%preun
%systemd_preun %{name}-dhcp-proxy.service
@ -140,7 +157,20 @@ cd docs
%{_unitdir}/%{name}-firewalld-reload.service
%{_unitdir}/%{name}-nftables-reload.service
%files tests
%dir %{_datadir}/%{name}
%{_datadir}/%{name}/examples/
%{_datadir}/%{name}/test/
%{_datadir}/%{name}/test-dhcp/
%{_libexecdir}/%{name}/netavark-connection-tester
%{_libexecdir}/%{name}/netavark-dhcp-proxy-client
%changelog
* Tue Jun 23 2026 Jindrich Novy <jnovy@redhat.com> - 2:2.0.0-1
- update to the latest upstream release
- add -tests subpackage
- Resolves: RHEL-187025
* Thu Feb 05 2026 Jindrich Novy <jnovy@redhat.com> - 2:1.17.2-1
- update to https://github.com/containers/netavark/releases/tag/v1.17.2
- Related: RHEL-111919

View File

@ -1,2 +1,2 @@
SHA512 (v1.17.2.tar.gz) = bc3a38e26c2f6dba03ce74e671189a8c2b132e0820aa5740a04949fbb32ad33170e7816535503c6c394d14f93f8ae62dcd9da0cbe410984cee8070b1e3855430
SHA512 (netavark-v1.17.2-vendor.tar.gz) = 2d34a237c540acd05590c09f07e57b1b0a765b746332cbc27337a4c31e2db4b92861629b1418a9c3990a0f25c659d537a8c7b7d2e63247fa3df39c092e80a59d
SHA512 (v2.0.0.tar.gz) = b2b04a3784bea78a18d7277f93aff3ec8296c6f8b7e97a72e8871e89f9628a739fecaae0db44f379f932c1223a19e6907a7fe53ba5143f7f7742606590613f8c
SHA512 (netavark-v2.0.0-vendor.tar.gz) = 125dcded2218e183020582c2bb1778667d812cb5009c6264fec14b0500329c493a57a01f0c72e1e2d7cc2cfef4462b0ccc68af1b4f745e35bddbcc1550835509