wireshark/wireshark.spec

311 lines
9.8 KiB
RPMSpec
Raw Normal View History

#
# spec file for package wireshark
#
# Copyright (c) 2021 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
# define libraries
%define libcodecs libwscodecs2
%define libtap libwiretap11
%define libutil libwsutil12
%define libwire libwireshark14
%if 0%{?suse_version} >= 1500
%bcond_without lz4
%else
%bcond_with lz4
%endif
Name: wireshark
Version: 3.4.6
Release: 0
Summary: A Network Traffic Analyser
License: GPL-2.0-or-later AND GPL-3.0-or-later
Group: Productivity/Networking/Diagnostic
URL: https://www.wireshark.org/
Source: https://www.wireshark.org/download/src/%{name}-%{version}.tar.xz
Source2: https://www.wireshark.org/download/SIGNATURES-%{version}.txt#/%{name}-%{version}.tar.xz.asc
Source3: https://www.wireshark.org/download/gerald_at_wireshark_dot_org.gpg#/wireshark.keyring
Patch10: wireshark-0001-dumpcap-permission-denied.patch
BuildRequires: bison
BuildRequires: flex
BuildRequires: glib2-devel >= 2.32
BuildRequires: hicolor-icon-theme
BuildRequires: krb5-devel
BuildRequires: libbrotli-devel
# keep until libbrotli-devel bug is fixed
BuildRequires: libbrotlidec1
BuildRequires: libcap-devel
BuildRequires: libcares-devel >= 1.5.0
BuildRequires: libgcrypt-devel >= 1.4.2
BuildRequires: libgnutls-devel >= 3.2
BuildRequires: libpcap-devel
BuildRequires: libqt5-linguist-devel
BuildRequires: libsmi-devel
BuildRequires: libtool
BuildRequires: net-snmp-devel
BuildRequires: openssl-devel
BuildRequires: pcre-devel
BuildRequires: pkgconfig
BuildRequires: portaudio-devel
BuildRequires: snappy-devel
BuildRequires: spandsp-devel
BuildRequires: tcpd-devel
BuildRequires: update-desktop-files
BuildRequires: zlib-devel
BuildRequires: pkgconfig(Qt5Core) >= 5.3.0
BuildRequires: pkgconfig(Qt5Gui)
BuildRequires: pkgconfig(Qt5Multimedia)
BuildRequires: pkgconfig(Qt5PrintSupport)
BuildRequires: pkgconfig(Qt5Svg)
BuildRequires: pkgconfig(Qt5Widgets)
BuildRequires: pkgconfig(libmaxminddb)
BuildRequires: pkgconfig(libnghttp2)
BuildRequires: pkgconfig(libssh) >= 0.6.0
BuildRequires: pkgconfig(libsystemd)
BuildRequires: pkgconfig(libxml-2.0)
BuildRequires: pkgconfig(minizip)
BuildRequires: pkgconfig(opus)
BuildRequires: pkgconfig(sbc)
BuildRequires: pkgconfig(speexdsp)
# keep until libbrotli-devel bug is fixed
Requires: libbrotlidec1
Requires(pre): permissions
Requires(pre): shadow
Recommends: wireshark-ui = %{version}
Provides: ethereal = %{version}
Obsoletes: %{libcodecs} < %{version}
Obsoletes: ethereal < %{version}
Provides: group(wireshark)
%if 0%{?is_opensuse} && 0%{?suse_version} >= 1550
# enable ITU G.729 Annex A/B speech codec only in Tumbleweed
BuildRequires: pkgconfig(libbcg729)
%endif
%if %{with lz4}
BuildRequires: pkgconfig(liblz4)
# in openSUSE Leap 42.3, lz4 was incorrectly packaged
BuildConflicts: pkgconfig(liblz4) = 124
%endif
%if 0%{?suse_version} > 1310
BuildRequires: pkgconfig(libnl-3.0)
%endif
%if 0%{?suse_version} > 1320
BuildRequires: lua51-devel
%else
BuildRequires: lua-devel
%endif
%description
Wireshark is a network protocol analyzer. It allows examining data
from a live network or from a capture file on disk. You can
interactively browse the capture data, viewing summary and detailed
information for each packet. Wireshark has several features,
including a rich display filter language and the ability to view the
reconstructed stream of a TCP session.
%package -n %{libutil}
Summary: Library for wireshark utilities
Group: System/Libraries
%description -n %{libutil}
The libwsutil library provides utility functions for libwireshark.
%package -n %{libwire}
Summary: Network packet dissection library
Group: System/Libraries
%description -n %{libwire}
The libwireshark library provides the network packet dissection services
developed by the Wireshark project.
%package -n %{libtap}
Summary: Wireshark library for tapping
Group: System/Libraries
%description -n %{libtap}
Wiretap, part of the Wireshark project, is a library that allows one to read
and write several packet capture file formats.
%package devel
Summary: A Network Traffic Analyser
Group: Development/Libraries/C and C++
Requires: %{libtap} = %{version}
Requires: %{libutil} = %{version}
Requires: %{libwire} = %{version}
Requires: %{name} = %{version}
Requires: glib2-devel
Requires: glibc-devel
Provides: ethereal-devel = %{version}
Obsoletes: ethereal-devel < %{version}
%description devel
Wireshark is a network protocol analyzer. It allows examining data
from a live network or from a capture file on disk.
%package ui-qt
Summary: A Network Traffic Analyser - Qt UI
Group: Productivity/Networking/Diagnostic
Requires: %{name} = %{version}
Requires: hicolor-icon-theme
Provides: %{name}-ui = %{version}
# gtk is the deprecated ui so ensure its uninstall
Provides: %{name}-ui-gtk = %{version}
Obsoletes: %{name}-ui-gtk < %{version}
%description ui-qt
This package contains the Qt based UI for Wireshark.
%prep
# The publisher doesn't sign the source tarball, but a signatures file containing multiple hashes.
# Verify hashes in that file against source tarball.
echo "`grep %{name}-%{version}.tar.xz %{SOURCE2} | grep SHA256 | head -n1 | cut -d= -f2` %{SOURCE0}" | sha256sum -c
%autosetup -p1
sed -i 's/^Icon=wireshark.png$/Icon=wireshark/' wireshark*.desktop
%build
%cmake -DCMAKE_INSTALL_LIBDIR='%{_lib}/'
%if 0%{?is_opensuse}
%cmake_build
%else
# if the cmake_build makro does not exit we build it by hand...
%{_bindir}/make \
%if "%{_bindir}/make" == "%{_bindir}/make"
-O VERBOSE=1 \
%else
-v \
%endif
-j8
%endif
%install
%cmake_install
find %{buildroot} -type f -name "*.la" -delete -print
# Ethereal support (remove when SLE-11 is out of scope
ln -fs wireshark %{buildroot}%{_bindir}/ethereal
ln -fs tshark %{buildroot}%{_bindir}/tethereal
install -d -m 0755 %{buildroot}%{_sysconfdir}
install -d -m 0755 %{buildroot}%{_mandir}/man1/
# install separate appdata files corresponding to .desktop files for AppStore integration
install -d -m0755 %{buildroot}%{_datadir}/appdata
install -m644 wireshark.appdata.xml %{buildroot}%{_datadir}/appdata/%{name}.appdata.xml
sed -i -e "/<description>/i \ \ \ \ <name>Wireshark (QT) Network Analyzer<\/name>" \
-e "/<description>/i \ \ \ \ <summary>QT interface for wireshark network traffic analyzer<\/summary>" \
%{buildroot}%{_datadir}/appdata/%{name}.appdata.xml
# -devel
install -d -m 0755 %{buildroot}%{_includedir}/wireshark
IDIR="%{buildroot}%{_includedir}/wireshark"
mkdir -p "${IDIR}/epan"
mkdir -p "${IDIR}/epan/crypt"
mkdir -p "${IDIR}/epan/ftypes"
mkdir -p "${IDIR}/epan/dfilter"
mkdir -p "${IDIR}/epan/dissectors"
mkdir -p "${IDIR}/epan/wmem"
mkdir -p "${IDIR}/wiretap"
mkdir -p "${IDIR}/wsutil"
install -m 644 *.h "${IDIR}/"
install -m 644 build/config.h "${IDIR}/"
install -m 644 epan/*.h "${IDIR}/epan/"
install -m 644 epan/crypt/*.h "${IDIR}/epan/crypt"
install -m 644 epan/ftypes/*.h "${IDIR}/epan/ftypes"
install -m 644 epan/dfilter/*.h "${IDIR}/epan/dfilter"
install -m 644 epan/dissectors/*.h "${IDIR}/epan/dissectors"
install -m 644 epan/wmem/*.h "${IDIR}/epan/wmem"
install -m 644 wiretap/*.h "${IDIR}/wiretap"
install -m 644 wsutil/*.h "${IDIR}/wsutil"
install -D -m 0644 image/wsicon48.png %{buildroot}%{_datadir}/pixmaps/wireshark.png
install -D -m 0644 wireshark.desktop %{buildroot}%{_datadir}/applications/wireshark.desktop
%suse_update_desktop_file %{name}
rm -f %{buildroot}%{_datadir}/doc/wireshark/*.html
%pre
getent group wireshark >/dev/null || groupadd -r wireshark
%verifyscript
%verify_permissions -e %{_bindir}/dumpcap
%post
%set_permissions %{_bindir}/dumpcap
exit 0
%post -n %{libutil} -p /sbin/ldconfig
%postun -n %{libutil} -p /sbin/ldconfig
%post -n %{libwire} -p /sbin/ldconfig
%postun -n %{libwire} -p /sbin/ldconfig
%post -n %{libtap} -p /sbin/ldconfig
%postun -n %{libtap} -p /sbin/ldconfig
%files
%license COPYING
%doc AUTHORS NEWS README.md README.linux
%{_mandir}/man1/[^i]*
%{_mandir}/man4/*
%{_bindir}/capinfos
%{_bindir}/captype
%{_bindir}/editcap
%{_bindir}/idl2wrs
%{_bindir}/mergecap
%{_bindir}/mmdbresolve
%{_bindir}/randpkt
%{_bindir}/rawshark
%{_bindir}/reordercap
Accepting request 603740 from home:ecsos - update to 2.6.0 * Bug Fixes - The following bugs have been fixed: - Dumpcap might not quit if Wireshark or TShark crashes. (Bug 1419) * New and Updated Features The following features are new (or have been significantly updated) since version 2.5.0: - HTTP Request sequences are now supported. - Wireshark now supports MaxMind DB files. Support for GeoIP and GeoLite Legacy databases has been removed. - The Windows packages are now built using Microsoft Visual Studio 2017. - The IP map feature (the “Map” button in the “Endpoints” dialog) has been removed. The following features are new (or have been significantly updated) since version 2.4.0: - Display filter buttons can now be edited, disabled, and removed via a context menu directly from the toolbar - Drag & Drop filter fields to the display filter toolbar or edit to create a button on the fly or apply the filter as a display filter. - Application startup time has been reduced. - Some keyboard shortcut mix-ups have been resolved by assigning new shortcuts to Edit → Copy methods. - TShark now supports color using the --color option. - The "matches" display filter operator is now case-insensitive. - Display expression (button) preferences have been converted to a UAT. This puts the display expressions in their own file. Wireshark still supports preference files that contain the old preferences, but new preference files will be written without the old fields. - SMI private enterprise numbers are now read from the “enterprises.tsv” configuration file. - The QUIC dissector has been renamed to Google QUIC (quic → gquic). - The selected packet number can now be shown in the Status Bar by enabling Preferences → Appearance → Layout → Show selected packet number. - File load time in the Status Bar is now disabled by default and can be enabled in Preferences → Appearance → Layout → Show file load time. - Support for the G.729A codec in the RTP Player is now added via the bcg729 library. - Support for hardware-timestamping of packets has been added. - Improved NetMon .cap support with comments, event tracing, network filter, network info types and some Message Analyzer exported types. - The personal plugins folder on Linux/Unix is now ~/.local/lib/wireshark/plugins. - TShark can print flow graphs using -z flow… - Capinfos now prints SHA256 hashes in addition to RIPEMD160 and SHA1. MD5 output has been removed. - The packet editor has been removed. (This was a GTK+ only experimental feature.) - Support BBC micro:bit Bluetooth profile - The Linux and UNIX installation step for Wireshark will now install headers required to build plugins. A pkg-config file is provided to help with this (see “doc/plugins.example” for details). Note you must still rebuild all plugins between minor releases (X.Y). - The Windows installers and packages now ship with Qt 5.9.4. - The generic data dissector can now uncompress zlib compressed data. - DNS Stats now supports service level statistics. - DNS filters for retransmissions and unsolicited responses have been added. - The “tcptrace” TCP Stream graph now shows duplicate ACKS and zero window advertisements. - The membership operator now supports ranges, allowing display filters such as tcp.port in {4430..4434} to be expressed. See the User’s Guide, chapter Building display filter expressions for details. * New Protocol Support * Updated Protocol Support - Too many protocols have been updated to list here. * New and Updated Capture File Support - Microsoft Network Monitor * New and Updated Capture Interfaces support - LoRaTap - drop patch wireshark-1.2.0-geoip.patch, because file to patch no more exists OBS-URL: https://build.opensuse.org/request/show/603740 OBS-URL: https://build.opensuse.org/package/show/network:utilities/wireshark?expand=0&rev=246
2018-05-07 20:50:00 +02:00
%{_bindir}/sharkd
%{_bindir}/tethereal
%{_bindir}/text2pcap
%{_bindir}/tshark
%verify(not mode caps) %attr(0750,root,wireshark) %caps(cap_net_raw,cap_net_admin=ep) %{_bindir}/dumpcap
%{_libdir}/wireshark/
%{_datadir}/wireshark/
%files -n %{libutil}
%{_libdir}/libwsutil*.so.*
%files -n %{libwire}
%{_libdir}/libwireshark.so.*
%files -n %{libtap}
%{_libdir}/libwiretap.so.*
%files devel
%{_includedir}/wireshark
%{_includedir}/wireshark/config.h
%{_libdir}/lib*.so
%{_libdir}/pkgconfig/wireshark.pc
%files ui-qt
%{_bindir}/wireshark
%{_bindir}/ethereal
%dir %{_datadir}/appdata
%{_datadir}/appdata/wireshark.appdata.xml
%{_datadir}/applications/wireshark.desktop
%{_datadir}/pixmaps/wireshark.png
%{_datadir}/icons/hicolor/*/apps/wireshark.png
%{_datadir}/icons/hicolor/*/mimetypes/application-wireshark-doc.png
%{_datadir}/icons/hicolor/scalable/apps/wireshark.svg
%{_datadir}/mime/packages/wireshark.xml
%post ui-qt
%desktop_database_post
%icon_theme_cache_post
%postun ui-qt
%desktop_database_postun
%icon_theme_cache_postun
%changelog