Sync from SUSE:SLFO:Main wireshark revision 35ccbbd72b84cf86f66366eac07a0db6

This commit is contained in:
Adrian Schröter 2024-05-04 01:54:55 +02:00
commit c394476a37
9 changed files with 5073 additions and 0 deletions

23
.gitattributes vendored Normal file
View File

@ -0,0 +1,23 @@
## Default LFS
*.7z filter=lfs diff=lfs merge=lfs -text
*.bsp filter=lfs diff=lfs merge=lfs -text
*.bz2 filter=lfs diff=lfs merge=lfs -text
*.gem filter=lfs diff=lfs merge=lfs -text
*.gz filter=lfs diff=lfs merge=lfs -text
*.jar filter=lfs diff=lfs merge=lfs -text
*.lz filter=lfs diff=lfs merge=lfs -text
*.lzma filter=lfs diff=lfs merge=lfs -text
*.obscpio filter=lfs diff=lfs merge=lfs -text
*.oxt filter=lfs diff=lfs merge=lfs -text
*.pdf filter=lfs diff=lfs merge=lfs -text
*.png filter=lfs diff=lfs merge=lfs -text
*.rpm filter=lfs diff=lfs merge=lfs -text
*.tbz filter=lfs diff=lfs merge=lfs -text
*.tbz2 filter=lfs diff=lfs merge=lfs -text
*.tgz filter=lfs diff=lfs merge=lfs -text
*.ttf filter=lfs diff=lfs merge=lfs -text
*.txz filter=lfs diff=lfs merge=lfs -text
*.whl filter=lfs diff=lfs merge=lfs -text
*.xz filter=lfs diff=lfs merge=lfs -text
*.zip filter=lfs diff=lfs merge=lfs -text
*.zst filter=lfs diff=lfs merge=lfs -text

19
_constraints Normal file
View File

@ -0,0 +1,19 @@
<?xml version="1.0"?>
<constraints>
<hardware>
<disk>
<size unit="G">5</size>
</disk>
</hardware>
<overwrite>
<conditions>
<arch>ppc</arch>
<arch>ppc64le</arch>
</conditions>
<hardware>
<physicalmemory>
<size unit="G">5</size>
</physicalmemory>
</hardware>
</overwrite>
</constraints>

View File

