11%define _unpackaged_files_terminate_build 0
2-
3- # Define variables for kernel version and source directory
4- %global KVERSION %(/bin/rpm -q --queryformat '%{RPMTAG_VERSION }-%{RPMTAG_RELEASE }' $(/bin/rpm -q --whatprovides kernel-headers))
5- %global K_SRC %{_libdir }/modules/%{KVERSION }/build
6- %global moddestdir /lib/modules/%{KVERSION }/kernel/drivers/net/kni
7-
82# Add option to build without examples
93%define target %{machine_arch }-%{machine_tmpl }-linuxapp-gcc
104# machine_arch maps between rpm and dpdk arch name, often same as _target_cpu
3327# Add option to build with examples, tools subpackages
3428%bcond_with examples
3529%bcond_without tools
36-
3730Summary: Set of libraries and drivers for fast packet processing
3831Name: dpdk
3932Version: 21.11.2
40- Release: 3 %{?dist }
33+ Release: 2 %{?dist }
4134License: BSD AND LGPLv2 AND GPLv2
4235Vendor: Microsoft Corporation
4336Distribution: Mariner
@@ -54,7 +47,6 @@ BuildRequires: meson
5447BuildRequires: python3-pyelftools
5548BuildRequires: python3-sphinx
5649BuildRequires: zlib-devel
57- BuildRequires: kernel-devel
5850#
5951# The DPDK is designed to optimize througput of network traffic using, among
6052# other techniques, carefully crafted assembly instructions. As such it
@@ -122,8 +114,6 @@ CFLAGS="$(echo %{optflags} -fcommon)" \
122114 -Ddrivers_install_subdir=dpdk-pmds \
123115 -Denable_docs=true \
124116 -Dmachine=default \
125- -Denable_kmods=true \
126- -Dkernel_dir=%{K_SRC } \
127117%if %{with examples }
128118 -Dexamples=all \
129119%endif
@@ -138,12 +128,6 @@ CFLAGS="$(echo %{optflags} -fcommon)" \
138128%install
139129%meson_install
140130
141- # Install the kernel modules to the specified directory
142- mkdir -p %{buildroot }%{moddestdir }
143- echo "find %{_builddir }/dpdk-stable-%{version } -name rte_kni.ko -exec install -D -m 755 '{}' %{buildroot }%{moddestdir } \;" > install_kni.sh
144- chmod +x install_kni.sh
145- ./install_kni.sh
146-
147131%files
148132# BSD
149133%doc README MAINTAINERS
@@ -156,7 +140,6 @@ chmod +x install_kni.sh
156140%{_bindir }/dpdk-proc-info
157141%{_libdir }/* .so.*
158142%{pmddir }/* .so.*
159- %{moddestdir }/rte_kni.ko
160143
161144%files devel
162145#BSD
@@ -196,11 +179,6 @@ chmod +x install_kni.sh
196179%endif
197180
198181%changelog
199- * Wed May 22 2024 Dinesh Kumar Ramasamy <dramasamy@microsoft.com> - 21.11.2-3
200- - Enable KNI module in DPDK build
201- - Update spec file to set kernel source directory using KVERSION and K_SRC variables.
202- - Ensure correct installation directory for kernel modules using moddestdir variable.
203-
204182* Wed Sep 20 2023 Jon Slobodzian <joslobo@microsoft.com> - 21.11.2-2
205183- Recompile with stack-protection fixed gcc version (CVE-2023-4039)
206184
0 commit comments