1 |
commit: 86fff0b3e052e21123855eada99fbff2aefde691 |
2 |
Author: Aaron Bauman <bman <AT> gentoo <DOT> org> |
3 |
AuthorDate: Mon Mar 11 07:48:01 2019 +0000 |
4 |
Commit: Aaron Bauman <bman <AT> gentoo <DOT> org> |
5 |
CommitDate: Mon Mar 11 07:48:01 2019 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=86fff0b3 |
7 |
|
8 |
Revert "net-analyzer/wireshark: drop vulnerable wrt bug #661578" |
9 |
|
10 |
This reverts commit d7b18f912d0c8622e8647cef757c715d6eb2eec8. |
11 |
|
12 |
Signed-off-by: Aaron Bauman <bman <AT> gentoo.org> |
13 |
|
14 |
net-analyzer/wireshark/Manifest | 1 + |
15 |
net-analyzer/wireshark/wireshark-2.4.5.ebuild | 291 ++++++++++++++++++++++++++ |
16 |
2 files changed, 292 insertions(+) |
17 |
|
18 |
diff --git a/net-analyzer/wireshark/Manifest b/net-analyzer/wireshark/Manifest |
19 |
index c4ba02e145b..9e5bc3e93b8 100644 |
20 |
--- a/net-analyzer/wireshark/Manifest |
21 |
+++ b/net-analyzer/wireshark/Manifest |
22 |
@@ -1,3 +1,4 @@ |
23 |
+DIST wireshark-2.4.5.tar.xz 28836740 BLAKE2B 797540daca259a2d5d7dc6e637f2b504b6d14191af4040e6b344c95db6c776b7de80c25c59c98ab84d0337cc96c7313b42c13103a3c3944768a793130deae258 SHA512 2f2c201d6b8a37dcbe03bc9affbf97d632d8e40e4fe5b3a3e79cbd5cfbeb5b9111919850546ccae355fcb042def3456438eb1c4d73f7d56d373e7898311b42f3 |
24 |
DIST wireshark-2.6.3.tar.xz 28384004 BLAKE2B f275c73173fbaf3f819c58f28859362e9c53ae50cf2649ac42c8d172362241eb00d7f43d0aead184ec67cb8da34d405124be10c5bf31226c2cb4800b8a01955b SHA512 87e5335840baa401a1064ee83e3f0ee859c059dd37a09f63f19eb5d91ad273e84f1c0e7a8fdd63fe8a7076abff5e79593827544c5796d921cf7dc7682c7c3f80 |
25 |
DIST wireshark-2.6.6.tar.xz 28407404 BLAKE2B 5135789d345b675814a6394d5ba1469585b9eab917885730125b8a007aecd9cb48a510fc9e7479148cadf625807bac9017b854797e4bb2e562d7dc7f76140826 SHA512 b781c3b34dc76a3d8e60dc2b9b4e46a11994440b8df7b56134521ea9a77b27b0719a600db60d7f3d65f15972a5db2a7e85a8bf60d7217fce498fb5668de8fe56 |
26 |
DIST wireshark-2.6.7.tar.xz 28420060 BLAKE2B fda1fb2b9a8968916dd24c59c193854ab56dc13d5a69d2f589ae89b257f92794d092a3da75c2e20b1c83c902966db15527346dc4072a38d16a21ed095cde364e SHA512 bd0f87debd8bd8947f386aaec9fc843148e3cdfbffc28ba499526c4053732becea606061deae6799da0cf52458fba840ba0ff8e4a034a671fa876b8a0ff25677 |
27 |
|
28 |
diff --git a/net-analyzer/wireshark/wireshark-2.4.5.ebuild b/net-analyzer/wireshark/wireshark-2.4.5.ebuild |
29 |
new file mode 100644 |
30 |
index 00000000000..c1819bafbf8 |
31 |
--- /dev/null |
32 |
+++ b/net-analyzer/wireshark/wireshark-2.4.5.ebuild |
33 |
@@ -0,0 +1,291 @@ |
34 |
+# Copyright 1999-2018 Gentoo Foundation |
35 |
+# Distributed under the terms of the GNU General Public License v2 |
36 |
+ |
37 |
+EAPI=6 |
38 |
+inherit autotools eutils fcaps flag-o-matic gnome2-utils multilib qmake-utils user xdg-utils |
39 |
+ |
40 |
+DESCRIPTION="A network protocol analyzer formerly known as ethereal" |
41 |
+HOMEPAGE="https://www.wireshark.org/" |
42 |
+SRC_URI="${HOMEPAGE}download/src/all-versions/${P/_/}.tar.xz" |
43 |
+ |
44 |
+LICENSE="GPL-2" |
45 |
+SLOT="0/${PV}" |
46 |
+KEYWORDS="~arm64 ~x86-fbsd" |
47 |
+IUSE=" |
48 |
+ adns androiddump +capinfos +caps +captype ciscodump cpu_flags_x86_sse4_2 |
49 |
+ +dftest doc doc-pdf +dumpcap +editcap geoip gtk kerberos libssh libxml2 lua |
50 |
+ lz4 +mergecap +netlink nghttp2 +pcap portaudio +qt5 +randpkt +randpktdump |
51 |
+ +reordercap sbc selinux +sharkd smi snappy spandsp sshdump ssl +text2pcap |
52 |
+ tfshark +tshark +udpdump zlib |
53 |
+" |
54 |
+REQUIRED_USE=" |
55 |
+ ciscodump? ( libssh ) |
56 |
+ sshdump? ( libssh ) |
57 |
+" |
58 |
+ |
59 |
+S=${WORKDIR}/${P/_/} |
60 |
+ |
61 |
+CDEPEND=" |
62 |
+ >=dev-libs/glib-2.14:2 |
63 |
+ dev-libs/libgcrypt:0 |
64 |
+ netlink? ( dev-libs/libnl:3 ) |
65 |
+ adns? ( >=net-dns/c-ares-1.5 ) |
66 |
+ caps? ( sys-libs/libcap ) |
67 |
+ geoip? ( dev-libs/geoip ) |
68 |
+ gtk? ( |
69 |
+ x11-libs/gdk-pixbuf |
70 |
+ x11-libs/gtk+:3 |
71 |
+ x11-libs/pango |
72 |
+ x11-misc/xdg-utils |
73 |
+ ) |
74 |
+ kerberos? ( virtual/krb5 ) |
75 |
+ libssh? ( >=net-libs/libssh-0.6 ) |
76 |
+ libxml2? ( dev-libs/libxml2 ) |
77 |
+ lua? ( >=dev-lang/lua-5.1:* ) |
78 |
+ lz4? ( app-arch/lz4 ) |
79 |
+ nghttp2? ( net-libs/nghttp2 ) |
80 |
+ pcap? ( net-libs/libpcap ) |
81 |
+ portaudio? ( media-libs/portaudio ) |
82 |
+ qt5? ( |
83 |
+ dev-qt/qtcore:5 |
84 |
+ dev-qt/qtgui:5 |
85 |
+ dev-qt/qtmultimedia:5 |
86 |
+ dev-qt/qtprintsupport:5 |
87 |
+ dev-qt/qtwidgets:5 |
88 |
+ >=media-libs/speex-1.2.0 |
89 |
+ media-libs/speexdsp |
90 |
+ x11-misc/xdg-utils |
91 |
+ ) |
92 |
+ sbc? ( media-libs/sbc ) |
93 |
+ smi? ( net-libs/libsmi ) |
94 |
+ snappy? ( app-arch/snappy ) |
95 |
+ spandsp? ( media-libs/spandsp ) |
96 |
+ ssl? ( net-libs/gnutls:= ) |
97 |
+ zlib? ( sys-libs/zlib ) |
98 |
+" |
99 |
+# We need perl for `pod2html`. The rest of the perl stuff is to block older |
100 |
+# and broken installs. #455122 |
101 |
+DEPEND=" |
102 |
+ ${CDEPEND} |
103 |
+ dev-lang/perl |
104 |
+ !<virtual/perl-Pod-Simple-3.170 |
105 |
+ !<perl-core/Pod-Simple-3.170 |
106 |
+ doc? ( |
107 |
+ app-doc/doxygen |
108 |
+ app-text/asciidoc |
109 |
+ dev-libs/libxml2 |
110 |
+ dev-libs/libxslt |
111 |
+ doc-pdf? ( dev-java/fop ) |
112 |
+ www-client/lynx |
113 |
+ ) |
114 |
+ qt5? ( |
115 |
+ dev-qt/linguist-tools:5 |
116 |
+ ) |
117 |
+ sys-devel/bison |
118 |
+ sys-devel/flex |
119 |
+ virtual/pkgconfig |
120 |
+" |
121 |
+RDEPEND=" |
122 |
+ ${CDEPEND} |
123 |
+ gtk? ( virtual/freedesktop-icon-theme ) |
124 |
+ qt5? ( virtual/freedesktop-icon-theme ) |
125 |
+ selinux? ( sec-policy/selinux-wireshark ) |
126 |
+" |
127 |
+PATCHES=( |
128 |
+ "${FILESDIR}"/${PN}-1.99.8-qtchooser.patch |
129 |
+ "${FILESDIR}"/${PN}-2.1.0-sse4_2-r1.patch |
130 |
+ "${FILESDIR}"/${PN}-2.4-androiddump.patch |
131 |
+ "${FILESDIR}"/${PN}-99999999-androiddump.patch |
132 |
+ "${FILESDIR}"/${PN}-2.4.3-libsmi.patch |
133 |
+) |
134 |
+ |
135 |
+pkg_setup() { |
136 |
+ enewgroup wireshark |
137 |
+} |
138 |
+ |
139 |
+src_prepare() { |
140 |
+ default |
141 |
+ |
142 |
+ eautoreconf |
143 |
+} |
144 |
+ |
145 |
+src_configure() { |
146 |
+ local myconf |
147 |
+ |
148 |
+ # Workaround bug #213705. If krb5-config --libs has -lcrypto then pass |
149 |
+ # --with-ssl to ./configure. (Mimics code from acinclude.m4). |
150 |
+ if use kerberos; then |
151 |
+ case $(krb5-config --libs) in |
152 |
+ *-lcrypto*) |
153 |
+ ewarn "Kerberos was built with ssl support: linkage with openssl is enabled." |
154 |
+ ewarn "Note there are annoying license incompatibilities between the OpenSSL" |
155 |
+ ewarn "license and the GPL, so do your check before distributing such package." |
156 |
+ myconf+=( "--with-ssl" ) |
157 |
+ ;; |
158 |
+ esac |
159 |
+ fi |
160 |
+ |
161 |
+ # Enable wireshark binary with any supported GUI toolkit (bug #473188) |
162 |
+ if use gtk || use qt5; then |
163 |
+ myconf+=( "--enable-wireshark" ) |
164 |
+ else |
165 |
+ myconf+=( "--disable-wireshark" ) |
166 |
+ fi |
167 |
+ |
168 |
+ if ! use qt5; then |
169 |
+ myconf+=( "--with-qt=no" ) |
170 |
+ fi |
171 |
+ |
172 |
+ if use qt5; then |
173 |
+ export QT_MIN_VERSION=5.3.0 |
174 |
+ append-cxxflags -fPIC -DPIC |
175 |
+ fi |
176 |
+ |
177 |
+ # Hack around inability to disable doxygen/fop doc generation |
178 |
+ use doc || export ac_cv_prog_HAVE_DOXYGEN=false |
179 |
+ use doc-pdf || export ac_cv_prog_HAVE_FOP=false |
180 |
+ |
181 |
+ econf \ |
182 |
+ $(use androiddump && use pcap && echo --enable-androiddump-use-libpcap=yes) \ |
183 |
+ $(use dumpcap && use_with pcap dumpcap-group wireshark) \ |
184 |
+ $(use_enable androiddump) \ |
185 |
+ $(use_enable capinfos) \ |
186 |
+ $(use_enable captype) \ |
187 |
+ $(use_enable ciscodump) \ |
188 |
+ $(use_enable dftest) \ |
189 |
+ $(use_enable dumpcap) \ |
190 |
+ $(use_enable editcap) \ |
191 |
+ $(use_enable mergecap) \ |
192 |
+ $(use_enable randpkt) \ |
193 |
+ $(use_enable randpktdump) \ |
194 |
+ $(use_enable reordercap) \ |
195 |
+ $(use_enable sharkd) \ |
196 |
+ $(use_enable sshdump) \ |
197 |
+ $(use_enable text2pcap) \ |
198 |
+ $(use_enable tfshark) \ |
199 |
+ $(use_enable tshark) \ |
200 |
+ $(use_enable udpdump) \ |
201 |
+ $(use_with adns c-ares) \ |
202 |
+ $(use_with caps libcap) \ |
203 |
+ $(use_with geoip) \ |
204 |
+ $(use_with gtk gtk 3) \ |
205 |
+ $(use_with kerberos krb5) \ |
206 |
+ $(use_with libssh) \ |
207 |
+ $(use_with libxml2) \ |
208 |
+ $(use_with lua) \ |
209 |
+ $(use_with lz4) \ |
210 |
+ $(use_with nghttp2) \ |
211 |
+ $(use_with pcap) \ |
212 |
+ $(use_with portaudio) \ |
213 |
+ $(use_with sbc) \ |
214 |
+ $(use_with smi libsmi) \ |
215 |
+ $(use_with snappy) \ |
216 |
+ $(use_with spandsp) \ |
217 |
+ $(use_with ssl gnutls) \ |
218 |
+ $(use_with zlib) \ |
219 |
+ $(usex cpu_flags_x86_sse4_2 --enable-sse4_2 '') \ |
220 |
+ $(usex netlink --with-libnl=3 --without-libnl) \ |
221 |
+ $(usex qt5 --with-qt=5 '') \ |
222 |
+ $(usex qt5 LRELEASE=$(qt5_get_bindir)/lrelease '') \ |
223 |
+ $(usex qt5 MOC=$(qt5_get_bindir)/moc '') \ |
224 |
+ $(usex qt5 RCC=$(qt5_get_bindir)/rcc '') \ |
225 |
+ $(usex qt5 UIC=$(qt5_get_bindir)/uic '') \ |
226 |
+ --disable-profile-build \ |
227 |
+ --disable-warnings-as-errors \ |
228 |
+ --sysconfdir="${EPREFIX}"/etc/wireshark \ |
229 |
+ ${myconf[@]} |
230 |
+} |
231 |
+ |
232 |
+src_compile() { |
233 |
+ default |
234 |
+ |
235 |
+ if use doc; then |
236 |
+ emake -j1 -C docbook |
237 |
+ if use doc-pdf; then |
238 |
+ addpredict "/root/.java" |
239 |
+ emake -C docbook all-pdf |
240 |
+ fi |
241 |
+ fi |
242 |
+} |
243 |
+ |
244 |
+src_install() { |
245 |
+ default |
246 |
+ |
247 |
+ # FAQ is not required as is installed from help/faq.txt |
248 |
+ dodoc AUTHORS ChangeLog NEWS README{,.bsd,.linux,.macos,.vmware} \ |
249 |
+ doc/{randpkt.txt,README*} |
250 |
+ |
251 |
+ if use doc; then |
252 |
+ docinto /usr/share/doc/${PF}/html |
253 |
+ dodoc -r docbook/{release-notes.html,ws{d,u}g_html{,_chunked}} |
254 |
+ if use doc-pdf; then |
255 |
+ docinto /usr/share/doc/${PF}/pdf/ |
256 |
+ dodoc docbook/{developer,user}-guide-{a4,us}.pdf docbook/release-notes.pdf |
257 |
+ fi |
258 |
+ fi |
259 |
+ |
260 |
+ # install headers |
261 |
+ local wsheader |
262 |
+ for wsheader in \ |
263 |
+ config.h \ |
264 |
+ epan/*.h \ |
265 |
+ epan/crypt/*.h \ |
266 |
+ epan/dfilter/*.h \ |
267 |
+ epan/dissectors/*.h \ |
268 |
+ epan/ftypes/*.h \ |
269 |
+ epan/wmem/*.h \ |
270 |
+ register.h \ |
271 |
+ wiretap/*.h \ |
272 |
+ ws_diag_control.h \ |
273 |
+ ws_symbol_export.h \ |
274 |
+ wsutil/*.h |
275 |
+ do |
276 |
+ insinto /usr/include/wireshark/$( dirname ${wsheader} ) |
277 |
+ doins ${wsheader} |
278 |
+ done |
279 |
+ |
280 |
+ #with the above this really shouldn't be needed, but things may be looking in wiretap/ instead of wireshark/wiretap/ |
281 |
+ insinto /usr/include/wiretap |
282 |
+ doins wiretap/wtap.h |
283 |
+ |
284 |
+ if use gtk || use qt5; then |
285 |
+ local c d |
286 |
+ for c in hi lo; do |
287 |
+ for d in 16 32 48; do |
288 |
+ insinto /usr/share/icons/${c}color/${d}x${d}/apps |
289 |
+ newins image/${c}${d}-app-wireshark.png wireshark.png |
290 |
+ done |
291 |
+ done |
292 |
+ for d in 16 24 32 48 64 128 256 ; do |
293 |
+ insinto /usr/share/icons/hicolor/${d}x${d}/mimetypes |
294 |
+ newins image/WiresharkDoc-${d}.png application-vnd.tcpdump.pcap.png |
295 |
+ done |
296 |
+ fi |
297 |
+ |
298 |
+ prune_libtool_files |
299 |
+} |
300 |
+ |
301 |
+pkg_postinst() { |
302 |
+ gnome2_icon_cache_update |
303 |
+ xdg_desktop_database_update |
304 |
+ xdg_mimeinfo_database_update |
305 |
+ |
306 |
+ # Add group for users allowed to sniff. |
307 |
+ enewgroup wireshark |
308 |
+ |
309 |
+ if use dumpcap && use pcap; then |
310 |
+ fcaps -o 0 -g wireshark -m 4710 -M 0710 \ |
311 |
+ cap_dac_read_search,cap_net_raw,cap_net_admin \ |
312 |
+ "${EROOT}"/usr/bin/dumpcap |
313 |
+ fi |
314 |
+ |
315 |
+ ewarn "NOTE: To capture traffic with wireshark as normal user you have to" |
316 |
+ ewarn "add yourself to the wireshark group. This security measure ensures" |
317 |
+ ewarn "that only trusted users are allowed to sniff your traffic." |
318 |
+} |
319 |
+ |
320 |
+pkg_postrm() { |
321 |
+ gnome2_icon_cache_update |
322 |
+ xdg_desktop_database_update |
323 |
+ xdg_mimeinfo_database_update |
324 |
+} |