@ -0,0 +1,14 @@
Index: wireshark-4.2.0rc2/wsutil/glib-compat.h
===================================================================
--- wireshark-4.2.0rc2.orig/wsutil/glib-compat.h
+++ wireshark-4.2.0rc2/wsutil/glib-compat.h
@@ -23,6 +23,9 @@ extern "C" {
#endif /* __cplusplus */
#if !GLIB_CHECK_VERSION(2, 68, 0)
+
+#include <string.h>
+
static inline void *
g_memdup2(gconstpointer mem, size_t byte_size)
{

View File

@ -0,0 +1,43 @@
commit acac613af7d702dae533cbdf9ef49cef803d0559
Author: Robert Frohl <rfrohl@suse.com>
Date: Tue Sep 12 14:53:17 2023 +0200
Warn if user can't access dumpcap.
Index: wireshark-4.2.0rc2/capture/capture_sync.c
===================================================================
--- wireshark-4.2.0rc2.orig/capture/capture_sync.c
+++ wireshark-4.2.0rc2/capture/capture_sync.c
@@ -24,6 +24,10 @@
#include <wsutil/strtoi.h>
#include <wsutil/ws_assert.h>
+#include <sys/stat.h>
+#include <fcntl.h>
+#include <grp.h>
+
#ifdef _WIN32
#include <wsutil/unicode-utils.h>
#include <wsutil/win32-utils.h>
@@ -530,10 +534,21 @@ sync_pipe_open_command(char* const argv[
ws_close(data_pipe[PIPE_READ]);
ws_close(data_pipe[PIPE_WRITE]);
}
+ char * grp_warning = calloc(1, 256);
dup2(sync_pipe[PIPE_WRITE], 2);
ws_close(sync_pipe[PIPE_READ]);
ws_close(sync_pipe[PIPE_WRITE]);
execv(argv[0], argv);
+ if (errno == EPERM || errno == EACCES) {
+ struct stat statbuf;
+ struct group *grp;
+ if(stat("/usr/bin/dumpcap", &statbuf) == 0) {
+ if ((grp = getgrgid(statbuf.st_gid)) != NULL) {
+ snprintf(grp_warning , 256, "\nYou need to be a member of the '%s' group. Try running\n'usermod -a -G %s <YOUR_USERNAME>' as root.", grp->gr_name, grp->gr_name);
+ }
+ }
+ }
+ free(grp_warning);
sync_pipe_write_int_msg(2, SP_EXEC_FAILED, errno);
/* Exit with "_exit()", so that we don't close the connection

BIN
wireshark-4.2.3.tar.xz (Stored with Git LFS) Normal file

Binary file not shown.

View File

@ -0,0 +1,53 @@
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512
wireshark-4.2.3.tar.xz: 44970016 bytes
SHA256(wireshark-4.2.3.tar.xz)=958bd5996f543d91779b1a4e7e952dcd7b0245fe82194202c3333a8f78795811
SHA1(wireshark-4.2.3.tar.xz)=b9d2bc4dbcf59c7295fa6cc98f5210a4e98a0b4e
Wireshark-4.2.3-arm64.exe: 67875712 bytes
SHA256(Wireshark-4.2.3-arm64.exe)=e6f10cfd71512c73ce8efcd436eaa811bf643cb45a31d25d9f7878bdd3aeb952
SHA1(Wireshark-4.2.3-arm64.exe)=a1e50f3b743ff9ffde7e66c6399d317c5872e7c7
Wireshark-4.2.3-x64.exe: 86371496 bytes
SHA256(Wireshark-4.2.3-x64.exe)=3bf71d8753e3033376de95b8cde58d3f2a1a60e529b1dbdadfe907500c1f6525
SHA1(Wireshark-4.2.3-x64.exe)=cd1ed1b825d825ed526a822a8237e8970dd53ff2
Wireshark-4.2.3-x64.msi: 62910464 bytes
SHA256(Wireshark-4.2.3-x64.msi)=565b2ec6aff533eb0059b3d7c7a512b62327edd2c29a6f5146a76bbf8227f072
SHA1(Wireshark-4.2.3-x64.msi)=b6317a1af15a3e0a6439fa3971ab6588b8509738
WiresharkPortable64_4.2.3.paf.exe: 53536936 bytes
SHA256(WiresharkPortable64_4.2.3.paf.exe)=d115c2cd5cc7b198d798d4734ecebb4bd47ad64b3051d5f3c0689f52e3fda0d0
SHA1(WiresharkPortable64_4.2.3.paf.exe)=f72a3cd0999c01fde8db3fd3ea6ddb5ff9ad4a76
Wireshark 4.2.3 Arm 64.dmg: 65590438 bytes
SHA256(Wireshark 4.2.3 Arm 64.dmg)=b11d86f650f4f751fbff4d741b16cbe2d57a35d8b83e87dcbd159c6980eff7ff
SHA1(Wireshark 4.2.3 Arm 64.dmg)=1ffeee06f4cb0c8852321c248a9b5dcd2503c93c
Wireshark 4.2.3 Intel 64.dmg: 69388046 bytes
SHA256(Wireshark 4.2.3 Intel 64.dmg)=cea02d3d36c1cb8568abeb42a50b5169a26fd179a3726f4451e167c61243b846
SHA1(Wireshark 4.2.3 Intel 64.dmg)=6d280914b3ac8eae7cad1073335ebba824d6de32
You can validate these hashes using the following commands (among others):
Windows: certutil -hashfile Wireshark-win64-x.y.z.exe SHA256
Linux (GNU Coreutils): sha256sum wireshark-x.y.z.tar.xz
macOS: shasum -a 256 "Wireshark x.y.z Arm 64.dmg"
Other: openssl sha256 wireshark-x.y.z.tar.xz
-----BEGIN PGP SIGNATURE-----
iQIzBAEBCgAdFiEEWlrbp9vqbD+HIk8ZgiRKeOb+ruoFAmXNJOYACgkQgiRKeOb+
rur4lA//U1YmtJl2N4qjNH6mnYyJxYPuwhMUqbROM44MzZkJVe04uKtgBJcUpTgh
VgKlaY9sT1wUtQHPrhS3wSl1FifVi/wdVJV3zNxpSt6XP6HbY4KjxmJE9DHu7Vw8
SsOBLtYi/N/VpZ52KXJT40tLzVWWtCMIRda+nEBNQ71ooQyCwVxeEeDONu9JNYFW
ODdG8rVxJyknlYIaX8OEROghf10+7MbZ95LXC8Sm1MdOGiE16lo4mLZhcKigLwoG
UuquXK/VV/REe1ifSs5U9VllyZ+vwfymYs9GjKU7WVkpXt088TRLQCsNfy3lDUVi
82RSw/fAwjIGZgE9VczLIQ5AtQHnpMbmW4Z0+GxUMRHERK5Q10zdQ73g1whIrJ6w
kRAcFSzl+V2OT9fvoHZv2RTWAAIUjvaJUJnmqD4UkBwf0Zot1GMX3mvhgtVO4II0
UdY3fqNo5kXuG1YEL2Ptl2FVZ0VVBwTgLO9fmgHCC/M98pTQdQBFEd/d40ugv0g8
cV7fJuOkedpYO2t/0MNPsAuBfLT6reZpR2CLpzsZIfRFdqzZN5E9YvcAgw9v8TRz
1H0NsECr88KxJDukWfPqzXvKwy4vCZzECDEhC4ihbri1UwPV3OnPzTRzaSbv/OP3
4pfrPaST5va4lFoLl1t0s6XXFcaHD0mzL0QrxkSef7AswOq0QPA=
=HNLY
-----END PGP SIGNATURE-----

4556
wireshark.changes Normal file

File diff suppressed because it is too large Load Diff

67
wireshark.keyring Normal file
View File

@ -0,0 +1,67 @@
-----BEGIN PGP PUBLIC KEY BLO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XbBU/8VcKW7IDOlm7q2dCr39/Bdkba5Y88BnEbDnCkhX
R0BJ3wARAQABiQIfBBgBCgAJBQJW+xqTAhsMAAoJEIIkSnjm/q7q9mAP/183Kv4C
Lp/3sfEk+bIRyfF7OFI3yEiyFyCjjQLvJQOWrlFIlZdKrEycq/JjJMM9G3AKVJMj
bPWhLjcDTIrwRxP0wDe/Gm1gdwsWlov9ftNNcY+jETRx0uOIR5OoSJfL4VDjI+H+
+0m0D6fKierq0YGYvaeMIqFK1k5FRBjihjICj1Rq5DNd6zynmeJv7e3EMvSEmdYb
RLOQEhWN/CzObuvQb3SPkbRXptrRt/dbVnAej+TFrtXvea1lIPxuOMvuWAAFw5S6
w4tPjuc6/HxmRCR07y9bfYFsBUKKUsk/HbGDv1tVWNWdZ/ovcjldobDBGnqnzhZe
wpy8TaPNiisvhpVGDiFs45hLZ8tNo0+p3WWrdwnpNJCf3rlcc/GAv4iQOoh5j7iZ
zOwo9aXgoZOwq/9McKj75Qk2liuvqlp1riHMF6ZkEcmZLDUQeLw+Lnw6BSfLD771
rEW3p3awEywiBFkqSWfkDvGQ8W4T/ANwNWo78FoDpOazKJ9JjYiQs9jwg0jN7f5t
yUGSReIlUbmgTF/bx8E8zRR3+zUeMDwjDkCQ6Em4hh7r/vpE08flaLxK4pZ0qVvX
hYqoY12hGFC595sEcl+S7IQXy/u7PL4A6o/ZyY/g3Jjne9b12GmMkifgTJ/EEBW1
/d6RXj1z84lvlb1iRxNM1bymERhZgIsQLUCz
=eisl
-----END PGP PUBLIC KEY BLOCK-----

295
wireshark.spec Normal file
View File

@ -0,0 +1,295 @@
#
# spec file for package wireshark
#
# Copyright (c) 2024 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 libtap libwiretap14
%define libutil libwsutil15
%define libwire libwireshark17
%define org_name org.wireshark.Wireshark
%bcond_without qt5
%if 0%{?suse_version} >= 1500
%bcond_without lz4
%else
%bcond_with lz4
%endif
Name: wireshark
Version: 4.2.3
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.hash
Source3: https://www.wireshark.org/download/gerald_at_wireshark_dot_org.gpg#/wireshark.keyring
# PATCH-FIX-UPSTREAM wireshark-0000-wsutil-implicit_declaration_memcpy.patch
Patch0: wireshark-0000-wsutil-implicit_declaration_memcpy.patch
# PATCH-FEATURE-SLE wireshark-0010-dumpcap-permission-denied.patch bsc#1180102
Patch10: wireshark-0010-dumpcap-permission-denied.patch
BuildRequires: %{rb_default_ruby_suffix}-rubygem-asciidoctor
BuildRequires: bison
BuildRequires: flex
BuildRequires: glib2-devel >= 2.32
BuildRequires: hicolor-icon-theme
BuildRequires: krb5-devel
BuildRequires: libbrotli-devel
BuildRequires: libcap-devel
BuildRequires: libcares-devel >= 1.5.0
BuildRequires: libgcrypt-devel >= 1.4.2
BuildRequires: libgnutls-devel >= 3.2
BuildRequires: libpcap-devel
BuildRequires: libsmi-devel
BuildRequires: libtool
BuildRequires: lua51-devel
BuildRequires: net-snmp-devel
BuildRequires: openssl-devel
BuildRequires: pcre2-devel
BuildRequires: pkgconfig
BuildRequires: portaudio-devel
BuildRequires: snappy-devel
BuildRequires: spandsp-devel
BuildRequires: tcpd-devel
BuildRequires: update-desktop-files
BuildRequires: zlib-devel
%if %{with qt5}
BuildRequires: libqt5-linguist-devel
BuildRequires: pkgconfig(Qt5Concurrent) >= 5.3.0
BuildRequires: pkgconfig(Qt5Core) >= 5.3.0
BuildRequires: pkgconfig(Qt5Gui)
BuildRequires: pkgconfig(Qt5Multimedia)
BuildRequires: pkgconfig(Qt5PrintSupport)
BuildRequires: pkgconfig(Qt5Svg)
BuildRequires: pkgconfig(Qt5Widgets)
%else
BuildRequires: qt6-linguist-devel
BuildRequires: qt6-qt5compat-devel
BuildRequires: pkgconfig(Qt6Concurrent)
BuildRequires: pkgconfig(Qt6Core)
BuildRequires: pkgconfig(Qt6Gui)
BuildRequires: pkgconfig(Qt6Multimedia)
BuildRequires: pkgconfig(Qt6PrintSupport)
BuildRequires: pkgconfig(Qt6Svg)
BuildRequires: pkgconfig(Qt6Widgets)
%endif
BuildRequires: pkgconfig(libmaxminddb)
BuildRequires: pkgconfig(libnghttp2)
BuildRequires: pkgconfig(libnl-3.0)
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)
Requires(pre): permissions
Requires(pre): shadow
Recommends: wireshark-ui = %{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
%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
%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
Requires: xdg-utils
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
%build
%if %{with qt5}
%cmake -DCMAKE_INSTALL_LIBDIR='%{_lib}/' -DUSE_qt6=OFF
%else
%cmake -DCMAKE_INSTALL_LIBDIR='%{_lib}/'
%endif
%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
cmake --install build --component Development --prefix %{buildroot}%{_prefix}
cmakedocdir=/usr/share/doc/packages/wireshark
if [ -d %{buildroot}/usr/share/doc/wireshark ]; then
cmakedocdir=/usr/share/doc/wireshark
fi
# removing doc files that are not needed
rm %{buildroot}/${cmakedocdir}/COPYING
rm %{buildroot}/${cmakedocdir}/README.xml-output
rm %{buildroot}/${cmakedocdir}/pdml2html.xsl
rm %{buildroot}/${cmakedocdir}/ws.css
install -d -m 0755 %{buildroot}%{_sysconfdir}
install -d -m 0755 %{buildroot}%{_mandir}/man1/
# desktop file
cp resources/freedesktop/%{org_name}.desktop %{buildroot}%{_datadir}/applications/%{org_name}-su.desktop
sed -i -e 's|Name=Wireshark|Name=Wireshark - Super User Mode|g' %{buildroot}%{_datadir}/applications/%{org_name}-su.desktop
sed -i -e 's|Exec=wireshark %f|Exec=xdg-su -c wireshark %f|g' %{buildroot}%{_datadir}/applications/%{org_name}-su.desktop
%suse_update_desktop_file %{org_name}
%suse_update_desktop_file %{org_name}-su
rm -f %{buildroot}${cmakedocdir}/*.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
%{_bindir}/sharkd
%{_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/
%{_libdir}/lib*.so
%{_libdir}/pkgconfig/wireshark.pc
%{_libdir}/cmake/wireshark/
%files ui-qt
%{_bindir}/wireshark
%{_datadir}/applications/%{org_name}.desktop
%{_datadir}/applications/%{org_name}-su.desktop
%{_datadir}/icons/hicolor/*/apps/%{org_name}.png
%{_datadir}/icons/hicolor/*/mimetypes/%{org_name}-mimetype.png
%{_datadir}/mime/packages/%{org_name}.xml
%{_datadir}/metainfo/%{org_name}.metainfo.xml
%post ui-qt
%desktop_database_post
%icon_theme_cache_post
%postun ui-qt
%desktop_database_postun
%icon_theme_cache_postun
%changelog