Compare commits

..

1 commit

Author SHA1 Message Date
Michal Ruprich
ba7eca69c4 New version 4.6.8 2026-08-17 15:13:36 +02:00
9 changed files with 387 additions and 328 deletions

View file

@ -1,14 +1,8 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: "From: Jan Safranek" <jsafrane@redhat.com>
Date: Wed, 9 Sep 2026 08:53:35 +0200
Subject: [PATCH] Customize 'permission denied' error.
diff --git a/capture/capture_sync.c b/capture/capture_sync.c
index 36a8f3edbe..db8b49b816 100644
index af08b32..2e0fcb7 100644
--- a/capture/capture_sync.c
+++ b/capture/capture_sync.c
@@ -2102,8 +2102,16 @@ sync_pipe_input_cb(GIOChannel *pipe_io, capture_session *cap_session)
@@ -1825,8 +1832,16 @@ sync_pipe_input_cb(GIOChannel *pipe_io, capture_session *cap_session)
if (!ws_strtoi32(buffer, NULL, &exec_errno)) {
ws_warning("Invalid errno: %s", buffer);
}

View file

@ -0,0 +1,18 @@
From: Peter Hatina <phatina@redhat.com>
Date: Wed, 4 Sep 2013 10:03:57 +0200
Subject: [PATCH] fix string overrun in plugins/profinet
diff --git a/plugins/epan/profinet/packet-dcom-cba.c b/plugins/epan/profinet/packet-dcom-cba.c
index 52c5017e1f..fb980269db 100644
--- a/plugins/epan/profinet/packet-dcom-cba.c
+++ b/plugins/epan/profinet/packet-dcom-cba.c
@@ -543,7 +543,7 @@ dissect_ICBAPhysicalDevice_get_LogicalDevice_rqst(tvbuff_t *tvb, int offset,
packet_info *pinfo, proto_tree *tree, dcerpc_info *di, uint8_t *drep)
{
uint32_t u32Pointer;
- char szStr[1000];
+ char szStr[1000] = "";
uint32_t u32MaxStr = sizeof(szStr);
char *call;

View file

@ -0,0 +1,15 @@
From: Peter Lemenkov <lemenkov@gmail.com>
Date: Fri, 13 Sep 2013 14:36:55 +0400
Subject: [PATCH] Restore Fedora-specific groups
Signed-off-by: Peter Lemenkov <lemenkov@gmail.com>
diff --git a/resources/freedesktop/org.wireshark.Wireshark.desktop b/resources/freedesktop/org.wireshark.Wireshark.desktop
index a880a50a33..a25d67d99b 100644
--- a/resources/freedesktop/org.wireshark.Wireshark.desktop
+++ b/resources/freedesktop/org.wireshark.Wireshark.desktop
@@ -108,4 +108,4 @@ Terminal=false
MimeType=application/vnd.tcpdump.pcap;application/x-pcapng;application/x-snoop;application/x-iptrace;application/x-lanalyzer;application/x-nettl;application/x-radcom;application/x-etherpeek;application/x-visualnetworks;application/x-netinstobserver;application/x-5view;application/x-tektronix-rf5;application/x-micropross-mplog;application/x-apple-packetlogger;application/x-endace-erf;application/ipfix;application/x-ixia-vwr;
# Category entry according to:
# https://specifications.freedesktop.org/menu-spec/1.0/
-Categories=Network;Monitor;Qt;
+Categories=Application;Network;Monitor;Qt;

View file

@ -0,0 +1,20 @@
From: Kenneth Soerensen <knnthsrnsn@gmail.com>
Date: Wed, 29 Jan 2014 16:04:12 +0400
Subject: [PATCH] Fix paths in a org.wireshark.Wireshark.desktop file
diff --git a/resources/freedesktop/org.wireshark.Wireshark.desktop b/resources/freedesktop/org.wireshark.Wireshark.desktop
index a880a50a33..54b3595d55 100644
--- a/resources/freedesktop/org.wireshark.Wireshark.desktop
+++ b/resources/freedesktop/org.wireshark.Wireshark.desktop
@@ -102,8 +102,8 @@ Comment[tr]=Ağ trafiği çözümleyicisi
Comment[vi]=Trình phân tích giao thông mạng
Comment[uk]=Аналізатор мережевого трафіку
Icon=org.wireshark.Wireshark
-TryExec=wireshark
-Exec=wireshark %f
+TryExec=/usr/bin/wireshark
+Exec=/usr/bin/wireshark %f
Terminal=false
MimeType=application/vnd.tcpdump.pcap;application/x-pcapng;application/x-snoop;application/x-iptrace;application/x-lanalyzer;application/x-nettl;application/x-radcom;application/x-etherpeek;application/x-visualnetworks;application/x-netinstobserver;application/x-5view;application/x-tektronix-rf5;application/x-micropross-mplog;application/x-apple-packetlogger;application/x-endace-erf;application/ipfix;application/x-ixia-vwr;
# Category entry according to:

View file

@ -1,77 +1,273 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Peter Hatina <phatina@redhat.com>
Date: Tue, 24 Sep 2013 10:55:09 +0200
From cb54210f7f02b07768cfbf49ae266d487f580e1b Mon Sep 17 00:00:00 2001
From: rpm-build <rpm-build>
Date: Thu, 29 Jun 2017 15:32:58 +0200
Subject: [PATCH] Move /tmp to /var/tmp
Fedora mounts /tmp on tmpfs, which is backed by RAM, and capture files
are routinely larger than RAM, so the default temporary directory needs
to be somewhere on disk.
Fedora is using tmpfs which is limited by the size of RAM, thus we need
to use different directory on different filesystem.
Set TMPDIR in configuration_init(), which every program calls early in
main(). TMPDIR is the one knob that GLib (g_get_tmp_dir()), Qt
(QDir::tempPath()) and child processes such as dumpcap all read, so one
default covers every temporary file rather than the handful of call
sites a per-site patch can reach. A TMPDIR already in the environment is
left alone.
---
ui/qt/about_dialog.cpp | 3 +-
ui/qt/iax2_analysis_dialog.cpp | 5 ++-
ui/qt/utils/rtp_audio_file.cpp | 3 +-
wsutil/tempfile.c | 18 +++++++-
wsutil/tempfile.h | 2 +-
wsutil/wstmpdir.c | 71 ++++++++++++++++++++++++++++++++++
wsutil/wstmpdir.h | 39 +++++++++++++++++++
7 files changed, 134 insertions(+), 7 deletions(-)
create mode 100644 wsutil/wstmpdir.c
create mode 100644 wsutil/wstmpdir.h
Only TMPDIR is consulted, and an empty one counts as unset - that is
exactly how GLib and Qt behave on Unix, where TMP and TEMP are ignored
entirely.
The change is Peter Hatina's, from 2013; the implementation above was
rewritten in 2026 and the original is worth recording. It added
wsutil/wstmpdir.{c,h} - a copy of g_get_tmp_dir() with a /var/tmp
fallback, exported from libwsutil as get_tmp_dir() - and rewrote
create_tempfile() around it.
That reached three of the roughly seventeen places that ask for a
temporary directory, missing the second temporary file in
rtp_audio_file.cpp, the export-object and traffic-tab dialogs, tshark's
own default, wsutil/socket.c and create_tempdir(). It also worked only
by accident: P_tmpdir is "/tmp" on glibc and was tested ahead of the
/var/tmp default, so the fallback was reached purely because
wstmpdir.c never included <stdio.h>. Adding that one header would have
silently restored /tmp.
Setting TMPDIR keeps Peter's intent and drops all of that.
Rewritten-by: Peter Lemenkov <lemenkov@gmail.com>
Assisted-by: Claude
diff --git a/wsutil/filesystem.c b/wsutil/filesystem.c
index f1c7358a97..6ee028cb71 100644
--- a/wsutil/filesystem.c
+++ b/wsutil/filesystem.c
@@ -932,6 +932,32 @@ configuration_init(const char* arg0)
#ifdef _WIN32
return configuration_init_w32(arg0);
#else
+ /*
+ * Fedora mounts /tmp on tmpfs, which is backed by RAM, and capture
+ * files are routinely larger than RAM. Default the temporary
+ * directory to /var/tmp unless the user has asked for something else.
+ *
+ * TMPDIR is the one knob that GLib (g_get_tmp_dir()), Qt
+ * (QDir::tempPath()) and child processes such as dumpcap all read on
+ * this platform, so setting it here covers every temporary file the
+ * programs create without having to touch each call site. It has to
+ * happen before any of them run, and configuration_init() is among
+ * the first things every program calls.
+ *
+ * Only TMPDIR is consulted. TMP and TEMP are Windows spellings that
+ * neither GLib nor Qt looks at on Unix, so honouring them here would
+ * promise something the rest of the code cannot keep.
+ *
+ * An empty TMPDIR counts as unset, which is how both GLib and Qt
+ * treat it - otherwise it would suppress this default and leave them
+ * falling back to /tmp, the one outcome nobody asked for.
+ */
+ const char *tmpdir = g_getenv("TMPDIR");
diff --git a/ui/qt/iax2_analysis_dialog.cpp b/ui/qt/iax2_analysis_dialog.cpp
index cdbd865..a2d24c5 100644
--- a/ui/qt/iax2_analysis_dialog.cpp
+++ b/ui/qt/iax2_analysis_dialog.cpp
@@ -24,6 +24,7 @@
#include "ui/rtp_stream.h"
#endif
#include <wsutil/utf8_entities.h>
+#include <wsutil/wstmpdir.h> /* for get_tmp_dir() */
#include <wsutil/g711.h>
#include <wsutil/pint.h>
@@ -252,9 +253,9 @@ Iax2AnalysisDialog::Iax2AnalysisDialog(QWidget &parent, CaptureFile &cf) :
// We keep our temp files open for the lifetime of the dialog. The GTK+
// UI opens and closes at various points.
- QString tempname = QStringLiteral("%1/wireshark_iax2_f").arg(QDir::tempPath());
+ QString tempname = QStringLiteral("%1/wireshark_iax2_f").arg(get_tmp_dir());
fwd_tempfile_ = new QTemporaryFile(tempname, this);
- tempname = QStringLiteral("%1/wireshark_iax2_r").arg(QDir::tempPath());
+ tempname = QStringLiteral("%1/wireshark_iax2_r").arg(get_tmp_dir());
rev_tempfile_ = new QTemporaryFile(tempname, this);
if (!fwd_tempfile_->open() || fwd_tempfile_->error() != QFile::NoError || !rev_tempfile_->open() || rev_tempfile_->error() != QFile::NoError) {
diff --git a/ui/qt/utils/rtp_audio_file.cpp b/ui/qt/utils/rtp_audio_file.cpp
index 591a63bbf3..203f5c5286 100644
--- a/ui/qt/utils/rtp_audio_file.cpp
+++ b/ui/qt/utils/rtp_audio_file.cpp
@@ -31,6 +31,7 @@
#include "rtp_audio_file.h"
#include <ws_attributes.h>
+#include <wsutil/wstmpdir.h> /* for get_tmp_dir() */
RtpAudioFile::RtpAudioFile(bool use_disk_for_temp, bool use_disk_for_frames):
real_pos_(0)
@@ -45,7 +46,7 @@ RtpAudioFile::RtpAudioFile(bool use_disk_for_temp, bool use_disk_for_frames):
tempname = "memory";
if (use_disk_for_temp) {
- tempname = QStringLiteral("%1/wireshark_rtp_stream").arg(QDir::tempPath());
+ tempname = QStringLiteral("%1/wireshark_rtp_stream").arg(get_tmp_dir());
sample_file_ = new QTemporaryFile(tempname, this);
} else {
sample_file_ = new QBuffer(this);
diff --git a/wsutil/tempfile.c b/wsutil/tempfile.c
index 531ed91..bd6fd60 100644
--- a/wsutil/tempfile.c
+++ b/wsutil/tempfile.c
@@ -10,6 +10,8 @@
#include "config.h"
#include "tempfile.h"
+#include <wsutil/file_util.h>
+#include <wsutil/wstmpdir.h> /* for get_tmp_dir() */
#include <errno.h>
@@ -39,7 +41,7 @@ sanitize_prefix(const char *prefix)
/**
* Create a tempfile with the given prefix (e.g. "wireshark"). The path
- * is created using g_file_open_tmp.
+ * is created using get_tmp_dir.
*
* @param tempdir [in] If not NULL, the directory in which to create the file.
* @param namebuf [in,out] If not NULL, receives the full path of the temp file.
@@ -55,13 +57,25 @@ create_tempfile(const char *tempdir, char **namebuf, const char *pfx, const char
{
int fd;
char *safe_pfx = sanitize_prefix(pfx);
+ gchar *tmp_file;
+ const char *tmp_dir;
+ int old_mask;
if (tempdir == NULL || tempdir[0] == '\0') {
/* Use OS default tempdir behaviour */
char* filetmpl = ws_strdup_printf("%sXXXXXX%s", safe_pfx ? safe_pfx : "", sfx ? sfx : "");
g_free(safe_pfx);
- fd = g_file_open_tmp(filetmpl, namebuf, err);
+ tmp_dir = get_tmp_dir();
+ tmp_file = g_strconcat(tmp_dir, "/", filetmpl, NULL);
+
+ if (tmpdir == NULL || tmpdir[0] == '\0') {
+ g_setenv("TMPDIR", "/var/tmp", true);
+ if (namebuf)
+ *namebuf = tmp_file;
+
+ old_mask = ws_umask(0077);
+ fd = mkstemps(tmp_file, sfx ? (int) strlen(sfx) : 0);
+ ws_umask(old_mask);
+
g_free(filetmpl);
}
else {
diff --git a/wsutil/tempfile.h b/wsutil/tempfile.h
index 70031b5419..72011e265a 100644
--- a/wsutil/tempfile.h
+++ b/wsutil/tempfile.h
@@ -23,7 +23,7 @@ extern "C" {
/**
* Create a tempfile with the given prefix (e.g. "wireshark"). The path
- * is created using g_file_open_tmp.
+ * is created using get_tmp_dir and mkstemp.
*
* @param tempdir [in] If not NULL, the directory in which to create the file.
* @param namebuf [in,out] If not NULL, receives the full path of the temp file.
diff --git a/wsutil/wstmpdir.c b/wsutil/wstmpdir.c
new file mode 100644
index 0000000000..9128d354ce
--- /dev/null
+++ b/wsutil/wstmpdir.c
@@ -0,0 +1,71 @@
+/* wstmpdir.c
+ *
+ * Copyright (C) 2013 Red Hat, Inc. All right reserved.
+ *
+ * Temporary directory routine
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Author: Peter Hatina <phatina@redhat.com>
+ */
+
+#include "config.h"
+
+#include <glib.h>
+#include "wstmpdir.h"
+
+/**
+ * Gets the directory to use for temporary files.
+ *
+ * Inspired by glib-2.0. If no TMP, TEMP or TMPDIR is set,
+ * /var/tmp is returned (Fedora specific).
+ *
+ * Returns: the directory to use for temporary files.
+ */
+const char *get_tmp_dir(void)
+{
+ static gchar *tmp_dir;
+
+ if (g_once_init_enter(&tmp_dir)) {
+ gchar *tmp;
+
+ tmp = g_strdup(g_getenv("TEMP"));
+ if (tmp == NULL || *tmp == '\0') {
+ g_free(tmp);
+ tmp = g_strdup(g_getenv("TMPDIR"));
+ }
+
+#ifdef P_tmpdir
+ if (tmp == NULL || *tmp == '\0') {
+ gsize k;
+ g_free(tmp);
+ tmp = g_strdup(P_tmpdir);
+ k = strlen(tmp);
+ if (k > 1 && G_IS_DIR_SEPARATOR(tmp[k - 1]))
+ tmp[k - 1] = '\0';
+ fprintf(stderr, "Using P_tmpdir: %s\n", P_tmpdir);
+ }
+#endif /* P_tmpdir */
+
+ if (tmp == NULL || *tmp == '\0') {
+ g_free(tmp);
+ tmp = g_strdup("/var/tmp");
+ }
+
+ g_once_init_leave(&tmp_dir, tmp);
+ }
+
return configuration_init_posix(arg0);
#endif
}
+ return tmp_dir;
+}
diff --git a/wsutil/wstmpdir.h b/wsutil/wstmpdir.h
new file mode 100644
index 0000000000..07ac5837ac
--- /dev/null
+++ b/wsutil/wstmpdir.h
@@ -0,0 +1,39 @@
+/* wstmpdir.c
+ *
+ * Copyright (C) 2013 Red Hat, Inc. All right reserved.
+ *
+ * Temporary directory routine
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Author: Peter Hatina <phatina@redhat.com>
+ */
+
+#ifndef __WS_TMP_DIR_H__
+#define __WS_TMP_DIR_H__
+
+#include "ws_symbol_export.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif // __cplusplus
+
+WS_DLL_PUBLIC const char *get_tmp_dir(void);
+
+#ifdef __cplusplus
+}
+#endif // __cplusplus
+
+#endif
--
2.37.3
diff --git a/ui/qt/about_dialog.cpp b/ui/qt/about_dialog.cpp
index ea11122..982ba1a 100644
--- a/ui/qt/about_dialog.cpp
+++ b/ui/qt/about_dialog.cpp
@@ -14,6 +14,7 @@
#include <ui_about_dialog.h>
#include "main_application.h"
+#include <wsutil/wstmpdir.h> /* for get_tmp_dir() */
#include <wsutil/application_flavor.h>
@@ -204,7 +205,7 @@ FolderListModel::FolderListModel(QObject * parent):
appendRow(QStringList() << tr("\"File\" dialog location") << get_open_dialog_initial_dir() << tr("Capture files"));
/* temp */
- appendRow(QStringList() << tr("Temp") << (global_capture_opts.temp_dir && global_capture_opts.temp_dir[0] ? global_capture_opts.temp_dir : g_get_tmp_dir())
+ appendRow(QStringList() << tr("Temp") << (global_capture_opts.temp_dir && global_capture_opts.temp_dir[0] ? global_capture_opts.temp_dir : get_tmp_dir())
<< tr("Untitled capture files"));
/* pers conf */

View file

@ -0,0 +1,20 @@
diff --git a/wsutil/CMakeLists.txt b/wsutil/CMakeLists.txt
index a55086c..0149801 100644
--- a/wsutil/CMakeLists.txt
+++ b/wsutil/CMakeLists.txt
@@ -80,6 +80,7 @@ set(WSUTIL_PUBLIC_HEADERS
ws_roundup.h
ws_strptime.h
wsgcrypt.h
+ wstmpdir.h
wsjson.h
wslog.h
xtea.h
@@ -135,6 +136,7 @@ set(WSUTIL_COMMON_FILES
ws_pipe.c
ws_strptime.c
wsgcrypt.c
+ wstmpdir.c
wsjson.c
wslog.c
xtea.c

View file

@ -0,0 +1,13 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index e6095ac..71a04e8 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -4309,8 +4309,6 @@ endif()
cmake_path(SET TMP_DST_PATH NORMALIZE "${CMAKE_INSTALL_LIBDIR}/pkgconfig")
install(FILES "${CMAKE_BINARY_DIR}/resources/wireshark.pc"
DESTINATION ${TMP_DST_PATH}
- COMPONENT "Development"
- EXCLUDE_FROM_ALL
)
cmake_path(SET TMP_DST_PATH NORMALIZE "${CMAKE_INSTALL_DATADIR}/${PROJECT_NAME}")

View file

@ -1,257 +1,44 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Peter Lemenkov <lemenkov@gmail.com>
Date: Tue, 8 Sep 2026 19:49:08 +0200
Subject: [PATCH] Docs: Build a manual page only when its program is built
The manual pages are added to the build unconditionally, so a build
configured without a program still generates, installs and packages
that program's page.
The default configuration shows it. BUILD_stratoshark is OFF by
default, yet stratoshark(1), strato(1), falcodump(1), sshdig(1) and
dumpcalls(1) are built and installed anyway, along with the Stratoshark
release notes, documenting programs that were never compiled. The same
goes for anything else switched off: randpktdump(1) survives
-DBUILD_randpktdump=OFF, and etwdump(1) is installed on every platform,
though the program it describes is built only on Windows.
Guard each page on the condition its program is built under, which is
what dpauxmon, sdjournal and mmdbresolve already do a few lines further
down. That means the dependency as well as the option, so sshdump,
ciscodump, wifidump and sshdig follow LIBSSH_FOUND and falcodump and
dumpcalls follow SINSP_FOUND, exactly as extcap/CMakeLists.txt builds
them. Extend the same to the HTML pages in DOC_FILES, where falcodump
and dumpcalls were already guarded and the rest were not, and to the
Stratoshark release notes.
sshdig moves to the stratoshark package in the Debian packaging. It is
a Stratoshark extcap, installed into STRATOSHARK_EXTCAP_INSTALL_LIBDIR
and shipped with stratoshark, but its manual page was listed in
wireshark-common. That was already wrong - a default build has no
sshdig binary in that package - and it becomes a build failure once the
page is only generated when the program is:
dh_installman: error: Cannot find (any matches for)
"obj-*/doc/man_pages/sshdig.1" (tried in ., debian/tmp)
Pages for things that are always built - wireshark, tshark, capinfos,
captype, dumpcap, editcap, mergecap, randpkt, rawshark, reordercap,
sharkd, text2pcap and the section 4 pages - stay unconditional.
Assisted-by: Claude
Signed-off-by: Peter Lemenkov <lemenkov@gmail.com>
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 2129bd0b22..e467cfdb1f 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -2281,33 +2281,60 @@ endif()
if (ASCIIDOCTOR_FOUND)
list(APPEND DOC_FILES
- ${CMAKE_BINARY_DIR}/doc/man_pages/androiddump.html
- ${CMAKE_BINARY_DIR}/doc/man_pages/udpdump.html
${CMAKE_BINARY_DIR}/doc/man_pages/capinfos.html
${CMAKE_BINARY_DIR}/doc/man_pages/captype.html
- ${CMAKE_BINARY_DIR}/doc/man_pages/ciscodump.html
${CMAKE_BINARY_DIR}/doc/man_pages/dumpcap.html
${CMAKE_BINARY_DIR}/doc/man_pages/editcap.html
${CMAKE_BINARY_DIR}/doc/man_pages/extcap.html
${CMAKE_BINARY_DIR}/doc/man_pages/mergecap.html
${CMAKE_BINARY_DIR}/doc/man_pages/randpkt.html
- ${CMAKE_BINARY_DIR}/doc/man_pages/randpktdump.html
- ${CMAKE_BINARY_DIR}/doc/man_pages/etwdump.html
${CMAKE_BINARY_DIR}/doc/man_pages/rawshark.html
${CMAKE_BINARY_DIR}/doc/man_pages/reordercap.html
${CMAKE_BINARY_DIR}/doc/man_pages/sharkd.html
- ${CMAKE_BINARY_DIR}/doc/man_pages/sshdig.html
- ${CMAKE_BINARY_DIR}/doc/man_pages/sshdump.html
- ${CMAKE_BINARY_DIR}/doc/man_pages/strato.html
- ${CMAKE_BINARY_DIR}/doc/man_pages/stratoshark.html
- ${CMAKE_BINARY_DIR}/doc/man_pages/wifidump.html
${CMAKE_BINARY_DIR}/doc/man_pages/text2pcap.html
${CMAKE_BINARY_DIR}/doc/man_pages/tshark.html
${CMAKE_BINARY_DIR}/doc/man_pages/wireshark.html
${CMAKE_BINARY_DIR}/doc/man_pages/wireshark-filter.html
"${CMAKE_BINARY_DIR}/doc/Wireshark Release Notes.html"
- "${CMAKE_BINARY_DIR}/doc/Stratoshark Release Notes.html"
)
+
+ #
+ # As with the manual pages themselves, only install the HTML for a
+ # program that is actually built.
+ #
+ if(BUILD_stratoshark)
+ list(APPEND DOC_FILES
+ ${CMAKE_BINARY_DIR}/doc/man_pages/stratoshark.html
+ "${CMAKE_BINARY_DIR}/doc/Stratoshark Release Notes.html"
+ )
+ endif()
+ if(BUILD_strato)
+ list(APPEND DOC_FILES ${CMAKE_BINARY_DIR}/doc/man_pages/strato.html)
+ endif()
+ if(BUILD_androiddump)
+ list(APPEND DOC_FILES ${CMAKE_BINARY_DIR}/doc/man_pages/androiddump.html)
+ endif()
+ if(BUILD_ciscodump AND LIBSSH_FOUND)
+ list(APPEND DOC_FILES ${CMAKE_BINARY_DIR}/doc/man_pages/ciscodump.html)
+ endif()
+ if(BUILD_etwdump AND WIN32)
+ list(APPEND DOC_FILES ${CMAKE_BINARY_DIR}/doc/man_pages/etwdump.html)
+ endif()
+ if(BUILD_randpktdump)
+ list(APPEND DOC_FILES ${CMAKE_BINARY_DIR}/doc/man_pages/randpktdump.html)
+ endif()
+ if(BUILD_sshdig AND LIBSSH_FOUND)
+ list(APPEND DOC_FILES ${CMAKE_BINARY_DIR}/doc/man_pages/sshdig.html)
+ endif()
+ if(BUILD_sshdump AND LIBSSH_FOUND)
+ list(APPEND DOC_FILES ${CMAKE_BINARY_DIR}/doc/man_pages/sshdump.html)
+ endif()
+ if(BUILD_udpdump)
+ list(APPEND DOC_FILES ${CMAKE_BINARY_DIR}/doc/man_pages/udpdump.html)
+ endif()
+ if(BUILD_wifidump AND LIBSSH_FOUND)
+ list(APPEND DOC_FILES ${CMAKE_BINARY_DIR}/doc/man_pages/wifidump.html)
+ endif()
if(MAXMINDDB_FOUND)
list(APPEND DOC_FILES ${CMAKE_BINARY_DIR}/doc/man_pages/mmdbresolve.html)
endif()
diff --git a/doc/CMakeLists.txt b/doc/CMakeLists.txt
index a92ed452fe..7a05821b4c 100644
index adcfa0c..fd92872 100644
--- a/doc/CMakeLists.txt
+++ b/doc/CMakeLists.txt
@@ -40,28 +40,70 @@ endmacro()
@@ -40,8 +40,6 @@ endmacro()
ADD_MAN_PAGE(wireshark 1)
ADD_MAN_PAGE(tshark 1)
-ADD_MAN_PAGE(stratoshark 1)
-ADD_MAN_PAGE(strato 1)
-ADD_MAN_PAGE(androiddump 1)
ADD_MAN_PAGE(androiddump 1)
ADD_MAN_PAGE(capinfos 1)
ADD_MAN_PAGE(captype 1)
-ADD_MAN_PAGE(ciscodump 1)
@@ -48,13 +46,11 @@ ADD_MAN_PAGE(ciscodump 1)
ADD_MAN_PAGE(dumpcap 1)
ADD_MAN_PAGE(editcap 1)
-ADD_MAN_PAGE(etwdump 1)
ADD_MAN_PAGE(etwdump 1)
-ADD_MAN_PAGE(falcodump 1)
ADD_MAN_PAGE(mergecap 1)
ADD_MAN_PAGE(randpkt 1)
-ADD_MAN_PAGE(randpktdump 1)
ADD_MAN_PAGE(randpktdump 1)
ADD_MAN_PAGE(rawshark 1)
ADD_MAN_PAGE(reordercap 1)
ADD_MAN_PAGE(sharkd 1)
-ADD_MAN_PAGE(sshdig 1)
-ADD_MAN_PAGE(sshdump 1)
ADD_MAN_PAGE(sshdump 1)
ADD_MAN_PAGE(text2pcap 1)
-ADD_MAN_PAGE(udpdump 1)
-ADD_MAN_PAGE(wifidump 1)
+
+#
+# A program that is not built should not leave a manual page behind for
+# it. Each of these follows the option that decides whether the program
+# is built, the same way dpauxmon, sdjournal and mmdbresolve do below.
+#
+if(BUILD_stratoshark)
+ ADD_MAN_PAGE(stratoshark 1)
+endif()
+
+if(BUILD_strato)
+ ADD_MAN_PAGE(strato 1)
+endif()
+
+if(BUILD_androiddump)
+ ADD_MAN_PAGE(androiddump 1)
+endif()
+
+if(BUILD_ciscodump AND LIBSSH_FOUND)
+ ADD_MAN_PAGE(ciscodump 1)
+endif()
+
+if(BUILD_dumpcalls AND SINSP_FOUND)
+ ADD_MAN_PAGE(dumpcalls 1)
+endif()
+
+if(BUILD_etwdump AND WIN32)
+ ADD_MAN_PAGE(etwdump 1)
+endif()
+
+if(BUILD_falcodump AND SINSP_FOUND)
+ ADD_MAN_PAGE(falcodump 1)
+endif()
+
+if(BUILD_randpktdump)
+ ADD_MAN_PAGE(randpktdump 1)
+endif()
+
+if(BUILD_sshdig AND LIBSSH_FOUND)
+ ADD_MAN_PAGE(sshdig 1)
+endif()
+
+if(BUILD_sshdump AND LIBSSH_FOUND)
+ ADD_MAN_PAGE(sshdump 1)
+endif()
+
+if(BUILD_udpdump)
+ ADD_MAN_PAGE(udpdump 1)
+endif()
+
+if(BUILD_wifidump AND LIBSSH_FOUND)
+ ADD_MAN_PAGE(wifidump 1)
+endif()
ADD_MAN_PAGE(extcap 4)
ADD_MAN_PAGE(wireshark-filter 4)
@@ -112,13 +154,17 @@ endif()
if(ASCIIDOCTOR_FOUND)
ASCIIDOCTOR2HTML("Wireshark_Release_Notes.adoc" CONVERT_UNDERSCORES)
ASCIIDOCTOR2TXT("Wireshark_Release_Notes.adoc" CONVERT_UNDERSCORES)
- ASCIIDOCTOR2HTML("Stratoshark_Release_Notes.adoc" CONVERT_UNDERSCORES)
- ASCIIDOCTOR2TXT("Stratoshark_Release_Notes.adoc" CONVERT_UNDERSCORES)
+ set(RELEASE_NOTES_HTML "${CMAKE_CURRENT_BINARY_DIR}/Wireshark Release Notes.html")
+
+ # Only the release notes for something that was built.
+ if(BUILD_stratoshark)
+ ASCIIDOCTOR2HTML("Stratoshark_Release_Notes.adoc" CONVERT_UNDERSCORES)
+ list(APPEND RELEASE_NOTES_HTML "${CMAKE_CURRENT_BINARY_DIR}/Stratoshark Release Notes.html")
+ endif()
add_custom_target(release_notes_html
DEPENDS
- "${CMAKE_CURRENT_BINARY_DIR}/Wireshark Release Notes.html"
- "${CMAKE_CURRENT_BINARY_DIR}/Stratoshark Release Notes.html"
+ ${RELEASE_NOTES_HTML}
)
set_target_properties(release_notes_html PROPERTIES FOLDER "Documentation")
@@ -166,8 +212,7 @@ if(ASCIIDOCTOR_FOUND)
install(
FILES
${HTML_INSTALL_FILES}
- "${CMAKE_CURRENT_BINARY_DIR}/Wireshark Release Notes.html"
- "${CMAKE_CURRENT_BINARY_DIR}/Stratoshark Release Notes.html"
+ ${RELEASE_NOTES_HTML}
DESTINATION
${CMAKE_INSTALL_DOCDIR}
COMPONENT "ReleaseNotes"
diff --git a/packaging/debian/stratoshark.manpages b/packaging/debian/stratoshark.manpages
index 4f27313b47..f13fa2d55d 100644
--- a/packaging/debian/stratoshark.manpages
+++ b/packaging/debian/stratoshark.manpages
@@ -1,2 +1,3 @@
usr/share/man/man1/strato.1
usr/share/man/man1/stratoshark.1
+usr/share/man/man1/sshdig.1
diff --git a/packaging/debian/wireshark-common.manpages b/packaging/debian/wireshark-common.manpages
index 9c7ce5956c..974e970e28 100644
--- a/packaging/debian/wireshark-common.manpages
+++ b/packaging/debian/wireshark-common.manpages
@@ -13,7 +13,6 @@ obj-*/doc/man_pages/androiddump.1
obj-*/doc/man_pages/ciscodump.1
obj-*/doc/man_pages/randpktdump.1
obj-*/doc/man_pages/udpdump.1
-obj-*/doc/man_pages/sshdig.1
obj-*/doc/man_pages/sshdump.1
obj-*/doc/man_pages/wifidump.1
obj-*/doc/man_pages/extcap.4
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 71a04e8..a797ad1 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -2283,11 +2283,8 @@ if (ASCIIDOCTOR_FOUND)
${CMAKE_BINARY_DIR}/doc/man_pages/etwdump.html
${CMAKE_BINARY_DIR}/doc/man_pages/rawshark.html
${CMAKE_BINARY_DIR}/doc/man_pages/reordercap.html
${CMAKE_BINARY_DIR}/doc/man_pages/sharkd.html
- ${CMAKE_BINARY_DIR}/doc/man_pages/sshdig.html
${CMAKE_BINARY_DIR}/doc/man_pages/sshdump.html
- ${CMAKE_BINARY_DIR}/doc/man_pages/strato.html
- ${CMAKE_BINARY_DIR}/doc/man_pages/stratoshark.html
${CMAKE_BINARY_DIR}/doc/man_pages/wifidump.html
${CMAKE_BINARY_DIR}/doc/man_pages/text2pcap.html
${CMAKE_BINARY_DIR}/doc/man_pages/tshark.html

View file

@ -22,8 +22,13 @@ Source3: wireshark.sysusers
# Fedora-specific
Patch2: wireshark-0002-Customize-permission-denied-error.patch
# Fedora-specific
Patch4: wireshark-0004-Restore-Fedora-specific-groups.patch
# Fedora-specific
Patch5: wireshark-0005-Fix-paths-in-a-wireshark.desktop-file.patch
# Fedora-specific
Patch6: wireshark-0006-Move-tmp-to-var-tmp.patch
# Proposed upstream - https://gitlab.com/wireshark/wireshark/-/merge_requests/26425
Patch7: wireshark-0007-cmakelists.patch
Patch8: wireshark-0008-pkgconfig.patch
Patch9: wireshark-0009-remove-strato-manpages.patch
#install tshark together with wireshark GUI
@ -271,9 +276,11 @@ fi
%{_mandir}/man1/androiddump.*
%{_mandir}/man1/captype.*
%{_mandir}/man1/ciscodump.*
%{_mandir}/man1/randpktdump.*
%{_mandir}/man1/dpauxmon.*
%{_mandir}/man1/sdjournal.*
%{_mandir}/man1/sharkd.*
%{_mandir}/man1/etwdump.*
%{_mandir}/man4/extcap.*
%{_datadir}/doc/wireshark/*
@ -298,20 +305,9 @@ fi
%endif
%changelog
* Wed Sep 9 2026 Peter Lemenkov <lemenkov@gmail.com> - 1:4.6.8-1
* Mon Aug 17 2026 Michal Ruprich <mruprich@redhat.com> - 1:4.6.8-1
- New version 4.6.8
* Tue Sep 08 2026 Peter Lemenkov <lemenkov@gmail.com> - 1:4.6.7-3
- Rewrite the /var/tmp patch to set TMPDIR in configuration_init() rather
than add wsutil/wstmpdir.{c,h} and rewrite create_tempfile(). TMPDIR is
read by GLib, by Qt and by child processes such as dumpcap, so one
default now covers every temporary file instead of three of the roughly
seventeen places that ask for a temporary directory
- Drop wireshark-0007-cmakelists.patch, which existed only to build the
files the rewrite removes
- Drop the stray wireshark-0003 patch, applied upstream in 0bc06ec1086 and
unreferenced by the spec since 4.6.0
* Fri Jul 17 2026 Fedora Release Engineering <releng@fedoraproject.org> - 1:4.6.7-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_45_Mass_Rebuild