Gentoo Archives: gentoo-commits

From: Sam James <sam@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: net-analyzer/wireshark/
Date: Tue, 04 Jan 2022 04:54:08
Message-Id: 1641272014.3caad1cbd744874cbfa34c4ae41f0ded2b75311e.sam@gentoo
1 commit: 3caad1cbd744874cbfa34c4ae41f0ded2b75311e
2 Author: Sam James <sam <AT> gentoo <DOT> org>
3 AuthorDate: Mon Jan 3 08:55:51 2022 +0000
4 Commit: Sam James <sam <AT> gentoo <DOT> org>
5 CommitDate: Tue Jan 4 04:53:34 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3caad1cb
7
8 net-analyzer/wireshark: add 3.4.11
9
10 Bug: https://bugs.gentoo.org/830343
11 Signed-off-by: Sam James <sam <AT> gentoo.org>
12
13 net-analyzer/wireshark/Manifest | 1 +
14 net-analyzer/wireshark/wireshark-3.4.11.ebuild | 285 +++++++++++++++++++++++++
15 2 files changed, 286 insertions(+)
16
17 diff --git a/net-analyzer/wireshark/Manifest b/net-analyzer/wireshark/Manifest
18 index 7ac98cb6122d..6e13f800ccfd 100644
19 --- a/net-analyzer/wireshark/Manifest
20 +++ b/net-analyzer/wireshark/Manifest
21 @@ -1,3 +1,4 @@
22 DIST wireshark-3.4.10.tar.xz 32344804 BLAKE2B fe2ececd4a02530176725d62524fe000816f7f12dd58082d4966dfe7e5e0b90be669ed216c5a664f6496e74cb5dc5e4fb5beeaf513570ae503e3181692635563 SHA512 8a57d5279e9f3821b6ba3dceba89ad77fa8d0cf8cf421eab4d32e039497b429444c147b31abebd65b11b0b3ff73cf10d484480bcf0aedb206011819df8ab0257
23 +DIST wireshark-3.4.11.tar.xz 32354216 BLAKE2B 3e08d01f2d89f5ddd74c4e2215e6852f30c7419234a45b52a25aa9119995ec2c2882cc3993dce7941e6e73230eb4d295bf0785dda5fe8c3df99f9efdb1e42bfd SHA512 cfef2c3e56279baadb7f41a1f46fde9214a467972f69914c14a8153ea2f2adcb55832413bcaf7a3f8d98b4b62d0574f12144de6c06ff382b4fa8b071903993dc
24 DIST wireshark-3.6.0.tar.xz 39687684 BLAKE2B 17af7046662087a18d0708ab0b5bc00bd4d43db848e14217e046dd551e57decd0a258f67c7fd82e1e10e0dceb249618e41ded5a6cd2e0a79d2ee5b7bf397cea7 SHA512 7c8afdee8957eb794030e0818a686c0efabc8ad9547449f434fc7299c7b7e624347698fdc7a42afac150eb86c8ca3d1d6360c29525bb35946619c4636f721094
25 DIST wireshark-3.6.1.tar.xz 39632140 BLAKE2B 49a7385946001a3b4a9890751cfea678c8aefcf8180e1a3008085a453d34e458d60d071975eeb585b92c6d9a210b732cc9fdb4fd952f1a9d74decad79c145fe0 SHA512 8b036d623010a5c4ece22de869847b3d999dac1c1e874e957c091a65c18351d9a1cc400828a70caf3c9f9900f8971dc585a5fafb7b08d446cd5d1d68938b0e81
26
27 diff --git a/net-analyzer/wireshark/wireshark-3.4.11.ebuild b/net-analyzer/wireshark/wireshark-3.4.11.ebuild
28 new file mode 100644
29 index 000000000000..6ea541c8b477
30 --- /dev/null
31 +++ b/net-analyzer/wireshark/wireshark-3.4.11.ebuild
32 @@ -0,0 +1,285 @@
33 +# Copyright 1999-2021 Gentoo Authors
34 +# Distributed under the terms of the GNU General Public License v2
35 +
36 +EAPI=7
37 +
38 +LUA_COMPAT=( lua5-{1..2} )
39 +PYTHON_COMPAT=( python3_{8..9} )
40 +
41 +inherit fcaps flag-o-matic lua-single python-any-r1 qmake-utils xdg-utils cmake
42 +
43 +DESCRIPTION="A network protocol analyzer formerly known as ethereal"
44 +HOMEPAGE="https://www.wireshark.org/"
45 +
46 +if [[ ${PV} == *9999* ]] ; then
47 + EGIT_REPO_URI="https://gitlab.com/wireshark/wireshark"
48 + inherit git-r3
49 +else
50 + SRC_URI="https://www.wireshark.org/download/src/all-versions/${P/_/}.tar.xz"
51 + S="${WORKDIR}/${P/_/}"
52 +
53 + KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~ppc64 ~x86"
54 +fi
55 +
56 +LICENSE="GPL-2"
57 +SLOT="0/${PV}"
58 +IUSE="androiddump bcg729 brotli +capinfos +captype ciscodump +dftest doc dpauxmon"
59 +IUSE+=" +dumpcap +editcap http2 ilbc kerberos libxml2 lto lua lz4 maxminddb"
60 +IUSE+=" +mergecap +minizip +netlink opus +plugins plugin-ifdemo +pcap +qt5 +randpkt"
61 +IUSE+=" +randpktdump +reordercap sbc selinux +sharkd smi snappy spandsp sshdump ssl"
62 +IUSE+=" sdjournal test +text2pcap tfshark +tshark +udpdump zlib +zstd"
63 +
64 +RESTRICT="!test? ( test )"
65 +
66 +# bug #753062 for speexdsp
67 +CDEPEND="
68 + acct-group/pcap
69 + >=dev-libs/glib-2.32:2
70 + >=net-dns/c-ares-1.5:=
71 + dev-libs/libgcrypt:=
72 + media-libs/speexdsp
73 + bcg729? ( media-libs/bcg729 )
74 + brotli? ( app-arch/brotli:= )
75 + ciscodump? ( >=net-libs/libssh-0.6 )
76 + filecaps? ( sys-libs/libcap )
77 + http2? ( net-libs/nghttp2:= )
78 + ilbc? ( media-libs/libilbc )
79 + kerberos? ( virtual/krb5 )
80 + libxml2? ( dev-libs/libxml2 )
81 + lua? ( ${LUA_DEPS} )
82 + lz4? ( app-arch/lz4:= )
83 + maxminddb? ( dev-libs/libmaxminddb:= )
84 + minizip? ( sys-libs/zlib[minizip] )
85 + netlink? ( dev-libs/libnl:3 )
86 + opus? ( media-libs/opus )
87 + pcap? ( net-libs/libpcap )
88 + qt5? (
89 + dev-qt/qtcore:5
90 + dev-qt/qtgui:5
91 + dev-qt/qtmultimedia:5
92 + dev-qt/qtprintsupport:5
93 + dev-qt/qtwidgets:5
94 + x11-misc/xdg-utils
95 + )
96 + sbc? ( media-libs/sbc )
97 + sdjournal? ( sys-apps/systemd )
98 + smi? ( net-libs/libsmi )
99 + snappy? ( app-arch/snappy )
100 + spandsp? ( media-libs/spandsp )
101 + sshdump? ( >=net-libs/libssh-0.6 )
102 + ssl? ( net-libs/gnutls:= )
103 + zlib? ( sys-libs/zlib )
104 + zstd? ( app-arch/zstd:= )
105 +"
106 +# We need perl for `pod2html`. The rest of the perl stuff is to block older
107 +# and broken installs. #455122
108 +DEPEND="
109 + ${CDEPEND}
110 + ${PYTHON_DEPS}
111 +"
112 +BDEPEND="
113 + dev-lang/perl
114 + sys-devel/bison
115 + sys-devel/flex
116 + virtual/pkgconfig
117 + doc? (
118 + app-doc/doxygen
119 + dev-ruby/asciidoctor
120 + )
121 + qt5? (
122 + dev-qt/linguist-tools:5
123 + )
124 + test? (
125 + dev-python/pytest
126 + dev-python/pytest-xdist
127 + )
128 +"
129 +RDEPEND="
130 + ${CDEPEND}
131 + qt5? ( virtual/freedesktop-icon-theme )
132 + selinux? ( sec-policy/selinux-wireshark )
133 +"
134 +REQUIRED_USE="
135 + lua? ( ${LUA_REQUIRED_USE} )
136 + plugin-ifdemo? ( plugins )
137 +"
138 +
139 +PATCHES=(
140 + "${FILESDIR}"/${PN}-2.6.0-redhat.patch
141 + "${FILESDIR}"/${PN}-3.4.2-cmake-lua-version.patch
142 + "${FILESDIR}"/${PN}-9999-ui-needs-wiretap.patch
143 +)
144 +
145 +pkg_setup() {
146 + use lua && lua-single_pkg_setup
147 +}
148 +
149 +src_configure() {
150 + local mycmakeargs
151 +
152 + # Workaround bug #213705. If krb5-config --libs has -lcrypto then pass
153 + # --with-ssl to ./configure. (Mimics code from acinclude.m4).
154 + if use kerberos; then
155 + case $(krb5-config --libs) in
156 + *-lcrypto*)
157 + ewarn "Kerberos was built with ssl support: linkage with openssl is enabled."
158 + ewarn "Note there are annoying license incompatibilities between the OpenSSL"
159 + ewarn "license and the GPL, so do your check before distributing such package."
160 + mycmakeargs+=( -DENABLE_GNUTLS=$(usex ssl) )
161 + ;;
162 + esac
163 + fi
164 +
165 + if use qt5; then
166 + export QT_MIN_VERSION=5.3.0
167 + append-cxxflags -fPIC -DPIC
168 + fi
169 +
170 + python_setup
171 +
172 + mycmakeargs+=(
173 + $(use androiddump && use pcap && echo -DEXTCAP_ANDROIDDUMP_LIBPCAP=yes)
174 + $(usex qt5 LRELEASE=$(qt5_get_bindir)/lrelease '')
175 + $(usex qt5 MOC=$(qt5_get_bindir)/moc '')
176 + $(usex qt5 RCC=$(qt5_get_bindir)/rcc '')
177 + $(usex qt5 UIC=$(qt5_get_bindir)/uic '')
178 + -DBUILD_androiddump=$(usex androiddump)
179 + -DBUILD_capinfos=$(usex capinfos)
180 + -DBUILD_captype=$(usex captype)
181 + -DBUILD_ciscodump=$(usex ciscodump)
182 + -DBUILD_dftest=$(usex dftest)
183 + -DBUILD_dpauxmon=$(usex dpauxmon)
184 + -DBUILD_dumpcap=$(usex dumpcap)
185 + -DBUILD_editcap=$(usex editcap)
186 + -DBUILD_mergecap=$(usex mergecap)
187 + -DBUILD_mmdbresolve=$(usex maxminddb)
188 + -DBUILD_randpkt=$(usex randpkt)
189 + -DBUILD_randpktdump=$(usex randpktdump)
190 + -DBUILD_reordercap=$(usex reordercap)
191 + -DBUILD_sdjournal=$(usex sdjournal)
192 + -DBUILD_sharkd=$(usex sharkd)
193 + -DBUILD_sshdump=$(usex sshdump)
194 + -DBUILD_text2pcap=$(usex text2pcap)
195 + -DBUILD_tfshark=$(usex tfshark)
196 + -DBUILD_tshark=$(usex tshark)
197 + -DBUILD_udpdump=$(usex udpdump)
198 + -DBUILD_wireshark=$(usex qt5)
199 + -DDISABLE_WERROR=yes
200 + -DENABLE_BCG729=$(usex bcg729)
201 + -DENABLE_BROTLI=$(usex brotli)
202 + -DENABLE_CAP=$(usex filecaps caps)
203 + -DENABLE_GNUTLS=$(usex ssl)
204 + -DENABLE_ILBC=$(usex ilbc)
205 + -DENABLE_KERBEROS=$(usex kerberos)
206 + -DENABLE_LIBXML2=$(usex libxml2)
207 + -DENABLE_LTO=$(usex lto)
208 + -DENABLE_LUA=$(usex lua)
209 + -DENABLE_LZ4=$(usex lz4)
210 + -DENABLE_MINIZIP=$(usex minizip)
211 + -DENABLE_NETLINK=$(usex netlink)
212 + -DENABLE_NGHTTP2=$(usex http2)
213 + -DENABLE_OPUS=$(usex opus)
214 + -DENABLE_PCAP=$(usex pcap)
215 + -DENABLE_PLUGINS=$(usex plugins)
216 + -DENABLE_PLUGIN_IFDEMO=$(usex plugin-ifdemo)
217 + -DENABLE_SBC=$(usex sbc)
218 + -DENABLE_SMI=$(usex smi)
219 + -DENABLE_SNAPPY=$(usex snappy)
220 + -DENABLE_SPANDSP=$(usex spandsp)
221 + -DENABLE_ZLIB=$(usex zlib)
222 + -DENABLE_ZSTD=$(usex zstd)
223 + )
224 +
225 + cmake_src_configure
226 +}
227 +
228 +src_test() {
229 + cmake_build test-programs
230 +
231 + myctestargs=(
232 + --disable-capture
233 + --skip-missing-programs=all
234 + --verbose
235 +
236 + # Skip known failing tests
237 + # extcaps needs a bunch of external programs
238 + # decryption/nameres seem to be fixed in 3.6.x
239 + -E "(suite_decryption|suite_extcaps|suite_nameres)"
240 + )
241 +
242 + cmake_src_test
243 +}
244 +
245 +src_install() {
246 + cmake_src_install
247 +
248 + # FAQ is not required as is installed from help/faq.txt
249 + dodoc AUTHORS ChangeLog NEWS README* doc/randpkt.txt doc/README*
250 +
251 + # install headers
252 + insinto /usr/include/wireshark
253 + doins ws_diag_control.h ws_symbol_export.h \
254 + "${BUILD_DIR}"/config.h "${BUILD_DIR}"/version.h
255 +
256 + local dir dirs=(
257 + epan
258 + epan/crypt
259 + epan/dfilter
260 + epan/dissectors
261 + epan/ftypes
262 + epan/wmem
263 + wiretap
264 + wsutil
265 + )
266 +
267 + for dir in "${dirs[@]}" ; do
268 + insinto /usr/include/wireshark/${dir}
269 + doins ${dir}/*.h
270 + done
271 +
272 + #with the above this really shouldn't be needed, but things may be looking
273 + # in wiretap/ instead of wireshark/wiretap/
274 + insinto /usr/include/wiretap
275 + doins wiretap/wtap.h
276 +
277 + if use qt5; then
278 + local s
279 + for s in 16 32 48 64 128 256 512 1024; do
280 + insinto /usr/share/icons/hicolor/${s}x${s}/apps
281 + newins image/wsicon${s}.png wireshark.png
282 + done
283 + for s in 16 24 32 48 64 128 256 ; do
284 + insinto /usr/share/icons/hicolor/${s}x${s}/mimetypes
285 + newins image/WiresharkDoc-${s}.png application-vnd.tcpdump.pcap.png
286 + done
287 + fi
288 +
289 + if [[ -d "${ED}"/usr/share/appdata ]]; then
290 + rm -r "${ED}"/usr/share/appdata || die
291 + fi
292 +}
293 +
294 +pkg_postinst() {
295 + xdg_desktop_database_update
296 + xdg_icon_cache_update
297 + xdg_mimeinfo_database_update
298 +
299 + # Add group for users allowed to sniff.
300 + chgrp pcap "${EROOT}"/usr/bin/dumpcap
301 +
302 + if use dumpcap && use pcap; then
303 + fcaps -o 0 -g pcap -m 4710 -M 0710 \
304 + cap_dac_read_search,cap_net_raw,cap_net_admin \
305 + "${EROOT}"/usr/bin/dumpcap
306 + fi
307 +
308 + ewarn "NOTE: To capture traffic with wireshark as normal user you have to"
309 + ewarn "add yourself to the pcap group. This security measure ensures"
310 + ewarn "that only trusted users are allowed to sniff your traffic."
311 +}
312 +
313 +pkg_postrm() {
314 + xdg_desktop_database_update
315 + xdg_icon_cache_update
316 + xdg_mimeinfo_database_update
317 +}