2 # - use policykit to gain root
3 # - use %caps when rpm supports it: %attr(750,root,wireshark) %caps(cap_net_raw,cap_net_admin=eip) %{_sbindir}/dumpcap
6 %bcond_without kerberos5 # Kerberos V support
7 %bcond_without snmp # SNMP support
8 %bcond_without gui # any GUI
9 %bcond_without gtk # GTK+ (2 or 3) GUI
10 %bcond_with gtk2 # GTK+ GUI based on GTK+ 2 instead of GTK+ 3
11 %bcond_without qt # Qt GUI
18 Summary: Network traffic and protocol analyzer
19 Summary(es.UTF-8): Analizador de tráfico de red
20 Summary(pl.UTF-8): Analizator ruchu i protokołów sieciowych
21 Summary(pt_BR.UTF-8): Analisador de tráfego de rede
22 Summary(ru.UTF-8): Анализатор сетевого траффика
23 Summary(uk.UTF-8): Аналізатор мережевого трафіку
28 Group: Networking/Utilities
29 Source0: https://www.wireshark.org/download/src/%{name}-%{version}.tar.xz
30 # Source0-md5: 6d0545309cace70e51f5555a3a966fbc
31 Patch0: %{name}-Werror.patch
32 Patch1: %{name}-ac.patch
33 Patch2: %{name}-desktop.patch
35 URL: https://www.wireshark.org/
36 BuildRequires: GeoIP-devel
37 BuildRequires: asciidoc
38 BuildRequires: autoconf >= 2.64
39 BuildRequires: automake >= 1:1.11
41 BuildRequires: c-ares-devel
42 BuildRequires: doxygen
44 BuildRequires: gcc >= 5:3.2
45 %{?with_gtk:BuildRequires: gdk-pixbuf2-devel >= 2.26}
46 BuildRequires: glib2-devel >= 1:2.32
47 BuildRequires: gnutls-devel >= 3.1.10
49 %{?with_gtk2:BuildRequires: gtk+2-devel >= 2:2.12.0}
50 %{!?with_gtk2:BuildRequires: gtk+3-devel >= 3.0.0}
52 %{?with_kerberos5:BuildRequires: heimdal-devel}
53 BuildRequires: libcap-devel
54 BuildRequires: libgcrypt-devel >= 1.4.2
55 BuildRequires: libmaxminddb-devel
56 BuildRequires: libnl-devel >= 3.2
57 BuildRequires: libpcap-devel >= 2:1.0.0-4
58 BuildRequires: libssh-devel >= 0.6.0
59 BuildRequires: libsmi-devel
60 BuildRequires: libstdc++-devel
61 BuildRequires: libtool >= 2:2.2.2
62 BuildRequires: libxml2-devel >= 2.0
63 BuildRequires: libxslt-progs
64 BuildRequires: lua52-devel
65 BuildRequires: lz4-devel
66 %{?with_snmp:BuildRequires: net-snmp-devel}
67 BuildRequires: nghttp2-devel
68 BuildRequires: perl-tools-pod
69 BuildRequires: pkgconfig >= 1:0.7
70 %{?with_gui:BuildRequires: portaudio-devel}
71 BuildRequires: python >= 1:2.5
72 BuildRequires: rpmbuild(macros) >= 1.527
73 %{?with_gui:BuildRequires: sbc-devel >= 1.0}
74 %{?with_qt:BuildRequires: speexdsp-devel}
75 BuildRequires: sed >= 4.0
76 BuildRequires: snappy-devel
77 BuildRequires: spandsp-devel
78 BuildRequires: tar >= 1:1.22
81 BuildRequires: zlib-devel
83 BuildRequires: Qt5Core-devel >= 5
84 BuildRequires: Qt5Multimedia-devel >= 5
85 BuildRequires: Qt5PrintSupport-devel >= 5
86 BuildRequires: Qt5Widgets-devel >= 5
87 BuildRequires: libstdc++-devel >= 5
88 BuildRequires: qt5-build >= 5
89 BuildRequires: qt5-linguist >= 5
91 Requires: %{name}-gui-common = %{version}-%{release}
92 Requires: gdk-pixbuf2 >= 2.26
94 Requires: gtk+2 >= 2:2.12.0
96 Requires: gtk+3 >= 3.0.0
100 Provides: ethereal-gnome
102 Obsoletes: ethereal-gnome
103 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
106 Wireshark is the name for powerful graphical network sniffer, traffic
107 and protocol analyzer based on GTK+ and libpcap libraries. It lets you
108 capture and interactively browse the contents of network frames with
109 vast knowledge of more than 100 network protocols. Wireshark has
110 severeal useful features, including a rich display filter language,
111 the ability to view the ASCII contents of a TCP connection and plug-in
114 %description -l es.UTF-8
115 Analizador de tráfico de red.
117 %description -l pl.UTF-8
118 Wireshark jest potężnym, graficznym snifferem, analizatorem ruchu oraz
119 protokołów sieciowych opartym na bibliotekach GTK+ oraz libpcap.
120 Umożliwia on przechwytywanie oraz interaktywną analizę zawartości
121 ramek oraz ponad stu protokołów sieciowych. Wireshark posiada wiele
122 użytecznych cech, takich jak rozbudowany język filtrów wyświetlania,
123 możliwość oglądania przebiegu sesji TCP oraz możliwość dołączania
126 %description -l pt_BR.UTF-8
127 O Wireshark é um analisador de protocolo de rede baseado no GTK+.
129 %description -l ru.UTF-8
130 Wireshark - это анализатор сетевого траффика для Unix-подобных ОС. Он
131 базируется на GTK+ и libpcap.
133 %description -l uk.UTF-8
134 Wireshark - це аналізатор мережевого трафіку для Unix-подібних ОС. Він
135 базується на GTK+ та libpcap.
138 Summary: Network traffic and protocol analyzer - GUI common files
139 Summary(pl.UTF-8): Analizator ruchu i protokołów sieciowych - wspólne pliki interfejsów graficznych
140 Group: Networking/Utilities
141 Requires: %{name}-common = %{version}-%{release}
143 %description gui-common
144 Network traffic and protocol analyzer - files common for all Wireshark
147 %description gui-common -l pl.UTF-8
148 Analizator ruchu i protokołów sieciowych - pliki wspólne dla
149 wszystkich interfejsów graficznych Wiresharka (GTK+, Qt).
152 Summary: Qt-based network traffic and protocol analyzer
153 Summary(pl.UTF-8): Analizator ruchu i protokołów sieciowych oparty na Qt
155 Requires: %{name}-gui-common = %{version}-%{release}
156 Requires: Qt5Gui-platform-xcb
159 An initial port to Qt (aka QtShark).
161 %description qt -l pl.UTF-8
162 Wstępna wersja analizatora wireshark oparta na Qt (znana też pod nazwą
166 Summary: Network traffic and protocol analyzer - common files
167 Summary(pl.UTF-8): Analizator ruchu i protokołów sieciowych - wspólne pliki
169 Requires: %{name}-libs = %{version}-%{release}
170 Requires: gnutls >= 3.1.10
171 Requires: libpcap >= 0.4
172 Requires: libssh >= 0.6.0
173 Provides: ethereal-common
174 Provides: group(wireshark)
175 Provides: wireshark-tools
176 Obsoletes: ethereal-common
177 Obsoletes: wireshark-tools
178 Requires(post,postun): /sbin/setcap
181 Wireshark is the name for powerful graphical network sniffer, traffic
182 and protocol analyzer based on GTK+ and libpcap libraries. It lets you
183 capture and interactively browse the contents of network frames with
184 vast knowledge of more than 100 network protocols. Wireshark has
185 severeal useful features, including a rich display filter language,
186 the ability to view the ASCII contents of a TCP connection and plug-in
189 This package provides the shared library, plugins, data and a set of
190 tools for manipulating capture files. It contains:
191 - capinfos - prints informatio about binary capture files,
192 - captype - prints the file types of capture files,
193 - dftest - shows display filter byte-code,
194 - dumpcap - dumps network traffic to a file,
195 - editcap - edit and/or translate the format of capture files,
196 - mergecap - merges two capture files into one,
197 - randpkt - generates libpcap trace file full of random packets,
198 - rawshark - dumps and analyzes raw libpcap data,
199 - text2cap - generate a capture file from an ASCII hexdump of packets.
201 %description common -l es.UTF-8
202 Analizador de tráfico de red.
204 %description common -l pl.UTF-8
205 Wireshark jest potężnym, graficznym snifferem, analizatorem ruchu oraz
206 protokołów sieciowych opartym na bibliotekach GTK+ oraz libpcap.
207 Umożliwia on przechwytywanie oraz interaktywną analizę zawartości
208 ramek oraz ponad stu protokołów sieciowych. Wireshark posiada wiele
209 użytecznych cech, takich jak rozbudowany język filtrów wyświetlania,
210 możliwość oglądania przebiegu sesji TCP oraz możliwość dołączania
213 Ten pakiet ten zawiera bibliotekę współdzieloną, wtyczki, dane oraz
214 zestaw narzędzi do obróbki plików z przechwyconymi pakietami,
216 - capinfos - do wyświetlania informacji o binarnych plikach zrzutu,
217 - captype - do wyświetlania rodzaju plików zrzutu,
218 - dftest - do pokazywania bajtkodu filtrów wyświetlania,
219 - dumpcap - do zrzucania ruchu sieciowego do pliku,
220 - editcap - do edycji plików i tłumaczenia ich na inne formaty,
221 - mergecap - do łączenia dwóch plików w jeden,
222 - randpkt - do generowania plikow cap z losowymi danymi,
223 - rawshark - do obróbki plików cap,
224 - text2cap - do generowania pliku cap z szesnastkowego zrzutu ASCII
227 %description common -l pt_BR.UTF-8
228 O Wireshark é um analisador de protocolo de rede baseado no GTK+.
230 %description common -l ru.UTF-8
231 Wireshark - это анализатор сетевого траффика для Unix-подобных ОС. Он
232 базируется на GTK+ и libpcap.
234 %description common -l uk.UTF-8
235 Wireshark - це аналізатор мережевого трафіку для Unix-подібних ОС. Він
236 базується на GTK+ та libpcap.
238 %package -n twireshark
239 Summary: Text-mode network traffic and protocol analyzer
240 Summary(pl.UTF-8): Tekstowy analizator ruchu i protokołów sieciowych
241 Summary(pt_BR.UTF-8): Analisador modo texto de tráfego de rede (sniffer)
243 Requires: %{name}-common = %{version}-%{release}
244 Requires: libpcap >= 0.4
248 %description -n twireshark
249 Twireshark is a network protocol analyzer. It lets you capture packet
250 data from a live network, or read packets from a previously saved
251 capture file, either printing a decoded form of those packets to the
252 standard output or writing the packets to a file. Twireshark's native
253 capture file format is libpcap format, which is also the format used
254 by tcpdump and various other tools.
256 %description -n twireshark -l pl.UTF-8
257 Twireshark jest analizatorem protokołów sieciowych. Pozwala na
258 przechwytywanie pakietów z sieci lub wczytywanie danych z pliku.
259 Zdekodowany wynik (a twireshark zna ponad 100 rozmaitych protokołów
260 sieciowych!) jest wyświetlony na ekranie. Natywnym formatem plików
261 tetherala jest format libpcap, tak więc jest on kompatybilny z
262 tcpdumpem i innymi podobnymi narzędziami.
264 %description -n twireshark -l pt_BR.UTF-8
265 Esta é uma versão para modo texto do analisador de tráfego de rede
269 Summary: Wireshark packet capture and dissection libraries
270 Summary(pl.UTF-8): Biblioteki Wiresharka do przechwytywania i sekcji pakietów
272 Requires: glib2 >= 1:2.32
273 Requires: libgcrypt >= 1.4.2
274 Requires: libnl >= 3.2
275 Obsoletes: libwiretap < 2.4.0
278 Wireshark packet capture and dissection libraries.
280 %description libs -l pl.UTF-8
281 Biblioteki Wiresharka do przechwytywania i sekcji pakietów.
284 Summary: Header files for Wireshark libraries
285 Summary(pl.UTF-8): Pliki nagłówkowe bibliotek Wiresharka
286 Group: Development/Libraries
287 Requires: %{name}-libs = %{version}-%{release}
288 Requires: glib2-devel >= 1:2.32
289 Requires: libgcrypt-devel >= 1.4.2
290 Requires: libnl-devel >= 3.2
291 Obsoletes: libwiretap-devel < 2.4.0
294 Header files for Wireshark libraries.
296 %description devel -l pl.UTF-8
297 Pliki nagłówkowe bibliotek Wiresharka.
305 find -name Makefile.am | xargs sed -i -e 's/-Werror//g'
309 %{__aclocal} -I aclocal-fallback
316 CPPFLAGS="%{rpmcppflags} $(pkg-config --cflags liblz4)"
318 HTML_VIEWER=/usr/bin/xdg-open \
320 --enable-packet-editor \
323 %{__enable_disable gui wireshark} \
324 --disable-silent-rules \
325 --disable-usr-local \
327 %{?with_gtk2:--with-gtk=2}%{!?with_gtk2:--with-gtk=3} \
329 %if %{with kerberos5}
333 %{__with_without qt} \
334 %{!?with_snmp:--without-net-snmp --without-ucdsnmp}
339 rm -rf $RPM_BUILD_ROOT
340 install -d $RPM_BUILD_ROOT{%{_desktopdir},%{_pixmapsdir},%{_includedir}/wireshark}
343 DESTDIR=$RPM_BUILD_ROOT
345 cp -p image/wsicon48.png $RPM_BUILD_ROOT%{_pixmapsdir}/%{name}.png
347 %{?with_gui:%{__rm} $RPM_BUILD_ROOT%{_desktopdir}/wireshark*.desktop}
348 %{?with_gtk:cp -p wireshark-gtk.desktop $RPM_BUILD_ROOT%{_desktopdir}/wireshark.desktop}
349 %{?with_qt:cp -p wireshark.desktop $RPM_BUILD_ROOT%{_desktopdir}/wireshark-qt.desktop}
351 # headers (from Fedora, inspired by debian/wireshark-dev.header-files)
352 install -d $RPM_BUILD_ROOT%{_includedir}/wireshark/{epan/{crypt,ftypes,dfilter,dissectors,wmem},wiretap,wsutil}
353 install config.h $RPM_BUILD_ROOT%{_includedir}/wireshark
354 install cfile.h file.h $RPM_BUILD_ROOT%{_includedir}/wireshark
355 install ws_diag_control.h $RPM_BUILD_ROOT%{_includedir}/wireshark
356 install ws_symbol_export.h $RPM_BUILD_ROOT%{_includedir}/wireshark
357 install epan/*.h $RPM_BUILD_ROOT%{_includedir}/wireshark/epan
358 install epan/crypt/*.h $RPM_BUILD_ROOT%{_includedir}/wireshark/epan/crypt
359 install epan/ftypes/*.h $RPM_BUILD_ROOT%{_includedir}/wireshark/epan/ftypes
360 install epan/dfilter/*.h $RPM_BUILD_ROOT%{_includedir}/wireshark/epan/dfilter
361 install epan/dissectors/*.h $RPM_BUILD_ROOT%{_includedir}/wireshark/epan/dissectors
362 install epan/wmem/*.h $RPM_BUILD_ROOT%{_includedir}/wireshark/epan/wmem
363 install wiretap/*.h $RPM_BUILD_ROOT%{_includedir}/wireshark/wiretap
364 install wsutil/*.h $RPM_BUILD_ROOT%{_includedir}/wireshark/wsutil
366 # plugins *.la are useless - *.so are loaded through gmodule
367 %{__rm} $RPM_BUILD_ROOT%{_libdir}/%{name}/plugins/*/*/*.la
369 %{?with_qt:%{__mv} $RPM_BUILD_ROOT%{_bindir}/wireshark{,-qt}}
370 %{?with_gtk:%{__mv} $RPM_BUILD_ROOT%{_bindir}/wireshark{-gtk,}}
373 rm -rf $RPM_BUILD_ROOT
376 %update_mime_database
379 %update_mime_database
382 %groupadd -P %{name}-common -g 104 wireshark
385 /sbin/setcap 'CAP_NET_RAW+eip CAP_NET_ADMIN+eip' %{_bindir}/dumpcap
389 if [ "$1" = "0" ]; then
390 %groupremove wireshark
393 %post libs -p /sbin/ldconfig
394 %postun libs -p /sbin/ldconfig
398 %defattr(644,root,root,755)
399 %attr(755,root,root) %{_bindir}/wireshark
400 %{_desktopdir}/wireshark.desktop
405 %defattr(644,root,root,755)
407 %{_datadir}/appdata/wireshark.appdata.xml
408 %{_datadir}/mime/packages/wireshark.xml
409 %{_pixmapsdir}/%{name}.png
410 %{_iconsdir}/hicolor/16x16/apps/%{name}.png
411 %{_iconsdir}/hicolor/16x16/mimetypes/application-%{name}-doc.png
412 %{_iconsdir}/hicolor/24x24/apps/%{name}.png
413 %{_iconsdir}/hicolor/24x24/mimetypes/application-%{name}-doc.png
414 %{_iconsdir}/hicolor/32x32/apps/%{name}.png
415 %{_iconsdir}/hicolor/32x32/mimetypes/application-%{name}-doc.png
416 %{_iconsdir}/hicolor/48x48/apps/%{name}.png
417 %{_iconsdir}/hicolor/48x48/mimetypes/application-%{name}-doc.png
418 %{_iconsdir}/hicolor/64x64/apps/%{name}.png
419 %{_iconsdir}/hicolor/64x64/mimetypes/application-%{name}-doc.png
420 %{_iconsdir}/hicolor/128x128/apps/%{name}.png
421 %{_iconsdir}/hicolor/128x128/mimetypes/application-%{name}-doc.png
422 %{_iconsdir}/hicolor/256x256/apps/%{name}.png
423 %{_iconsdir}/hicolor/256x256/mimetypes/application-%{name}-doc.png
424 %{_iconsdir}/hicolor/scalable/apps/%{name}.svg
425 %{_mandir}/man1/wireshark.1*
430 %defattr(644,root,root,755)
431 %attr(755,root,root) %{_bindir}/wireshark-qt
432 %{_desktopdir}/wireshark-qt.desktop
436 %defattr(644,root,root,755)
437 %doc AUTHORS* ChangeLog NEWS README.md README.linux doc/README.*
438 %dir %{_libdir}/%{name}
439 %dir %{_libdir}/%{name}/extcap
440 %dir %{_libdir}/%{name}/plugins
441 %dir %{_libdir}/%{name}/plugins/2.6
442 %dir %{_libdir}/%{name}/plugins/2.6/codecs
443 %dir %{_libdir}/%{name}/plugins/2.6/epan
444 %dir %{_libdir}/%{name}/plugins/2.6/wiretap
445 %attr(755,root,root) %{_libdir}/%{name}/extcap/ciscodump
446 %attr(755,root,root) %{_libdir}/%{name}/extcap/androiddump
447 %attr(755,root,root) %{_libdir}/%{name}/extcap/randpktdump
448 %attr(755,root,root) %{_libdir}/%{name}/extcap/sshdump
449 %attr(755,root,root) %{_libdir}/%{name}/extcap/udpdump
450 %attr(755,root,root) %{_libdir}/%{name}/plugins/2.6/codecs/*.so
451 %attr(755,root,root) %{_libdir}/%{name}/plugins/2.6/epan/*.so
452 %attr(755,root,root) %{_libdir}/%{name}/plugins/2.6/wiretap/*.so
453 %attr(755,root,root) %{_bindir}/capinfos
454 %attr(755,root,root) %{_bindir}/captype
455 %attr(755,root,root) %{_bindir}/dftest
456 %attr(750,root,wireshark) %{_bindir}/dumpcap
457 %attr(755,root,root) %{_bindir}/editcap
458 %attr(755,root,root) %{_bindir}/idl2wrs
459 %attr(755,root,root) %{_bindir}/mergecap
460 %attr(755,root,root) %{_bindir}/mmdbresolve
461 %attr(755,root,root) %{_bindir}/randpkt
462 %attr(755,root,root) %{_bindir}/rawshark
463 %attr(755,root,root) %{_bindir}/reordercap
464 %attr(755,root,root) %{_bindir}/sharkd
465 %attr(755,root,root) %{_bindir}/text2pcap
466 %attr(755,root,root) %{_bindir}/tfshark
467 %{_mandir}/man1/androiddump.1*
468 %{_mandir}/man1/capinfos.1*
469 %{_mandir}/man1/captype.1*
470 %{_mandir}/man1/ciscodump.1*
471 %{_mandir}/man1/dftest.1*
472 %{_mandir}/man1/dumpcap.1*
473 %{_mandir}/man1/editcap.1*
474 %{_mandir}/man1/mergecap.1*
475 %{_mandir}/man1/mmdbresolve.1*
476 %{_mandir}/man1/rawshark.1*
477 %{_mandir}/man1/randpkt.1*
478 %{_mandir}/man1/randpktdump.1*
479 %{_mandir}/man1/reordercap.1*
480 %{_mandir}/man1/sshdump.1*
481 %{_mandir}/man1/text2pcap.1*
482 %{_mandir}/man1/udpdump.1*
483 %{_mandir}/man4/extcap.4*
484 %{_mandir}/man4/wireshark-filter.4*
487 %defattr(644,root,root,755)
488 %attr(755,root,root) %{_bindir}/tshark
489 %{_mandir}/man1/tshark*.1*
492 %defattr(644,root,root,755)
494 %attr(755,root,root) %{_libdir}/libwireshark.so.*.*.*
495 %attr(755,root,root) %ghost %{_libdir}/libwireshark.so.10
496 %attr(755,root,root) %{_libdir}/libwiretap.so.*.*.*
497 %attr(755,root,root) %ghost %{_libdir}/libwiretap.so.8
498 %attr(755,root,root) %{_libdir}/libwscodecs.so.*.*.*
499 %attr(755,root,root) %ghost %{_libdir}/libwscodecs.so.2
500 %attr(755,root,root) %{_libdir}/libwsutil.so.*.*.*
501 %attr(755,root,root) %ghost %{_libdir}/libwsutil.so.9
504 %defattr(644,root,root,755)
505 %attr(755,root,root) %{_libdir}/libwireshark.so
506 %attr(755,root,root) %{_libdir}/libwiretap.so
507 %attr(755,root,root) %{_libdir}/libwscodecs.so
508 %attr(755,root,root) %{_libdir}/libwsutil.so
509 %{_libdir}/libwireshark.la
510 %{_libdir}/libwiretap.la
511 %{_libdir}/libwscodecs.la
512 %{_libdir}/libwsutil.la
513 %{_includedir}/wireshark
514 %{_pkgconfigdir}/wireshark.pc