From b97a1d43619c8250645cec112fa4fc289c7c3630 Mon Sep 17 00:00:00 2001 From: huyongqiang Date: Wed, 26 Oct 2022 17:23:16 +0800 Subject: [PATCH] =?UTF-8?q?openEuler=20Embedded=E6=94=AF=E6=8C=81tcpdump?= =?UTF-8?q?=E5=B7=A5=E5=85=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../recipes-support/tcpdump/tcpdump_4.99.1.bb | 48 +++++++++++++++++++ scripts/download_code.sh | 1 + 2 files changed, 49 insertions(+) create mode 100644 meta-openeuler/recipes-support/tcpdump/tcpdump_4.99.1.bb diff --git a/meta-openeuler/recipes-support/tcpdump/tcpdump_4.99.1.bb b/meta-openeuler/recipes-support/tcpdump/tcpdump_4.99.1.bb new file mode 100644 index 00000000000..445ab6b53ad --- /dev/null +++ b/meta-openeuler/recipes-support/tcpdump/tcpdump_4.99.1.bb @@ -0,0 +1,48 @@ +SUMMARY = "A sophisticated network protocol analyzer" +HOMEPAGE = "http://www.tcpdump.org/" +SECTION = "net" +LICENSE = "BSD-3-Clause" +LIC_FILES_CHKSUM = "file://LICENSE;md5=5eb289217c160e2920d2e35bddc36453" + +DEPENDS = "libpcap" +DEPENDS += " libyaml " + + +SRC_URI = " \ + file://${BP}.tar.gz \ + file://${BP}.tar.gz.sig \ + file://backport-0002-Use-getnameinfo-instead-of-gethostbyaddr.patch \ + file://backport-0007-Introduce-nn-option.patch \ + file://backport-0009-Change-n-flag-to-nn-in-TESTonce.patch \ + file://tcpdump.spec \ + file://tcpdump.yaml \ +" + +SRC_URI[md5sum] = "929a255c71a9933608bd7c31927760f7" +SRC_URI[sha256sum] = "79b36985fb2703146618d87c4acde3e068b91c553fb93f021a337f175fd10ebe" + +UPSTREAM_CHECK_REGEX = "tcpdump-(?P\d+(\.\d+)+)\.tar" + +inherit autotools-brokensep pkgconfig + +PACKAGECONFIG ?= "openssl" + +PACKAGECONFIG[libcap-ng] = "--with-cap-ng,--without-cap-ng,libcap-ng" +PACKAGECONFIG[openssl] = "--with-crypto,--without-crypto,openssl" +PACKAGECONFIG[smi] = "--with-smi,--without-smi,libsmi" +# Note: CVE-2018-10103 (SMB - partially fixed, but SMB printing disabled) +PACKAGECONFIG[smb] = "--enable-smb,--disable-smb" + +EXTRA_AUTORECONF += "-I m4" + +do_configure_prepend() { + mkdir -p ${S}/m4 + if [ -f aclocal.m4 ]; then + mv aclocal.m4 ${S}/m4 + fi +} + +do_install_append() { + # make install installs an unneeded extra copy of the tcpdump binary + rm ${D}${bindir}/tcpdump.${PV} +} diff --git a/scripts/download_code.sh b/scripts/download_code.sh index b5271ec26c0..bbff28375e7 100644 --- a/scripts/download_code.sh +++ b/scripts/download_code.sh @@ -258,6 +258,7 @@ download_code() update_code_repo src-openeuler/dtc ${SRC_BRANCH} update_code_repo src-openeuler/libunwind ${SRC_BRANCH} update_code_repo src-openeuler/libatomic_ops ${SRC_BRANCH} + update_code_repo src-openeuler/tcpdump ${SRC_BRANCH} } # download iSulad related packages -- Gitee