diff --git a/.gitignore b/.gitignore index e69de29..dafa321 100644 --- a/.gitignore +++ b/.gitignore @@ -0,0 +1 @@ +/*.tar.* diff --git a/netavark.spec b/netavark.spec new file mode 100644 index 0000000..8a2bb52 --- /dev/null +++ b/netavark.spec @@ -0,0 +1,72 @@ +# debuginfo doesn't work yet +%global debug_package %{nil} + +Name: netavark +Version: 1.1.0 +Release: 1%{?dist} +License: ASL 2.0 and BSD and MIT +ExclusiveArch: %{rust_arches} +Summary: OCI network stack +URL: https://github.com/containers/%{name} +Source0: %{url}/archive/v%{version}/%{version}.tar.gz +Source1: %{url}/releases/download/v%{version}/%{name}-v%{version}-vendor.tar.gz +BuildRequires: cargo +BuildRequires: go-md2man +Recommends: aardvark-dns >= 1.0.3 +Provides: container-network-stack = 2 +BuildRequires: make +BuildRequires: rust-srpm-macros +BuildRequires: git-core + +%description +%{summary} + +Netavark is a rust based network stack for containers. It is being +designed to work with Podman but is also applicable for other OCI +container management applications. + +Netavark is a tool for configuring networking for Linux containers. +Its features include: +* Configuration of container networks via JSON configuration file +* Creation and management of required network interfaces, + including MACVLAN networks +* All required firewall configuration to perform NAT and port + forwarding as required for containers +* Support for iptables and firewalld at present, with support + for nftables planned in a future release +* Support for rootless containers +* Support for IPv4 and IPv6 +* Support for container DNS resolution via aardvark-dns. + +%prep +%autosetup -Sgit +tar fx %{SOURCE1} +mkdir -p .cargo + +cat >.cargo/config << EOF +[source.crates-io] +replace-with = "vendored-sources" + +[source.vendored-sources] +directory = "vendor" +EOF + +%build +%{__make} build + +cd docs +go-md2man -in %{name}.1.md -out %{name}.1 + +%install +%{__make} DESTDIR=%{buildroot} PREFIX=%{_prefix} install + +%files +%license LICENSE +%dir %{_libexecdir}/podman +%{_libexecdir}/podman/%{name} +%{_mandir}/man1/%{name}.1* + +%changelog +* Wed Aug 03 2022 Jindrich Novy - 1.1.0-1 +- initial import +- Related: #2061316 diff --git a/sources b/sources new file mode 100644 index 0000000..6ee9a82 --- /dev/null +++ b/sources @@ -0,0 +1,2 @@ +SHA512 (1.1.0.tar.gz) = 9b7e899d4838a0cc4c50d76dbbcb9c5ad77c709e4c0f95c4bc529b7c863744f2a463bbd1cd5fc781a2bbf955d13c5f5a01f1a2c25c7616e54822e56a8ef13493 +SHA512 (netavark-v1.1.0-vendor.tar.gz) = 2416ca061d0aac8ceeab08f7b9081313a48cb52f827b980c9b8909e2c94ff795153f2a17e8217b6f00c4c15591388378da96537cf8b2e9a29c11cd4f4e73ee9a