dpdk.spec: linkage and file overlap
The dpdk-tools and dpdk packages copy the same files into %{_bindir}, which should be avoided. To fix this, setup an exclude. Additionally, there's an odd requirement imposed by using dpdk because of libraries not being linked in properly against the shared objects generated. To fix this, introduce the dt-needed patch. A version of this has been accepted upstream for some PMDs, but we will do this for all. Signed-off-by: Aaron Conole <aconole@redhat.com>
This commit is contained in:
parent
4c2d5be950
commit
8f01de6aa6
24
dpdk-2.1-dtneeded.patch
Normal file
24
dpdk-2.1-dtneeded.patch
Normal file
@ -0,0 +1,24 @@
|
||||
diff -up dpdk-2.0.0/lib/librte_eal/linuxapp/eal/Makefile.dtneeded dpdk-2.0.0/lib/librte_eal/linuxapp/eal/Makefile
|
||||
--- dpdk-2.0.0/lib/librte_eal/linuxapp/eal/Makefile.dtneeded 2015-04-03 17:13:45.000000000 +0300
|
||||
+++ dpdk-2.0.0/lib/librte_eal/linuxapp/eal/Makefile 2015-04-17 15:23:38.267984467 +0300
|
||||
@@ -53,6 +53,8 @@ CFLAGS += -I$(RTE_SDK)/drivers/net/af_packet
|
||||
CFLAGS += -I$(RTE_SDK)/lib/librte_ivshmem
|
||||
CFLAGS += $(WERROR_FLAGS) -O3
|
||||
|
||||
+LDLIBS += -ldl -lpthread
|
||||
+
|
||||
# specific to linuxapp exec-env
|
||||
SRCS-$(CONFIG_RTE_LIBRTE_EAL_LINUXAPP) := eal.c
|
||||
SRCS-$(CONFIG_RTE_LIBRTE_EAL_LINUXAPP) += eal_hugepage_info.c
|
||||
diff -up dpdk-2.1.0/drivers/net/pcap/Makefile.dtneeded dpdk-2.0.0/lib/librte_pmd_pcap/Makefile
|
||||
--- dpdk-2.1.0/drivers/net/pcap/Makefile.dtneeded 2015-04-03 17:13:45.000000000 +0300
|
||||
+++ dpdk-2.1.0/drivers/net/pcap/Makefile 2015-04-17 15:23:38.267984467 +0300
|
||||
@@ -37,6 +37,8 @@ include $(RTE_SDK)/mk/rte.vars.mk
|
||||
#
|
||||
LIB = librte_pmd_pcap.a
|
||||
|
||||
+LDLIBS += -lpcap
|
||||
+
|
||||
CFLAGS += -O3
|
||||
CFLAGS += $(WERROR_FLAGS)
|
||||
|
11
dpdk-dtneeded-2.2-accepted.patch
Normal file
11
dpdk-dtneeded-2.2-accepted.patch
Normal file
@ -0,0 +1,11 @@
|
||||
diff -up dpdk-2.0.0/lib/librte_vhost/Makefile.dtneeded dpdk-2.0.0/lib/librte_vhost/Makefile
|
||||
--- dpdk-2.0.0/lib/librte_vhost/Makefile.dtneeded 2015-04-03 17:13:45.000000000 +0300
|
||||
+++ dpdk-2.0.0/lib/librte_vhost/Makefile 2015-04-17 15:24:37.593834737 +0300
|
||||
@@ -44,6 +44,7 @@ CFLAGS += -I vhost_user
|
||||
else
|
||||
CFLAGS += -I vhost_cuse -lfuse
|
||||
LDFLAGS += -lfuse
|
||||
+LDLIBS += -lfuse
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_RTE_LIBRTE_VHOST_NUMA),y)
|
10
dpdk.spec
10
dpdk.spec
@ -12,6 +12,8 @@ URL: http://dpdk.org
|
||||
Source: http://dpdk.org/browse/dpdk/snapshot/dpdk-%{version}.tar.gz
|
||||
|
||||
Patch1: enic-pun-fix.patch
|
||||
Patch2: dpdk-2.1-dtneeded.patch
|
||||
Patch3: dpdk-dtneeded-2.2-accepted.patch
|
||||
|
||||
Summary: Set of libraries and drivers for fast packet processing
|
||||
|
||||
@ -84,6 +86,8 @@ Requires: kmod pciutils findutils iproute
|
||||
%prep
|
||||
%setup -q
|
||||
%patch1 -p2 -z .enic
|
||||
%patch2 -p1 -z .dtneeded
|
||||
%patch3 -p1 -z .accepted
|
||||
|
||||
%build
|
||||
# set up a method for modifying the resulting .config file
|
||||
@ -209,7 +213,7 @@ echo "GROUP (" > ${comblib}
|
||||
find %{buildroot}/%{_libdir}/ -name "*.${libext}" |\
|
||||
sed -e "s:^%{buildroot}/: :g" >> ${comblib}
|
||||
echo ")" >> ${comblib}
|
||||
install -m 755 ${comblib} %{buildroot}/%{_libdir}/${comblib}
|
||||
install -m 644 ${comblib} %{buildroot}/%{_libdir}/${comblib}
|
||||
|
||||
%files
|
||||
# BSD
|
||||
@ -217,6 +221,8 @@ install -m 755 ${comblib} %{buildroot}/%{_libdir}/${comblib}
|
||||
%exclude %{_bindir}/*.py
|
||||
%if %{with shared}
|
||||
%{_libdir}/*.so.*
|
||||
%{_libdir}/*_pmd_*.so
|
||||
%{_libdir}/*_pmd_*.so.*
|
||||
%endif
|
||||
|
||||
%files doc
|
||||
@ -232,6 +238,8 @@ install -m 755 ${comblib} %{buildroot}/%{_libdir}/${comblib}
|
||||
%{_libdir}/*.a
|
||||
%else
|
||||
%{_libdir}/*.so
|
||||
%exclude %{_libdir}/*_pmd_*.so
|
||||
%exclude %{_libdir}/*_pmd_*.so.*
|
||||
%endif
|
||||
|
||||
%if %{with tools}
|
||||
|
Loading…
Reference in New Issue
Block a user