tcpdump: Upgrade to version 4.6.1 to fix cross-builds
Poky dizzy is more strict with -I/usr/include and the old tcpdump could pick-up "/usr/bin/pcap-config" from the host and fail. Just upgrade to a newer version of tcpdump and be done with it.
This commit is contained in:
parent
2b5b343078
commit
c4d5061917
|
@ -1,22 +0,0 @@
|
||||||
From: Sergey Lapin <slapin@slind.org>
|
|
||||||
Date: Wed, 28 Jan 2009 16:34:15 +0300
|
|
||||||
Subject: [PATCH] minimal IEEE802.15.4 allowed
|
|
||||||
|
|
||||||
---
|
|
||||||
tcpdump.c | 3 +++
|
|
||||||
1 files changed, 3 insertions(+), 0 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/tcpdump.c b/tcpdump.c
|
|
||||||
index 06683af..fbc944c 100644
|
|
||||||
--- a/tcpdump.c
|
|
||||||
+++ b/tcpdump.c
|
|
||||||
@@ -282,6 +282,9 @@ static struct printer printers[] = {
|
|
||||||
#ifdef DLT_MFR
|
|
||||||
{ mfr_if_print, DLT_MFR },
|
|
||||||
#endif
|
|
||||||
+#ifdef DLT_IEEE802_15_4
|
|
||||||
+ { raw_if_print, DLT_IEEE802_15_4 },
|
|
||||||
+#endif
|
|
||||||
#if defined(DLT_BLUETOOTH_HCI_H4_WITH_PHDR) && defined(HAVE_PCAP_BLUETOOTH_H)
|
|
||||||
{ bt_if_print, DLT_BLUETOOTH_HCI_H4_WITH_PHDR},
|
|
||||||
#endif
|
|
|
@ -1,41 +0,0 @@
|
||||||
---
|
|
||||||
configure.in | 12 ++++++++----
|
|
||||||
1 files changed, 8 insertions(+), 4 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/configure.in b/configure.in
|
|
||||||
index eb3e5e8..11257c9 100644
|
|
||||||
--- a/configure.in
|
|
||||||
+++ b/configure.in
|
|
||||||
@@ -181,8 +181,9 @@ yes) AC_MSG_RESULT(yes)
|
|
||||||
ipv6=no
|
|
||||||
;;
|
|
||||||
esac ],
|
|
||||||
-
|
|
||||||
- AC_TRY_RUN([ /* AF_INET6 available check */
|
|
||||||
+[
|
|
||||||
+ if test x"$cross_compiling" != "xyes"; then
|
|
||||||
+ AC_TRY_RUN([ /* AF_INET6 avalable check */
|
|
||||||
#include <sys/types.h>
|
|
||||||
#include <sys/socket.h>
|
|
||||||
main()
|
|
||||||
@@ -201,7 +202,10 @@ main()
|
|
||||||
ipv6=no],
|
|
||||||
[ AC_MSG_RESULT(no)
|
|
||||||
ipv6=no]
|
|
||||||
-))
|
|
||||||
+ )
|
|
||||||
+else
|
|
||||||
+ AC_MSG_FAILURE([Unable to check for ipv6 when crosscompiling, please specify.])
|
|
||||||
+fi])
|
|
||||||
|
|
||||||
ipv6type=unknown
|
|
||||||
ipv6lib=none
|
|
||||||
@@ -316,7 +320,7 @@ if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
|
|
||||||
fi
|
|
||||||
|
|
||||||
|
|
||||||
-if test "$ipv6" = "yes"; then
|
|
||||||
+if test x"$cross_compiling" != "xyes" -a "$ipv6" = "yes"; then
|
|
||||||
#
|
|
||||||
# XXX - on Tru64 UNIX 5.1, there is no "getaddrinfo()"
|
|
||||||
# function in libc; there are "ngetaddrinfo()" and
|
|
|
@ -1,42 +0,0 @@
|
||||||
---
|
|
||||||
configure | 8 ++++----
|
|
||||||
1 files changed, 4 insertions(+), 4 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/configure b/configure
|
|
||||||
index cb51d19..73d51af 100755
|
|
||||||
--- a/configure
|
|
||||||
+++ b/configure
|
|
||||||
@@ -2691,13 +2691,13 @@ if test "$ac_test_CFLAGS" = set; then
|
|
||||||
CFLAGS=$ac_save_CFLAGS
|
|
||||||
elif test $ac_cv_prog_cc_g = yes; then
|
|
||||||
if test "$GCC" = yes; then
|
|
||||||
- CFLAGS="-g -O2"
|
|
||||||
+ CFLAGS="-g"
|
|
||||||
else
|
|
||||||
CFLAGS="-g"
|
|
||||||
fi
|
|
||||||
else
|
|
||||||
if test "$GCC" = yes; then
|
|
||||||
- CFLAGS="-O2"
|
|
||||||
+ CFLAGS=""
|
|
||||||
else
|
|
||||||
CFLAGS=
|
|
||||||
fi
|
|
||||||
@@ -2830,7 +2830,7 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
|
|
||||||
if test "$GCC" = yes ; then
|
|
||||||
if test "$SHLICC2" = yes ; then
|
|
||||||
ac_cv_lbl_gcc_vers=2
|
|
||||||
- V_CCOPT="-O2"
|
|
||||||
+ V_CCOPT=""
|
|
||||||
else
|
|
||||||
{ echo "$as_me:$LINENO: checking gcc version" >&5
|
|
||||||
echo $ECHO_N "checking gcc version... $ECHO_C" >&6; }
|
|
||||||
@@ -2847,7 +2847,7 @@ fi
|
|
||||||
{ echo "$as_me:$LINENO: result: $ac_cv_lbl_gcc_vers" >&5
|
|
||||||
echo "${ECHO_T}$ac_cv_lbl_gcc_vers" >&6; }
|
|
||||||
if test $ac_cv_lbl_gcc_vers -gt 1 ; then
|
|
||||||
- V_CCOPT="-O2"
|
|
||||||
+ V_CCOPT=""
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
else
|
|
|
@ -0,0 +1,38 @@
|
||||||
|
From 7b259580800e259d232229dc89f97058b56e2fe8 Mon Sep 17 00:00:00 2001
|
||||||
|
From: "Hongjun.Yang" <hongjun.yang@windriver.com>
|
||||||
|
Date: Wed, 22 Oct 2014 10:02:48 +0800
|
||||||
|
Subject: [PATCH] Add ptest for tcpdump
|
||||||
|
|
||||||
|
Upstream-Status: Pending
|
||||||
|
|
||||||
|
Signed-off-by: Hongjun.Yang <hongjun.yang@windriver.com>
|
||||||
|
---
|
||||||
|
Makefile.in | 10 +++++++++-
|
||||||
|
1 file changed, 9 insertions(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/Makefile.in b/Makefile.in
|
||||||
|
index 8c35a45..4fb8ae6 100644
|
||||||
|
--- a/Makefile.in
|
||||||
|
+++ b/Makefile.in
|
||||||
|
@@ -428,9 +428,17 @@ distclean:
|
||||||
|
tests/failure-outputs.txt
|
||||||
|
rm -rf autom4te.cache tests/DIFF tests/NEW
|
||||||
|
|
||||||
|
-check: tcpdump
|
||||||
|
+buildtest-TESTS: tcpdump
|
||||||
|
+
|
||||||
|
+runtest-PTEST:
|
||||||
|
(cd tests && ./TESTrun.sh)
|
||||||
|
|
||||||
|
+install-ptest:
|
||||||
|
+ cp -r tests $(DESTDIR)
|
||||||
|
+ cp -r config.h $(DESTDIR)
|
||||||
|
+ install -m 0755 Makefile $(DESTDIR)
|
||||||
|
+ ln -sf /usr/sbin/tcpdump $(DESTDIR)/tcpdump
|
||||||
|
+
|
||||||
|
tags: $(TAGFILES)
|
||||||
|
ctags -wtd $(TAGFILES)
|
||||||
|
|
||||||
|
--
|
||||||
|
1.9.1
|
||||||
|
|
|
@ -0,0 +1,5 @@
|
||||||
|
#!/bin/sh
|
||||||
|
make -k runtest-PTEST | sed -e '/: passed/ s/^/PASS: /g' \
|
||||||
|
-e '/: failed/ s/^/FAIL: /g' \
|
||||||
|
-e 's/: passed//g' \
|
||||||
|
-e 's/: failed//g'
|
|
@ -0,0 +1,31 @@
|
||||||
|
[PATCH] tcpdump: cross-compiling not check dlpi.
|
||||||
|
|
||||||
|
For cross-compiling on Linux platforms, we do not need to check libdlpi
|
||||||
|
since it is only placed on Solaris.
|
||||||
|
Also, checking libdlpi in native /lib would cause do_qa_configure fail.
|
||||||
|
|
||||||
|
Upstream-Status: Pending.
|
||||||
|
|
||||||
|
Signed-off-by: Xin Ouyang <Xin.Ouyang@windriver.com>
|
||||||
|
---
|
||||||
|
configure.in | 4 +++-
|
||||||
|
1 files changed, 3 insertions(+), 1 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/configure.in b/configure.in
|
||||||
|
index 7f9591c..ca277c0 100644
|
||||||
|
--- a/configure.in
|
||||||
|
+++ b/configure.in
|
||||||
|
@@ -716,7 +716,9 @@ don't.])
|
||||||
|
fi
|
||||||
|
|
||||||
|
# libdlpi is needed for Solaris 11 and later.
|
||||||
|
-AC_CHECK_LIB(dlpi, dlpi_walk, LIBS="$LIBS -ldlpi" LDFLAGS="-L/lib $LDFLAGS", ,-L/lib)
|
||||||
|
+if test "$cross_compiling" != yes; then
|
||||||
|
+ AC_CHECK_LIB(dlpi, dlpi_walk, LIBS="$LIBS -ldlpi" LDFLAGS="-L/lib $LDFLAGS", ,-L/lib)
|
||||||
|
+fi
|
||||||
|
|
||||||
|
dnl portability macros for getaddrinfo/getnameinfo
|
||||||
|
dnl
|
||||||
|
--
|
||||||
|
1.7.5.4
|
||||||
|
|
|
@ -0,0 +1,23 @@
|
||||||
|
Fix getaddinfo check when cross compiling
|
||||||
|
|
||||||
|
Upstream-Status: Pending.
|
||||||
|
|
||||||
|
AC_TRY_RUN defaults to td_cv_buggygetaddrinfo=yes when
|
||||||
|
cross-compiling. So this change indicates that we
|
||||||
|
are cross-compiling.
|
||||||
|
|
||||||
|
Signed-of-by: Aws Ismail <aws.ismail@windriver.com>
|
||||||
|
|
||||||
|
diff --git a/configure.in b/configure.in
|
||||||
|
index ca277c0..283035e 100644
|
||||||
|
--- a/configure.in
|
||||||
|
+++ b/configure.in
|
||||||
|
@@ -434,7 +434,7 @@ main()
|
||||||
|
],
|
||||||
|
td_cv_buggygetaddrinfo=no,
|
||||||
|
td_cv_buggygetaddrinfo=yes,
|
||||||
|
- td_cv_buggygetaddrinfo=yes)])
|
||||||
|
+ td_cv_buggygetaddrinfo=cross)])
|
||||||
|
if test "$td_cv_buggygetaddrinfo" = no; then
|
||||||
|
AC_MSG_RESULT(good)
|
||||||
|
else
|
|
@ -0,0 +1,33 @@
|
||||||
|
unnecessary to check libpcap
|
||||||
|
|
||||||
|
Upstream-Status: Pending
|
||||||
|
|
||||||
|
since the check of libpcap did not consider the cross-compile, lead to the
|
||||||
|
below error:
|
||||||
|
This autoconf log indicates errors, it looked at host include and/or
|
||||||
|
library paths while determining system capabilities.
|
||||||
|
|
||||||
|
In fact, the libpcap has been added into the tcpdump's DEPENDS, not need to
|
||||||
|
check if libpcap existed.
|
||||||
|
|
||||||
|
Signed-off-by: Roy Li <rongqing.li@windriver.com>
|
||||||
|
---
|
||||||
|
configure.in | 2 +-
|
||||||
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/configure.in b/configure.in
|
||||||
|
index 06fade1..9125de7 100644
|
||||||
|
--- a/configure.in
|
||||||
|
+++ b/configure.in
|
||||||
|
@@ -567,7 +567,7 @@ AC_SEARCH_LIBS(getrpcbynumber, nsl,
|
||||||
|
dnl AC_CHECK_LIB(z, uncompress)
|
||||||
|
dnl AC_CHECK_HEADERS(zlib.h)
|
||||||
|
|
||||||
|
-AC_LBL_LIBPCAP(V_PCAPDEP, V_INCLS)
|
||||||
|
+#AC_LBL_LIBPCAP(V_PCAPDEP, V_INCLS)
|
||||||
|
|
||||||
|
#
|
||||||
|
# Check for these after AC_LBL_LIBPCAP, so we link with the appropriate
|
||||||
|
--
|
||||||
|
1.7.9.5
|
||||||
|
|
|
@ -1,41 +0,0 @@
|
||||||
DESCRIPTION = "A sophisticated network protocol analyzer"
|
|
||||||
HOMEPAGE = "http://www.tcpdump.org/"
|
|
||||||
LICENSE = "BSD"
|
|
||||||
LIC_FILES_CHKSUM = "file://LICENSE;md5=1d4b0366557951c84a94fabe3529f867"
|
|
||||||
SECTION = "console/network"
|
|
||||||
DEPENDS = "libpcap"
|
|
||||||
PR = "r1"
|
|
||||||
|
|
||||||
SRC_URI = " \
|
|
||||||
http://www.tcpdump.org/release/tcpdump-${PV}.tar.gz \
|
|
||||||
file://tcpdump_configure_no_-O2.patch \
|
|
||||||
file://0001-minimal-IEEE802.15.4-allowed.patch \
|
|
||||||
file://ipv6-cross.patch \
|
|
||||||
file://configure.patch \
|
|
||||||
"
|
|
||||||
|
|
||||||
inherit autotools
|
|
||||||
# ac_cv_linux_vers=${ac_cv_linux_vers=2}
|
|
||||||
|
|
||||||
EXTRA_OECONF = "--without-crypto \
|
|
||||||
${@base_contains('DISTRO_FEATURES', 'ipv6', '--enable-ipv6', '--disable-ipv6', d)}"
|
|
||||||
|
|
||||||
do_configure() {
|
|
||||||
# AC_CHECK_LIB(dlpi.. was looking to host /lib
|
|
||||||
sed -i 's:-L/lib:-L${STAGING_LIBDIR}:g' ./configure.in
|
|
||||||
|
|
||||||
gnu-configize
|
|
||||||
autoconf
|
|
||||||
oe_runconf
|
|
||||||
sed -i 's:/usr/lib:${STAGING_LIBDIR}:' ./Makefile
|
|
||||||
sed -i 's:/usr/include:${STAGING_INCDIR}:' ./Makefile
|
|
||||||
}
|
|
||||||
|
|
||||||
do_install_append() {
|
|
||||||
# tcpdump 4.0.0 installs a copy to /usr/sbin/tcpdump.4.0.0
|
|
||||||
rm -f ${D}${sbindir}/tcpdump.${PV}
|
|
||||||
}
|
|
||||||
|
|
||||||
SRC_URI[md5sum] = "d0dd58bbd6cd36795e05c6f1f74420b0"
|
|
||||||
SRC_URI[sha256sum] = "e6cd4bbd61ec7adbb61ba8352c4b4734f67b8caaa845d88cb826bc0b9f1e7f0a"
|
|
||||||
|
|
|
@ -0,0 +1,51 @@
|
||||||
|
SUMMARY = "A sophisticated network protocol analyzer"
|
||||||
|
HOMEPAGE = "http://www.tcpdump.org/"
|
||||||
|
LICENSE = "BSD"
|
||||||
|
LIC_FILES_CHKSUM = "file://LICENSE;md5=1d4b0366557951c84a94fabe3529f867"
|
||||||
|
SECTION = "console/network"
|
||||||
|
DEPENDS = "libpcap"
|
||||||
|
|
||||||
|
SRC_URI = " \
|
||||||
|
http://www.tcpdump.org/release/${BP}.tar.gz \
|
||||||
|
file://configure.patch \
|
||||||
|
file://unnecessary-to-check-libpcap.patch \
|
||||||
|
file://tcpdump-configure-dlpi.patch \
|
||||||
|
file://tcpdump-cross-getaddrinfo.patch \
|
||||||
|
file://add-ptest.patch \
|
||||||
|
file://run-ptest \
|
||||||
|
"
|
||||||
|
SRC_URI[md5sum] = "dab267ec30216a069747d10314079ec7"
|
||||||
|
SRC_URI[sha256sum] = "4c88c2a9aeb4047074f344fc9b2b6577b219972d359e192f6d12ccf983a13fd7"
|
||||||
|
export LIBS=" -lpcap"
|
||||||
|
|
||||||
|
inherit autotools-brokensep ptest
|
||||||
|
CACHED_CONFIGUREVARS = "ac_cv_linux_vers=${ac_cv_linux_vers=2}"
|
||||||
|
|
||||||
|
PACKAGECONFIG ??= "openssl ipv6"
|
||||||
|
PACKAGECONFIG[openssl] = "--with-crypto=yes, --without-openssl --without-crypto, openssl"
|
||||||
|
PACKAGECONFIG[ipv6] = "--enable-ipv6, --disable-ipv6,"
|
||||||
|
|
||||||
|
EXTRA_AUTORECONF += " -I m4"
|
||||||
|
|
||||||
|
do_configure_prepend() {
|
||||||
|
mkdir -p ${S}/m4
|
||||||
|
if [ -f aclocal.m4 ]; then
|
||||||
|
mv aclocal.m4 ${S}/m4
|
||||||
|
fi
|
||||||
|
# AC_CHECK_LIB(dlpi.. was looking to host /lib
|
||||||
|
sed -i 's:-L/lib::g' ./configure.in
|
||||||
|
}
|
||||||
|
do_configure_append() {
|
||||||
|
sed -i 's:-L/usr/lib::' ./Makefile
|
||||||
|
sed -i 's:-Wl,-rpath,${STAGING_LIBDIR}::' ./Makefile
|
||||||
|
sed -i 's:-I/usr/include::' ./Makefile
|
||||||
|
}
|
||||||
|
|
||||||
|
do_install_append() {
|
||||||
|
# tcpdump 4.0.0 installs a copy to /usr/sbin/tcpdump.4.0.0
|
||||||
|
rm -f ${D}${sbindir}/tcpdump.${PV}
|
||||||
|
}
|
||||||
|
|
||||||
|
do_compile_ptest() {
|
||||||
|
oe_runmake buildtest-TESTS
|
||||||
|
}
|
Loading…
Reference in New Issue