2015-01-28 07:58:09 +00:00
|
|
|
# Add option to enable combined library (--with combined)
|
|
|
|
%bcond_with combined
|
2015-04-08 17:06:44 +00:00
|
|
|
# Add option to build as static libraries (--without shared)
|
|
|
|
%bcond_without shared
|
2015-01-28 07:58:09 +00:00
|
|
|
|
2014-06-06 21:00:32 +00:00
|
|
|
Name: dpdk
|
2015-04-08 17:06:44 +00:00
|
|
|
Version: 2.0.0
|
|
|
|
Release: 1%{?dist}
|
2014-06-06 21:00:32 +00:00
|
|
|
URL: http://dpdk.org
|
2014-07-10 19:52:18 +00:00
|
|
|
Source: http://dpdk.org/browse/dpdk/snapshot/dpdk-%{version}.tar.gz
|
2014-06-06 21:00:32 +00:00
|
|
|
|
2014-07-21 14:02:31 +00:00
|
|
|
Patch1: dpdk-config.patch
|
2015-04-08 17:06:44 +00:00
|
|
|
Patch2: enic-pun-fix.patch
|
|
|
|
Patch3: null_array-bounds.patch
|
2014-06-06 21:00:32 +00:00
|
|
|
|
2015-01-27 09:06:53 +00:00
|
|
|
Summary: Set of libraries and drivers for fast packet processing
|
2014-06-06 21:00:32 +00:00
|
|
|
|
|
|
|
#
|
|
|
|
# Note that, while this is dual licensed, all code that is included with this
|
|
|
|
# Pakcage are BSD licensed. The only files that aren't licensed via BSD is the
|
|
|
|
# kni kernel module which is dual LGPLv2/BSD, and thats not built for fedora.
|
|
|
|
#
|
|
|
|
License: BSD and LGPLv2 and GPLv2
|
|
|
|
|
|
|
|
#
|
|
|
|
# The DPDK is designed to optimize througput of network traffic using, among
|
|
|
|
# other techniques, carefully crafted x86 assembly instructions. As such it
|
|
|
|
# currently (and likely never will) run on non-x86 platforms
|
|
|
|
#
|
2014-07-21 14:02:31 +00:00
|
|
|
ExclusiveArch: x86_64
|
2014-07-01 15:09:58 +00:00
|
|
|
|
2015-01-27 09:39:48 +00:00
|
|
|
%define machine native
|
2014-07-10 19:52:18 +00:00
|
|
|
|
2015-01-27 09:39:48 +00:00
|
|
|
%define target x86_64-%{machine}-linuxapp-gcc
|
2014-07-01 15:09:58 +00:00
|
|
|
|
2014-06-06 21:00:32 +00:00
|
|
|
|
|
|
|
|
2015-04-08 17:06:44 +00:00
|
|
|
BuildRequires: kernel-headers, libpcap-devel, doxygen, texlive-dejavu
|
|
|
|
BuildRequires: python-sphinx inkscape
|
2014-06-06 21:00:32 +00:00
|
|
|
|
|
|
|
%description
|
2015-01-27 09:06:53 +00:00
|
|
|
The Data Plane Development Kit is a set of libraries and drivers for
|
|
|
|
fast packet processing in the user space.
|
2014-06-06 21:00:32 +00:00
|
|
|
|
|
|
|
%package devel
|
2015-01-27 09:06:53 +00:00
|
|
|
Summary: Data Plane Development Kit development files
|
2014-06-06 21:00:32 +00:00
|
|
|
Requires: %{name}%{?_isa} = %{version}-%{release}
|
2015-01-28 09:28:50 +00:00
|
|
|
%if ! %{with shared}
|
2015-01-28 09:18:01 +00:00
|
|
|
Provides: %{name}-static = %{version}-%{release}
|
2015-01-28 09:28:50 +00:00
|
|
|
%endif
|
2014-06-06 21:00:32 +00:00
|
|
|
|
|
|
|
%description devel
|
2015-01-27 09:06:53 +00:00
|
|
|
This package contains the headers and other files needed for developing
|
|
|
|
applications with the Data Plane Development Kit.
|
2014-06-06 21:00:32 +00:00
|
|
|
|
|
|
|
%package doc
|
2015-01-27 09:06:53 +00:00
|
|
|
Summary: Data Plane Development Kit API documentation
|
2014-06-06 21:00:32 +00:00
|
|
|
BuildArch: noarch
|
|
|
|
|
|
|
|
%description doc
|
2015-01-27 09:06:53 +00:00
|
|
|
API programming documentation for the Data Plane Development Kit.
|
2014-06-06 21:00:32 +00:00
|
|
|
|
2015-01-27 10:54:14 +00:00
|
|
|
%define sdkdir %{_libdir}/%{name}-%{version}-sdk
|
2015-01-27 09:39:48 +00:00
|
|
|
%define docdir %{_docdir}/%{name}-%{version}
|
2014-06-06 21:00:32 +00:00
|
|
|
|
|
|
|
%prep
|
|
|
|
%setup -q
|
2014-07-21 14:02:31 +00:00
|
|
|
%patch1 -p1 -z .config
|
2015-04-08 17:06:44 +00:00
|
|
|
%patch2 -p1 -z .enic
|
|
|
|
%patch3 -p1 -z .null
|
2014-06-06 21:00:32 +00:00
|
|
|
|
2015-01-28 09:28:50 +00:00
|
|
|
%if %{with shared}
|
|
|
|
sed -i 's:^CONFIG_RTE_BUILD_SHARED_LIB=n$:CONFIG_RTE_BUILD_SHARED_LIB=y:g' config/common_linuxapp
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
2014-06-06 21:00:32 +00:00
|
|
|
%build
|
2015-01-28 12:13:27 +00:00
|
|
|
export EXTRA_CFLAGS="%{optflags} -fPIC"
|
2014-07-21 14:02:31 +00:00
|
|
|
|
|
|
|
# DPDK defaults to using builder-specific compiler flags. However,
|
|
|
|
# the config has been changed by specifying CONFIG_RTE_MACHINE=default
|
|
|
|
# in order to build for a more generic host. NOTE: It is possible that
|
|
|
|
# the compiler flags used still won't work for all Fedora-supported
|
|
|
|
# machines, but runtime checks in DPDK will catch those situations.
|
2014-07-01 15:09:58 +00:00
|
|
|
|
2014-07-21 14:02:31 +00:00
|
|
|
make V=1 O=%{target} T=%{target} %{?_smp_mflags} config
|
|
|
|
make V=1 O=%{target} %{?_smp_mflags}
|
|
|
|
make V=1 O=%{target} %{?_smp_mflags} doc
|
2014-06-06 21:00:32 +00:00
|
|
|
|
|
|
|
%install
|
2014-07-21 14:02:31 +00:00
|
|
|
|
|
|
|
# DPDK's "make install" seems a bit broken -- do things manually...
|
|
|
|
|
|
|
|
mkdir -p %{buildroot}%{_bindir}
|
|
|
|
cp -a %{target}/app/testpmd %{buildroot}%{_bindir}/testpmd-%{version}
|
|
|
|
mkdir -p %{buildroot}%{_includedir}/%{name}-%{version}
|
2015-01-27 08:35:41 +00:00
|
|
|
cp -Lr %{target}/include/* %{buildroot}%{_includedir}/%{name}-%{version}
|
2014-07-21 14:02:31 +00:00
|
|
|
mkdir -p %{buildroot}%{_libdir}/%{name}-%{version}
|
|
|
|
cp -a %{target}/lib/* %{buildroot}%{_libdir}/%{name}-%{version}
|
|
|
|
mkdir -p %{buildroot}%{docdir}
|
|
|
|
cp -a %{target}/doc/* %{buildroot}%{docdir}
|
2015-01-27 10:54:14 +00:00
|
|
|
|
|
|
|
# DPDK apps expect a particular (and somewhat peculiar) directory layout
|
|
|
|
# for building, arrange for that
|
|
|
|
mkdir -p %{buildroot}%{sdkdir}/%{target}
|
|
|
|
cp -a %{target}/.config %{buildroot}%{sdkdir}/%{target}
|
|
|
|
ln -s ../../../%{_lib}/%{name}-%{version} %{buildroot}%{sdkdir}/%{target}/lib
|
|
|
|
ln -s ../../../include/%{name}-%{version} %{buildroot}%{sdkdir}/%{target}/include
|
|
|
|
cp -a mk/ %{buildroot}%{sdkdir}
|
|
|
|
|
|
|
|
# Setup RTE_SDK environment as expected by apps etc
|
|
|
|
mkdir -p %{buildroot}/%{_sysconfdir}/profile.d
|
|
|
|
cat << EOF > %{buildroot}/%{_sysconfdir}/profile.d/dpdk-sdk-%{_arch}.sh
|
2015-01-28 07:41:45 +00:00
|
|
|
if [ -z "\${RTE_SDK}" ]; then
|
2015-01-27 10:54:14 +00:00
|
|
|
export RTE_SDK="%{sdkdir}"
|
|
|
|
export RTE_TARGET="%{target}"
|
|
|
|
export RTE_INCLUDE="%{_includedir}/%{name}-%{version}"
|
|
|
|
fi
|
|
|
|
EOF
|
|
|
|
|
|
|
|
cat << EOF > %{buildroot}/%{_sysconfdir}/profile.d/dpdk-sdk-%{_arch}.csh
|
2015-01-28 07:41:45 +00:00
|
|
|
if ( ! \$RTE_SDK ) then
|
2015-01-27 10:54:14 +00:00
|
|
|
setenv RTE_SDK "%{sdkdir}"
|
|
|
|
setenv RTE_TARGET "%{target}"
|
|
|
|
setenv RTE_INCLUDE "%{_includedir}/%{name}-%{version}"
|
|
|
|
endif
|
|
|
|
EOF
|
|
|
|
|
2015-01-27 08:43:00 +00:00
|
|
|
# Theres no point in packaging any of the tools
|
|
|
|
# We currently don't need the igb uio script, there
|
|
|
|
# are several uio scripts already available
|
|
|
|
# And the cpu_layout script functionality is
|
|
|
|
# covered by lscpu
|
|
|
|
#cp -a tools %{buildroot}%{datadir}
|
2014-06-06 21:00:32 +00:00
|
|
|
|
2015-01-27 08:35:59 +00:00
|
|
|
# Fixup irregular modes in headers
|
|
|
|
find %{buildroot}%{_includedir}/%{name}-%{version} -type f | xargs chmod 0644
|
|
|
|
|
2015-01-28 07:58:09 +00:00
|
|
|
# Upstream has an option to build a combined library but it'll clash
|
|
|
|
# with symbol/library versioning once it lands. Use a linker script to
|
|
|
|
# avoid the issue.
|
|
|
|
%if %{with combined}
|
2015-01-28 09:28:50 +00:00
|
|
|
|
|
|
|
%if %{with shared}
|
|
|
|
libext=so
|
|
|
|
%else
|
2015-01-28 07:58:09 +00:00
|
|
|
libext=a
|
2015-01-28 09:28:50 +00:00
|
|
|
%endif
|
|
|
|
|
2015-01-28 07:58:09 +00:00
|
|
|
comblib=libintel_dpdk.${libext}
|
|
|
|
|
|
|
|
echo "GROUP (" > ${comblib}
|
|
|
|
find %{buildroot}/%{_libdir}/%{name}-%{version}/ -name "*.${libext}" |\
|
|
|
|
sed -e "s:^%{buildroot}/: :g" >> ${comblib}
|
|
|
|
echo ")" >> ${comblib}
|
|
|
|
install -m 644 ${comblib} %{buildroot}/%{_libdir}/%{name}-%{version}/${comblib}
|
|
|
|
%endif
|
|
|
|
|
2014-06-06 21:00:32 +00:00
|
|
|
%files
|
|
|
|
# BSD
|
|
|
|
%{_bindir}/*
|
2015-01-28 09:18:01 +00:00
|
|
|
%dir %{_libdir}/%{name}-%{version}
|
2015-01-28 09:28:50 +00:00
|
|
|
%if %{with shared}
|
2015-04-08 17:06:44 +00:00
|
|
|
%{_libdir}/%{name}-%{version}/*.so.*
|
2015-01-28 09:28:50 +00:00
|
|
|
%endif
|
2014-06-06 21:00:32 +00:00
|
|
|
|
|
|
|
%files doc
|
|
|
|
#BSD
|
|
|
|
%{docdir}
|
|
|
|
|
|
|
|
%files devel
|
|
|
|
#BSD
|
|
|
|
%{_includedir}/*
|
2015-01-27 10:54:14 +00:00
|
|
|
%{sdkdir}
|
|
|
|
%{_sysconfdir}/profile.d/dpdk-sdk-*.*
|
2015-01-28 09:28:50 +00:00
|
|
|
%if ! %{with shared}
|
2015-01-28 09:18:01 +00:00
|
|
|
%{_libdir}/%{name}-%{version}/*.a
|
2015-04-08 17:06:44 +00:00
|
|
|
%else
|
|
|
|
%{_libdir}/%{name}-%{version}/*.so
|
2015-01-28 09:28:50 +00:00
|
|
|
%endif
|
2014-06-06 21:00:32 +00:00
|
|
|
|
|
|
|
%changelog
|
2015-04-08 17:06:44 +00:00
|
|
|
* Mon Apr 06 2015 Neil Horman <nhorman@redhat.com> - 2.0.0-1
|
|
|
|
- Update to dpdk 2.0
|
|
|
|
- converted --with shared option to --without shared option
|
|
|
|
|
2015-01-28 12:13:27 +00:00
|
|
|
* Wed Jan 28 2015 Panu Matilainen <pmatilai@redhat.com> - 1.7.0-8
|
|
|
|
- Always build with -fPIC
|
|
|
|
|
2015-01-28 09:33:44 +00:00
|
|
|
* Wed Jan 28 2015 Panu Matilainen <pmatilai@redhat.com> - 1.7.0-7
|
2015-01-28 09:18:01 +00:00
|
|
|
- Policy compliance: move static libraries to -devel, provide dpdk-static
|
2015-01-28 09:28:50 +00:00
|
|
|
- Add a spec option to build as shared libraries
|
2015-01-28 09:18:01 +00:00
|
|
|
|
2015-01-28 09:33:44 +00:00
|
|
|
* Wed Jan 28 2015 Panu Matilainen <pmatilai@redhat.com> - 1.7.0-6
|
2015-01-28 07:41:45 +00:00
|
|
|
- Avoid variable expansion in the spec here-documents during build
|
2015-01-28 07:49:40 +00:00
|
|
|
- Drop now unnecessary debug flags patch
|
2015-01-28 07:58:09 +00:00
|
|
|
- Add a spec option to build a combined library
|
2015-01-28 07:41:45 +00:00
|
|
|
|
2015-01-27 09:39:48 +00:00
|
|
|
* Tue Jan 27 2015 Panu Matilainen <pmatilai@redhat.com> - 1.7.0-5
|
|
|
|
- Avoid unnecessary use of %%global, lazy expansion is normally better
|
|
|
|
- Drop unused destdir macro while at it
|
2015-01-27 10:54:14 +00:00
|
|
|
- Arrange for RTE_SDK environment + directory layout expected by DPDK apps
|
|
|
|
- Drop config from main package, it shouldn't be needed at runtime
|
2015-01-27 09:39:48 +00:00
|
|
|
|
2015-01-27 08:35:41 +00:00
|
|
|
* Tue Jan 27 2015 Panu Matilainen <pmatilai@redhat.com> - 1.7.0-4
|
|
|
|
- Copy the headers instead of broken symlinks into -devel package
|
2015-01-27 08:35:59 +00:00
|
|
|
- Force sane mode on the headers
|
2015-01-27 08:43:00 +00:00
|
|
|
- Avoid unnecessary %%exclude by not copying unpackaged content to buildroot
|
2015-01-27 09:06:53 +00:00
|
|
|
- Clean up summaries and descriptions
|
2015-01-27 09:10:36 +00:00
|
|
|
- Drop unnecessary kernel-devel BR, we are not building kernel modules
|
2015-01-27 08:35:41 +00:00
|
|
|
|
2014-08-16 09:40:50 +00:00
|
|
|
* Sat Aug 16 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.7.0-3
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
|
|
|
|
|
2014-07-21 14:02:31 +00:00
|
|
|
* Thu Jul 17 2014 - John W. Linville <linville@redhat.com> - 1.7.0-2
|
|
|
|
- Use EXTRA_CFLAGS to include standard Fedora compiler flags in build
|
|
|
|
- Set CONFIG_RTE_MACHINE=default to build for least-common-denominator machines
|
|
|
|
- Turn-off build of librte_acl, since it does not build on default machines
|
|
|
|
- Turn-off build of physical device PMDs that require kernel support
|
|
|
|
- Clean-up the install rules to match current packaging
|
|
|
|
- Correct changelog versions 1.0.7 -> 1.7.0
|
|
|
|
- Remove ix86 from ExclusiveArch -- it does not build with above changes
|
|
|
|
|
|
|
|
* Thu Jul 10 2014 - Neil Horman <nhorman@tuxdriver.com> - 1.7.0-1.0
|
2014-07-10 19:52:18 +00:00
|
|
|
- Update source to official 1.7.0 release
|
|
|
|
|
|
|
|
* Thu Jul 03 2014 - Neil Horman <nhorman@tuxdriver.com>
|
2014-07-03 11:45:28 +00:00
|
|
|
- Fixing up release numbering
|
|
|
|
|
2014-07-21 14:02:31 +00:00
|
|
|
* Tue Jul 01 2014 - Neil Horman <nhorman@tuxdriver.com> - 1.7.0-0.9.1.20140603git5ebbb1728
|
2014-07-01 15:09:58 +00:00
|
|
|
- Fixed some build errors (empty debuginfo, bad 32 bit build)
|
|
|
|
|
2014-07-21 14:02:31 +00:00
|
|
|
* Wed Jun 11 2014 - Neil Horman <nhorman@tuxdriver.com> - 1.7.0-0.9.20140603git5ebbb1728
|
2014-06-11 11:01:39 +00:00
|
|
|
- Fix another build dependency
|
|
|
|
|
2014-07-21 14:02:31 +00:00
|
|
|
* Mon Jun 09 2014 - Neil Horman <nhorman@tuxdriver.com> - 1.7.0-0.8.20140603git5ebbb1728
|
2014-06-09 16:50:30 +00:00
|
|
|
- Fixed doc arch versioning issue
|
|
|
|
|
2014-07-21 14:02:31 +00:00
|
|
|
* Mon Jun 09 2014 - Neil Horman <nhorman@tuxdriver.com> - 1.7.0-0.7.20140603git5ebbb1728
|
2014-06-09 16:07:22 +00:00
|
|
|
- Added verbose output to build
|
|
|
|
|
2014-07-21 14:02:31 +00:00
|
|
|
* Tue May 13 2014 - Neil Horman <nhorman@tuxdriver.com> - 1.7.0-0.6.20140603git5ebbb1728
|
2014-06-06 21:00:32 +00:00
|
|
|
- Initial Build
|
|
|
|
|