diff options
| author | Andre McCurdy <armccurdy@gmail.com> | 2019-01-15 14:17:42 -0800 |
|---|---|---|
| committer | Khem Raj <raj.khem@gmail.com> | 2019-01-15 22:08:47 -0800 |
| commit | 9e669a4cbcb1a14406f349f70c0ab7a2a1604138 (patch) | |
| tree | f2433ddbff63b3490ef8d433381d0a80c1ee98bd | |
| parent | ddb7541472947e463e35ad576c3fb936caf2ed01 (diff) | |
| download | meta-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>
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 0000000000..d82c16053e --- /dev/null +++ b/meta-networking/recipes-support/tcpdump/tcpdump/avoid-absolute-path-when-searching-for-libdlpi.patch | |||
| @@ -0,0 +1,30 @@ | |||
| 1 | From a2bfd28034d9aa48d8ff109c1314e53bc9779752 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Andre McCurdy <armccurdy@gmail.com> | ||
| 3 | Date: Wed, 24 Oct 2018 22:26:08 -0700 | ||
| 4 | Subject: [PATCH] avoid absolute path when searching for libdlpi | ||
| 5 | |||
| 6 | Let the build environment control library search paths. | ||
| 7 | |||
| 8 | Upstream-Status: Inappropriate [OE specific] | ||
| 9 | |||
| 10 | Signed-off-by: Andre McCurdy <armccurdy@gmail.com> | ||
| 11 | --- | ||
| 12 | configure.in | 2 +- | ||
| 13 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
| 14 | |||
| 15 | diff --git a/configure.in b/configure.in | ||
| 16 | index 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 | -- | ||
| 29 | 1.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 8cefadf284..69d68baac4 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 @@ | |||
| 1 | From 741d77e42fc4af49804f7ee43b7237e01633cbcd Mon Sep 17 00:00:00 2001 | 1 | From dd023c133980fcc0cff5896e85377675e0571894 Mon Sep 17 00:00:00 2001 |
| 2 | From: Roy Li <rongqing.li@windriver.com> | 2 | From: Roy Li <rongqing.li@windriver.com> |
| 3 | Date: Tue, 8 Jul 2014 13:20:47 +0800 | 3 | Date: Tue, 8 Jul 2014 13:20:47 +0800 |
| 4 | Subject: [PATCH] unnecessary to check libpcap | 4 | Subject: [PATCH] unnecessary to check libpcap |
| 5 | 5 | ||
| 6 | Upstream-Status: Pending | ||
| 7 | |||
| 8 | since the check of libpcap did not consider the cross-compile, lead to the | 6 | since the check of libpcap did not consider the cross-compile, lead to the |
| 9 | below error: | 7 | below 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: | |||
| 13 | In fact, the libpcap has been added into the tcpdump's DEPENDS, not need to | 11 | In fact, the libpcap has been added into the tcpdump's DEPENDS, not need to |
| 14 | check if libpcap existed. | 12 | check if libpcap existed. |
| 15 | 13 | ||
| 16 | Signed-off-by: Roy Li <rongqing.li@windriver.com> | 14 | Upstream-Status: Inappropriate [OE specific] |
| 17 | 15 | ||
| 16 | Signed-off-by: Roy Li <rongqing.li@windriver.com> | ||
| 17 | Signed-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 | ||
| 22 | diff --git a/configure.in b/configure.in | 22 | diff --git a/configure.in b/configure.in |
| 23 | index b2305a5..b3b5dbf 100644 | 23 | index 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 | -- | ||
| 38 | 1.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 d38540e34d..038c1617fc 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 @@ | |||
| 1 | SUMMARY = "A sophisticated network protocol analyzer" | 1 | SUMMARY = "A sophisticated network protocol analyzer" |
| 2 | HOMEPAGE = "http://www.tcpdump.org/" | 2 | HOMEPAGE = "http://www.tcpdump.org/" |
| 3 | SECTION = "net" | ||
| 3 | LICENSE = "BSD" | 4 | LICENSE = "BSD" |
| 4 | LIC_FILES_CHKSUM = "file://LICENSE;md5=1d4b0366557951c84a94fabe3529f867" | 5 | LIC_FILES_CHKSUM = "file://LICENSE;md5=1d4b0366557951c84a94fabe3529f867" |
| 5 | SECTION = "net" | 6 | |
| 6 | DEPENDS = "libpcap" | 7 | DEPENDS = "libpcap" |
| 7 | 8 | ||
| 8 | SRC_URI = " \ | 9 | SRC_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 = " \ | |||
| 15 | SRC_URI[md5sum] = "9bbc1ee33dab61302411b02dd0515576" | 17 | SRC_URI[md5sum] = "9bbc1ee33dab61302411b02dd0515576" |
| 16 | SRC_URI[sha256sum] = "798b3536a29832ce0cbb07fafb1ce5097c95e308a6f592d14052e1ef1505fe79" | 18 | SRC_URI[sha256sum] = "798b3536a29832ce0cbb07fafb1ce5097c95e308a6f592d14052e1ef1505fe79" |
| 17 | 19 | ||
| 18 | export LIBS=" -lpcap" | ||
| 19 | |||
| 20 | inherit autotools-brokensep ptest | 20 | inherit autotools-brokensep ptest |
| 21 | CACHED_CONFIGUREVARS = "ac_cv_linux_vers=${ac_cv_linux_vers=2}" | ||
| 22 | 21 | ||
| 23 | PACKAGECONFIG ??= "openssl" | 22 | PACKAGECONFIG ?= "openssl" |
| 24 | PACKAGECONFIG[openssl] = "--with-crypto=yes, --without-openssl --without-crypto, openssl" | 23 | |
| 25 | PACKAGECONFIG[smi] = "--with-smi, --without-smi,libsmi" | 24 | PACKAGECONFIG[libcap-ng] = "--with-cap-ng,--without-cap-ng,libcap-ng" |
| 26 | PACKAGECONFIG[libcap-ng] = "--with-cap-ng=yes,--with-cap-ng=no,libcap-ng" | 25 | PACKAGECONFIG[openssl] = "--with-crypto,--without-openssl --without-crypto,openssl" |
| 26 | PACKAGECONFIG[smi] = "--with-smi,--without-smi,libsmi" | ||
| 27 | 27 | ||
| 28 | EXTRA_AUTORECONF += " -I m4" | 28 | EXTRA_AUTORECONF += "-I m4" |
| 29 | 29 | ||
| 30 | do_configure_prepend() { | 30 | do_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 | } | ||
| 38 | do_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 | ||
| 44 | do_install_append() { | 37 | do_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 | ||
