From 53bfa920f506dd3ae602107d9cd18e70aa173bbb6780f12d1f037c81f2cbf586 Mon Sep 17 00:00:00 2001 From: Dirk Mueller Date: Tue, 21 Jun 2022 13:20:38 +0000 Subject: [PATCH] - also strip meson generated runpaths when installing examples manually (bsc#1200620) OBS-URL: https://build.opensuse.org/package/show/network/dpdk?expand=0&rev=139 --- dpdk.changes | 6 ++++++ dpdk.spec | 30 ++++++++++++++++-------------- 2 files changed, 22 insertions(+), 14 deletions(-) diff --git a/dpdk.changes b/dpdk.changes index 3717ba3..6100004 100644 --- a/dpdk.changes +++ b/dpdk.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Tue Jun 21 13:20:00 UTC 2022 - Dirk Müller + +- also strip meson generated runpaths when installing examples + manually (bsc#1200620) + ------------------------------------------------------------------- Wed May 25 10:13:44 UTC 2022 - Jiri Slaby diff --git a/dpdk.spec b/dpdk.spec index ec3140c..99175c3 100644 --- a/dpdk.spec +++ b/dpdk.spec @@ -20,7 +20,6 @@ %define flavor @BUILD_FLAVOR@%{nil} %define aarch64_machine armv8a %define exclusive_arch aarch64 x86_64 ppc64le - %define name_tag %{nil} %define summary_tag %{nil} %if "%{flavor}" == "thunderx" @@ -29,7 +28,6 @@ %define aarch64_machine thunderx %define exclusive_arch aarch64 %endif - # http://doc.dpdk.org/guides-21.11/linux_gsg/build_dpdk.html#adjusting-build-options %define platform generic %define machine auto @@ -67,6 +65,7 @@ BuildRequires: kernel-syms BuildRequires: libfdt-devel BuildRequires: meson >= 0.49.2 BuildRequires: modutils +BuildRequires: patchelf BuildRequires: pesign-obs-integration BuildRequires: pkgconfig BuildRequires: python3 @@ -214,15 +213,18 @@ done %install examples="%{?with_examples:all}" for flavor in %{flavors_to_build}; do - %meson_install - # Also install the example binaries - if [ ! -z "$examples" ]; then - for f in %{_vpath_builddir}/examples/dpdk-*; do - bn=$(basename "$f") - [ -f "$f" ] && install -Dm 0755 ${f} "%{buildroot}%{_bindir}/${bn/dpdk-/dpdk_example_}" - done - fi - examples="" + %meson_install + # Also install the example binaries + if [ ! -z "$examples" ]; then + for f in %{_vpath_builddir}/examples/dpdk-*; do + bn=$(basename "$f") + if [ -f "$f" ] ; then + install -Dm 0755 ${f} "%{buildroot}%{_bindir}/${bn/dpdk-/dpdk_example_}" + patchelf --remove-rpath "%{buildroot}%{_bindir}/${bn/dpdk-/dpdk_example_}" + fi + done + fi + examples="" done # Fix Kernel modules on Factory (/usr merge) @@ -232,8 +234,8 @@ mv %{buildroot}/lib/modules %{buildroot}%{_prefix}/lib %endif # Fix documentation -mkdir -p %{buildroot}%{docdir} -mv %{buildroot}%{_datadir}/doc/dpdk %{buildroot}%{docdir} +mkdir -p %{buildroot}%docdir +mv %{buildroot}%{_datadir}/doc/dpdk %{buildroot}%docdir %if ! %{with tools} # Remove tools if not needed @@ -251,7 +253,7 @@ find %{buildroot} -name "*.py" -exec sed -i 's|python$|python3|' \{\} + find %{buildroot} -name "*.py" -exec sed -i 's|env python|python|' \{\} + # Remove duplicates -%fdupes %{buildroot}/%{docdir} +%fdupes %{buildroot}/%docdir %fdupes %{buildroot}/%{sdkdir}/examples # Fix broken symlink (yes with * in its name)