Blob Blame History Raw
Name:           virtio-forwarder
Version:        1.1.99.51
Release:        3%{?dist}
Summary:        SR-IOV virtual function to virtio packet forwarder

License:        BSD
URL:            http://netronome.com
Source0:        https://rpm.netronome.com/archives/virtio-forwarder/virtio-forwarder-1.1.99.51-1.tar.bz2
%if 0%{?rhel} && 0%{?rhel} <= 7
Requires:       protobuf-python
Requires:       python-zmq
%else
Requires:       python2-protobuf
Requires:       python2-zmq
%endif
BuildRequires:  make gcc dpdk-devel
BuildRequires:  protobuf-c-compiler protobuf-c-devel protobuf-compiler
BuildRequires:  zeromq-devel
BuildRequires:  python2-devel python2-sphinx
%if 0%{?rhel}
BuildRequires:  python-sphinx_rtd_theme
%else
BuildRequires:  python2-sphinx_rtd_theme
%endif
BuildRequires:  numactl-devel
%{?systemd_requires}
BuildRequires:  systemd

# Track DPDK's architectures
ExclusiveArch: x86_64 aarch64 ppc64le %ix86

Patch0: harden_cflags.patch

%description
virtio-forwarder is a userspace networking application that forwards
bi-directional traffic between SR-IOV virtual functions and virtio networking
devices in QEMU virtual machines. virtio-forwarder implements a virtio backend
driver using the DPDK’s vhost-user library and services designated VFs by means
of the DPDK poll mode driver (PMD) mechanism.

%prep
%setup -q
%patch0 -p1

%build
# We need to clean the variables that may have been set from a previous
# invocation of make, e.g. if rpmbuild is called from a Makefile.
env -i PATH=$PATH ${RTE_SDK:+RTE_SDK=$RTE_SDK} \
	${RTE_TARGET:+RTE_TARGET=$RTE_TARGET} \
	${CFLAGS:+CFLAGS="$CFLAGS"} ${V:+V="$V"} \
	%make_build

%install
env -i PATH=$PATH ${RTE_SDK:+RTE_SDK=$RTE_SDK} \
	${RTE_TARGET:+RTE_TARGET=$RTE_TARGET} \
	${CFLAGS:+CFLAGS="$CFLAGS"} ${V:+V="$V"} \
	%{make_install} prefix=%{_prefix} unitdir=%{_unitdir} \
	libexecdir=%{_libdir}/virtio-forwarder

%post
%systemd_post virtio-forwarder.service
%systemd_post vio4wd_core_scheduler.service

%preun
%systemd_preun virtio-forwarder.service
%systemd_preun vio4wd_core_scheduler.service

%postun
%systemd_postun virtio-forwarder.service
%systemd_postun_with_restart vio4wd_core_scheduler.service

%files
%{_bindir}/virtio-forwarder
%{_mandir}/man8/virtio-forwarder.8.*
%{_libdir}/virtio-forwarder
%config(noreplace) %{_sysconfdir}/default/virtioforwarder
%{_unitdir}/virtio-forwarder.service
%{_unitdir}/vio4wd_core_scheduler.service
%doc README.md
%license LICENSE

%changelog
* Sat Jul 27 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1.1.99.51-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild

* Mon Feb 18 2019 Frik Botha <frik.botha@netronome.com> - 1.1.99.51-2
- Add hardening cflags (1676193)

* Mon Feb 18 2019 Frik Botha <frik.botha@netronome.com> - 1.1.99.51-1
- Initial release