Rebase to 20.11.1

Resolves: #2024994
This commit is contained in:
Timothy Redaelli 2021-11-19 18:13:21 +01:00
parent ff20b3714b
commit cb5923422f
3 changed files with 9 additions and 103 deletions

1
.gitignore vendored
View File

@ -7,3 +7,4 @@
/dpdk-19.11.2.tar.xz
/dpdk-19.11.3.tar.xz
/dpdk-20.11.tar.xz
/dpdk-20.11.1.tar.xz

109
dpdk.spec
View File

@ -8,8 +8,8 @@
#% define date 20191128
#% define shortcommit0 %(c=%{commit0}; echo ${c:0:7})
%define ver 20.11
%define rel 3
%define ver 20.11.1
%define rel 1
%define srcname dpdk
@ -26,12 +26,7 @@ Source: http://dpdk.org/browse/dpdk/snapshot/dpdk-%{commit0}.tar.xz
Source: http://fast.dpdk.org/rel/dpdk-%{ver}.tar.xz
%endif
%if 0%{?rhel} && 0%{?rhel} < 8
Source1: https://github.com/ninja-build/ninja/archive/v%{ninjaver}.tar.gz#/ninja-build-%{ninjaver}.tar.gz
Source2: https://github.com/mesonbuild/meson/releases/download/%{mesonver}/meson-%{mesonver}.tar.gz
%else
BuildRequires: meson
%endif
# Only needed for creating snapshot tarballs, not used in build itself
Source100: dpdk-snapshot.sh
@ -61,15 +56,10 @@ ExclusiveArch: x86_64 aarch64 ppc64le
%define venvdir %{_builddir}/venv
%if 0%{?rhel} > 7 || 0%{?fedora}
%define _py python3
%define _py_exec %{?__python3}
%else
%define _py python
%define _py_exec %{?__python2}
%endif
%if 0%{?rhel} > 7
%if 0%{?rhel} == 8
# Fix conflicts with README and MAINTAINERS (included in dpdk-doc < 18.11-2)
Conflicts: dpdk-doc < 18.11-2
%endif
@ -81,71 +71,6 @@ BuildRequires: python3-devel
BuildRequires: rdma-core-devel >= 15
%endif
# Macros taked from ninja-build and meson packages and adapted to be defined here
# See /usr/lib/rpm/macros.d/macros.{ninja,meson}
%if 0%{?rhel} && 0%{?rhel} < 8
# RHEL-7 doesn't define _vpath_* macros yet
%if 0%{!?_vpath_srcdir:1}
%define _vpath_srcdir .
%endif
%if 0%{!?_vpath_builddir:1}
%define _vpath_builddir %_target_platform
%endif
%define __ninja %{venvdir}/bin/ninja
%define __ninja_common_opts -v %{?_smp_mflags}
%define ninja_build \
%{__ninja} %{__ninja_common_opts}
%define ninja_install \
DESTDIR=%{buildroot} %{__ninja} install %{__ninja_common_opts}
%define ninja_test \
%{__ninja} test %{__ninja_common_opts}
%define __meson %{venvdir}/bin/meson
%define __meson_wrap_mode nodownload
%define __meson_auto_features enabled
%define meson \
export CFLAGS="${CFLAGS:-%__global_cflags}" \
export CXXFLAGS="${CXXFLAGS:-%__global_cxxflags}" \
export FFLAGS="${FFLAGS:-%__global_fflags}" \
export FCFLAGS="${FCFLAGS:-%__global_fcflags}" \
export LDFLAGS="${LDFLAGS:-%__global_ldflags}" \
%{__meson} \\\
--buildtype=plain \\\
--prefix=%{_prefix} \\\
--libdir=%{_libdir} \\\
--libexecdir=%{_libexecdir} \\\
--bindir=%{_bindir} \\\
--sbindir=%{_sbindir} \\\
--includedir=%{_includedir} \\\
--datadir=%{_datadir} \\\
--mandir=%{_mandir} \\\
--infodir=%{_infodir} \\\
--localedir=%{_datadir}/locale \\\
--sysconfdir=%{_sysconfdir} \\\
--localstatedir=%{_localstatedir} \\\
--sharedstatedir=%{_sharedstatedir} \\\
--wrap-mode=%{__meson_wrap_mode} \\\
--auto-features=%{__meson_auto_features} \\\
%{_vpath_srcdir} %{_vpath_builddir} \\\
%{nil}
%define meson_build \
%ninja_build -C %{_vpath_builddir}
%define meson_install \
%ninja_install -C %{_vpath_builddir}
%define meson_test \
%ninja_test -C %{_vpath_builddir}
%endif
%description
The Data Plane Development Kit is a set of libraries and drivers for
fast packet processing in the user space.
@ -189,28 +114,9 @@ as L2 and L3 forwarding.
%endif
%prep
%if 0%{?rhel} && 0%{?rhel} < 8
%setup -q -a 1 -a 2 -n %{srcname}-%{?commit0:%{commit0}}%{!?commit0:%{ver}}
%else
%setup -q -n %{srcname}-%{?commit0:%{commit0}}%{!?commit0:%{ver}}
%endif
%autopatch -p1
%autosetup -n %{srcname}-stable-%{?commit0:%{commit0}}%{!?commit0:%{ver}} -p1
%build
%if 0%{?rhel} && 0%{?rhel} < 8
%{__python3} -m venv --clear %{venvdir}
pushd ninja-%{ninjaver}
%{venvdir}/bin/python configure.py --bootstrap --with-python %{venvdir}/bin/python
mv ninja %{venvdir}/bin
popd
pushd meson-%{mesonver}
%{venvdir}/bin/python setup.py install
popd
export PATH="%{venvdir}/bin:$PATH"
%endif
ENABLED_DRIVERS=(
bus/pci
bus/vdev
@ -268,10 +174,6 @@ done
%meson_build
%install
%if 0%{?rhel} && 0%{?rhel} < 8
export PATH="%{venvdir}/bin:$PATH"
%endif
%meson_install
# FIXME this file doesn't have chmod +x upstream
@ -322,6 +224,9 @@ rm -f %{buildroot}%{_libdir}/*.a
%endif
%changelog
* Fri Nov 19 2021 Timothy Redaelli <tredaelli@redhat.com> - 20.11.1-1
- Rebase to 20.11.1 (#2024994)
* Tue Feb 16 2021 Timothy Redaelli <tredaelli@redhat.com> - 20.11-3
- Fix gating since on DPDK 20.11 testpmd is called dpdk-testpmd

View File

@ -1 +1 @@
SHA512 (dpdk-20.11.tar.xz) = 3d63be6682d7bf2df9399a32d74399fe3db7d6d884b3f546c2f785f2f531ed1c7383f802b3de8fcbbbe18c5bc030db7d58808f9509f1c8c7e85b1bc6b81b1a8b
SHA512 (dpdk-20.11.1.tar.xz) = 8eda369ab880b1071d313530a09a3f7ac8c449811fc9151c58524264e3ea9868d35b21b9481fb22daa6068db7de285109d822387f845100d73cdbd18c7527c69