From f63eb6aa6ea0baa58c2d22f872b445685ec0d783 Mon Sep 17 00:00:00 2001 From: sthen Date: Wed, 5 Oct 2022 13:58:00 +0000 Subject: [PATCH] update to wireshark-4.0.0 --- net/wireshark/Makefile | 31 +++++++++++++------ net/wireshark/distinfo | 4 +-- net/wireshark/patches/patch-CMakeLists_txt | 2 +- ...atch-epan_crypt_dot11decrypt_ccmp_compat_c | 14 --------- net/wireshark/patches/patch-rawshark_c | 2 +- .../patches/patch-tools_make-version_pl | 14 --------- .../patch-tools_radiotap-gen_radiotap-gen_c | 12 +++++++ .../patches/patch-wsutil_inet_addr_h | 21 ------------- net/wireshark/pkg/PLIST-text | 26 +++++++++++++--- 9 files changed, 59 insertions(+), 67 deletions(-) delete mode 100644 net/wireshark/patches/patch-epan_crypt_dot11decrypt_ccmp_compat_c delete mode 100644 net/wireshark/patches/patch-tools_make-version_pl create mode 100644 net/wireshark/patches/patch-tools_radiotap-gen_radiotap-gen_c delete mode 100644 net/wireshark/patches/patch-wsutil_inet_addr_h diff --git a/net/wireshark/Makefile b/net/wireshark/Makefile index 4e43590e555..03ce5607c05 100644 --- a/net/wireshark/Makefile +++ b/net/wireshark/Makefile @@ -4,7 +4,7 @@ COMMENT-main = graphical network protocol analyzer, Qt user-interface COMMENT-text = network protocol analyzer DPB_PROPERTIES = parallel -V = 3.6.8 +V = 4.0.0 PORTROACH = limitw:1,even DISTNAME = wireshark-$V PKGNAME-main = wireshark-$V @@ -25,16 +25,17 @@ EXTRACT_SUFX = .tar.xz # tools/pidl is GPLv3 or later. See COPYING. PERMIT_PACKAGE = Yes -cWANTLIB += c gcrypt glib-2.0 gmodule-2.0 m pcap z +cWANTLIB += c gcrypt glib-2.0 gmodule-2.0 m pcap pcre2-8 z MAINTAINER = Stuart Henderson MULTI_PACKAGES = -text -main +DEBUG_PACKAGES = ${BUILD_PACKAGES} PSEUDO_FLAVORS = no_x11 .if ${MACHINE_ARCH} == "arm" -# no qt5 -- won't be for m88k/sh either but those are already knocked out by COMPILER +# no qt -- won't be for m88k/sh either but those are already knocked out by COMPILER FLAVOR ?= no_x11 .else FLAVOR ?= @@ -55,7 +56,8 @@ WANTLIB-text += opus smi snappy spandsp speexdsp ssh xml2 zstd WANTLIB-main = ${cWANTLIB} ${COMPILER_LIBCXX} WANTLIB-main += minizip speexdsp wireshark wiretap wsutil -WANTLIB-main += Qt5Core Qt5Gui Qt5Multimedia Qt5PrintSupport Qt5Widgets +WANTLIB-main += Qt6Core Qt6Core5Compat Qt6Gui Qt6Multimedia Qt6PrintSupport +WANTLIB-main += Qt6Widgets MASTER_SITES = https://www.wireshark.org/download/src/all-versions/ @@ -68,7 +70,8 @@ BUILD_DEPENDS += devel/bison \ textproc/libxml \ textproc/libxslt \ devel/xdg-utils \ - textproc/asciidoctor + textproc/asciidoctor \ + x11/qt6/qttools RUN_DEPENDS = devel/desktop-file-utils \ devel/xdg-utils \ misc/shared-mime-info \ @@ -82,6 +85,7 @@ LIB_DEPENDS-text = ${MODLUA_LIB_DEPENDS} \ audio/opus \ audio/speexdsp \ devel/glib2 \ + devel/pcre2 \ net/libcares \ net/libmaxminddb \ net/libsmi \ @@ -96,25 +100,34 @@ LIB_DEPENDS-text = ${MODLUA_LIB_DEPENDS} \ LIB_DEPENDS-main += ${LIB_DEPENDS} \ tshark-$V:${BUILD_PKGPATH:S/,$//},-text \ archivers/minizip \ - x11/qt5/qtmultimedia + x11/qt6/qt5compat \ + x11/qt6/qtmultimedia # required for displaying language icons at Preferences; see a5abaa81ad9 -RUN_DEPENDS-main += x11/qt5/qtsvg +RUN_DEPENDS-main += x11/qt6/qtsvg MODULES += devel/cmake +CFLAGS += -I${X11BASE}/include +CXXFLAGS += -I${X11BASE}/include CONFIGURE_STYLE = cmake CONFIGURE_ENV += WIRESHARK_VERSION_EXTRA=" from OpenBSD packages" CONFIGURE_ARGS += -DCMAKE_INSTALL_MANDIR=${TRUEPREFIX}/man \ + -DUSE_qt6=true \ -DENABLE_SBC=false \ -DENABLE_ILBC=false \ - -DCOMPILER_CAN_HANDLE_SSE4_2=false + -DCOMPILER_CAN_HANDLE_SSE4_2=false \ + -DVCSVERSION_OVERRIDE="Git v$V packaged as ${FULLPKGNAME-main}" .include +.if ${PROPERTIES:Mlld} +CONFIGURE_ARGS += -DENABLE_LTO=true +.endif + .if ${FLAVOR:Mno_x11} BUILD_PACKAGES := ${BUILD_PACKAGES:N-main} .endif .if ${BUILD_PACKAGES:M-main} -MODULES += x11/qt5 +MODULES += x11/qt6 .else CONFIGURE_ARGS += -DBUILD_wireshark=false .endif diff --git a/net/wireshark/distinfo b/net/wireshark/distinfo index beb77e219ef..731396a650d 100644 --- a/net/wireshark/distinfo +++ b/net/wireshark/distinfo @@ -1,2 +1,2 @@ -SHA256 (wireshark-3.6.8.tar.xz) = Z6sj7gmmRquMwN3MmFIJ8k8lMzdGHj2WRMbP4cCXJgw= -SIZE (wireshark-3.6.8.tar.xz) = 39942580 +SHA256 (wireshark-4.0.0.tar.xz) = PcEl74XoXCp1anTMc5s+sRzjjjCgjghed9N47n/cre0= +SIZE (wireshark-4.0.0.tar.xz) = 41323336 diff --git a/net/wireshark/patches/patch-CMakeLists_txt b/net/wireshark/patches/patch-CMakeLists_txt index 94b7e5e3638..32160d3c523 100644 --- a/net/wireshark/patches/patch-CMakeLists_txt +++ b/net/wireshark/patches/patch-CMakeLists_txt @@ -5,7 +5,7 @@ Avoid the broken libwsutil.so that gets generated with -pie -shared Index: CMakeLists.txt --- CMakeLists.txt.orig +++ CMakeLists.txt -@@ -1084,7 +1084,7 @@ endif() +@@ -1051,7 +1051,7 @@ endif() include(CheckCLinkerFlag) diff --git a/net/wireshark/patches/patch-epan_crypt_dot11decrypt_ccmp_compat_c b/net/wireshark/patches/patch-epan_crypt_dot11decrypt_ccmp_compat_c deleted file mode 100644 index afc0a1c3063..00000000000 --- a/net/wireshark/patches/patch-epan_crypt_dot11decrypt_ccmp_compat_c +++ /dev/null @@ -1,14 +0,0 @@ -Index: epan/crypt/dot11decrypt_ccmp_compat.c ---- epan/crypt/dot11decrypt_ccmp_compat.c.orig -+++ epan/crypt/dot11decrypt_ccmp_compat.c -@@ -128,7 +128,9 @@ static void ccmp_init_blocks( - } - - /* NB: we know 3 addresses are contiguous */ -- memcpy(aad + 4, (guint8 *)wh->addr1, 3 * DOT11DECRYPT_MAC_LEN); -+ memcpy(aad + 4, &wh->addr1[0], DOT11DECRYPT_MAC_LEN); -+ memcpy(aad + 4 + DOT11DECRYPT_MAC_LEN, &wh->addr2[0], DOT11DECRYPT_MAC_LEN); -+ memcpy(aad + 4 + 2 * DOT11DECRYPT_MAC_LEN, &wh->addr3[0], DOT11DECRYPT_MAC_LEN); - aad[22] = (UINT8)(wh->seq[0] & DOT11DECRYPT_SEQ_FRAG_MASK); - aad[23] = 0; /* all bits masked */ - /* diff --git a/net/wireshark/patches/patch-rawshark_c b/net/wireshark/patches/patch-rawshark_c index ff0a6961af2..530c86a1ee9 100644 --- a/net/wireshark/patches/patch-rawshark_c +++ b/net/wireshark/patches/patch-rawshark_c @@ -1,7 +1,7 @@ Index: rawshark.c --- rawshark.c.orig +++ rawshark.c -@@ -566,7 +566,11 @@ main(int argc, char *argv[]) +@@ -570,7 +570,11 @@ main(int argc, char *argv[]) limit.rlim_cur = get_positive_int(ws_optarg, "memory limit"); limit.rlim_max = get_positive_int(ws_optarg, "memory limit"); diff --git a/net/wireshark/patches/patch-tools_make-version_pl b/net/wireshark/patches/patch-tools_make-version_pl deleted file mode 100644 index 9ea43605bb6..00000000000 --- a/net/wireshark/patches/patch-tools_make-version_pl +++ /dev/null @@ -1,14 +0,0 @@ -avoid ugly "Git Rev Unknown from Unknown" - -Index: tools/make-version.pl ---- tools/make-version.pl.orig -+++ tools/make-version.pl -@@ -63,7 +63,7 @@ my $script_dir = dirname(__FILE__); - my $src_dir = "$script_dir/.."; - my $verbose = 0; - my $devnull = File::Spec->devnull(); --my $enable_vcsversion = 1; -+my $enable_vcsversion = 0; - - # Ensure we run with correct locale - $ENV{LANG} = "C"; diff --git a/net/wireshark/patches/patch-tools_radiotap-gen_radiotap-gen_c b/net/wireshark/patches/patch-tools_radiotap-gen_radiotap-gen_c new file mode 100644 index 00000000000..6e0c6e968aa --- /dev/null +++ b/net/wireshark/patches/patch-tools_radiotap-gen_radiotap-gen_c @@ -0,0 +1,12 @@ +Index: tools/radiotap-gen/radiotap-gen.c +--- tools/radiotap-gen/radiotap-gen.c.orig ++++ tools/radiotap-gen/radiotap-gen.c +@@ -66,7 +66,7 @@ static void gen_u_sig_pkts(pcap_dumper_t *dumper) + { + struct pcap_pkthdr hdr; + struct complete_pkt pkt; +- struct timeval ts; ++ struct bpf_timeval ts; + /* + * Create the complete packet. + * diff --git a/net/wireshark/patches/patch-wsutil_inet_addr_h b/net/wireshark/patches/patch-wsutil_inet_addr_h deleted file mode 100644 index 04ba9d0a2df..00000000000 --- a/net/wireshark/patches/patch-wsutil_inet_addr_h +++ /dev/null @@ -1,21 +0,0 @@ -partially revert https://github.com/wireshark/wireshark/commit/becc442da -which breaks build on OpenBSD - -wsutil/inet_addr.c:51:28: error: invalid application of 'sizeof' to an incomplete type 'struct in6_addr' - memset(dst, 0, sizeof(struct in6_addr)); - ^ ~~~~~~~~~~~~~~~~~ - -Index: wsutil/inet_addr.h ---- wsutil/inet_addr.h.orig -+++ wsutil/inet_addr.h -@@ -13,6 +13,10 @@ - #include "ws_symbol_export.h" - #include "ws_attributes.h" - -+#ifdef HAVE_NETINET_IN_H -+#include -+#endif -+ - #include - #include "inet_ipv4.h" - #include "inet_ipv6.h" diff --git a/net/wireshark/pkg/PLIST-text b/net/wireshark/pkg/PLIST-text index ae2eca01502..959d09ef59c 100644 --- a/net/wireshark/pkg/PLIST-text +++ b/net/wireshark/pkg/PLIST-text @@ -59,6 +59,7 @@ include/wireshark/epan/diam_dict.h include/wireshark/epan/disabled_protos.h include/wireshark/epan/dissectors/ include/wireshark/epan/dissectors/cond_ace_token_enum.h +include/wireshark/epan/dissectors/file-pcapng.h include/wireshark/epan/dissectors/file-rbm.h include/wireshark/epan/dissectors/packet-6lowpan.h include/wireshark/epan/dissectors/packet-a21.h @@ -78,8 +79,10 @@ include/wireshark/epan/dissectors/packet-asap+enrp-common.h include/wireshark/epan/dissectors/packet-atalk.h include/wireshark/epan/dissectors/packet-atm.h include/wireshark/epan/dissectors/packet-atn-ulcs.h +include/wireshark/epan/dissectors/packet-autosar-ipdu-multiplexer.h include/wireshark/epan/dissectors/packet-bacapp.h include/wireshark/epan/dissectors/packet-bacnet.h +include/wireshark/epan/dissectors/packet-bblog.h include/wireshark/epan/dissectors/packet-ber.h include/wireshark/epan/dissectors/packet-bfd.h include/wireshark/epan/dissectors/packet-bgp.h @@ -145,6 +148,7 @@ include/wireshark/epan/dissectors/packet-diameter.h include/wireshark/epan/dissectors/packet-diameter_3gpp.h include/wireshark/epan/dissectors/packet-diffserv-mpls-common.h include/wireshark/epan/dissectors/packet-disp.h +include/wireshark/epan/dissectors/packet-dlt.h include/wireshark/epan/dissectors/packet-dns.h include/wireshark/epan/dissectors/packet-docsis-tlv.h include/wireshark/epan/dissectors/packet-doip.h @@ -182,6 +186,7 @@ include/wireshark/epan/dissectors/packet-fmp.h include/wireshark/epan/dissectors/packet-frame.h include/wireshark/epan/dissectors/packet-ftam.h include/wireshark/epan/dissectors/packet-ftdi-ft.h +include/wireshark/epan/dissectors/packet-gdt.h include/wireshark/epan/dissectors/packet-geonw.h include/wireshark/epan/dissectors/packet-giop.h include/wireshark/epan/dissectors/packet-gluster.h @@ -401,7 +406,8 @@ include/wireshark/epan/dissectors/packet-t38.h include/wireshark/epan/dissectors/packet-tacacs.h include/wireshark/epan/dissectors/packet-tcap.h include/wireshark/epan/dissectors/packet-tcp.h -include/wireshark/epan/dissectors/packet-tcpclv3.h +include/wireshark/epan/dissectors/packet-tcpcl.h +include/wireshark/epan/dissectors/packet-tecmp.h include/wireshark/epan/dissectors/packet-tetra.h include/wireshark/epan/dissectors/packet-thrift.h include/wireshark/epan/dissectors/packet-tls-utils.h @@ -416,6 +422,7 @@ include/wireshark/epan/dissectors/packet-uaudp.h include/wireshark/epan/dissectors/packet-uavcan-dsdl.h include/wireshark/epan/dissectors/packet-ubertooth.h include/wireshark/epan/dissectors/packet-udp.h +include/wireshark/epan/dissectors/packet-uds.h include/wireshark/epan/dissectors/packet-umts_fp.h include/wireshark/epan/dissectors/packet-umts_mac.h include/wireshark/epan/dissectors/packet-umts_rlc.h @@ -479,12 +486,12 @@ include/wireshark/epan/frame_data_sequence.h include/wireshark/epan/ftypes/ include/wireshark/epan/ftypes/ftypes.h include/wireshark/epan/funnel.h -include/wireshark/epan/garrayfix.h include/wireshark/epan/golay.h include/wireshark/epan/guid-utils.h include/wireshark/epan/iana_charsets.h include/wireshark/epan/iax2_codec_type.h include/wireshark/epan/in_cksum.h +include/wireshark/epan/introspection.h include/wireshark/epan/ip_opts.h include/wireshark/epan/ipproto.h include/wireshark/epan/ipv4.h @@ -535,7 +542,6 @@ include/wireshark/epan/t35.h include/wireshark/epan/tap-voip.h include/wireshark/epan/tap.h include/wireshark/epan/tfs.h -include/wireshark/epan/time_fmt.h include/wireshark/epan/timestamp.h include/wireshark/epan/timestats.h include/wireshark/epan/to_str.h @@ -551,7 +557,7 @@ include/wireshark/epan/wscbor.h include/wireshark/epan/x264_prt_id.h include/wireshark/epan/xdlc.h include/wireshark/file.h -include/wireshark/globals.h +include/wireshark/wireshark.h include/wireshark/wiretap/ include/wireshark/wiretap/file_wrappers.h include/wireshark/wiretap/merge.h @@ -565,6 +571,7 @@ include/wireshark/ws_attributes.h include/wireshark/ws_compiler_tests.h include/wireshark/ws_diag_control.h include/wireshark/ws_log_defs.h +include/wireshark/ws_posix_compat.h include/wireshark/ws_symbol_export.h include/wireshark/ws_version.h include/wireshark/wsutil/ @@ -577,7 +584,6 @@ include/wireshark/wsutil/bitswap.h include/wireshark/wsutil/buffer.h include/wireshark/wsutil/codecs.h include/wireshark/wsutil/color.h -include/wireshark/wsutil/copyright_info.h include/wireshark/wsutil/cpu_info.h include/wireshark/wsutil/crash_info.h include/wireshark/wsutil/crc10.h @@ -593,6 +599,7 @@ include/wireshark/wsutil/curve25519.h include/wireshark/wsutil/eax.h include/wireshark/wsutil/epochs.h include/wireshark/wsutil/exported_pdu_tlvs.h +include/wireshark/wsutil/feature_list.h include/wireshark/wsutil/filesystem.h include/wireshark/wsutil/g711.h include/wireshark/wsutil/glib-compat.h @@ -611,6 +618,7 @@ include/wireshark/wsutil/please_report_bug.h include/wireshark/wsutil/pow2.h include/wireshark/wsutil/privileges.h include/wireshark/wsutil/processes.h +include/wireshark/wsutil/regex.h include/wireshark/wsutil/report_message.h include/wireshark/wsutil/sign_ext.h include/wireshark/wsutil/sober128.h @@ -632,6 +640,7 @@ include/wireshark/wsutil/wmem/wmem_interval_tree.h include/wireshark/wsutil/wmem/wmem_list.h include/wireshark/wsutil/wmem/wmem_map.h include/wireshark/wsutil/wmem/wmem_miscutl.h +include/wireshark/wsutil/wmem/wmem_multimap.h include/wireshark/wsutil/wmem/wmem_queue.h include/wireshark/wsutil/wmem/wmem_stack.h include/wireshark/wsutil/wmem/wmem_strbuf.h @@ -644,7 +653,9 @@ include/wireshark/wsutil/ws_getopt.h include/wireshark/wsutil/ws_mempbrk.h include/wireshark/wsutil/ws_mempbrk_int.h include/wireshark/wsutil/ws_pipe.h +include/wireshark/wsutil/ws_return.h include/wireshark/wsutil/ws_roundup.h +include/wireshark/wsutil/wsgcrypt.h include/wireshark/wsutil/wsjson.h include/wireshark/wsutil/wslog.h include/wireshark/wsutil/xtea.h @@ -670,6 +681,7 @@ lib/wireshark/extcap/ @bin lib/wireshark/extcap/randpktdump @bin lib/wireshark/extcap/sshdump @bin lib/wireshark/extcap/udpdump +@bin lib/wireshark/extcap/wifidump lib/wireshark/plugins/ lib/wireshark/plugins/${WVER}/ lib/wireshark/plugins/${WVER}/codecs/ @@ -712,10 +724,12 @@ lib/wireshark/plugins/${WVER}/wiretap/ @man man/man1/text2pcap.1 @man man/man1/tshark.1 @man man/man1/udpdump.1 +@man man/man1/wifidump.1 @man man/man4/extcap.4 @man man/man4/wireshark-filter.4 share/wireshark/ share/wireshark/AUTHORS-SHORT +share/wireshark/Acknowledgements.md share/wireshark/COPYING share/wireshark/androiddump.html share/wireshark/capinfos.html @@ -778,6 +792,7 @@ share/wireshark/editcap.html share/wireshark/enterprises.tsv share/wireshark/etwdump.html share/wireshark/extcap.html +share/wireshark/gpl-2.0-standalone.html share/wireshark/init.lua share/wireshark/ipmap.html share/wireshark/manuf @@ -1014,6 +1029,7 @@ share/wireshark/tpncp/ share/wireshark/tpncp/tpncp.dat share/wireshark/tshark.html share/wireshark/udpdump.html +share/wireshark/wifidump.html share/wireshark/wimaxasncp/ share/wireshark/wimaxasncp/dictionary.dtd share/wireshark/wimaxasncp/dictionary.xml