From 53d55216c8c721d3b66ec8f968737bf081def870 Mon Sep 17 00:00:00 2001 From: Roy Li Date: Thu, 23 Apr 2015 16:08:53 +0800 Subject: tcpdump: upgrade to 4.7.4 Remove two unneeded patches, configure.patch and tcpdump-cross-getaddrinfo.patch Signed-off-by: Roy Li Signed-off-by: Joe MacDonald --- .../tcpdump/tcpdump-4.6.1/add-ptest.patch | 38 ---------------- .../tcpdump/tcpdump-4.6.1/configure.patch | 29 ------------ .../tcpdump/tcpdump-4.6.1/run-ptest | 5 --- .../tcpdump-4.6.1/tcpdump-configure-dlpi.patch | 31 ------------- .../tcpdump-4.6.1/tcpdump-cross-getaddrinfo.patch | 23 ---------- .../unnecessary-to-check-libpcap.patch | 33 -------------- .../tcpdump/tcpdump/add-ptest.patch | 38 ++++++++++++++++ .../recipes-support/tcpdump/tcpdump/run-ptest | 5 +++ .../tcpdump/tcpdump/tcpdump-configure-dlpi.patch | 31 +++++++++++++ .../tcpdump/unnecessary-to-check-libpcap.patch | 33 ++++++++++++++ .../recipes-support/tcpdump/tcpdump_4.6.1.bb | 51 ---------------------- .../recipes-support/tcpdump/tcpdump_4.7.4.bb | 49 +++++++++++++++++++++ 12 files changed, 156 insertions(+), 210 deletions(-) delete mode 100644 meta-networking/recipes-support/tcpdump/tcpdump-4.6.1/add-ptest.patch delete mode 100644 meta-networking/recipes-support/tcpdump/tcpdump-4.6.1/configure.patch delete mode 100755 meta-networking/recipes-support/tcpdump/tcpdump-4.6.1/run-ptest delete mode 100644 meta-networking/recipes-support/tcpdump/tcpdump-4.6.1/tcpdump-configure-dlpi.patch delete mode 100644 meta-networking/recipes-support/tcpdump/tcpdump-4.6.1/tcpdump-cross-getaddrinfo.patch delete mode 100644 meta-networking/recipes-support/tcpdump/tcpdump-4.6.1/unnecessary-to-check-libpcap.patch create mode 100644 meta-networking/recipes-support/tcpdump/tcpdump/add-ptest.patch create mode 100755 meta-networking/recipes-support/tcpdump/tcpdump/run-ptest create mode 100644 meta-networking/recipes-support/tcpdump/tcpdump/tcpdump-configure-dlpi.patch create mode 100644 meta-networking/recipes-support/tcpdump/tcpdump/unnecessary-to-check-libpcap.patch delete mode 100644 meta-networking/recipes-support/tcpdump/tcpdump_4.6.1.bb create mode 100644 meta-networking/recipes-support/tcpdump/tcpdump_4.7.4.bb diff --git a/meta-networking/recipes-support/tcpdump/tcpdump-4.6.1/add-ptest.patch b/meta-networking/recipes-support/tcpdump/tcpdump-4.6.1/add-ptest.patch deleted file mode 100644 index 358f6050f6..0000000000 --- a/meta-networking/recipes-support/tcpdump/tcpdump-4.6.1/add-ptest.patch +++ /dev/null @@ -1,38 +0,0 @@ -From 7b259580800e259d232229dc89f97058b56e2fe8 Mon Sep 17 00:00:00 2001 -From: "Hongjun.Yang" -Date: Wed, 22 Oct 2014 10:02:48 +0800 -Subject: [PATCH] Add ptest for tcpdump - -Upstream-Status: Pending - -Signed-off-by: Hongjun.Yang ---- - 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 - diff --git a/meta-networking/recipes-support/tcpdump/tcpdump-4.6.1/configure.patch b/meta-networking/recipes-support/tcpdump/tcpdump-4.6.1/configure.patch deleted file mode 100644 index 3697420fd3..0000000000 --- a/meta-networking/recipes-support/tcpdump/tcpdump-4.6.1/configure.patch +++ /dev/null @@ -1,29 +0,0 @@ ---- - aclocal.m4 | 1 - - configure.in | 1 + - 2 files changed, 1 insertions(+), 1 deletions(-) - -diff --git a/aclocal.m4 b/aclocal.m4 -index 40b5866..0c662b0 100644 ---- a/aclocal.m4 -+++ b/aclocal.m4 -@@ -40,7 +40,6 @@ dnl - AC_DEFUN(AC_LBL_C_INIT_BEFORE_CC, - [AC_PREREQ(2.50) - AC_BEFORE([$0], [AC_LBL_C_INIT]) -- AC_BEFORE([$0], [AC_PROG_CC]) - AC_BEFORE([$0], [AC_LBL_FIXINCLUDES]) - AC_BEFORE([$0], [AC_LBL_DEVEL]) - AC_ARG_WITH(gcc, [ --without-gcc don't use gcc]) -diff --git a/configure.in b/configure.in -index 11257c9..7f9591c 100644 ---- a/configure.in -+++ b/configure.in -@@ -19,6 +19,7 @@ AC_REVISION($Revision: 1.204 $) - AC_PREREQ(2.50) - AC_INIT(tcpdump.c) - -+AC_PROG_CC - AC_CANONICAL_HOST - - AC_LBL_C_INIT_BEFORE_CC(V_CCOPT, V_INCLS) diff --git a/meta-networking/recipes-support/tcpdump/tcpdump-4.6.1/run-ptest b/meta-networking/recipes-support/tcpdump/tcpdump-4.6.1/run-ptest deleted file mode 100755 index c03a8b8ef3..0000000000 --- a/meta-networking/recipes-support/tcpdump/tcpdump-4.6.1/run-ptest +++ /dev/null @@ -1,5 +0,0 @@ -#!/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' diff --git a/meta-networking/recipes-support/tcpdump/tcpdump-4.6.1/tcpdump-configure-dlpi.patch b/meta-networking/recipes-support/tcpdump/tcpdump-4.6.1/tcpdump-configure-dlpi.patch deleted file mode 100644 index 50e2d54399..0000000000 --- a/meta-networking/recipes-support/tcpdump/tcpdump-4.6.1/tcpdump-configure-dlpi.patch +++ /dev/null @@ -1,31 +0,0 @@ -[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 ---- - 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 - diff --git a/meta-networking/recipes-support/tcpdump/tcpdump-4.6.1/tcpdump-cross-getaddrinfo.patch b/meta-networking/recipes-support/tcpdump/tcpdump-4.6.1/tcpdump-cross-getaddrinfo.patch deleted file mode 100644 index b414b72e9d..0000000000 --- a/meta-networking/recipes-support/tcpdump/tcpdump-4.6.1/tcpdump-cross-getaddrinfo.patch +++ /dev/null @@ -1,23 +0,0 @@ -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 - -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 diff --git a/meta-networking/recipes-support/tcpdump/tcpdump-4.6.1/unnecessary-to-check-libpcap.patch b/meta-networking/recipes-support/tcpdump/tcpdump-4.6.1/unnecessary-to-check-libpcap.patch deleted file mode 100644 index d7a3ac23b1..0000000000 --- a/meta-networking/recipes-support/tcpdump/tcpdump-4.6.1/unnecessary-to-check-libpcap.patch +++ /dev/null @@ -1,33 +0,0 @@ -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 ---- - 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 - diff --git a/meta-networking/recipes-support/tcpdump/tcpdump/add-ptest.patch b/meta-networking/recipes-support/tcpdump/tcpdump/add-ptest.patch new file mode 100644 index 0000000000..358f6050f6 --- /dev/null +++ b/meta-networking/recipes-support/tcpdump/tcpdump/add-ptest.patch @@ -0,0 +1,38 @@ +From 7b259580800e259d232229dc89f97058b56e2fe8 Mon Sep 17 00:00:00 2001 +From: "Hongjun.Yang" +Date: Wed, 22 Oct 2014 10:02:48 +0800 +Subject: [PATCH] Add ptest for tcpdump + +Upstream-Status: Pending + +Signed-off-by: Hongjun.Yang +--- + 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 + diff --git a/meta-networking/recipes-support/tcpdump/tcpdump/run-ptest b/meta-networking/recipes-support/tcpdump/tcpdump/run-ptest new file mode 100755 index 0000000000..c03a8b8ef3 --- /dev/null +++ b/meta-networking/recipes-support/tcpdump/tcpdump/run-ptest @@ -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' diff --git a/meta-networking/recipes-support/tcpdump/tcpdump/tcpdump-configure-dlpi.patch b/meta-networking/recipes-support/tcpdump/tcpdump/tcpdump-configure-dlpi.patch new file mode 100644 index 0000000000..50e2d54399 --- /dev/null +++ b/meta-networking/recipes-support/tcpdump/tcpdump/tcpdump-configure-dlpi.patch @@ -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 +--- + 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 + 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 new file mode 100644 index 0000000000..d7a3ac23b1 --- /dev/null +++ b/meta-networking/recipes-support/tcpdump/tcpdump/unnecessary-to-check-libpcap.patch @@ -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 +--- + 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 + diff --git a/meta-networking/recipes-support/tcpdump/tcpdump_4.6.1.bb b/meta-networking/recipes-support/tcpdump/tcpdump_4.6.1.bb deleted file mode 100644 index 1fdaf308d8..0000000000 --- a/meta-networking/recipes-support/tcpdump/tcpdump_4.6.1.bb +++ /dev/null @@ -1,51 +0,0 @@ -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 -} diff --git a/meta-networking/recipes-support/tcpdump/tcpdump_4.7.4.bb b/meta-networking/recipes-support/tcpdump/tcpdump_4.7.4.bb new file mode 100644 index 0000000000..e01f5fb963 --- /dev/null +++ b/meta-networking/recipes-support/tcpdump/tcpdump_4.7.4.bb @@ -0,0 +1,49 @@ +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://unnecessary-to-check-libpcap.patch \ + file://tcpdump-configure-dlpi.patch \ + file://add-ptest.patch \ + file://run-ptest \ +" +SRC_URI[md5sum] = "58af728de36f499341918fc4b8e827c3" +SRC_URI[sha256sum] = "6be520269a89036f99c0b2126713a60965953eab921002b07608ccfc0c47d9af" +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 +} -- cgit 1.2.3-korg