Sync from SUSE:ALP:Source:Standard:1.0 wireshark revision 35ccbbd72b84cf86f66366eac07a0db6

This commit is contained in:
Adrian Schröter 2024-03-01 23:04:17 +01:00
parent 52d32ccf90
commit 0285680063
8 changed files with 583 additions and 537 deletions

View File

@ -1,14 +1,14 @@
Index: wireshark-3.6.1/wsutil/glib-compat.h
Index: wireshark-4.2.0rc2/wsutil/glib-compat.h
===================================================================
--- wireshark-3.6.1.orig/wsutil/glib-compat.h
+++ wireshark-3.6.1/wsutil/glib-compat.h
@@ -21,6 +21,9 @@ extern "C" {
--- 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 gpointer
g_memdup2(gconstpointer mem, gsize byte_size)
static inline void *
g_memdup2(gconstpointer mem, size_t byte_size)
{

View File

@ -1,15 +1,15 @@
commit 1865e02e6c22ee55b0bb11b8c78330d4e65a1132
commit acac613af7d702dae533cbdf9ef49cef803d0559
Author: Robert Frohl <rfrohl@suse.com>
Date: Wed Jan 13 14:18:36 2021 +0100
Date: Tue Sep 12 14:53:17 2023 +0200
Warn if user can't access dumpcap.
diff --git a/capchild/capture_sync.c b/capchild/capture_sync.c
index f31914886a..d3baab6c50 100644
--- a/capture/capture_sync.c
+++ b/capture/capture_sync.c
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/wslog.h>
#include <wsutil/strtoi.h>
#include <wsutil/ws_assert.h>
+#include <sys/stat.h>
@ -19,45 +19,15 @@ index f31914886a..d3baab6c50 100644
#ifdef _WIN32
#include <wsutil/unicode-utils.h>
#include <wsutil/win32-utils.h>
@@ -592,11 +596,22 @@ sync_pipe_start(capture_options *capture_opts, capture_session *cap_session, inf
* Child process - run dumpcap with the right arguments to make
* it just capture with the specified capture parameters
*/
@@ -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]);
execv(argv[0], argv);
- snprintf(errmsg, sizeof errmsg, "Couldn't run %s in child process: %s",
- argv[0], g_strerror(errno));
+ 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);
+ }
+ }
+ }
+ snprintf(errmsg, sizeof errmsg, "Couldn't run %s in child process: %s%s",
+ argv[0], g_strerror(errno), grp_warning);
+ free(grp_warning);
sync_pipe_errmsg_to_parent(2, errmsg, "");
/* Exit with "_exit()", so that we don't close the connection
@@ -827,6 +842,7 @@ sync_pipe_open_command(char* const argv[], int *data_read_fd,
* Child process - run dumpcap with the right arguments to make
* it just capture with the specified capture parameters
*/
+ char * grp_warning = calloc(1, 256);
dup2(data_pipe[PIPE_WRITE], 1);
ws_close(data_pipe[PIPE_READ]);
ws_close(data_pipe[PIPE_WRITE]);
@@ -834,8 +850,18 @@ sync_pipe_open_command(char* const argv[], int *data_read_fd,
ws_close(sync_pipe[PIPE_READ]);
ws_close(sync_pipe[PIPE_WRITE]);
execv(argv[0], argv);
- snprintf(errmsg, sizeof errmsg, "Couldn't run %s in child process: %s",
- argv[0], g_strerror(errno));
+ if (errno == EPERM || errno == EACCES) {
+ struct stat statbuf;
+ struct group *grp;
@ -67,9 +37,7 @@ index f31914886a..d3baab6c50 100644
+ }
+ }
+ }
+ snprintf(errmsg, sizeof errmsg, "Couldn't run %s in child process: %s%s",
+ argv[0], g_strerror(errno), grp_warning);
+ free(grp_warning);
sync_pipe_errmsg_to_parent(2, errmsg, "");
sync_pipe_write_int_msg(2, SP_EXEC_FAILED, errno);
/* Exit with "_exit()", so that we don't close the connection

BIN
wireshark-4.0.11.tar.xz (Stored with Git LFS)

Binary file not shown.

View File

@ -1,49 +0,0 @@
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512
wireshark-4.0.11.tar.xz: 43153680 bytes
SHA256(wireshark-4.0.11.tar.xz)=4c341cc33a6c512d983f4126e6f3e5c249f604e14ab7f337d38b1cbe58199e3d
SHA1(wireshark-4.0.11.tar.xz)=4af3140d69f9d41e1c4e161fad66304a6920ddce
Wireshark-win64-4.0.11.exe: 79609384 bytes
SHA256(Wireshark-win64-4.0.11.exe)=f3bb3156ef2c3470d45d4150038c2cc86ae0d04d501ff2c662196eeeaf85d633
SHA1(Wireshark-win64-4.0.11.exe)=24f51cc40b0c404146f5436223ec29c35476c353
Wireshark-win64-4.0.11.msi: 54325248 bytes
SHA256(Wireshark-win64-4.0.11.msi)=b06fab0a8d02788f71a21cf9473c4c38c2d93195b8029825d3de00e9bf199ca9
SHA1(Wireshark-win64-4.0.11.msi)=13eebda94ff1bb39fcd039ca7070e26cf990134a
WiresharkPortable64_4.0.11.paf.exe: 46772200 bytes
SHA256(WiresharkPortable64_4.0.11.paf.exe)=686c04c42fdd101986e664216033d2b5a13911b379ffc93c3546ec354245e998
SHA1(WiresharkPortable64_4.0.11.paf.exe)=cf1417b2fc190a118e5d8711966eaa2521a50a23
Wireshark 4.0.11 Arm 64.dmg: 65048706 bytes
SHA256(Wireshark 4.0.11 Arm 64.dmg)=f8bf18df6c74624c18d79f937c537588f53e1cca5ecfd5d59edbcaa6029ce852
SHA1(Wireshark 4.0.11 Arm 64.dmg)=519322ec6cdc5e9e9831fc62597ee1aff1923550
Wireshark 4.0.11 Intel 64.dmg: 68640199 bytes
SHA256(Wireshark 4.0.11 Intel 64.dmg)=b9a0dc1942c5f78214a986773b22180bba720f51b45e2da4260318b83b504d0d
SHA1(Wireshark 4.0.11 Intel 64.dmg)=8712a3168703935032b828ea69fd1ae12620b20d
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+ruoFAmVVHrsACgkQgiRKeOb+
rur9yQ//Ti9zIrOVFcjkrSVRlI/DmuK5LH4A+phpMRztbd9z3Idzpk8XjyMwQc+q
5bgWuVEFky6h8bQUILJqAaFH1eUIYWXztNP0QwKPkRu3qB0g6cSiAl3q1Ef9/onl
C191aFjb+NaAJl2oU0/5KxbMrcRw66d4FkW7AiPcDibGq804Q1ZUwRnzkrnud8l/
VJPRu9Ps8nCN0W59RqgGq2NV6DXGXLh8LpHMyqcygX8l19DIQRWeuWwRmXse5vtz
F5a9kOOeQ7i/QWkhDMLqbQRdB/xt2MN2BHilX8sbWsanCODCJhUx5mIe71FDvVrR
8knGIu0TajJBAQwavMfZTfst/Qi9LGJ7ChfBhIysfqetS0ns3kiAsE6bLwPddCo0
wnh5cDXj83fX4LkGoeF+NhKnx48pLcV9r+QjYVIZrtipRdK7wruzw5gnO57JXFZI
naQjGYjT9qwHKw9iqFhn4P70Tvlu1OUH81DCE60rT2aRof5ovzoRanjKqLNp6mFb
a6jT7lHamHi2PyW1Z5jYcEHImWK5YIXpeo5MblLb0EebfiCNl2xmVSMFhrSWkGBa
9WJsHGDOa5q/a+RbLOFs532pPkJonGx5ch65BfOvvg862HtUEwilBNO3aQrXVVpv
0RBpClnBRzFY/s10NjHemyFoEtC6Z44+xJLq4rZDvQYyno6LthI=
=T37X
-----END PGP SIGNATURE-----

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-----

File diff suppressed because it is too large Load Diff

View File

@ -1,7 +1,7 @@
#
# spec file for package wireshark
#
# Copyright (c) 2023 SUSE LLC
# 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
@ -17,18 +17,18 @@
# define libraries
%define libcodecs libwscodecs2
%define libtap libwiretap13
%define libutil libwsutil14
%define libwire libwireshark16
%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.0.11
Version: 4.2.3
Release: 0
Summary: A Network Traffic Analyser
License: GPL-2.0-or-later AND GPL-3.0-or-later
@ -48,14 +48,11 @@ 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: lua51-devel
@ -69,6 +66,8 @@ 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)
@ -76,6 +75,17 @@ 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)
@ -86,14 +96,9 @@ 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
@ -145,8 +150,6 @@ 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
@ -174,7 +177,11 @@ echo "`grep %{name}-%{version}.tar.xz %{SOURCE2} | grep SHA256 | head -n1 | cut
%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
@ -190,36 +197,21 @@ echo "`grep %{name}-%{version}.tar.xz %{SOURCE2} | grep SHA256 | head -n1 | cut
%install
%cmake_install
find %{buildroot} -type f -name "*.la" -delete -print
cmake --install build --component Development --prefix %{buildroot}%{_prefix}
# Ethereal support (remove when SLE-11 is out of scope
ln -fs wireshark %{buildroot}%{_bindir}/ethereal
ln -fs tshark %{buildroot}%{_bindir}/tethereal
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/
# -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 wiretap/*.h "${IDIR}/wiretap"
install -m 644 wsutil/*.h "${IDIR}/wsutil"
# 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
@ -228,7 +220,7 @@ sed -i -e 's|Exec=wireshark %f|Exec=xdg-su -c wireshark %f|g' %{buildroot}%{_dat
%suse_update_desktop_file %{org_name}
%suse_update_desktop_file %{org_name}-su
rm -f %{buildroot}%{_datadir}/doc/wireshark/*.html
rm -f %{buildroot}${cmakedocdir}/*.html
%pre
getent group wireshark >/dev/null || groupadd -r wireshark
@ -262,7 +254,6 @@ exit 0
%{_bindir}/rawshark
%{_bindir}/reordercap
%{_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
@ -279,19 +270,17 @@ exit 0
%{_libdir}/libwiretap.so.*
%files devel
%{_includedir}/wireshark
%{_includedir}/wireshark/config.h
%{_includedir}/wireshark/
%{_libdir}/lib*.so
%{_libdir}/pkgconfig/wireshark.pc
%{_libdir}/cmake/wireshark/
%files ui-qt
%{_bindir}/wireshark
%{_bindir}/ethereal
%{_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}/icons/hicolor/scalable/apps/%{org_name}.svg
%{_datadir}/mime/packages/%{org_name}.xml
%{_datadir}/metainfo/%{org_name}.metainfo.xml