Initial commit

This commit is contained in:
Your Name
2026-04-23 17:07:55 +08:00
commit b7e39e063b
16725 changed files with 1625565 additions and 0 deletions
@@ -0,0 +1,47 @@
From 5f0f70192b0e20336e642b02ca9662ba2fef66cf Mon Sep 17 00:00:00 2001
From: Yi Fan Yu <yifan.yu@windriver.com>
Date: Fri, 19 Feb 2021 15:21:18 -0500
Subject: [PATCH] Add ptest for tcpdump
Upstream-Status: Pending
Signed-off-by: Hongjun.Yang <hongjun.yang@windriver.com>
Signed-off-by: Peiran Hong <peiran.hong@windriver.com>
remove perl script not required by ptest causing QA problems
reference upstream issue/commit:
https://github.com/the-tcpdump-group/tcpdump/issues/26
Signed-off-by: Yi Fan Yu <yifan.yu@windriver.com>
---
Makefile.in | 11 ++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)
diff --git a/Makefile.in b/Makefile.in
index ea1ef1d0..e7987bd8 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -445,9 +445,18 @@ distclean:
tests/failure-outputs.txt
rm -rf autom4te.cache tests/DIFF tests/NEW
-check: tcpdump
+buildtest-TESTS: tcpdump
+
+runtest-PTEST:
$(srcdir)/tests/TESTrun
+install-ptest:
+ cp -r tests $(DESTDIR)
+ rm $(DESTDIR)/tests/setkey2esp-secrets.pl
+ cp -r config.h $(DESTDIR)
+ install -m 0755 Makefile $(DESTDIR)
+ ln -s /usr/bin/tcpdump $(DESTDIR)/tcpdump
+
extags: $(TAGFILES)
ctags $(TAGFILES)
--
2.29.2
@@ -0,0 +1,5 @@
#!/bin/sh
make -k runtest-PTEST | sed -e '/: passed/ s/^/PASS: /g' \
-e '/: TEST FAILED.*/ s/^/FAIL: /g' \
-e 's/: passed//g' \
-e 's/: TEST FAILED.*//g'
@@ -0,0 +1,52 @@
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"
RDEPENDS:${PN}-ptest += " make perl \
perl-module-file-basename \
perl-module-file-spec \
perl-module-file-spec-unix \
perl-module-file-path \
perl-module-file-glob \
perl-module-data-dumper \
perl-module-bytes \
perl-module-posix \
perl-module-carp \
perl-module-cwd \
perl-module-constant \
"
SRC_URI = " \
http://www.tcpdump.org/release/${BP}.tar.gz \
file://add-ptest.patch \
file://run-ptest \
"
SRC_URI[sha256sum] = "0232231bb2f29d6bf2426e70a08a7e0c63a0d59a9b44863b7f5e2357a6e49fea"
UPSTREAM_CHECK_REGEX = "tcpdump-(?P<pver>\d+(\.\d+)+)\.tar"
inherit autotools-brokensep pkgconfig ptest
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 += "--exclude=aclocal"
do_install:append() {
# make install installs an unneeded extra copy of the tcpdump binary
rm ${D}${bindir}/tcpdump.${PV}
}
do_compile_ptest() {
oe_runmake buildtest-TESTS
}
@@ -0,0 +1,24 @@
SUMMARY = "tcpslice"
DESCRIPTION = "A tool for extracting parts of a tcpdump packet trace."
HOMEPAGE = "http://www.tcpdump.org/related.html"
SECTION = "net"
LICENSE = "BSD-4-Clause"
LIC_FILES_CHKSUM = "file://tcpslice.c;endline=20;md5=99519e2e5234d1662a4ce16baa62c64e"
SRC_URI = "http://www.tcpdump.org/release/${BP}.tar.gz \
"
SRC_URI[sha256sum] = "60d23f00d4c485fef2dda9b12c2018af958df3a511238c45374733bbc1231920"
UPSTREAM_CHECK_REGEX = "tcpslice-(?P<pver>\d+(\.\d+)+)\.tar"
inherit autotools-brokensep pkgconfig
DEPENDS = "libpcap"
EXTRA_AUTORECONF += "--exclude=aclocal"
do_install () {
install -d ${D}${sbindir}
install -m 0755 tcpslice ${D}${sbindir}
}