From 6e1ca2647e3582e41dc33757c49f628f8c740388 Mon Sep 17 00:00:00 2001 From: Luca Boccassi Date: Mon, 12 Jun 2017 13:57:06 +0100 Subject: [PATCH] Generate libdpdk-dev dependencies and dpdk recommends There are many, many binary packages in DPDK, and they constantly change. To avoid having to manually maintain the list of dependencies of libdpdk-dev and recommends of dpdk, generate them at build time depending on what is actually built for each architecture. Change-Id: I19f5f037c41dc4b1d61fb5b2c00e0f005431d8f0 Signed-off-by: Luca Boccassi --- debian/control | 69 ++-------------------------------------------------------- debian/rules | 7 ++++++ 2 files changed, 9 insertions(+), 67 deletions(-) diff --git a/debian/control b/debian/control index db3c12eb..57f41d78 100644 --- a/debian/control +++ b/debian/control @@ -35,26 +35,7 @@ Depends: hwdata, ${misc:Depends}, ${python:Depends}, ${shlibs:Depends} -Recommends: librte-pmd-af-packet1 (= ${binary:Version}), - librte-pmd-bnxt1 (= ${binary:Version}), - librte-pmd-bond1 (= ${binary:Version}), - librte-pmd-cxgbe1 (= ${binary:Version}), - librte-pmd-e1000-1 (= ${binary:Version}), - librte-pmd-ena1 (= ${binary:Version}), - librte-pmd-enic1 (= ${binary:Version}) [amd64 arm64 i386], - librte-pmd-fm10k1 (= ${binary:Version}) [amd64 i386], - librte-pmd-i40e1 (= ${binary:Version}), - librte-pmd-ixgbe1 (= ${binary:Version}) [amd64 arm64 i386], - librte-pmd-null-crypto1 (= ${binary:Version}), - librte-pmd-null1 (= ${binary:Version}), - librte-pmd-pcap1 (= ${binary:Version}), - librte-pmd-qede1 (= ${binary:Version}), - librte-pmd-ring2 (= ${binary:Version}), - librte-pmd-thunderx-nicvf1 (= ${binary:Version}), - librte-pmd-vhost1 (= ${binary:Version}), - librte-pmd-virtio1 (= ${binary:Version}), - librte-pmd-vmxnet3-uio1 (= ${binary:Version}) [amd64 arm64 i386], - librte-pmd-xenvirt1 (= ${binary:Version}) [amd64 arm64 i386] +Recommends: ${librte:Recommends}, Suggests: dpdk-doc, dpdk-igb-uio-dkms (= ${binary:Version}), dpdk-rte-kni-dkms (= ${binary:Version}), @@ -124,53 +105,7 @@ Architecture: amd64 arm64 i386 ppc64el Multi-Arch: same Pre-Depends: ${misc:Pre-Depends} Depends: libpcap-dev, - librte-acl2 (= ${binary:Version}), - librte-cfgfile2 (= ${binary:Version}), - librte-cmdline2 (= ${binary:Version}), - librte-cryptodev2 (= ${binary:Version}), - librte-distributor1 (= ${binary:Version}), - librte-eal3 (= ${binary:Version}), - librte-ethdev5 (= ${binary:Version}), - librte-hash2 (= ${binary:Version}), - librte-ip-frag1 (= ${binary:Version}), - librte-jobstats1 (= ${binary:Version}), - librte-kni2 (= ${binary:Version}) [amd64 arm64 ppc64el], - librte-kvargs1 (= ${binary:Version}), - librte-lpm2 (= ${binary:Version}), - librte-mbuf2 (= ${binary:Version}), - librte-mempool2 (= ${binary:Version}), - librte-meter1 (= ${binary:Version}), - librte-net1 (= ${binary:Version}), - librte-pdump1 (= ${binary:Version}), - librte-pipeline3 (= ${binary:Version}), - librte-pmd-af-packet1 (= ${binary:Version}), - librte-pmd-bnxt1 (= ${binary:Version}), - librte-pmd-bond1 (= ${binary:Version}), - librte-pmd-cxgbe1 (= ${binary:Version}), - librte-pmd-e1000-1 (= ${binary:Version}), - librte-pmd-ena1 (= ${binary:Version}), - librte-pmd-enic1 (= ${binary:Version}) [amd64 arm64 i386], - librte-pmd-fm10k1 (= ${binary:Version}) [amd64 i386], - librte-pmd-i40e1 (= ${binary:Version}), - librte-pmd-ixgbe1 (= ${binary:Version}) [amd64 arm64 i386], - librte-pmd-null-crypto1 (= ${binary:Version}), - librte-pmd-null1 (= ${binary:Version}), - librte-pmd-pcap1 (= ${binary:Version}), - librte-pmd-qede1 (= ${binary:Version}), - librte-pmd-ring2 (= ${binary:Version}), - librte-pmd-thunderx-nicvf1 (= ${binary:Version}), - librte-pmd-vhost1 (= ${binary:Version}), - librte-pmd-virtio1 (= ${binary:Version}), - librte-pmd-vmxnet3-uio1 (= ${binary:Version}) [amd64 arm64 i386], - librte-pmd-xenvirt1 (= ${binary:Version}) [amd64 arm64 i386], - librte-port3 (= ${binary:Version}), - librte-power1 (= ${binary:Version}), - librte-reorder1 (= ${binary:Version}), - librte-ring1 (= ${binary:Version}), - librte-sched1 (= ${binary:Version}), - librte-table2 (= ${binary:Version}), - librte-timer1 (= ${binary:Version}), - librte-vhost3 (= ${binary:Version}), + ${librte:Depends}, ${misc:Depends} Description: Data Plane Development Kit (basic development files) DPDK is a set of libraries for fast packet processing. Applications run diff --git a/debian/rules b/debian/rules index 33b98b5a..82eb417b 100755 --- a/debian/rules +++ b/debian/rules @@ -128,6 +128,13 @@ endif override_dh_gencontrol: dh_gencontrol + # debian/files will not exist until dh_gencontrol has ran at least once, + # so we need to run gencontrol for libdpdk-dev and libdpdk-dbgsym after. + # The list of libraries and PMDs is everchanging, so generate the dependency + # list for libdpdk-dev to avoid having to maintain it manually. + # Same for the recommends list for dpdk, were we want the PMDs and the mempools. + dh_gencontrol -p libdpdk-dev -- -V"librte:Depends=`grep -E 'librte-*' ./debian/files | grep -v dbgsym | tr '_' ' ' | awk '{ print $$1,"(=",$$2 ")" }' | paste -sd ',' - | sed -e 's/,/, /g'`" + dh_gencontrol -p dpdk -- -V"librte:Recommends=`grep -E 'librte-(pmd|mempool).*' ./debian/files | grep -v dbgsym | tr '_' ' ' | awk '{ print $$1,"(=",$$2 ")" }' | paste -sd ',' - | sed -e 's/,/, /g'`" ifneq (,$(findstring kernel_modules,$(DEB_BUILD_OPTIONS))) dh_gencontrol -p dpdk-modules-$(KVERS) -- \ -v`cat debian/VERSION` \ -- 2.16.6