diff options
Diffstat (limited to 'net-analyzer/wireshark')
-rw-r--r-- | net-analyzer/wireshark/Manifest | 11 | ||||
-rw-r--r-- | net-analyzer/wireshark/files/README.gentoo | 3 | ||||
-rw-r--r-- | net-analyzer/wireshark/files/wireshark-9999-ui-needs-wiretap.patch | 11 | ||||
-rw-r--r-- | net-analyzer/wireshark/metadata.xml | 12 | ||||
-rw-r--r-- | net-analyzer/wireshark/wireshark-3.4.11.ebuild | 285 | ||||
-rw-r--r-- | net-analyzer/wireshark/wireshark-3.6.3.ebuild | 265 | ||||
-rw-r--r-- | net-analyzer/wireshark/wireshark-4.0.11.ebuild (renamed from net-analyzer/wireshark/wireshark-3.6.8.ebuild) | 193 | ||||
-rw-r--r-- | net-analyzer/wireshark/wireshark-4.0.14.ebuild (renamed from net-analyzer/wireshark/wireshark-3.6.6.ebuild) | 193 | ||||
-rw-r--r-- | net-analyzer/wireshark/wireshark-4.2.4-r1.ebuild (renamed from net-analyzer/wireshark/wireshark-4.0.0_rc2.ebuild) | 94 | ||||
-rw-r--r-- | net-analyzer/wireshark/wireshark-9999.ebuild | 94 |
10 files changed, 429 insertions, 732 deletions
diff --git a/net-analyzer/wireshark/Manifest b/net-analyzer/wireshark/Manifest index 4bdd30fffb51..3959fedc5576 100644 --- a/net-analyzer/wireshark/Manifest +++ b/net-analyzer/wireshark/Manifest @@ -1,5 +1,6 @@ -DIST wireshark-3.4.11.tar.xz 32354216 BLAKE2B 3e08d01f2d89f5ddd74c4e2215e6852f30c7419234a45b52a25aa9119995ec2c2882cc3993dce7941e6e73230eb4d295bf0785dda5fe8c3df99f9efdb1e42bfd SHA512 cfef2c3e56279baadb7f41a1f46fde9214a467972f69914c14a8153ea2f2adcb55832413bcaf7a3f8d98b4b62d0574f12144de6c06ff382b4fa8b071903993dc -DIST wireshark-3.6.3.tar.xz 39935892 BLAKE2B 3b636867d946f0cf748eb719874e815c919ee9cedd21a7e9034d54b4cb87ae4a09ec02a199e1ec8051e421fe2929983d659f340ccfd12ab35e1ecd52000964fd SHA512 4415216f791caee23757f3c754dd88ce8fd8eb8d2d64c1bd011b40c7451a1ef56cf41bcf1cdcf41221f196bf17be550f9271f05b82a017a02cac5c241785b7e6 -DIST wireshark-3.6.6.tar.xz 39950276 BLAKE2B cb74c4ed307b83ba509fa3b56356a33df11d9d1effb29054f73f248ca1c7107806676539d0802cc71e07687831a838145194104183afa4ae1825eb1fb85062b1 SHA512 c32d5aafb3091dc1475896a3c4cfcb5a47af002e53f011a65697271c611e690743153841f5db1021a6cbea6d427dc661dce7b85208832251200258fb46aad84b -DIST wireshark-3.6.8.tar.xz 39942580 BLAKE2B 8b51ae1b3bf56fe1ccec70e94d9edb891e7b486a87b8f43984ea6d3150fe8f6c04beef9f12ebd9b830138aec6a993bcf88d50cfc4695b1f9ade6933092bed8db SHA512 c286e84e113f06b13b931da89b6d21b18e342660682579f88e77697f3e9c335ba75cdc190b41651da4d5729529a20740ef1a41e9f9523d9f6cc768147363053a -DIST wireshark-4.0.0rc2.tar.xz 41318448 BLAKE2B e4f3a9aca102a2f9fa519e429ad262f24df6a67fbd6debf9a9320ae0eb1e8753f65783ca19b5e4b224cf7af368af2a2cedc8065c7cc97216b4ced224fa9ffcaf SHA512 524722f7093af3d9cbb1e355fdeafb653917eabfb1d8d7d7c480a35853b0a777c8f5043d367955d01b7ca16b3f90569dcbafc1025bbeeb57a29ff486066840b8 +DIST wireshark-4.0.11-signatures.txt 2521 BLAKE2B 3fce906f2050fb990d80b912919c46d0e6e087c66a36bc18e8c57fa19d7ef7e966a26842770370e1211c4e4644deed31091ec929c53c80bfcdb1e472b149bd7c SHA512 d9b15d14b8e061bf2f4aaf0121c295db1992b7cbbb56e67b48fff4110e897f4f0d40304bdeaced2031bc802796a6f3ea7ba62a730f82d7469658924313f301a4 +DIST wireshark-4.0.11.tar.xz 43153680 BLAKE2B 1a90b9c20773758dbcfad85ea9a5c180e846307701ce75a471699544507b6dcf7cab611b5d71056d68ec1646a951729d7df416ef1a9a473bf96d9bf5a7066ebc SHA512 c027b279f9bc761c5c701131df9e57d3f2568129f63c919cd744f6626843eb0e000caebc3e01c9a10eedad35874c01c880d2c736b62f8e841da35c375a37c53f +DIST wireshark-4.0.14-signatures.txt 2521 BLAKE2B 371bf67dc0f36fe46848fef77194e221879db1ff422420949ba0fce4280fb9ee84ca18363046a0ce6fd1e7879ba336c1c16c9bdea13b8d14f14137f59d76212e SHA512 f084d454d1756be35e1e1ed4636cb994bd9c49bd4666d355ce3719d526bf71f9e3cc929b4dca311231d43b046711b223a379c6d915aa260966f0b7bab8a8e352 +DIST wireshark-4.0.14.tar.xz 43186416 BLAKE2B 1b67079cc0f9cdc33ce7e2fce0b49deb4d3016db79099a3bd2003099477a3bac43d4e31d4820c72a92135cca14572ac46406f41e477d794a63e96a6329d30199 SHA512 e88a4b2f41489f3ffe82c4c79c9c89ec521d931a716a5dacaede28c03b0625a0603935e723d5d869f801cfcab440a7d2f310c910707e15f9b0bca0c131398d73 +DIST wireshark-4.2.4-signatures.txt 2706 BLAKE2B 169c7eea2d89f4eedc58e833512cf813dfe76cbb76eb505d47153c1dc55f6d838b7a0187fdee4dae214ea04a3e062dd13f64df460fb16c042a889aac28e4428e SHA512 273182a2364b46bdbe89928e4776cf61ff70b91fcea9cc730ace6cd3501b51388ca9a85552b2ee26a68da42d033fdc8b2cfa279f0c52cc4cdd5278fbccaa8fb9 +DIST wireshark-4.2.4.tar.xz 44986232 BLAKE2B 03806a167a4b055409fadbc54ba338c9d2790df3ac2b9fb547c640c67d7bee6a3f8f19d30549228e494cabf8d303cef42ff098a9e1f45b092589643e568632f5 SHA512 963ac6938c08c6526240c270977057eeff7814686e11d1f3c6641a4838eb66f8d4349e48aa7373d25a8ca8911ad12eb8162f1c55af043f571d74979ddf4fd9a6 diff --git a/net-analyzer/wireshark/files/README.gentoo b/net-analyzer/wireshark/files/README.gentoo new file mode 100644 index 000000000000..a26d2c4dcb76 --- /dev/null +++ b/net-analyzer/wireshark/files/README.gentoo @@ -0,0 +1,3 @@ +NOTE: To capture traffic with wireshark as normal user you have to +add yourself to the pcap group. This security measure ensures +that only trusted users are allowed to sniff your traffic. diff --git a/net-analyzer/wireshark/files/wireshark-9999-ui-needs-wiretap.patch b/net-analyzer/wireshark/files/wireshark-9999-ui-needs-wiretap.patch deleted file mode 100644 index c0bfc3acd5a6..000000000000 --- a/net-analyzer/wireshark/files/wireshark-9999-ui-needs-wiretap.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/ui/CMakeLists.txt -+++ b/ui/CMakeLists.txt -@@ -76,6 +76,8 @@ - - add_library(ui STATIC ${UI_SRC}) - -+set(ui_LIBS wiretap) -+ - set_target_properties(ui PROPERTIES - LINK_FLAGS "${WS_LINK_FLAGS}" - FOLDER "UI" diff --git a/net-analyzer/wireshark/metadata.xml b/net-analyzer/wireshark/metadata.xml index ceb09bd64731..50ce497801f7 100644 --- a/net-analyzer/wireshark/metadata.xml +++ b/net-analyzer/wireshark/metadata.xml @@ -5,10 +5,6 @@ <email>sam@gentoo.org</email> <name>Sam James</name> </maintainer> - <maintainer type="person"> - <email>zlogene@gentoo.org</email> - <name>Mikle Kolyada</name> - </maintainer> <longdescription> Wireshark is the world's foremost network protocol analyzer, and is the de facto (and often de jure) standard across many industries and educational @@ -33,7 +29,6 @@ <use> <flag name="androiddump">Install androiddump, an extcap interface to capture from Android devices</flag> <flag name="bcg729">Use <pkg>media-libs/bcg729</pkg> for G.729 codec support in RTP Player</flag> - <flag name="brotli">Use <pkg>app-arch/brotli</pkg> for compression/decompression</flag> <flag name="capinfos">Install capinfos, to print information about capture files</flag> <flag name="captype">Install captype, to print the file types of capture files</flag> <flag name="ciscodump">Install ciscodump, extcap interface to capture from a remote Cisco router</flag> @@ -41,16 +36,14 @@ <flag name="dpauxmon">Install dpauxmon, an external capture interface (extcap) that captures DisplayPort AUX channel data from linux kernel drivers</flag> <flag name="dumpcap">Install dumpcap, to dump network traffic from inside wireshark</flag> <flag name="editcap">Install editcap, to edit and/or translate the format of capture files</flag> - <flag name="http2">Use <pkg>net-libs/nghttp2</pkg> for HTTP/2 support</flag> + <flag name="http3">Install <pkg>net-libs/nghttp3</pkg> for enhanced HTTP3 analysis</flag> <flag name="ilbc">Build with iLBC support in RTP Player using <pkg>media-libs/libilbc</pkg></flag> <flag name="libxml2">Use <pkg>dev-libs/libxml2</pkg> for handling XML configuration in dissectors</flag> - <flag name="lto">Enable link time optimization</flag> <flag name="maxminddb">Use <pkg>dev-libs/libmaxminddb</pkg> for IP address geolocation</flag> <flag name="mergecap">Install mergecap, to merge two or more capture files into one</flag> <flag name="minizip">Build with zip file compression support</flag> <flag name="netlink">Use <pkg>dev-libs/libnl</pkg></flag> <flag name="pcap">Use <pkg>net-libs/libpcap</pkg> for network packet capturing (build dumpcap, rawshark)</flag> - <flag name="plugin-ifdemo">Install plugin interface demo</flag> <flag name="plugins">Install plugins</flag> <flag name="qt6">Build with Qt6 support instead of the default Qt5 for GUI support</flag> <flag name="randpkt">Install randpkt, a utility for creating pcap trace files full of random packets</flag> @@ -66,9 +59,12 @@ <flag name="tfshark">Install tfshark, a terminal-based version of the FileShark capability</flag> <flag name="tshark">Install tshark, to dump and analyzer network traffic from the command line</flag> <flag name="udpdump">Install udpdump, to get packets exported from a source (like a network device or a GSMTAP producer) that are dumped to a pcap file</flag> + <flag name="wifi">Install wifidump, to dump and analyse 802.11 traffic</flag> </use> <upstream> + <changelog>https://www.wireshark.org/news/</changelog> <remote-id type="github">wireshark/wireshark</remote-id> <remote-id type="gitlab">wireshark/wireshark</remote-id> + <remote-id type="cpe">cpe:/a:wireshark:wireshark</remote-id> </upstream> </pkgmetadata> diff --git a/net-analyzer/wireshark/wireshark-3.4.11.ebuild b/net-analyzer/wireshark/wireshark-3.4.11.ebuild deleted file mode 100644 index d1c09690a523..000000000000 --- a/net-analyzer/wireshark/wireshark-3.4.11.ebuild +++ /dev/null @@ -1,285 +0,0 @@ -# Copyright 1999-2022 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=7 - -LUA_COMPAT=( lua5-{1..2} ) -PYTHON_COMPAT=( python3_{8..9} ) - -inherit fcaps flag-o-matic lua-single python-any-r1 qmake-utils xdg-utils cmake - -DESCRIPTION="A network protocol analyzer formerly known as ethereal" -HOMEPAGE="https://www.wireshark.org/" - -if [[ ${PV} == *9999* ]] ; then - EGIT_REPO_URI="https://gitlab.com/wireshark/wireshark" - inherit git-r3 -else - SRC_URI="https://www.wireshark.org/download/src/all-versions/${P/_/}.tar.xz" - S="${WORKDIR}/${P/_/}" - - KEYWORDS="~alpha amd64 arm arm64 ~hppa ~ia64 ppc64 x86" -fi - -LICENSE="GPL-2" -SLOT="0/${PV}" -IUSE="androiddump bcg729 brotli +capinfos +captype ciscodump +dftest doc dpauxmon" -IUSE+=" +dumpcap +editcap http2 ilbc kerberos libxml2 lto lua lz4 maxminddb" -IUSE+=" +mergecap +minizip +netlink opus +plugins plugin-ifdemo +pcap +qt5 +randpkt" -IUSE+=" +randpktdump +reordercap sbc selinux +sharkd smi snappy spandsp sshdump ssl" -IUSE+=" sdjournal test +text2pcap tfshark +tshark +udpdump zlib +zstd" - -RESTRICT="!test? ( test )" - -# bug #753062 for speexdsp -CDEPEND=" - acct-group/pcap - >=dev-libs/glib-2.32:2 - >=net-dns/c-ares-1.5:= - dev-libs/libgcrypt:= - media-libs/speexdsp - bcg729? ( media-libs/bcg729 ) - brotli? ( app-arch/brotli:= ) - ciscodump? ( >=net-libs/libssh-0.6 ) - filecaps? ( sys-libs/libcap ) - http2? ( net-libs/nghttp2:= ) - ilbc? ( media-libs/libilbc ) - kerberos? ( virtual/krb5 ) - libxml2? ( dev-libs/libxml2 ) - lua? ( ${LUA_DEPS} ) - lz4? ( app-arch/lz4:= ) - maxminddb? ( dev-libs/libmaxminddb:= ) - minizip? ( sys-libs/zlib[minizip] ) - netlink? ( dev-libs/libnl:3 ) - opus? ( media-libs/opus ) - pcap? ( net-libs/libpcap ) - qt5? ( - dev-qt/qtcore:5 - dev-qt/qtgui:5 - dev-qt/qtmultimedia:5 - dev-qt/qtprintsupport:5 - dev-qt/qtwidgets:5 - x11-misc/xdg-utils - ) - sbc? ( media-libs/sbc ) - sdjournal? ( sys-apps/systemd ) - smi? ( net-libs/libsmi ) - snappy? ( app-arch/snappy ) - spandsp? ( media-libs/spandsp ) - sshdump? ( >=net-libs/libssh-0.6 ) - ssl? ( net-libs/gnutls:= ) - zlib? ( sys-libs/zlib ) - zstd? ( app-arch/zstd:= ) -" -# We need perl for `pod2html`. The rest of the perl stuff is to block older -# and broken installs. #455122 -DEPEND=" - ${CDEPEND} - ${PYTHON_DEPS} -" -BDEPEND=" - dev-lang/perl - sys-devel/bison - sys-devel/flex - virtual/pkgconfig - doc? ( - app-doc/doxygen - dev-ruby/asciidoctor - ) - qt5? ( - dev-qt/linguist-tools:5 - ) - test? ( - dev-python/pytest - dev-python/pytest-xdist - ) -" -RDEPEND=" - ${CDEPEND} - qt5? ( virtual/freedesktop-icon-theme ) - selinux? ( sec-policy/selinux-wireshark ) -" -REQUIRED_USE=" - lua? ( ${LUA_REQUIRED_USE} ) - plugin-ifdemo? ( plugins ) -" - -PATCHES=( - "${FILESDIR}"/${PN}-2.6.0-redhat.patch - "${FILESDIR}"/${PN}-3.4.2-cmake-lua-version.patch - "${FILESDIR}"/${PN}-9999-ui-needs-wiretap.patch -) - -pkg_setup() { - use lua && lua-single_pkg_setup -} - -src_configure() { - local mycmakeargs - - # Workaround bug #213705. If krb5-config --libs has -lcrypto then pass - # --with-ssl to ./configure. (Mimics code from acinclude.m4). - if use kerberos; then - case $(krb5-config --libs) in - *-lcrypto*) - ewarn "Kerberos was built with ssl support: linkage with openssl is enabled." - ewarn "Note there are annoying license incompatibilities between the OpenSSL" - ewarn "license and the GPL, so do your check before distributing such package." - mycmakeargs+=( -DENABLE_GNUTLS=$(usex ssl) ) - ;; - esac - fi - - if use qt5; then - export QT_MIN_VERSION=5.3.0 - append-cxxflags -fPIC -DPIC - fi - - python_setup - - mycmakeargs+=( - $(use androiddump && use pcap && echo -DEXTCAP_ANDROIDDUMP_LIBPCAP=yes) - $(usex qt5 LRELEASE=$(qt5_get_bindir)/lrelease '') - $(usex qt5 MOC=$(qt5_get_bindir)/moc '') - $(usex qt5 RCC=$(qt5_get_bindir)/rcc '') - $(usex qt5 UIC=$(qt5_get_bindir)/uic '') - -DBUILD_androiddump=$(usex androiddump) - -DBUILD_capinfos=$(usex capinfos) - -DBUILD_captype=$(usex captype) - -DBUILD_ciscodump=$(usex ciscodump) - -DBUILD_dftest=$(usex dftest) - -DBUILD_dpauxmon=$(usex dpauxmon) - -DBUILD_dumpcap=$(usex dumpcap) - -DBUILD_editcap=$(usex editcap) - -DBUILD_mergecap=$(usex mergecap) - -DBUILD_mmdbresolve=$(usex maxminddb) - -DBUILD_randpkt=$(usex randpkt) - -DBUILD_randpktdump=$(usex randpktdump) - -DBUILD_reordercap=$(usex reordercap) - -DBUILD_sdjournal=$(usex sdjournal) - -DBUILD_sharkd=$(usex sharkd) - -DBUILD_sshdump=$(usex sshdump) - -DBUILD_text2pcap=$(usex text2pcap) - -DBUILD_tfshark=$(usex tfshark) - -DBUILD_tshark=$(usex tshark) - -DBUILD_udpdump=$(usex udpdump) - -DBUILD_wireshark=$(usex qt5) - -DDISABLE_WERROR=yes - -DENABLE_BCG729=$(usex bcg729) - -DENABLE_BROTLI=$(usex brotli) - -DENABLE_CAP=$(usex filecaps caps) - -DENABLE_GNUTLS=$(usex ssl) - -DENABLE_ILBC=$(usex ilbc) - -DENABLE_KERBEROS=$(usex kerberos) - -DENABLE_LIBXML2=$(usex libxml2) - -DENABLE_LTO=$(usex lto) - -DENABLE_LUA=$(usex lua) - -DENABLE_LZ4=$(usex lz4) - -DENABLE_MINIZIP=$(usex minizip) - -DENABLE_NETLINK=$(usex netlink) - -DENABLE_NGHTTP2=$(usex http2) - -DENABLE_OPUS=$(usex opus) - -DENABLE_PCAP=$(usex pcap) - -DENABLE_PLUGINS=$(usex plugins) - -DENABLE_PLUGIN_IFDEMO=$(usex plugin-ifdemo) - -DENABLE_SBC=$(usex sbc) - -DENABLE_SMI=$(usex smi) - -DENABLE_SNAPPY=$(usex snappy) - -DENABLE_SPANDSP=$(usex spandsp) - -DENABLE_ZLIB=$(usex zlib) - -DENABLE_ZSTD=$(usex zstd) - ) - - cmake_src_configure -} - -src_test() { - cmake_build test-programs - - myctestargs=( - --disable-capture - --skip-missing-programs=all - --verbose - - # Skip known failing tests - # extcaps needs a bunch of external programs - # decryption/nameres seem to be fixed in 3.6.x - -E "(suite_decryption|suite_extcaps|suite_nameres)" - ) - - cmake_src_test -} - -src_install() { - cmake_src_install - - # FAQ is not required as is installed from help/faq.txt - dodoc AUTHORS ChangeLog NEWS README* doc/randpkt.txt doc/README* - - # install headers - insinto /usr/include/wireshark - doins ws_diag_control.h ws_symbol_export.h \ - "${BUILD_DIR}"/config.h "${BUILD_DIR}"/version.h - - local dir dirs=( - epan - epan/crypt - epan/dfilter - epan/dissectors - epan/ftypes - epan/wmem - wiretap - wsutil - ) - - for dir in "${dirs[@]}" ; do - insinto /usr/include/wireshark/${dir} - doins ${dir}/*.h - done - - #with the above this really shouldn't be needed, but things may be looking - # in wiretap/ instead of wireshark/wiretap/ - insinto /usr/include/wiretap - doins wiretap/wtap.h - - if use qt5; then - local s - for s in 16 32 48 64 128 256 512 1024; do - insinto /usr/share/icons/hicolor/${s}x${s}/apps - newins image/wsicon${s}.png wireshark.png - done - for s in 16 24 32 48 64 128 256 ; do - insinto /usr/share/icons/hicolor/${s}x${s}/mimetypes - newins image/WiresharkDoc-${s}.png application-vnd.tcpdump.pcap.png - done - fi - - if [[ -d "${ED}"/usr/share/appdata ]]; then - rm -r "${ED}"/usr/share/appdata || die - fi -} - -pkg_postinst() { - xdg_desktop_database_update - xdg_icon_cache_update - xdg_mimeinfo_database_update - - # Add group for users allowed to sniff. - chgrp pcap "${EROOT}"/usr/bin/dumpcap - - if use dumpcap && use pcap; then - fcaps -o 0 -g pcap -m 4710 -M 0710 \ - cap_dac_read_search,cap_net_raw,cap_net_admin \ - "${EROOT}"/usr/bin/dumpcap - fi - - ewarn "NOTE: To capture traffic with wireshark as normal user you have to" - ewarn "add yourself to the pcap group. This security measure ensures" - ewarn "that only trusted users are allowed to sniff your traffic." -} - -pkg_postrm() { - xdg_desktop_database_update - xdg_icon_cache_update - xdg_mimeinfo_database_update -} diff --git a/net-analyzer/wireshark/wireshark-3.6.3.ebuild b/net-analyzer/wireshark/wireshark-3.6.3.ebuild deleted file mode 100644 index 4d449ccaf2ea..000000000000 --- a/net-analyzer/wireshark/wireshark-3.6.3.ebuild +++ /dev/null @@ -1,265 +0,0 @@ -# Copyright 1999-2022 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=8 - -LUA_COMPAT=( lua5-{1..2} ) -PYTHON_COMPAT=( python3_{8..10} ) - -inherit fcaps flag-o-matic lua-single python-any-r1 qmake-utils xdg cmake - -DESCRIPTION="A network protocol analyzer formerly known as ethereal" -HOMEPAGE="https://www.wireshark.org/" - -if [[ ${PV} == *9999* ]] ; then - EGIT_REPO_URI="https://gitlab.com/wireshark/wireshark" - inherit git-r3 -else - SRC_URI="https://www.wireshark.org/download/src/all-versions/${P/_/}.tar.xz" - S="${WORKDIR}/${P/_/}" - - KEYWORDS="~alpha amd64 arm arm64 ~hppa ~ia64 ppc64 ~riscv x86" -fi - -LICENSE="GPL-2" -SLOT="0/${PV}" -IUSE="androiddump bcg729 brotli +capinfos +captype ciscodump +dftest doc dpauxmon" -IUSE+=" +dumpcap +editcap http2 ilbc kerberos libxml2 lto lua lz4 maxminddb" -IUSE+=" +mergecap +minizip +netlink opus +plugins plugin-ifdemo +pcap +qt5 +randpkt" -IUSE+=" +randpktdump +reordercap sbc selinux +sharkd smi snappy spandsp sshdump ssl" -IUSE+=" sdjournal test +text2pcap tfshark +tshark +udpdump zlib +zstd" - -REQUIRED_USE="lua? ( ${LUA_REQUIRED_USE} ) - plugin-ifdemo? ( plugins )" - -RESTRICT="!test? ( test )" - -# bug #753062 for speexdsp -RDEPEND="acct-group/pcap - >=dev-libs/glib-2.38:2 - >=net-dns/c-ares-1.5:= - dev-libs/libgcrypt:= - media-libs/speexdsp - bcg729? ( media-libs/bcg729 ) - brotli? ( app-arch/brotli:= ) - ciscodump? ( >=net-libs/libssh-0.6 ) - filecaps? ( sys-libs/libcap ) - http2? ( net-libs/nghttp2:= ) - ilbc? ( media-libs/libilbc ) - kerberos? ( virtual/krb5 ) - libxml2? ( dev-libs/libxml2 ) - lua? ( ${LUA_DEPS} ) - lz4? ( app-arch/lz4:= ) - maxminddb? ( dev-libs/libmaxminddb:= ) - minizip? ( sys-libs/zlib[minizip] ) - netlink? ( dev-libs/libnl:3 ) - opus? ( media-libs/opus ) - pcap? ( net-libs/libpcap ) - qt5? ( - dev-qt/qtcore:5 - dev-qt/qtgui:5 - dev-qt/qtmultimedia:5 - dev-qt/qtprintsupport:5 - dev-qt/qtwidgets:5 - x11-misc/xdg-utils - ) - sbc? ( media-libs/sbc ) - sdjournal? ( sys-apps/systemd ) - smi? ( net-libs/libsmi ) - snappy? ( app-arch/snappy ) - spandsp? ( media-libs/spandsp ) - sshdump? ( >=net-libs/libssh-0.6 ) - ssl? ( net-libs/gnutls:= ) - zlib? ( sys-libs/zlib ) - zstd? ( app-arch/zstd:= )" -DEPEND="${RDEPEND}" -BDEPEND="${PYTHON_DEPS} - dev-lang/perl - sys-devel/flex - sys-devel/gettext - virtual/pkgconfig - doc? ( - app-doc/doxygen - dev-ruby/asciidoctor - ) - qt5? ( - dev-qt/linguist-tools:5 - ) - test? ( - dev-python/pytest - dev-python/pytest-xdist - )" -RDEPEND="${RDEPEND} - qt5? ( virtual/freedesktop-icon-theme ) - selinux? ( sec-policy/selinux-wireshark )" - -PATCHES=( - "${FILESDIR}"/${PN}-2.6.0-redhat.patch - "${FILESDIR}"/${PN}-3.4.2-cmake-lua-version.patch -) - -pkg_setup() { - use lua && lua-single_pkg_setup -} - -src_configure() { - local mycmakeargs - - # Workaround bug #213705. If krb5-config --libs has -lcrypto then pass - # --with-ssl to ./configure. (Mimics code from acinclude.m4). - if use kerberos ; then - case $(krb5-config --libs) in - *-lcrypto*) - ewarn "Kerberos was built with ssl support: linkage with openssl is enabled." - ewarn "Note there are annoying license incompatibilities between the OpenSSL" - ewarn "license and the GPL, so do your check before distributing such package." - mycmakeargs+=( -DENABLE_GNUTLS=$(usex ssl) ) - ;; - esac - fi - - if use qt5 ; then - export QT_MIN_VERSION=5.3.0 - append-cxxflags -fPIC -DPIC - fi - - python_setup - - mycmakeargs+=( - -DCMAKE_DISABLE_FIND_PACKAGE_{Asciidoctor,DOXYGEN}=$(usex !doc) - $(use androiddump && use pcap && echo -DEXTCAP_ANDROIDDUMP_LIBPCAP=yes) - $(usex qt5 LRELEASE=$(qt5_get_bindir)/lrelease '') - $(usex qt5 MOC=$(qt5_get_bindir)/moc '') - $(usex qt5 RCC=$(qt5_get_bindir)/rcc '') - $(usex qt5 UIC=$(qt5_get_bindir)/uic '') - -DBUILD_androiddump=$(usex androiddump) - -DBUILD_capinfos=$(usex capinfos) - -DBUILD_captype=$(usex captype) - -DBUILD_ciscodump=$(usex ciscodump) - -DBUILD_dftest=$(usex dftest) - -DBUILD_dpauxmon=$(usex dpauxmon) - -DBUILD_dumpcap=$(usex dumpcap) - -DBUILD_editcap=$(usex editcap) - -DBUILD_mergecap=$(usex mergecap) - -DBUILD_mmdbresolve=$(usex maxminddb) - -DBUILD_randpkt=$(usex randpkt) - -DBUILD_randpktdump=$(usex randpktdump) - -DBUILD_reordercap=$(usex reordercap) - -DBUILD_sdjournal=$(usex sdjournal) - -DBUILD_sharkd=$(usex sharkd) - -DBUILD_sshdump=$(usex sshdump) - -DBUILD_text2pcap=$(usex text2pcap) - -DBUILD_tfshark=$(usex tfshark) - -DBUILD_tshark=$(usex tshark) - -DBUILD_udpdump=$(usex udpdump) - -DBUILD_wireshark=$(usex qt5) - -DDISABLE_WERROR=yes - -DENABLE_BCG729=$(usex bcg729) - -DENABLE_BROTLI=$(usex brotli) - -DENABLE_CAP=$(usex filecaps caps) - -DENABLE_GNUTLS=$(usex ssl) - -DENABLE_ILBC=$(usex ilbc) - -DENABLE_KERBEROS=$(usex kerberos) - -DENABLE_LIBXML2=$(usex libxml2) - -DENABLE_LTO=$(usex lto) - -DENABLE_LUA=$(usex lua) - -DENABLE_LZ4=$(usex lz4) - -DENABLE_MINIZIP=$(usex minizip) - -DENABLE_NETLINK=$(usex netlink) - -DENABLE_NGHTTP2=$(usex http2) - -DENABLE_OPUS=$(usex opus) - -DENABLE_PCAP=$(usex pcap) - -DENABLE_PLUGINS=$(usex plugins) - -DENABLE_PLUGIN_IFDEMO=$(usex plugin-ifdemo) - -DENABLE_SBC=$(usex sbc) - -DENABLE_SMI=$(usex smi) - -DENABLE_SNAPPY=$(usex snappy) - -DENABLE_SPANDSP=$(usex spandsp) - -DENABLE_ZLIB=$(usex zlib) - -DENABLE_ZSTD=$(usex zstd) - ) - - cmake_src_configure -} - -src_test() { - cmake_build test-programs - - myctestargs=( - --disable-capture - --skip-missing-programs=all - --verbose - - # Skip known failing tests - # extcaps needs a bunch of external programs - -E "(suite_extcaps)" - #-E "(suite_decryption|suite_extcaps|suite_nameres)" - ) - - cmake_src_test -} - -src_install() { - cmake_src_install - - # FAQ is not required as is installed from help/faq.txt - dodoc AUTHORS ChangeLog NEWS README* doc/randpkt.txt doc/README* - - # install headers - insinto /usr/include/wireshark - doins ws_diag_control.h ws_symbol_export.h \ - "${BUILD_DIR}"/config.h - - # If trying to remove this, try build e.g. libvirt first! - # At last check, Fedora is still doing this too. - local dir dirs=( - epan - epan/crypt - epan/dfilter - epan/dissectors - epan/ftypes - wiretap - wsutil - wsutil/wmem - ) - - for dir in "${dirs[@]}" ; do - insinto /usr/include/wireshark/${dir} - doins ${dir}/*.h - done - - if use qt5 ; then - local s - - for s in 16 32 48 64 128 256 512 1024 ; do - insinto /usr/share/icons/hicolor/${s}x${s}/apps - newins image/wsicon${s}.png wireshark.png - done - - for s in 16 24 32 48 64 128 256 ; do - insinto /usr/share/icons/hicolor/${s}x${s}/mimetypes - newins image/WiresharkDoc-${s}.png application-vnd.tcpdump.pcap.png - done - fi - - if [[ -d "${ED}"/usr/share/appdata ]] ; then - rm -r "${ED}"/usr/share/appdata || die - fi -} - -pkg_postinst() { - xdg_pkg_postinst - - # Add group for users allowed to sniff. - chgrp pcap "${EROOT}"/usr/bin/dumpcap - - if use dumpcap && use pcap ; then - fcaps -o 0 -g pcap -m 4710 -M 0710 \ - cap_dac_read_search,cap_net_raw,cap_net_admin \ - "${EROOT}"/usr/bin/dumpcap - fi - - ewarn "NOTE: To capture traffic with wireshark as normal user you have to" - ewarn "add yourself to the pcap group. This security measure ensures" - ewarn "that only trusted users are allowed to sniff your traffic." -} diff --git a/net-analyzer/wireshark/wireshark-3.6.8.ebuild b/net-analyzer/wireshark/wireshark-4.0.11.ebuild index 373d120f39a6..f3715b72f3e7 100644 --- a/net-analyzer/wireshark/wireshark-3.6.8.ebuild +++ b/net-analyzer/wireshark/wireshark-4.0.11.ebuild @@ -1,51 +1,62 @@ -# Copyright 1999-2022 Gentoo Authors +# Copyright 1999-2024 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=8 LUA_COMPAT=( lua5-{1..2} ) -PYTHON_COMPAT=( python3_{8..10} ) +PYTHON_COMPAT=( python3_{10..11} ) -inherit fcaps flag-o-matic lua-single python-any-r1 qmake-utils xdg cmake +inherit fcaps flag-o-matic readme.gentoo-r1 lua-single python-any-r1 qmake-utils xdg cmake -DESCRIPTION="A network protocol analyzer formerly known as ethereal" +DESCRIPTION="Network protocol analyzer (sniffer)" HOMEPAGE="https://www.wireshark.org/" if [[ ${PV} == *9999* ]] ; then EGIT_REPO_URI="https://gitlab.com/wireshark/wireshark" inherit git-r3 else + VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/wireshark.asc + inherit verify-sig + SRC_URI="https://www.wireshark.org/download/src/all-versions/${P/_/}.tar.xz" + SRC_URI+=" verify-sig? ( https://www.wireshark.org/download/SIGNATURES-${PV}.txt -> ${P}-signatures.txt )" S="${WORKDIR}/${P/_/}" - KEYWORDS="~alpha amd64 arm arm64 ~hppa ~ia64 ~ppc64 ~riscv x86" + if [[ ${PV} != *_rc* ]] ; then + KEYWORDS="amd64 arm arm64 ~hppa ~ia64 ppc64 ~riscv x86" + fi fi LICENSE="GPL-2" SLOT="0/${PV}" IUSE="androiddump bcg729 brotli +capinfos +captype ciscodump +dftest doc dpauxmon" -IUSE+=" +dumpcap +editcap http2 ilbc kerberos libxml2 lto lua lz4 maxminddb" -IUSE+=" +mergecap +minizip +netlink opus +plugins plugin-ifdemo +pcap +qt5 +randpkt" +IUSE+=" +dumpcap +editcap +gui http2 ilbc kerberos libxml2 lua lz4 maxminddb" +IUSE+=" +mergecap +minizip +netlink opus +plugins +pcap qt6 +randpkt" IUSE+=" +randpktdump +reordercap sbc selinux +sharkd smi snappy spandsp sshdump ssl" -IUSE+=" sdjournal test +text2pcap tfshark +tshark +udpdump zlib +zstd" +IUSE+=" sdjournal test +text2pcap tfshark +tshark +udpdump wifi zlib +zstd" -REQUIRED_USE="lua? ( ${LUA_REQUIRED_USE} ) - plugin-ifdemo? ( plugins )" +REQUIRED_USE=" + lua? ( ${LUA_REQUIRED_USE} ) +" -RESTRICT="!test? ( test )" +# Tests restricted for now because rely on pytest internals w/ >=3.11 +# See bug #897078 and https://gitlab.com/wireshark/wireshark/-/issues/18740. +RESTRICT="!test? ( test ) test" # bug #753062 for speexdsp -RDEPEND="acct-group/pcap - >=dev-libs/glib-2.38:2 - >=net-dns/c-ares-1.5:= - dev-libs/libgcrypt:= +RDEPEND=" + acct-group/pcap + >=dev-libs/glib-2.50.0:2 + dev-libs/libpcre2 + >=net-dns/c-ares-1.13.0:= + >=dev-libs/libgcrypt-1.8.0:= media-libs/speexdsp bcg729? ( media-libs/bcg729 ) brotli? ( app-arch/brotli:= ) - ciscodump? ( >=net-libs/libssh-0.6 ) + ciscodump? ( >=net-libs/libssh-0.6:= ) filecaps? ( sys-libs/libcap ) - http2? ( net-libs/nghttp2:= ) - ilbc? ( media-libs/libilbc ) + http2? ( >=net-libs/nghttp2-1.11.0:= ) + ilbc? ( media-libs/libilbc:= ) kerberos? ( virtual/krb5 ) libxml2? ( dev-libs/libxml2 ) lua? ( ${LUA_DEPS} ) @@ -55,45 +66,77 @@ RDEPEND="acct-group/pcap netlink? ( dev-libs/libnl:3 ) opus? ( media-libs/opus ) pcap? ( net-libs/libpcap ) - qt5? ( - dev-qt/qtcore:5 - dev-qt/qtgui:5 - dev-qt/qtmultimedia:5 - dev-qt/qtprintsupport:5 - dev-qt/qtwidgets:5 + gui? ( x11-misc/xdg-utils + qt6? ( + dev-qt/qtbase:6[concurrent,dbus,gui,widgets] + dev-qt/qt5compat:6 + dev-qt/qtmultimedia:6 + ) + !qt6? ( + dev-qt/qtcore:5 + dev-qt/qtconcurrent:5 + dev-qt/qtgui:5 + dev-qt/qtmultimedia:5 + dev-qt/qtprintsupport:5 + dev-qt/qtwidgets:5 + ) ) sbc? ( media-libs/sbc ) - sdjournal? ( sys-apps/systemd ) + sdjournal? ( sys-apps/systemd:= ) smi? ( net-libs/libsmi ) - snappy? ( app-arch/snappy ) - spandsp? ( media-libs/spandsp ) - sshdump? ( >=net-libs/libssh-0.6 ) - ssl? ( net-libs/gnutls:= ) + snappy? ( app-arch/snappy:= ) + spandsp? ( media-libs/spandsp:= ) + sshdump? ( >=net-libs/libssh-0.6:= ) + ssl? ( >=net-libs/gnutls-3.5.8:= ) + wifi? ( >=net-libs/libssh-0.6:= ) zlib? ( sys-libs/zlib ) - zstd? ( app-arch/zstd:= )" -DEPEND="${RDEPEND}" -BDEPEND="${PYTHON_DEPS} + zstd? ( app-arch/zstd:= ) +" +DEPEND=" + ${RDEPEND} + gui? ( + !qt6? ( + dev-qt/qtdeclarative:5 + ) + ) +" +# TODO: 4.0.0_rc1 release notes say: +# "Perl is no longer required to build Wireshark, but may be required to build some source code files and run code analysis checks." +BDEPEND=" + ${PYTHON_DEPS} dev-lang/perl - sys-devel/flex + app-alternatives/lex sys-devel/gettext virtual/pkgconfig doc? ( - app-doc/doxygen + app-text/doxygen dev-ruby/asciidoctor ) - qt5? ( - dev-qt/linguist-tools:5 + gui? ( + qt6? ( + dev-qt/qttools:6[linguist] + ) + !qt6? ( + dev-qt/linguist-tools:5 + ) ) test? ( $(python_gen_any_dep ' dev-python/pytest[${PYTHON_USEDEP}] dev-python/pytest-xdist[${PYTHON_USEDEP}] ') - )" -RDEPEND="${RDEPEND} - qt5? ( virtual/freedesktop-icon-theme ) - selinux? ( sec-policy/selinux-wireshark )" + ) +" +RDEPEND=" + ${RDEPEND} + gui? ( virtual/freedesktop-icon-theme ) + selinux? ( sec-policy/selinux-wireshark ) +" + +if [[ ${PV} != *9999* ]] ; then + BDEPEND+=" verify-sig? ( sec-keys/openpgp-keys-wireshark )" +fi PATCHES=( "${FILESDIR}"/${PN}-2.6.0-redhat.patch @@ -113,9 +156,28 @@ pkg_setup() { python-any-r1_pkg_setup } +src_unpack() { + if [[ ${PV} == *9999* ]] ; then + git-r3_src_unpack + else + if use verify-sig ; then + cd "${DISTDIR}" || die + verify-sig_verify_signed_checksums \ + ${P}-signatures.txt \ + openssl-dgst \ + ${P}.tar.xz + cd "${WORKDIR}" || die + fi + + default + fi +} + src_configure() { local mycmakeargs + python_setup + # Workaround bug #213705. If krb5-config --libs has -lcrypto then pass # --with-ssl to ./configure. (Mimics code from acinclude.m4). if use kerberos ; then @@ -129,20 +191,24 @@ src_configure() { esac fi - if use qt5 ; then - export QT_MIN_VERSION=5.3.0 + if use gui ; then append-cxxflags -fPIC -DPIC fi - python_setup + # crashes at runtime + # https://bugs.gentoo.org/754021 + filter-lto mycmakeargs+=( + -DPython3_EXECUTABLE="${PYTHON}" -DCMAKE_DISABLE_FIND_PACKAGE_{Asciidoctor,DOXYGEN}=$(usex !doc) + $(use androiddump && use pcap && echo -DEXTCAP_ANDROIDDUMP_LIBPCAP=yes) - $(usex qt5 LRELEASE=$(qt5_get_bindir)/lrelease '') - $(usex qt5 MOC=$(qt5_get_bindir)/moc '') - $(usex qt5 RCC=$(qt5_get_bindir)/rcc '') - $(usex qt5 UIC=$(qt5_get_bindir)/uic '') + $(usex gui LRELEASE=$(qt5_get_bindir)/lrelease '') + $(usex gui MOC=$(qt5_get_bindir)/moc '') + $(usex gui RCC=$(qt5_get_bindir)/rcc '') + $(usex gui UIC=$(qt5_get_bindir)/uic '') + -DBUILD_androiddump=$(usex androiddump) -DBUILD_capinfos=$(usex capinfos) -DBUILD_captype=$(usex captype) @@ -163,8 +229,11 @@ src_configure() { -DBUILD_tfshark=$(usex tfshark) -DBUILD_tshark=$(usex tshark) -DBUILD_udpdump=$(usex udpdump) - -DBUILD_wireshark=$(usex qt5) - -DDISABLE_WERROR=ON + + -DBUILD_wireshark=$(usex gui) + -DUSE_qt6=$(usex qt6) + + -DENABLE_WERROR=OFF -DENABLE_BCG729=$(usex bcg729) -DENABLE_BROTLI=$(usex brotli) -DENABLE_CAP=$(usex filecaps caps) @@ -172,7 +241,8 @@ src_configure() { -DENABLE_ILBC=$(usex ilbc) -DENABLE_KERBEROS=$(usex kerberos) -DENABLE_LIBXML2=$(usex libxml2) - -DENABLE_LTO=$(usex lto) + # only appends -flto + -DENABLE_LTO=OFF -DENABLE_LUA=$(usex lua) -DENABLE_LZ4=$(usex lz4) -DENABLE_MINIZIP=$(usex minizip) @@ -181,11 +251,12 @@ src_configure() { -DENABLE_OPUS=$(usex opus) -DENABLE_PCAP=$(usex pcap) -DENABLE_PLUGINS=$(usex plugins) - -DENABLE_PLUGIN_IFDEMO=$(usex plugin-ifdemo) + -DENABLE_PLUGIN_IFDEMO=OFF -DENABLE_SBC=$(usex sbc) -DENABLE_SMI=$(usex smi) -DENABLE_SNAPPY=$(usex snappy) -DENABLE_SPANDSP=$(usex spandsp) + -DBUILD_wifidump=$(usex wifi) -DENABLE_ZLIB=$(usex zlib) -DENABLE_ZSTD=$(usex zstd) ) @@ -196,6 +267,11 @@ src_configure() { src_test() { cmake_build test-programs + EPYTEST_DESELECT=( + # TODO: investigate + suite_follow_multistream.py::case_follow_multistream::test_follow_http2_multistream + ) + # https://www.wireshark.org/docs/wsdg_html_chunked/ChTestsRunPytest.html epytest \ --disable-capture \ @@ -211,8 +287,7 @@ src_install() { # install headers insinto /usr/include/wireshark - doins ws_diag_control.h ws_symbol_export.h \ - "${BUILD_DIR}"/config.h + doins "${BUILD_DIR}"/config.h # If trying to remove this, try build e.g. libvirt first! # At last check, Fedora is still doing this too. @@ -232,23 +307,25 @@ src_install() { doins ${dir}/*.h done - if use qt5 ; then + if use gui ; then local s for s in 16 32 48 64 128 256 512 1024 ; do insinto /usr/share/icons/hicolor/${s}x${s}/apps - newins image/wsicon${s}.png wireshark.png + newins resources/icons/wsicon${s}.png wireshark.png done for s in 16 24 32 48 64 128 256 ; do insinto /usr/share/icons/hicolor/${s}x${s}/mimetypes - newins image/WiresharkDoc-${s}.png application-vnd.tcpdump.pcap.png + newins resources/icons//WiresharkDoc-${s}.png application-vnd.tcpdump.pcap.png done fi if [[ -d "${ED}"/usr/share/appdata ]] ; then rm -r "${ED}"/usr/share/appdata || die fi + + readme.gentoo_create_doc } pkg_postinst() { @@ -263,7 +340,5 @@ pkg_postinst() { "${EROOT}"/usr/bin/dumpcap fi - ewarn "NOTE: To capture traffic with wireshark as normal user you have to" - ewarn "add yourself to the pcap group. This security measure ensures" - ewarn "that only trusted users are allowed to sniff your traffic." + readme.gentoo_print_elog } diff --git a/net-analyzer/wireshark/wireshark-3.6.6.ebuild b/net-analyzer/wireshark/wireshark-4.0.14.ebuild index 373d120f39a6..808132d6248f 100644 --- a/net-analyzer/wireshark/wireshark-3.6.6.ebuild +++ b/net-analyzer/wireshark/wireshark-4.0.14.ebuild @@ -1,51 +1,62 @@ -# Copyright 1999-2022 Gentoo Authors +# Copyright 1999-2024 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=8 LUA_COMPAT=( lua5-{1..2} ) -PYTHON_COMPAT=( python3_{8..10} ) +PYTHON_COMPAT=( python3_{10..11} ) -inherit fcaps flag-o-matic lua-single python-any-r1 qmake-utils xdg cmake +inherit fcaps flag-o-matic readme.gentoo-r1 lua-single python-any-r1 qmake-utils xdg cmake -DESCRIPTION="A network protocol analyzer formerly known as ethereal" +DESCRIPTION="Network protocol analyzer (sniffer)" HOMEPAGE="https://www.wireshark.org/" if [[ ${PV} == *9999* ]] ; then EGIT_REPO_URI="https://gitlab.com/wireshark/wireshark" inherit git-r3 else + VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/wireshark.asc + inherit verify-sig + SRC_URI="https://www.wireshark.org/download/src/all-versions/${P/_/}.tar.xz" + SRC_URI+=" verify-sig? ( https://www.wireshark.org/download/SIGNATURES-${PV}.txt -> ${P}-signatures.txt )" S="${WORKDIR}/${P/_/}" - KEYWORDS="~alpha amd64 arm arm64 ~hppa ~ia64 ~ppc64 ~riscv x86" + if [[ ${PV} != *_rc* ]] ; then + KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~ia64 ~ppc64 ~riscv ~x86" + fi fi LICENSE="GPL-2" SLOT="0/${PV}" IUSE="androiddump bcg729 brotli +capinfos +captype ciscodump +dftest doc dpauxmon" -IUSE+=" +dumpcap +editcap http2 ilbc kerberos libxml2 lto lua lz4 maxminddb" -IUSE+=" +mergecap +minizip +netlink opus +plugins plugin-ifdemo +pcap +qt5 +randpkt" +IUSE+=" +dumpcap +editcap +gui http2 ilbc kerberos libxml2 lua lz4 maxminddb" +IUSE+=" +mergecap +minizip +netlink opus +plugins +pcap qt6 +randpkt" IUSE+=" +randpktdump +reordercap sbc selinux +sharkd smi snappy spandsp sshdump ssl" -IUSE+=" sdjournal test +text2pcap tfshark +tshark +udpdump zlib +zstd" +IUSE+=" sdjournal test +text2pcap tfshark +tshark +udpdump wifi zlib +zstd" -REQUIRED_USE="lua? ( ${LUA_REQUIRED_USE} ) - plugin-ifdemo? ( plugins )" +REQUIRED_USE=" + lua? ( ${LUA_REQUIRED_USE} ) +" -RESTRICT="!test? ( test )" +# Tests restricted for now because rely on pytest internals w/ >=3.11 +# See bug #897078 and https://gitlab.com/wireshark/wireshark/-/issues/18740. +RESTRICT="!test? ( test ) test" # bug #753062 for speexdsp -RDEPEND="acct-group/pcap - >=dev-libs/glib-2.38:2 - >=net-dns/c-ares-1.5:= - dev-libs/libgcrypt:= +RDEPEND=" + acct-group/pcap + >=dev-libs/glib-2.50.0:2 + dev-libs/libpcre2 + >=net-dns/c-ares-1.13.0:= + >=dev-libs/libgcrypt-1.8.0:= media-libs/speexdsp bcg729? ( media-libs/bcg729 ) brotli? ( app-arch/brotli:= ) - ciscodump? ( >=net-libs/libssh-0.6 ) + ciscodump? ( >=net-libs/libssh-0.6:= ) filecaps? ( sys-libs/libcap ) - http2? ( net-libs/nghttp2:= ) - ilbc? ( media-libs/libilbc ) + http2? ( >=net-libs/nghttp2-1.11.0:= ) + ilbc? ( media-libs/libilbc:= ) kerberos? ( virtual/krb5 ) libxml2? ( dev-libs/libxml2 ) lua? ( ${LUA_DEPS} ) @@ -55,45 +66,77 @@ RDEPEND="acct-group/pcap netlink? ( dev-libs/libnl:3 ) opus? ( media-libs/opus ) pcap? ( net-libs/libpcap ) - qt5? ( - dev-qt/qtcore:5 - dev-qt/qtgui:5 - dev-qt/qtmultimedia:5 - dev-qt/qtprintsupport:5 - dev-qt/qtwidgets:5 + gui? ( x11-misc/xdg-utils + qt6? ( + dev-qt/qtbase:6[concurrent,dbus,gui,widgets] + dev-qt/qt5compat:6 + dev-qt/qtmultimedia:6 + ) + !qt6? ( + dev-qt/qtcore:5 + dev-qt/qtconcurrent:5 + dev-qt/qtgui:5 + dev-qt/qtmultimedia:5 + dev-qt/qtprintsupport:5 + dev-qt/qtwidgets:5 + ) ) sbc? ( media-libs/sbc ) - sdjournal? ( sys-apps/systemd ) + sdjournal? ( sys-apps/systemd:= ) smi? ( net-libs/libsmi ) - snappy? ( app-arch/snappy ) - spandsp? ( media-libs/spandsp ) - sshdump? ( >=net-libs/libssh-0.6 ) - ssl? ( net-libs/gnutls:= ) + snappy? ( app-arch/snappy:= ) + spandsp? ( media-libs/spandsp:= ) + sshdump? ( >=net-libs/libssh-0.6:= ) + ssl? ( >=net-libs/gnutls-3.5.8:= ) + wifi? ( >=net-libs/libssh-0.6:= ) zlib? ( sys-libs/zlib ) - zstd? ( app-arch/zstd:= )" -DEPEND="${RDEPEND}" -BDEPEND="${PYTHON_DEPS} + zstd? ( app-arch/zstd:= ) +" +DEPEND=" + ${RDEPEND} + gui? ( + !qt6? ( + dev-qt/qtdeclarative:5 + ) + ) +" +# TODO: 4.0.0_rc1 release notes say: +# "Perl is no longer required to build Wireshark, but may be required to build some source code files and run code analysis checks." +BDEPEND=" + ${PYTHON_DEPS} dev-lang/perl - sys-devel/flex + app-alternatives/lex sys-devel/gettext virtual/pkgconfig doc? ( - app-doc/doxygen + app-text/doxygen dev-ruby/asciidoctor ) - qt5? ( - dev-qt/linguist-tools:5 + gui? ( + qt6? ( + dev-qt/qttools:6[linguist] + ) + !qt6? ( + dev-qt/linguist-tools:5 + ) ) test? ( $(python_gen_any_dep ' dev-python/pytest[${PYTHON_USEDEP}] dev-python/pytest-xdist[${PYTHON_USEDEP}] ') - )" -RDEPEND="${RDEPEND} - qt5? ( virtual/freedesktop-icon-theme ) - selinux? ( sec-policy/selinux-wireshark )" + ) +" +RDEPEND=" + ${RDEPEND} + gui? ( virtual/freedesktop-icon-theme ) + selinux? ( sec-policy/selinux-wireshark ) +" + +if [[ ${PV} != *9999* ]] ; then + BDEPEND+=" verify-sig? ( sec-keys/openpgp-keys-wireshark )" +fi PATCHES=( "${FILESDIR}"/${PN}-2.6.0-redhat.patch @@ -113,9 +156,28 @@ pkg_setup() { python-any-r1_pkg_setup } +src_unpack() { + if [[ ${PV} == *9999* ]] ; then + git-r3_src_unpack + else + if use verify-sig ; then + cd "${DISTDIR}" || die + verify-sig_verify_signed_checksums \ + ${P}-signatures.txt \ + openssl-dgst \ + ${P}.tar.xz + cd "${WORKDIR}" || die + fi + + default + fi +} + src_configure() { local mycmakeargs + python_setup + # Workaround bug #213705. If krb5-config --libs has -lcrypto then pass # --with-ssl to ./configure. (Mimics code from acinclude.m4). if use kerberos ; then @@ -129,20 +191,24 @@ src_configure() { esac fi - if use qt5 ; then - export QT_MIN_VERSION=5.3.0 + if use gui ; then append-cxxflags -fPIC -DPIC fi - python_setup + # crashes at runtime + # https://bugs.gentoo.org/754021 + filter-lto mycmakeargs+=( + -DPython3_EXECUTABLE="${PYTHON}" -DCMAKE_DISABLE_FIND_PACKAGE_{Asciidoctor,DOXYGEN}=$(usex !doc) + $(use androiddump && use pcap && echo -DEXTCAP_ANDROIDDUMP_LIBPCAP=yes) - $(usex qt5 LRELEASE=$(qt5_get_bindir)/lrelease '') - $(usex qt5 MOC=$(qt5_get_bindir)/moc '') - $(usex qt5 RCC=$(qt5_get_bindir)/rcc '') - $(usex qt5 UIC=$(qt5_get_bindir)/uic '') + $(usex gui LRELEASE=$(qt5_get_bindir)/lrelease '') + $(usex gui MOC=$(qt5_get_bindir)/moc '') + $(usex gui RCC=$(qt5_get_bindir)/rcc '') + $(usex gui UIC=$(qt5_get_bindir)/uic '') + -DBUILD_androiddump=$(usex androiddump) -DBUILD_capinfos=$(usex capinfos) -DBUILD_captype=$(usex captype) @@ -163,8 +229,11 @@ src_configure() { -DBUILD_tfshark=$(usex tfshark) -DBUILD_tshark=$(usex tshark) -DBUILD_udpdump=$(usex udpdump) - -DBUILD_wireshark=$(usex qt5) - -DDISABLE_WERROR=ON + + -DBUILD_wireshark=$(usex gui) + -DUSE_qt6=$(usex qt6) + + -DENABLE_WERROR=OFF -DENABLE_BCG729=$(usex bcg729) -DENABLE_BROTLI=$(usex brotli) -DENABLE_CAP=$(usex filecaps caps) @@ -172,7 +241,8 @@ src_configure() { -DENABLE_ILBC=$(usex ilbc) -DENABLE_KERBEROS=$(usex kerberos) -DENABLE_LIBXML2=$(usex libxml2) - -DENABLE_LTO=$(usex lto) + # only appends -flto + -DENABLE_LTO=OFF -DENABLE_LUA=$(usex lua) -DENABLE_LZ4=$(usex lz4) -DENABLE_MINIZIP=$(usex minizip) @@ -181,11 +251,12 @@ src_configure() { -DENABLE_OPUS=$(usex opus) -DENABLE_PCAP=$(usex pcap) -DENABLE_PLUGINS=$(usex plugins) - -DENABLE_PLUGIN_IFDEMO=$(usex plugin-ifdemo) + -DENABLE_PLUGIN_IFDEMO=OFF -DENABLE_SBC=$(usex sbc) -DENABLE_SMI=$(usex smi) -DENABLE_SNAPPY=$(usex snappy) -DENABLE_SPANDSP=$(usex spandsp) + -DBUILD_wifidump=$(usex wifi) -DENABLE_ZLIB=$(usex zlib) -DENABLE_ZSTD=$(usex zstd) ) @@ -196,6 +267,11 @@ src_configure() { src_test() { cmake_build test-programs + EPYTEST_DESELECT=( + # TODO: investigate + suite_follow_multistream.py::case_follow_multistream::test_follow_http2_multistream + ) + # https://www.wireshark.org/docs/wsdg_html_chunked/ChTestsRunPytest.html epytest \ --disable-capture \ @@ -211,8 +287,7 @@ src_install() { # install headers insinto /usr/include/wireshark - doins ws_diag_control.h ws_symbol_export.h \ - "${BUILD_DIR}"/config.h + doins "${BUILD_DIR}"/config.h # If trying to remove this, try build e.g. libvirt first! # At last check, Fedora is still doing this too. @@ -232,23 +307,25 @@ src_install() { doins ${dir}/*.h done - if use qt5 ; then + if use gui ; then local s for s in 16 32 48 64 128 256 512 1024 ; do insinto /usr/share/icons/hicolor/${s}x${s}/apps - newins image/wsicon${s}.png wireshark.png + newins resources/icons/wsicon${s}.png wireshark.png done for s in 16 24 32 48 64 128 256 ; do insinto /usr/share/icons/hicolor/${s}x${s}/mimetypes - newins image/WiresharkDoc-${s}.png application-vnd.tcpdump.pcap.png + newins resources/icons//WiresharkDoc-${s}.png application-vnd.tcpdump.pcap.png done fi if [[ -d "${ED}"/usr/share/appdata ]] ; then rm -r "${ED}"/usr/share/appdata || die fi + + readme.gentoo_create_doc } pkg_postinst() { @@ -263,7 +340,5 @@ pkg_postinst() { "${EROOT}"/usr/bin/dumpcap fi - ewarn "NOTE: To capture traffic with wireshark as normal user you have to" - ewarn "add yourself to the pcap group. This security measure ensures" - ewarn "that only trusted users are allowed to sniff your traffic." + readme.gentoo_print_elog } diff --git a/net-analyzer/wireshark/wireshark-4.0.0_rc2.ebuild b/net-analyzer/wireshark/wireshark-4.2.4-r1.ebuild index 9110abbac9e4..0e0d86d74067 100644 --- a/net-analyzer/wireshark/wireshark-4.0.0_rc2.ebuild +++ b/net-analyzer/wireshark/wireshark-4.2.4-r1.ebuild @@ -1,55 +1,61 @@ -# Copyright 1999-2022 Gentoo Authors +# Copyright 1999-2024 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=8 LUA_COMPAT=( lua5-{1..2} ) -PYTHON_COMPAT=( python3_{8..10} ) +# TODO: check cmake/modules/UseAsn2Wrs.cmake for 3.12 +PYTHON_COMPAT=( python3_{10..12} ) inherit fcaps flag-o-matic lua-single python-any-r1 qmake-utils xdg cmake -DESCRIPTION="A network protocol analyzer formerly known as ethereal" +DESCRIPTION="Network protocol analyzer (sniffer)" HOMEPAGE="https://www.wireshark.org/" if [[ ${PV} == *9999* ]] ; then EGIT_REPO_URI="https://gitlab.com/wireshark/wireshark" inherit git-r3 else + VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/wireshark.asc + inherit verify-sig + SRC_URI="https://www.wireshark.org/download/src/all-versions/${P/_/}.tar.xz" + SRC_URI+=" verify-sig? ( https://www.wireshark.org/download/SIGNATURES-${PV}.txt -> ${P}-signatures.txt )" S="${WORKDIR}/${P/_/}" if [[ ${PV} != *_rc* ]] ; then - KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~ppc64 ~riscv ~x86" + KEYWORDS="~amd64 ~arm64 ~hppa" fi fi LICENSE="GPL-2" SLOT="0/${PV}" IUSE="androiddump bcg729 brotli +capinfos +captype ciscodump +dftest doc dpauxmon" -IUSE+=" +dumpcap +editcap +gui http2 ilbc kerberos libxml2 lto lua lz4 maxminddb" -IUSE+=" +mergecap +minizip +netlink opus +plugins plugin-ifdemo +pcap qt6 +randpkt" +IUSE+=" +dumpcap +editcap +gui http2 http3 ilbc kerberos libxml2 lua lz4 maxminddb" +IUSE+=" +mergecap +minizip +netlink opus +plugins +pcap qt6 +randpkt" IUSE+=" +randpktdump +reordercap sbc selinux +sharkd smi snappy spandsp sshdump ssl" -IUSE+=" sdjournal test +text2pcap tfshark +tshark +udpdump zlib +zstd" +IUSE+=" sdjournal test +text2pcap tfshark +tshark +udpdump wifi zlib +zstd" -REQUIRED_USE="lua? ( ${LUA_REQUIRED_USE} ) - plugin-ifdemo? ( plugins )" +REQUIRED_USE=" + lua? ( ${LUA_REQUIRED_USE} ) +" RESTRICT="!test? ( test )" -# TODO: wifidump/libssh automagic? # bug #753062 for speexdsp RDEPEND=" acct-group/pcap >=dev-libs/glib-2.50.0:2 dev-libs/libpcre2 - >=net-dns/c-ares-1.14.0:= + >=net-dns/c-ares-1.13.0:= >=dev-libs/libgcrypt-1.8.0:= media-libs/speexdsp bcg729? ( media-libs/bcg729 ) brotli? ( app-arch/brotli:= ) - ciscodump? ( >=net-libs/libssh-0.6 ) + ciscodump? ( >=net-libs/libssh-0.6:= ) filecaps? ( sys-libs/libcap ) http2? ( >=net-libs/nghttp2-1.11.0:= ) + http3? ( net-libs/nghttp3 ) ilbc? ( media-libs/libilbc:= ) kerberos? ( virtual/krb5 ) libxml2? ( dev-libs/libxml2 ) @@ -69,6 +75,7 @@ RDEPEND=" ) !qt6? ( dev-qt/qtcore:5 + dev-qt/qtconcurrent:5 dev-qt/qtgui:5 dev-qt/qtmultimedia:5 dev-qt/qtprintsupport:5 @@ -78,25 +85,34 @@ RDEPEND=" sbc? ( media-libs/sbc ) sdjournal? ( sys-apps/systemd:= ) smi? ( net-libs/libsmi ) - snappy? ( app-arch/snappy ) + snappy? ( app-arch/snappy:= ) spandsp? ( media-libs/spandsp:= ) sshdump? ( >=net-libs/libssh-0.6:= ) ssl? ( >=net-libs/gnutls-3.5.8:= ) + wifi? ( >=net-libs/libssh-0.6:= ) zlib? ( sys-libs/zlib ) zstd? ( app-arch/zstd:= ) " -DEPEND="${RDEPEND}" +DEPEND=" + ${RDEPEND} + gui? ( + !qt6? ( + dev-qt/qtdeclarative:5 + ) + ) +" # TODO: 4.0.0_rc1 release notes say: # "Perl is no longer required to build Wireshark, but may be required to build some source code files and run code analysis checks." BDEPEND=" ${PYTHON_DEPS} dev-lang/perl - sys-devel/flex + app-alternatives/lex sys-devel/gettext virtual/pkgconfig doc? ( - app-doc/doxygen + app-text/doxygen dev-ruby/asciidoctor + dev-libs/libxslt ) gui? ( qt6? ( @@ -119,9 +135,12 @@ RDEPEND=" selinux? ( sec-policy/selinux-wireshark ) " +if [[ ${PV} != *9999* ]] ; then + BDEPEND+=" verify-sig? ( sec-keys/openpgp-keys-wireshark )" +fi + PATCHES=( "${FILESDIR}"/${PN}-2.6.0-redhat.patch - "${FILESDIR}"/${PN}-3.4.2-cmake-lua-version.patch ) python_check_deps() { @@ -137,6 +156,23 @@ pkg_setup() { python-any-r1_pkg_setup } +src_unpack() { + if [[ ${PV} == *9999* ]] ; then + git-r3_src_unpack + else + if use verify-sig ; then + cd "${DISTDIR}" || die + verify-sig_verify_signed_checksums \ + ${P}-signatures.txt \ + openssl-dgst \ + ${P}.tar.xz + cd "${WORKDIR}" || die + fi + + default + fi +} + src_configure() { local mycmakeargs @@ -159,13 +195,20 @@ src_configure() { append-cxxflags -fPIC -DPIC fi + # crashes at runtime + # https://bugs.gentoo.org/754021 + filter-lto + mycmakeargs+=( + -DPython3_EXECUTABLE="${PYTHON}" -DCMAKE_DISABLE_FIND_PACKAGE_{Asciidoctor,DOXYGEN}=$(usex !doc) + $(use androiddump && use pcap && echo -DEXTCAP_ANDROIDDUMP_LIBPCAP=yes) $(usex gui LRELEASE=$(qt5_get_bindir)/lrelease '') $(usex gui MOC=$(qt5_get_bindir)/moc '') $(usex gui RCC=$(qt5_get_bindir)/rcc '') $(usex gui UIC=$(qt5_get_bindir)/uic '') + -DBUILD_androiddump=$(usex androiddump) -DBUILD_capinfos=$(usex capinfos) -DBUILD_captype=$(usex captype) @@ -198,20 +241,24 @@ src_configure() { -DENABLE_ILBC=$(usex ilbc) -DENABLE_KERBEROS=$(usex kerberos) -DENABLE_LIBXML2=$(usex libxml2) - -DENABLE_LTO=$(usex lto) + # only appends -flto + -DENABLE_LTO=OFF -DENABLE_LUA=$(usex lua) + -DLUA_FIND_VERSIONS="${ELUA#lua}" -DENABLE_LZ4=$(usex lz4) -DENABLE_MINIZIP=$(usex minizip) -DENABLE_NETLINK=$(usex netlink) -DENABLE_NGHTTP2=$(usex http2) + -DENABLE_NGHTTP3=$(usex http3) -DENABLE_OPUS=$(usex opus) -DENABLE_PCAP=$(usex pcap) -DENABLE_PLUGINS=$(usex plugins) - -DENABLE_PLUGIN_IFDEMO=$(usex plugin-ifdemo) + -DENABLE_PLUGIN_IFDEMO=OFF -DENABLE_SBC=$(usex sbc) -DENABLE_SMI=$(usex smi) -DENABLE_SNAPPY=$(usex snappy) -DENABLE_SPANDSP=$(usex spandsp) + -DBUILD_wifidump=$(usex wifi) -DENABLE_ZLIB=$(usex zlib) -DENABLE_ZSTD=$(usex zstd) ) @@ -222,6 +269,11 @@ src_configure() { src_test() { cmake_build test-programs + EPYTEST_DESELECT=( + # TODO: investigate + suite_follow_multistream.py::case_follow_multistream::test_follow_http2_multistream + ) + # https://www.wireshark.org/docs/wsdg_html_chunked/ChTestsRunPytest.html epytest \ --disable-capture \ @@ -230,7 +282,9 @@ src_test() { } src_install() { - cmake_src_install + # bug #928577 + # https://gitlab.com/wireshark/wireshark/-/commit/fe7bfdf6caac9204ab5f34eeba7b0f4a0314d3cd + cmake_src_install install-headers # FAQ is not required as is installed from help/faq.txt dodoc AUTHORS ChangeLog NEWS README* doc/randpkt.txt doc/README* diff --git a/net-analyzer/wireshark/wireshark-9999.ebuild b/net-analyzer/wireshark/wireshark-9999.ebuild index 9110abbac9e4..0e0d86d74067 100644 --- a/net-analyzer/wireshark/wireshark-9999.ebuild +++ b/net-analyzer/wireshark/wireshark-9999.ebuild @@ -1,55 +1,61 @@ -# Copyright 1999-2022 Gentoo Authors +# Copyright 1999-2024 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=8 LUA_COMPAT=( lua5-{1..2} ) -PYTHON_COMPAT=( python3_{8..10} ) +# TODO: check cmake/modules/UseAsn2Wrs.cmake for 3.12 +PYTHON_COMPAT=( python3_{10..12} ) inherit fcaps flag-o-matic lua-single python-any-r1 qmake-utils xdg cmake -DESCRIPTION="A network protocol analyzer formerly known as ethereal" +DESCRIPTION="Network protocol analyzer (sniffer)" HOMEPAGE="https://www.wireshark.org/" if [[ ${PV} == *9999* ]] ; then EGIT_REPO_URI="https://gitlab.com/wireshark/wireshark" inherit git-r3 else + VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/wireshark.asc + inherit verify-sig + SRC_URI="https://www.wireshark.org/download/src/all-versions/${P/_/}.tar.xz" + SRC_URI+=" verify-sig? ( https://www.wireshark.org/download/SIGNATURES-${PV}.txt -> ${P}-signatures.txt )" S="${WORKDIR}/${P/_/}" if [[ ${PV} != *_rc* ]] ; then - KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~ppc64 ~riscv ~x86" + KEYWORDS="~amd64 ~arm64 ~hppa" fi fi LICENSE="GPL-2" SLOT="0/${PV}" IUSE="androiddump bcg729 brotli +capinfos +captype ciscodump +dftest doc dpauxmon" -IUSE+=" +dumpcap +editcap +gui http2 ilbc kerberos libxml2 lto lua lz4 maxminddb" -IUSE+=" +mergecap +minizip +netlink opus +plugins plugin-ifdemo +pcap qt6 +randpkt" +IUSE+=" +dumpcap +editcap +gui http2 http3 ilbc kerberos libxml2 lua lz4 maxminddb" +IUSE+=" +mergecap +minizip +netlink opus +plugins +pcap qt6 +randpkt" IUSE+=" +randpktdump +reordercap sbc selinux +sharkd smi snappy spandsp sshdump ssl" -IUSE+=" sdjournal test +text2pcap tfshark +tshark +udpdump zlib +zstd" +IUSE+=" sdjournal test +text2pcap tfshark +tshark +udpdump wifi zlib +zstd" -REQUIRED_USE="lua? ( ${LUA_REQUIRED_USE} ) - plugin-ifdemo? ( plugins )" +REQUIRED_USE=" + lua? ( ${LUA_REQUIRED_USE} ) +" RESTRICT="!test? ( test )" -# TODO: wifidump/libssh automagic? # bug #753062 for speexdsp RDEPEND=" acct-group/pcap >=dev-libs/glib-2.50.0:2 dev-libs/libpcre2 - >=net-dns/c-ares-1.14.0:= + >=net-dns/c-ares-1.13.0:= >=dev-libs/libgcrypt-1.8.0:= media-libs/speexdsp bcg729? ( media-libs/bcg729 ) brotli? ( app-arch/brotli:= ) - ciscodump? ( >=net-libs/libssh-0.6 ) + ciscodump? ( >=net-libs/libssh-0.6:= ) filecaps? ( sys-libs/libcap ) http2? ( >=net-libs/nghttp2-1.11.0:= ) + http3? ( net-libs/nghttp3 ) ilbc? ( media-libs/libilbc:= ) kerberos? ( virtual/krb5 ) libxml2? ( dev-libs/libxml2 ) @@ -69,6 +75,7 @@ RDEPEND=" ) !qt6? ( dev-qt/qtcore:5 + dev-qt/qtconcurrent:5 dev-qt/qtgui:5 dev-qt/qtmultimedia:5 dev-qt/qtprintsupport:5 @@ -78,25 +85,34 @@ RDEPEND=" sbc? ( media-libs/sbc ) sdjournal? ( sys-apps/systemd:= ) smi? ( net-libs/libsmi ) - snappy? ( app-arch/snappy ) + snappy? ( app-arch/snappy:= ) spandsp? ( media-libs/spandsp:= ) sshdump? ( >=net-libs/libssh-0.6:= ) ssl? ( >=net-libs/gnutls-3.5.8:= ) + wifi? ( >=net-libs/libssh-0.6:= ) zlib? ( sys-libs/zlib ) zstd? ( app-arch/zstd:= ) " -DEPEND="${RDEPEND}" +DEPEND=" + ${RDEPEND} + gui? ( + !qt6? ( + dev-qt/qtdeclarative:5 + ) + ) +" # TODO: 4.0.0_rc1 release notes say: # "Perl is no longer required to build Wireshark, but may be required to build some source code files and run code analysis checks." BDEPEND=" ${PYTHON_DEPS} dev-lang/perl - sys-devel/flex + app-alternatives/lex sys-devel/gettext virtual/pkgconfig doc? ( - app-doc/doxygen + app-text/doxygen dev-ruby/asciidoctor + dev-libs/libxslt ) gui? ( qt6? ( @@ -119,9 +135,12 @@ RDEPEND=" selinux? ( sec-policy/selinux-wireshark ) " +if [[ ${PV} != *9999* ]] ; then + BDEPEND+=" verify-sig? ( sec-keys/openpgp-keys-wireshark )" +fi + PATCHES=( "${FILESDIR}"/${PN}-2.6.0-redhat.patch - "${FILESDIR}"/${PN}-3.4.2-cmake-lua-version.patch ) python_check_deps() { @@ -137,6 +156,23 @@ pkg_setup() { python-any-r1_pkg_setup } +src_unpack() { + if [[ ${PV} == *9999* ]] ; then + git-r3_src_unpack + else + if use verify-sig ; then + cd "${DISTDIR}" || die + verify-sig_verify_signed_checksums \ + ${P}-signatures.txt \ + openssl-dgst \ + ${P}.tar.xz + cd "${WORKDIR}" || die + fi + + default + fi +} + src_configure() { local mycmakeargs @@ -159,13 +195,20 @@ src_configure() { append-cxxflags -fPIC -DPIC fi + # crashes at runtime + # https://bugs.gentoo.org/754021 + filter-lto + mycmakeargs+=( + -DPython3_EXECUTABLE="${PYTHON}" -DCMAKE_DISABLE_FIND_PACKAGE_{Asciidoctor,DOXYGEN}=$(usex !doc) + $(use androiddump && use pcap && echo -DEXTCAP_ANDROIDDUMP_LIBPCAP=yes) $(usex gui LRELEASE=$(qt5_get_bindir)/lrelease '') $(usex gui MOC=$(qt5_get_bindir)/moc '') $(usex gui RCC=$(qt5_get_bindir)/rcc '') $(usex gui UIC=$(qt5_get_bindir)/uic '') + -DBUILD_androiddump=$(usex androiddump) -DBUILD_capinfos=$(usex capinfos) -DBUILD_captype=$(usex captype) @@ -198,20 +241,24 @@ src_configure() { -DENABLE_ILBC=$(usex ilbc) -DENABLE_KERBEROS=$(usex kerberos) -DENABLE_LIBXML2=$(usex libxml2) - -DENABLE_LTO=$(usex lto) + # only appends -flto + -DENABLE_LTO=OFF -DENABLE_LUA=$(usex lua) + -DLUA_FIND_VERSIONS="${ELUA#lua}" -DENABLE_LZ4=$(usex lz4) -DENABLE_MINIZIP=$(usex minizip) -DENABLE_NETLINK=$(usex netlink) -DENABLE_NGHTTP2=$(usex http2) + -DENABLE_NGHTTP3=$(usex http3) -DENABLE_OPUS=$(usex opus) -DENABLE_PCAP=$(usex pcap) -DENABLE_PLUGINS=$(usex plugins) - -DENABLE_PLUGIN_IFDEMO=$(usex plugin-ifdemo) + -DENABLE_PLUGIN_IFDEMO=OFF -DENABLE_SBC=$(usex sbc) -DENABLE_SMI=$(usex smi) -DENABLE_SNAPPY=$(usex snappy) -DENABLE_SPANDSP=$(usex spandsp) + -DBUILD_wifidump=$(usex wifi) -DENABLE_ZLIB=$(usex zlib) -DENABLE_ZSTD=$(usex zstd) ) @@ -222,6 +269,11 @@ src_configure() { src_test() { cmake_build test-programs + EPYTEST_DESELECT=( + # TODO: investigate + suite_follow_multistream.py::case_follow_multistream::test_follow_http2_multistream + ) + # https://www.wireshark.org/docs/wsdg_html_chunked/ChTestsRunPytest.html epytest \ --disable-capture \ @@ -230,7 +282,9 @@ src_test() { } src_install() { - cmake_src_install + # bug #928577 + # https://gitlab.com/wireshark/wireshark/-/commit/fe7bfdf6caac9204ab5f34eeba7b0f4a0314d3cd + cmake_src_install install-headers # FAQ is not required as is installed from help/faq.txt dodoc AUTHORS ChangeLog NEWS README* doc/randpkt.txt doc/README* |