summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndre McCurdy <armccurdy@gmail.com>2019-01-15 14:17:42 -0800
committerKhem Raj <raj.khem@gmail.com>2019-01-15 22:08:47 -0800
commit9e669a4cbcb1a14406f349f70c0ab7a2a1604138 (patch)
treef2433ddbff63b3490ef8d433381d0a80c1ee98bd
parentddb7541472947e463e35ad576c3fb936caf2ed01 (diff)
downloadmeta-openembedded-9e669a4cbcb1a14406f349f70c0ab7a2a1604138.tar.gz
tcpdump: misc recipe cleanup + drop obsolete workarounds
Remove obsolete workarounds and improve the workarounds that remain. For example, it hasn't been necessary to set ac_cv_linux_vers since tcpdump 4.6.0: https://github.com/the-tcpdump-group/tcpdump/commit/a42fc6e764abfe4a99eef993784733f735f6c874 Signed-off-by: Andre McCurdy <armccurdy@gmail.com> Signed-off-by: Khem Raj <raj.khem@gmail.com>
-rw-r--r--meta-networking/recipes-support/tcpdump/tcpdump/avoid-absolute-path-when-searching-for-libdlpi.patch30
-rw-r--r--meta-networking/recipes-support/tcpdump/tcpdump/unnecessary-to-check-libpcap.patch23
-rw-r--r--meta-networking/recipes-support/tcpdump/tcpdump_4.9.2.bb27
3 files changed, 54 insertions, 26 deletions
diff --git a/meta-networking/recipes-support/tcpdump/tcpdump/avoid-absolute-path-when-searching-for-libdlpi.patch b/meta-networking/recipes-support/tcpdump/tcpdump/avoid-absolute-path-when-searching-for-libdlpi.patch
new file mode 100644
index 000000000..d82c16053
--- /dev/null
+++ b/meta-networking/recipes-support/tcpdump/tcpdump/avoid-absolute-path-when-searching-for-libdlpi.patch
@@ -0,0 +1,30 @@
1From a2bfd28034d9aa48d8ff109c1314e53bc9779752 Mon Sep 17 00:00:00 2001
2From: Andre McCurdy <armccurdy@gmail.com>
3Date: Wed, 24 Oct 2018 22:26:08 -0700
4Subject: [PATCH] avoid absolute path when searching for libdlpi
5
6Let the build environment control library search paths.
7
8Upstream-Status: Inappropriate [OE specific]
9
10Signed-off-by: Andre McCurdy <armccurdy@gmail.com>
11---
12 configure.in | 2 +-
13 1 file changed, 1 insertion(+), 1 deletion(-)
14
15diff --git a/configure.in b/configure.in
16index c882909..52aefd6 100644
17--- a/configure.in
18+++ b/configure.in
19@@ -542,7 +542,7 @@ don't.])
20 fi
21
22 # libdlpi is needed for Solaris 11 and later.
23-AC_CHECK_LIB(dlpi, dlpi_walk, LIBS="$LIBS -ldlpi" LDFLAGS="-L/lib $LDFLAGS", ,-L/lib)
24+AC_CHECK_LIB(dlpi, dlpi_walk, LIBS="$LIBS -ldlpi")
25
26 dnl
27 dnl Check for "pcap_list_datalinks()", "pcap_set_datalink()",
28--
291.9.1
30
diff --git a/meta-networking/recipes-support/tcpdump/tcpdump/unnecessary-to-check-libpcap.patch b/meta-networking/recipes-support/tcpdump/tcpdump/unnecessary-to-check-libpcap.patch
index 8cefadf28..69d68baac 100644
--- a/meta-networking/recipes-support/tcpdump/tcpdump/unnecessary-to-check-libpcap.patch
+++ b/meta-networking/recipes-support/tcpdump/tcpdump/unnecessary-to-check-libpcap.patch
@@ -1,10 +1,8 @@
1From 741d77e42fc4af49804f7ee43b7237e01633cbcd Mon Sep 17 00:00:00 2001 1From dd023c133980fcc0cff5896e85377675e0571894 Mon Sep 17 00:00:00 2001
2From: Roy Li <rongqing.li@windriver.com> 2From: Roy Li <rongqing.li@windriver.com>
3Date: Tue, 8 Jul 2014 13:20:47 +0800 3Date: Tue, 8 Jul 2014 13:20:47 +0800
4Subject: [PATCH] unnecessary to check libpcap 4Subject: [PATCH] unnecessary to check libpcap
5 5
6Upstream-Status: Pending
7
8since the check of libpcap did not consider the cross-compile, lead to the 6since the check of libpcap did not consider the cross-compile, lead to the
9below error: 7below error:
10 This autoconf log indicates errors, it looked at host include and/or 8 This autoconf log indicates errors, it looked at host include and/or
@@ -13,22 +11,29 @@ below error:
13In fact, the libpcap has been added into the tcpdump's DEPENDS, not need to 11In fact, the libpcap has been added into the tcpdump's DEPENDS, not need to
14check if libpcap existed. 12check if libpcap existed.
15 13
16Signed-off-by: Roy Li <rongqing.li@windriver.com> 14Upstream-Status: Inappropriate [OE specific]
17 15
16Signed-off-by: Roy Li <rongqing.li@windriver.com>
17Signed-off-by: Andre McCurdy <armccurdy@gmail.com>
18--- 18---
19 configure.in | 2 +- 19 configure.in | 4 +++-
20 1 file changed, 1 insertion(+), 1 deletion(-) 20 1 file changed, 3 insertions(+), 1 deletion(-)
21 21
22diff --git a/configure.in b/configure.in 22diff --git a/configure.in b/configure.in
23index b2305a5..b3b5dbf 100644 23index b2305a5..c882909 100644
24--- a/configure.in 24--- a/configure.in
25+++ b/configure.in 25+++ b/configure.in
26@@ -418,7 +418,7 @@ dnl Some platforms may need -lnsl for getrpcbynumber. 26@@ -418,7 +418,9 @@ dnl Some platforms may need -lnsl for getrpcbynumber.
27 AC_SEARCH_LIBS(getrpcbynumber, nsl, 27 AC_SEARCH_LIBS(getrpcbynumber, nsl,
28 AC_DEFINE(HAVE_GETRPCBYNUMBER, 1, [define if you have getrpcbynumber()])) 28 AC_DEFINE(HAVE_GETRPCBYNUMBER, 1, [define if you have getrpcbynumber()]))
29 29
30-AC_LBL_LIBPCAP(V_PCAPDEP, V_INCLS) 30-AC_LBL_LIBPCAP(V_PCAPDEP, V_INCLS)
31+#AC_LBL_LIBPCAP(V_PCAPDEP, V_INCLS) 31+# Simplified (more cross compile friendly) check for libpcap. All we really
32+# need is to sanity check that libpcap is available and add -lpcap to LIBS.
33+AC_CHECK_LIB(pcap, pcap_compile, LIBS="$LIBS -lpcap")
32 34
33 # 35 #
34 # Check for these after AC_LBL_LIBPCAP, so we link with the appropriate 36 # Check for these after AC_LBL_LIBPCAP, so we link with the appropriate
37--
381.9.1
39
diff --git a/meta-networking/recipes-support/tcpdump/tcpdump_4.9.2.bb b/meta-networking/recipes-support/tcpdump/tcpdump_4.9.2.bb
index d38540e34..038c1617f 100644
--- a/meta-networking/recipes-support/tcpdump/tcpdump_4.9.2.bb
+++ b/meta-networking/recipes-support/tcpdump/tcpdump_4.9.2.bb
@@ -1,13 +1,15 @@
1SUMMARY = "A sophisticated network protocol analyzer" 1SUMMARY = "A sophisticated network protocol analyzer"
2HOMEPAGE = "http://www.tcpdump.org/" 2HOMEPAGE = "http://www.tcpdump.org/"
3SECTION = "net"
3LICENSE = "BSD" 4LICENSE = "BSD"
4LIC_FILES_CHKSUM = "file://LICENSE;md5=1d4b0366557951c84a94fabe3529f867" 5LIC_FILES_CHKSUM = "file://LICENSE;md5=1d4b0366557951c84a94fabe3529f867"
5SECTION = "net" 6
6DEPENDS = "libpcap" 7DEPENDS = "libpcap"
7 8
8SRC_URI = " \ 9SRC_URI = " \
9 http://www.tcpdump.org/release/${BP}.tar.gz \ 10 http://www.tcpdump.org/release/${BP}.tar.gz \
10 file://unnecessary-to-check-libpcap.patch \ 11 file://unnecessary-to-check-libpcap.patch \
12 file://avoid-absolute-path-when-searching-for-libdlpi.patch \
11 file://add-ptest.patch \ 13 file://add-ptest.patch \
12 file://run-ptest \ 14 file://run-ptest \
13" 15"
@@ -15,34 +17,25 @@ SRC_URI = " \
15SRC_URI[md5sum] = "9bbc1ee33dab61302411b02dd0515576" 17SRC_URI[md5sum] = "9bbc1ee33dab61302411b02dd0515576"
16SRC_URI[sha256sum] = "798b3536a29832ce0cbb07fafb1ce5097c95e308a6f592d14052e1ef1505fe79" 18SRC_URI[sha256sum] = "798b3536a29832ce0cbb07fafb1ce5097c95e308a6f592d14052e1ef1505fe79"
17 19
18export LIBS=" -lpcap"
19
20inherit autotools-brokensep ptest 20inherit autotools-brokensep ptest
21CACHED_CONFIGUREVARS = "ac_cv_linux_vers=${ac_cv_linux_vers=2}"
22 21
23PACKAGECONFIG ??= "openssl" 22PACKAGECONFIG ?= "openssl"
24PACKAGECONFIG[openssl] = "--with-crypto=yes, --without-openssl --without-crypto, openssl" 23
25PACKAGECONFIG[smi] = "--with-smi, --without-smi,libsmi" 24PACKAGECONFIG[libcap-ng] = "--with-cap-ng,--without-cap-ng,libcap-ng"
26PACKAGECONFIG[libcap-ng] = "--with-cap-ng=yes,--with-cap-ng=no,libcap-ng" 25PACKAGECONFIG[openssl] = "--with-crypto,--without-openssl --without-crypto,openssl"
26PACKAGECONFIG[smi] = "--with-smi,--without-smi,libsmi"
27 27
28EXTRA_AUTORECONF += " -I m4" 28EXTRA_AUTORECONF += "-I m4"
29 29
30do_configure_prepend() { 30do_configure_prepend() {
31 mkdir -p ${S}/m4 31 mkdir -p ${S}/m4
32 if [ -f aclocal.m4 ]; then 32 if [ -f aclocal.m4 ]; then
33 mv aclocal.m4 ${S}/m4 33 mv aclocal.m4 ${S}/m4
34 fi 34 fi
35 # AC_CHECK_LIB(dlpi.. was looking to host /lib
36 sed -i 's:-L/lib::g' ./configure.in
37}
38do_configure_append() {
39 sed -i 's:-L/usr/lib::' ./Makefile
40 sed -i 's:-Wl,-rpath,${STAGING_LIBDIR}::' ./Makefile
41 sed -i 's:-I/usr/include::' ./Makefile
42} 35}
43 36
44do_install_append() { 37do_install_append() {
45 # tcpdump 4.0.0 installs a copy to /usr/sbin/tcpdump.4.0.0 38 # make install installs an unneeded extra copy of the tcpdump binary
46 rm -f ${D}${sbindir}/tcpdump.${PV} 39 rm -f ${D}${sbindir}/tcpdump.${PV}
47} 40}
48 41