Initial commit
This commit is contained in:
@@ -0,0 +1,45 @@
|
||||
#
|
||||
Wireshark - Notes
|
||||
|
||||
URL: http://www.wireshark.org/
|
||||
User Guide: http://www.wireshark.org/docs/wsug_html_chunked/
|
||||
Secruity advisories: http://www.wireshark.org/security/
|
||||
|
||||
Wireshark is slowly moving away from gtk and towards QT as their graphical stack.
|
||||
Currently gtk is supported with this release and I plan on integrating QT.
|
||||
|
||||
|
||||
|
||||
Adding the wireshark to your build
|
||||
========================================
|
||||
|
||||
via local.conf
|
||||
IMAGE_INSTALL:append = " wireshark"
|
||||
|
||||
Adding the wireshark to your graphical build
|
||||
========================================
|
||||
via local.conf
|
||||
IMAGE_INSTALL:append = " wireshark"
|
||||
|
||||
and one of:
|
||||
|
||||
EXTRA_IMAGE_FEATURES += "x11-base"
|
||||
|
||||
or use the "core-image-x11"
|
||||
|
||||
|
||||
Maintenance
|
||||
-----------
|
||||
|
||||
Send patches, comments or questions to openembedded-devel@lists.openembedded.org
|
||||
|
||||
When sending single patches, please use something like:
|
||||
|
||||
git send-email -1 -M \
|
||||
--to openembedded-devel@lists.openembedded.org \
|
||||
--cc akuster@mvista.com \
|
||||
--subject-prefix=meta-networking][PATCH
|
||||
|
||||
Maintainer: Armin Kuster <akuster@mvista.com>
|
||||
|
||||
|
||||
+66
@@ -0,0 +1,66 @@
|
||||
From b4f29807225cf3744c2f4f971902fbdd7486fc19 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Jo=C3=A3o=20Valverde?= <j@v6e.pt>
|
||||
Date: Fri, 26 May 2023 13:29:23 +0100
|
||||
Subject: [PATCH] CMake: Fix a try_run() test when cross-compiling
|
||||
|
||||
Upstream-Status: Backport
|
||||
Signed-off-by: Armin Kuster <akuster808@gmail.com>
|
||||
|
||||
---
|
||||
ConfigureChecks.cmake | 36 ++++++++++++++++++++----------------
|
||||
1 file changed, 20 insertions(+), 16 deletions(-)
|
||||
|
||||
diff --git a/ConfigureChecks.cmake b/ConfigureChecks.cmake
|
||||
index dd8268e077..d8bca54115 100644
|
||||
--- a/ConfigureChecks.cmake
|
||||
+++ b/ConfigureChecks.cmake
|
||||
@@ -122,26 +122,30 @@ check_type_size("ssize_t" SSIZE_T)
|
||||
# Check if the libc vsnprintf() conforms to C99. If this fails we may
|
||||
# need to fall-back on GLib I/O.
|
||||
#
|
||||
-check_c_source_runs("
|
||||
- #include <stdio.h>
|
||||
- int main(void)
|
||||
- {
|
||||
- /* Check that snprintf() and vsnprintf() don't return
|
||||
- * -1 if the buffer is too small. C99 says this value
|
||||
- * is the length that would be written not including
|
||||
- * the nul byte. */
|
||||
- char buf[3];
|
||||
- return snprintf(buf, sizeof(buf), \"%s\", \"ABCDEF\") > 0 ? 0 : 1;
|
||||
- }"
|
||||
- HAVE_C99_VSNPRINTF
|
||||
-)
|
||||
-if (NOT HAVE_C99_VSNPRINTF)
|
||||
- message(FATAL_ERROR
|
||||
+# If cross-compiling we can't check so just assume this requirement is met.
|
||||
+#
|
||||
+if(NOT CMAKE_CROSSCOMPILING)
|
||||
+ check_c_source_runs("
|
||||
+ #include <stdio.h>
|
||||
+ int main(void)
|
||||
+ {
|
||||
+ /* Check that snprintf() and vsnprintf() don't return
|
||||
+ * -1 if the buffer is too small. C99 says this value
|
||||
+ * is the length that would be written not including
|
||||
+ * the nul byte. */
|
||||
+ char buf[3];
|
||||
+ return snprintf(buf, sizeof(buf), \"%s\", \"ABCDEF\") > 0 ? 0 : 1;
|
||||
+ }"
|
||||
+ HAVE_C99_VSNPRINTF
|
||||
+ )
|
||||
+ if (NOT HAVE_C99_VSNPRINTF)
|
||||
+ message(FATAL_ERROR
|
||||
"Building Wireshark requires a C99 compliant vsnprintf() and this \
|
||||
target does not meet that requirement. Compiling for ${CMAKE_SYSTEM} \
|
||||
using ${CMAKE_C_COMPILER_ID}. Please report this issue to the Wireshark \
|
||||
developers at wireshark-dev@wireshark.org."
|
||||
- )
|
||||
+ )
|
||||
+ endif()
|
||||
endif()
|
||||
|
||||
#
|
||||
--
|
||||
2.25.1
|
||||
|
||||
+28
@@ -0,0 +1,28 @@
|
||||
From 0a9ab056ce7582033a21d6bc541ece520bf2b0b6 Mon Sep 17 00:00:00 2001
|
||||
From: Oleksiy Obitotskyy <oobitots@cisco.com>
|
||||
Date: Thu, 26 Nov 2020 05:38:31 -0800
|
||||
Subject: [PATCH] wireshark-src: improve reproducibility
|
||||
|
||||
Cut absolute path for filename in generated code
|
||||
comments.
|
||||
|
||||
Upstream-Status: Pending
|
||||
Signed-off-by: Oleksiy Obitotskyy <oobitots@cisco.com>
|
||||
---
|
||||
tools/make-plugin-reg.py | 2 +-
|
||||
tools/ncp2222.py | 2 +-
|
||||
2 files changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
Index: wireshark-4.0.6/tools/ncp2222.py
|
||||
===================================================================
|
||||
--- wireshark-4.0.6.orig/tools/ncp2222.py
|
||||
+++ wireshark-4.0.6/tools/ncp2222.py
|
||||
@@ -5891,7 +5891,7 @@ def produce_code():
|
||||
|
||||
print("/*")
|
||||
print(" * Do not modify this file. Changes will be overwritten.")
|
||||
- print(" * Generated automatically from %s" % (sys.argv[0]))
|
||||
+ print(" * Generated automatically from %s" % (os.path.basename(sys.argv[0])))
|
||||
print(" */\n")
|
||||
|
||||
print("""
|
||||
+46
@@ -0,0 +1,46 @@
|
||||
From 3e571e24c730f747d18ed02ba7451e9e00480fc7 Mon Sep 17 00:00:00 2001
|
||||
From: Oleksiy Obitotskyy <oobitots@cisco.com>
|
||||
Date: Thu, 26 Nov 2020 12:00:43 -0800
|
||||
Subject: [PATCH] flex: Remove #line directives
|
||||
|
||||
Append --noline option to flex to not
|
||||
generate #line directives with absolute file patch.
|
||||
|
||||
Upstream-Status: Pending
|
||||
Signed-off-by: Oleksiy Obitotskyy <oobitots@cisco.com>
|
||||
---
|
||||
cmake/modules/FindLEX.cmake | 18 +++++++++++++-----
|
||||
1 file changed, 13 insertions(+), 5 deletions(-)
|
||||
|
||||
diff --git a/cmake/modules/FindLEX.cmake b/cmake/modules/FindLEX.cmake
|
||||
index 0008bc4..ec68f84 100644
|
||||
--- a/cmake/modules/FindLEX.cmake
|
||||
+++ b/cmake/modules/FindLEX.cmake
|
||||
@@ -32,11 +32,19 @@ MACRO(ADD_LEX_FILES _source _generated)
|
||||
SET(_outc ${CMAKE_CURRENT_BINARY_DIR}/${_basename}.c)
|
||||
SET(_outh ${CMAKE_CURRENT_BINARY_DIR}/${_basename}_lex.h)
|
||||
|
||||
- ADD_CUSTOM_COMMAND(
|
||||
- OUTPUT ${_outc} ${_outh}
|
||||
- COMMAND ${LEX_EXECUTABLE} -o${_outc} --header-file=${_outh} ${_in}
|
||||
- DEPENDS ${_in}
|
||||
- )
|
||||
+ IF (DEFINED ENV{SOURCE_DATE_EPOCH})
|
||||
+ ADD_CUSTOM_COMMAND(
|
||||
+ OUTPUT ${_outc} ${_outh}
|
||||
+ COMMAND ${LEX_EXECUTABLE} --noline -o${_outc} --header-file=${_outh} ${_in}
|
||||
+ DEPENDS ${_in}
|
||||
+ )
|
||||
+ ELSE ()
|
||||
+ ADD_CUSTOM_COMMAND(
|
||||
+ OUTPUT ${_outc} ${_outh}
|
||||
+ COMMAND ${LEX_EXECUTABLE} -o${_outc} --header-file=${_outh} ${_in}
|
||||
+ DEPENDS ${_in}
|
||||
+ )
|
||||
+ ENDIF ()
|
||||
LIST(APPEND ${_source} ${_in})
|
||||
LIST(APPEND ${_generated} ${_outc})
|
||||
INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR})
|
||||
--
|
||||
2.26.2.Cisco
|
||||
|
||||
+74
@@ -0,0 +1,74 @@
|
||||
From 17f05a8d02c589e4867906f70381e63e46a67870 Mon Sep 17 00:00:00 2001
|
||||
From: Oleksiy Obitotskyy <oobitots@cisco.com>
|
||||
Date: Wed, 27 Jan 2021 06:47:13 -0800
|
||||
Subject: [PATCH] lemon: Remove #line directives
|
||||
|
||||
In case of reproducible build remove #line
|
||||
directives with extra option '-l'.
|
||||
|
||||
Upstream-Status: Pending
|
||||
Signed-off-by: Oleksiy Obitotskyy <oobitots@cisco.com>
|
||||
---
|
||||
cmake/modules/UseLemon.cmake | 49 +++++++++++++++++++++++++-----------
|
||||
1 file changed, 34 insertions(+), 15 deletions(-)
|
||||
|
||||
Index: wireshark-3.4.11/cmake/modules/UseLemon.cmake
|
||||
===================================================================
|
||||
--- wireshark-3.4.11.orig/cmake/modules/UseLemon.cmake
|
||||
+++ wireshark-3.4.11/cmake/modules/UseLemon.cmake
|
||||
@@ -7,21 +7,40 @@ MACRO(ADD_LEMON_FILES _source _generated
|
||||
|
||||
SET(_out ${CMAKE_CURRENT_BINARY_DIR}/${_basename})
|
||||
|
||||
- ADD_CUSTOM_COMMAND(
|
||||
- OUTPUT
|
||||
- ${_out}.c
|
||||
- # These files are generated as side-effect
|
||||
- ${_out}.h
|
||||
- ${_out}.out
|
||||
- COMMAND $<TARGET_FILE:lemon>
|
||||
- -T${_lemonpardir}/lempar.c
|
||||
- -d.
|
||||
- ${_in}
|
||||
- DEPENDS
|
||||
- ${_in}
|
||||
- lemon
|
||||
- ${_lemonpardir}/lempar.c
|
||||
- )
|
||||
+ IF (DEFINED ENV{SOURCE_DATE_EPOCH})
|
||||
+ ADD_CUSTOM_COMMAND(
|
||||
+ OUTPUT
|
||||
+ ${_out}.c
|
||||
+ # These files are generated as side-effect
|
||||
+ ${_out}.h
|
||||
+ ${_out}.out
|
||||
+ COMMAND lemon
|
||||
+ -l
|
||||
+ -T${_lemonpardir}/lempar.c
|
||||
+ -d.
|
||||
+ ${_in}
|
||||
+ DEPENDS
|
||||
+ ${_in}
|
||||
+ lemon
|
||||
+ ${_lemonpardir}/lempar.c
|
||||
+ )
|
||||
+ ELSE ()
|
||||
+ ADD_CUSTOM_COMMAND(
|
||||
+ OUTPUT
|
||||
+ ${_out}.c
|
||||
+ # These files are generated as side-effect
|
||||
+ ${_out}.h
|
||||
+ ${_out}.out
|
||||
+ COMMAND lemon
|
||||
+ -T${_lemonpardir}/lempar.c
|
||||
+ -d.
|
||||
+ ${_in}
|
||||
+ DEPENDS
|
||||
+ ${_in}
|
||||
+ lemon
|
||||
+ ${_lemonpardir}/lempar.c
|
||||
+ )
|
||||
+ ENDIF ()
|
||||
|
||||
LIST(APPEND ${_source} ${_in})
|
||||
LIST(APPEND ${_generated} ${_out}.c)
|
||||
@@ -0,0 +1,99 @@
|
||||
DESCRIPTION = "wireshark - a popular network protocol analyzer"
|
||||
HOMEPAGE = "http://www.wireshark.org"
|
||||
SECTION = "net"
|
||||
LICENSE = "GPL-2.0-only"
|
||||
LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263"
|
||||
|
||||
DEPENDS = "pcre2 expat glib-2.0 glib-2.0-native libgcrypt libgpg-error libxml2 bison-native c-ares"
|
||||
|
||||
DEPENDS:append:class-target = " wireshark-native chrpath-replacement-native "
|
||||
|
||||
SRC_URI = "https://1.eu.dl.wireshark.org/src/wireshark-${PV}.tar.xz \
|
||||
file://0001-CMake-Fix-a-try_run-test-when-cross-compiling.patch \
|
||||
file://0001-wireshark-src-improve-reproducibility.patch \
|
||||
file://0002-flex-Remove-line-directives.patch \
|
||||
file://0004-lemon-Remove-line-directives.patch \
|
||||
"
|
||||
|
||||
UPSTREAM_CHECK_URI = "https://1.as.dl.wireshark.org/src"
|
||||
|
||||
SRC_URI[sha256sum] = "0079097a1b17ebc7250a73563f984c13327dac5016b7d53165810fbcca4bd884"
|
||||
|
||||
PE = "1"
|
||||
|
||||
inherit cmake pkgconfig python3native python3targetconfig perlnative upstream-version-is-even mime mime-xdg
|
||||
|
||||
PACKAGECONFIG ?= "libpcap gnutls libnl libcap sbc"
|
||||
|
||||
PACKAGECONFIG:class-native = "libpcap gnutls ssl libssh"
|
||||
|
||||
PACKAGECONFIG[libcap] = "-DENABLE_CAP=ON,-DENABLE_CAP=OFF -DENABLE_PCAP_NG_DEFAULT=ON, libcap"
|
||||
PACKAGECONFIG[libpcap] = "-DENABLE_PCAP=ON,-DENABLE_PCAP=OFF -DENABLE_PCAP_NG_DEFAULT=ON , libpcap"
|
||||
PACKAGECONFIG[libsmi] = "-DENABLE_SMI=ON,-DENABLE_SMI=OFF,libsmi"
|
||||
PACKAGECONFIG[libnl] = ",,libnl"
|
||||
PACKAGECONFIG[portaudio] = "-DENABLE_PORTAUDIO=ON,-DENABLE_PORTAUDIO=OFF, portaudio-v19"
|
||||
PACKAGECONFIG[gnutls] = "-DENABLE_GNUTLS=ON,-DENABLE_GNUTLS=OFF, gnutls"
|
||||
PACKAGECONFIG[ssl] = ",,openssl"
|
||||
PACKAGECONFIG[krb5] = "-DENABLE_KRB5=ON,-DENABLE_KRB5=OFF, krb5"
|
||||
PACKAGECONFIG[lua] = "-DENABLE_LUA=ON,-DENABLE_LUA=OFF, lua"
|
||||
PACKAGECONFIG[zlib] = "-DENABLE_ZLIB=ON,-DENABLE_ZLIB=OFF, zlib"
|
||||
PACKAGECONFIG[geoip] = ",, geoip"
|
||||
PACKAGECONFIG[plugins] = "-DENABLE_PLUGINS=ON,-DENABLE_PLUGINS=OFF"
|
||||
PACKAGECONFIG[sbc] = "-DENABLE_SBC=ON,-DENABLE_SBC=OFF, sbc"
|
||||
PACKAGECONFIG[libssh] = "-DENABLE_LIBSSH=ON,-DENABLE_LIBSSH=OFF, libssh2"
|
||||
PACKAGECONFIG[lz4] = "-DENABLE_LZ4=ON,-DENABLE_LZ4=OFF, lz4"
|
||||
PACKAGECONFIG[zstd] = "-DENABLE_STTD=ON,-DENABLE_ZSTD=OFF, zstd"
|
||||
PACKAGECONFIG[nghttp2] = "-DENABLE_NGHTTP2=ON,-DENABLE_NGHTTP2=OFF, nghttp2"
|
||||
|
||||
# these next two options require addional layers
|
||||
PACKAGECONFIG[qt5] = "-DENABLE_QT5=ON -DBUILD_wireshark=ON, -DENABLE_QT5=OFF -DBUILD_wireshark=OFF, qttools-native qtmultimedia qtsvg"
|
||||
|
||||
inherit ${@bb.utils.contains('PACKAGECONFIG', 'qt5', 'cmake_qt5', '', d)}
|
||||
|
||||
EXTRA_OECMAKE += "-DENABLE_NETLINK=ON \
|
||||
-DBUILD_mmdbresolve=OFF \
|
||||
-DBUILD_randpktdump=OFF \
|
||||
-DBUILD_androiddump=OFF \
|
||||
-DBUILD_dcerpcidl2wrs=OFF \
|
||||
-DM_INCLUDE_DIR=${includedir} \
|
||||
-DM_LIBRARY=${libdir} \
|
||||
"
|
||||
CFLAGS:append = " -lm"
|
||||
|
||||
do_compile:append:class-target() {
|
||||
# Fix TMPDIR, these are in the comments section
|
||||
sed -i -e "s:** source file.*::g" ${B}/wiretap/ascend_parser.c
|
||||
sed -i -e "s:** source file.*::g" ${B}/wiretap/candump_parser.c
|
||||
sed -i -e "s:** source file.*::g" ${B}/wiretap/busmaster_parser.c
|
||||
sed -i -e "s:** source file.*::g" ${B}/epan/protobuf_lang_parser.c
|
||||
sed -i -e "s:** source file.*::g" ${B}/epan/dtd_grammar.c
|
||||
sed -i -e "s:** source file.*::g" ${B}/epan/dfilter/grammar.c
|
||||
}
|
||||
|
||||
do_install:append:class-native() {
|
||||
install -d ${D}${bindir}
|
||||
for f in lemon
|
||||
do
|
||||
install -m 0755 ${B}/run/$f ${D}${bindir}
|
||||
done
|
||||
}
|
||||
|
||||
do_install:append:class-target() {
|
||||
for f in `find ${D}${libdir} ${D}${bindir} -type f -executable`
|
||||
do
|
||||
chrpath --delete $f
|
||||
done
|
||||
|
||||
# We don't need the cmake files installed
|
||||
rm -fr ${D}${usrlib}/${BPN}/cmake
|
||||
}
|
||||
|
||||
PACKAGE_BEFORE_PN += "tshark"
|
||||
|
||||
FILES:tshark = "${bindir}/tshark ${mandir}/man1/tshark.*"
|
||||
|
||||
FILES:${PN} += "${datadir}*"
|
||||
|
||||
RDEPENDS:tshark = "wireshark"
|
||||
|
||||
BBCLASSEXTEND = "native"
|
||||
Reference in New Issue
Block a user