mirror of
https://abf.rosa.ru/djam/netavark.git
synced 2025-02-23 22:12:57 +00:00
108 lines
2.6 KiB
RPMSpec
108 lines
2.6 KiB
RPMSpec
%define debug %nil
|
|
%define debug_package %{nil}
|
|
%define _libexecdir %{_prefix}/libexec
|
|
%define rustver 1.70.0
|
|
|
|
Name: netavark
|
|
Version: 1.10.3
|
|
Release: 1
|
|
License: ASL-2.0 AND BSD-3-Clause AND MIT
|
|
Summary: OCI network stack
|
|
URL: https://github.com/containers/%{name}
|
|
Source0: %{url}/archive/v%{version}/%{name}-%{version}.tar.gz
|
|
Source1: %{url}/releases/download/v%{version}/%{name}-v%{version}-vendor.tar.gz
|
|
Group: Development/Other
|
|
BuildRequires: go-md2man
|
|
#Requires: aardvark-dns >= %{epoch}:%{major_minor}
|
|
#Provides: container-network-stack = 2
|
|
BuildRequires: make
|
|
BuildRequires: curl
|
|
BuildRequires: protobuf-c
|
|
BuildRequires: protobuf-compiler
|
|
BuildRequires: git-core
|
|
BuildRequires: systemd
|
|
BuildRequires: systemd-devel
|
|
%if %{mdvver} > 201610
|
|
BuildRequires: rust
|
|
BuildRequires: cargo
|
|
%endif
|
|
|
|
|
|
%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
|
|
%setup -q
|
|
|
|
%if %{mdvver} <= 201610
|
|
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs |\
|
|
sh -s -- -y --profile default --default-toolchain %{rustver}
|
|
%endif
|
|
|
|
|
|
%if !%{defined copr_username}
|
|
tar fx %{SOURCE1}
|
|
mkdir -p .cargo
|
|
|
|
cat >.cargo/config << EOF
|
|
[source.crates-io]
|
|
replace-with = "vendored-sources"
|
|
|
|
[source.vendored-sources]
|
|
directory = "vendor"
|
|
EOF
|
|
%endif
|
|
|
|
%build
|
|
%if %{mdvver} <= 201610
|
|
source "$HOME/.cargo/env"
|
|
%endif
|
|
|
|
#{__make} CARGO="%{__cargo}" build
|
|
%make build
|
|
|
|
cd docs
|
|
#{__make}
|
|
%make
|
|
|
|
%install
|
|
#{__make} DESTDIR=%{buildroot} PREFIX=%{_prefix} install
|
|
%makeinstall
|
|
|
|
%preun
|
|
%systemd_preun %{name}-dhcp-proxy.service
|
|
%systemd_preun %{name}-firewalld-reload.service
|
|
|
|
%postun
|
|
%systemd_postun %{name}-dhcp-proxy.service
|
|
%systemd_postun %{name}-firewalld-reload.service
|
|
|
|
%files
|
|
%doc LICENSE
|
|
#dir %{_libexecdir}/podman
|
|
%{_libexecdir}/podman/%{name}*
|
|
%{_mandir}/man1/%{name}.1*
|
|
%{_unitdir}/%{name}-dhcp-proxy.service
|
|
%{_unitdir}/%{name}-dhcp-proxy.socket
|
|
%{_unitdir}/%{name}-firewalld-reload.service
|
|
|
|
%changelog
|