diff --git a/.gitignore b/.gitignore index bf11075..5f7f296 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ /wireshark-*.tar.bz2 +/wireshark-*.tar.xz diff --git a/sources b/sources index b54e5e3..10167f2 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (wireshark-2.2.7.tar.bz2) = 417836810eb895b3f2a6ac1cfd138fb0275382ea2edc60fc5f5e5f8ce433b56b8120aa8b58b4f77296986630fdf49e4c5c3859b2c2c5e26b1ce0651393b7d716 +SHA512 (wireshark-2.4.0rc2.tar.xz) = 2df36aa6465256d63d95e69137a9e8bb828940c629dacec5afc4f9ceab158bd023d006bf5c44a50e7f6d1d94d704a7c5f7ecf4bf5d34ddfcb9af9ca1abd7887d diff --git a/wireshark-0004-Restore-Fedora-specific-groups.patch b/wireshark-0004-Restore-Fedora-specific-groups.patch new file mode 100644 index 0000000..2cdf2ea --- /dev/null +++ b/wireshark-0004-Restore-Fedora-specific-groups.patch @@ -0,0 +1,15 @@ +From: Peter Lemenkov +Date: Fri, 13 Sep 2013 14:36:55 +0400 +Subject: [PATCH] Restore Fedora-specific groups + +Signed-off-by: Peter Lemenkov +diff --git a/wireshark.desktop b/wireshark.desktop +index 334db48..669c6f1 100644 +--- a/wireshark.desktop ++++ b/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: + # http://standards.freedesktop.org/menu-spec/1.0/ +-Categories=Network;Monitor;Qt; ++Categories=Application;Network;Monitor;Qt; diff --git a/wireshark-0004-adds-autoconf-macro-file.patch b/wireshark-0004-adds-autoconf-macro-file.patch deleted file mode 100644 index 5c1818d..0000000 --- a/wireshark-0004-adds-autoconf-macro-file.patch +++ /dev/null @@ -1,113 +0,0 @@ -From: =?UTF-8?q?Radek=20Vok=C3=A1l?= -Date: Mon, 21 Dec 2009 11:19:39 +0000 -Subject: [PATCH] adds autoconf macro file - -updated autoconf macros and pkgconfig file in wireshark-devel to reflect current config.h Resolves: #746655 - -diff --git a/wireshark-autoconf.m4 b/wireshark-autoconf.m4 -new file mode 100644 -index 0000000..d8015d8 ---- /dev/null -+++ b/wireshark-autoconf.m4 -@@ -0,0 +1,101 @@ -+dnl AM_PATH_WIRESHARK([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]]) -+dnl Test for wireshark development files, and define WIRESHARK_CFLAGS, -+dnl WIRESHARK_LIBS and WIRESHARK_VERSION. -+dnl -+AC_DEFUN([AM_PATH_WIRESHARK],[ -+ AC_ARG_WITH(wireshark-prefix, -+ [ --with-wireshark-prefix=PFX Prefix where wireshark libraries are installed (optional)], -+ wireshark_config_prefix="$withval", wireshark_config_prefix="") -+ -+ wireshark_found=no -+ if test "$wireshark_config_prefix" != "" ; then -+ AM_PATH_GLIB_2_0(,,,[gmodule]) -+ WIRESHARK_CFLAGS="-DWS_VAR_IMPORT=extern -DWS_MSVC_NORETURN= -I$wireshark_config_prefix/include/wireshark -I$wireshark_config_prefix/include/wireshark/epan -I/usr/include/wireshark -I/usr/include/wireshark/epan $GLIB_CFLAGS" -+ WIRESHARK_LIBS="-L$wireshark_config_prefix/lib -lwireshark -lwiretap $GLIB_LIBS" -+ wireshark_found=yes -+ else -+ PKG_PROG_PKG_CONFIG() -+ PKG_CHECK_MODULES(WIRESHARK, wireshark, wireshark_found=yes) -+ fi -+ -+ ac_save_CFLAGS="$CFLAGS" -+ ac_save_CLIBS="$LIBS" -+ CFLAGS="$CFLAGS $WIRESHARK_CFLAGS" -+ LIBS="$WIRESHARK_LIBS $LIBS" -+ min_wireshark_version=ifelse([$1], ,0.0.0,[$1]) -+ if test $wireshark_found = yes; then -+ AC_MSG_CHECKING(for wireshark version >= $min_wireshark_version) -+ wireshark_found=no -+ AC_TRY_RUN([ -+#include -+#include -+#include -+#include -+#include -+#include -+ -+int -+main() -+ -+{ -+ int ws_major_version, ws_minor_version, ws_micro_version; -+ int major, minor, micro; -+ char **tmp_version; -+ -+ tmp_version = (char *) strdup("$min_wireshark_version"); -+ major = 0; -+ minor = 0; -+ micro = 0; -+ sscanf(tmp_version, "%d.%d.%d", &major, &minor, µ); -+ free(tmp_version); -+ tmp_version = (char *) epan_get_version(); -+ sscanf(tmp_version, "%d.%d.%d", -+ &ws_major_version, &ws_minor_version, &ws_micro_version); -+ -+ if (ws_major_version > major || -+ (ws_major_version == major && ws_minor_version > minor) || -+ (ws_major_version == major && ws_minor_version == minor && -+ ws_micro_version >= micro)) -+ return 0; -+ -+ printf("\n*** An old version of wireshark (%d.%d.%d) was found.\n", -+ ws_major_version, ws_minor_version, ws_micro_version); -+ printf("*** You need a version of wireshark not older than %d.%d.%d. ", -+ major, minor, micro); -+ return 1; -+} -+ ], wireshark_found=yes) -+ fi -+ -+ if test "$wireshark_found" != no; then -+ AC_LANG_PUSH(C) -+ AC_LINK_IFELSE([AC_LANG_PROGRAM([ -+#include -+#include -+#include -+#include -+#include -+#include -+], [puts(epan_get_version());])], [WIRESHARK_VERSION=`./conftest$ac_exeext`], -+wireshark_found=no) -+ -+ AC_LANG_POP -+ fi -+ -+ CFLAGS="$ac_save_CFLAGS" -+ LIBS="$ac_save_LIBS" -+ -+ if test "$wireshark_found" != no; then -+ AC_MSG_RESULT(yes) -+ ifelse([$2],, :, [$2]) -+ else -+ AC_MSG_RESULT(no) -+ WIRESHARK_CFLAGS="" -+ WIRESHARK_LIBS="" -+ WIRESHARK_VERSION="" -+ ifelse([$3], , :, [$3]) -+ fi -+ AC_SUBST(WIRESHARK_CFLAGS) -+ AC_SUBST(WIRESHARK_LIBS) -+ AC_SUBST(WIRESHARK_VERSION) -+]) diff --git a/wireshark-0005-Fix-paths-in-a-wireshark.desktop-file.patch b/wireshark-0005-Fix-paths-in-a-wireshark.desktop-file.patch new file mode 100644 index 0000000..a762194 --- /dev/null +++ b/wireshark-0005-Fix-paths-in-a-wireshark.desktop-file.patch @@ -0,0 +1,20 @@ +From: Kenneth Soerensen +Date: Wed, 29 Jan 2014 16:04:12 +0400 +Subject: [PATCH] Fix paths in a wireshark.desktop file + + +diff --git a/wireshark.desktop b/wireshark.desktop +index 669c6f1..f7df1f3 100644 +--- a/wireshark.desktop ++++ b/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=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: diff --git a/wireshark-0005-Restore-Fedora-specific-groups.patch b/wireshark-0005-Restore-Fedora-specific-groups.patch deleted file mode 100644 index 2cdf2ea..0000000 --- a/wireshark-0005-Restore-Fedora-specific-groups.patch +++ /dev/null @@ -1,15 +0,0 @@ -From: Peter Lemenkov -Date: Fri, 13 Sep 2013 14:36:55 +0400 -Subject: [PATCH] Restore Fedora-specific groups - -Signed-off-by: Peter Lemenkov -diff --git a/wireshark.desktop b/wireshark.desktop -index 334db48..669c6f1 100644 ---- a/wireshark.desktop -+++ b/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: - # http://standards.freedesktop.org/menu-spec/1.0/ --Categories=Network;Monitor;Qt; -+Categories=Application;Network;Monitor;Qt; diff --git a/wireshark-0006-Move-tmp-to-var-tmp.patch b/wireshark-0006-Move-tmp-to-var-tmp.patch new file mode 100644 index 0000000..2cb1b81 --- /dev/null +++ b/wireshark-0006-Move-tmp-to-var-tmp.patch @@ -0,0 +1,353 @@ +From cb54210f7f02b07768cfbf49ae266d487f580e1b Mon Sep 17 00:00:00 2001 +From: rpm-build +Date: Thu, 29 Jun 2017 15:32:58 +0200 +Subject: [PATCH] Move /tmp to /var/tmp + +Fedora is using tmpfs which is limited by the size of RAM, thus we need +to use different directory on different filesystem. +--- + ui/gtk/about_dlg.c | 3 +- + ui/qt/about_dialog.cpp | 3 +- + ui/qt/iax2_analysis_dialog.cpp | 5 +-- + ui/qt/rtp_analysis_dialog.cpp | 5 +-- + ui/qt/rtp_audio_stream.cpp | 3 +- + wsutil/Makefile.am | 6 ++-- + wsutil/tempfile.c | 9 +++--- + wsutil/tempfile.h | 4 +-- + wsutil/wstmpdir.c | 70 ++++++++++++++++++++++++++++++++++++++++++ + wsutil/wstmpdir.h | 39 +++++++++++++++++++++++ + 10 files changed, 132 insertions(+), 15 deletions(-) + create mode 100644 wsutil/wstmpdir.c + create mode 100644 wsutil/wstmpdir.h + +diff --git a/ui/gtk/about_dlg.c b/ui/gtk/about_dlg.c +index 22ca841..6bcb527 100644 +--- a/ui/gtk/about_dlg.c ++++ b/ui/gtk/about_dlg.c +@@ -28,6 +28,7 @@ + #include + + #include ++#include /* for get_tmp_dir() */ + #include + #include + #ifdef HAVE_LIBSMI +@@ -427,7 +428,7 @@ about_folders_page_new(void) + "capture files"); + + /* temp */ +- about_folders_row(table, "Temp", g_get_tmp_dir(), ++ about_folders_row(table, "Temp", get_tmp_dir(), + "untitled capture files"); + + /* pers conf */ +diff --git a/ui/qt/about_dialog.cpp b/ui/qt/about_dialog.cpp +index 31dc581..2f74285 100644 +--- a/ui/qt/about_dialog.cpp ++++ b/ui/qt/about_dialog.cpp +@@ -26,6 +26,7 @@ + + #include "wireshark_application.h" + #include ++#include /* for get_tmp_dir() */ + + #ifdef HAVE_LIBSMI + #include +@@ -204,7 +205,7 @@ AboutDialog::AboutDialog(QWidget *parent) : + message += about_folders_row("\"File\" dialogs", get_last_open_dir(), "capture files"); + + /* temp */ +- message += about_folders_row("Temp", g_get_tmp_dir(), "untitled capture files"); ++ message += about_folders_row("Temp", get_tmp_dir(), "untitled capture files"); + + /* pers conf */ + message += about_folders_row("Personal configuration", +diff --git a/ui/qt/iax2_analysis_dialog.cpp b/ui/qt/iax2_analysis_dialog.cpp +index ee4e5fd..fe17a95 100644 +--- a/ui/qt/iax2_analysis_dialog.cpp ++++ b/ui/qt/iax2_analysis_dialog.cpp +@@ -37,6 +37,7 @@ + #include "ui/rtp_stream.h" + #endif + #include ++#include /* for get_tmp_dir() */ + + #include + #include +@@ -271,10 +272,10 @@ 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 = QString("%1/wireshark_iax2_f").arg(QDir::tempPath()); ++ QString tempname = QString("%1/wireshark_iax2_f").arg(get_tmp_dir()); + fwd_tempfile_ = new QTemporaryFile(tempname, this); + fwd_tempfile_->open(); +- tempname = QString("%1/wireshark_iax2_r").arg(QDir::tempPath()); ++ tempname = QString("%1/wireshark_iax2_r").arg(get_tmp_dir()); + rev_tempfile_ = new QTemporaryFile(tempname, this); + rev_tempfile_->open(); + +diff --git a/ui/qt/rtp_analysis_dialog.cpp b/ui/qt/rtp_analysis_dialog.cpp +index 5d82e46..8008984 100644 +--- a/ui/qt/rtp_analysis_dialog.cpp ++++ b/ui/qt/rtp_analysis_dialog.cpp +@@ -37,6 +37,7 @@ + + #include + #include ++#include /* for get_tmp_dir() */ + + #include + #include +@@ -331,10 +332,10 @@ RtpAnalysisDialog::RtpAnalysisDialog(QWidget &parent, CaptureFile &cf, struct _r + + // We keep our temp files open for the lifetime of the dialog. The GTK+ + // UI opens and closes at various points. +- QString tempname = QString("%1/wireshark_rtp_f").arg(QDir::tempPath()); ++ QString tempname = QString("%1/wireshark_rtp_f").arg(get_tmp_dir()); + fwd_tempfile_ = new QTemporaryFile(tempname, this); + fwd_tempfile_->open(); +- tempname = QString("%1/wireshark_rtp_r").arg(QDir::tempPath()); ++ tempname = QString("%1/wireshark_rtp_r").arg(get_tmp_dir()); + rev_tempfile_ = new QTemporaryFile(tempname, this); + rev_tempfile_->open(); + +diff --git a/ui/qt/rtp_audio_stream.cpp b/ui/qt/rtp_audio_stream.cpp +index fde66c8..b9531d2 100644 +--- a/ui/qt/rtp_audio_stream.cpp ++++ b/ui/qt/rtp_audio_stream.cpp +@@ -37,6 +37,7 @@ + #include + + #include ++#include /* for get_tmp_dir() */ + + #include + #include +@@ -76,7 +77,7 @@ RtpAudioStream::RtpAudioStream(QObject *parent, _rtp_stream_info *rtp_stream) : + visual_sample_rate_, SPEEX_RESAMPLER_QUALITY_MIN, NULL); + speex_resampler_skip_zeros(visual_resampler_); + +- QString tempname = QString("%1/wireshark_rtp_stream").arg(QDir::tempPath()); ++ QString tempname = QString("%1/wireshark_rtp_stream").arg(get_tmp_dir()); + tempfile_ = new QTemporaryFile(tempname, this); + tempfile_->open(); + +diff --git a/wsutil/Makefile.am b/wsutil/Makefile.am +index 2af1b6c..aa149a2 100644 +--- a/wsutil/Makefile.am ++++ b/wsutil/Makefile.am +@@ -91,7 +91,8 @@ libwsutil_nonrepl_INCLUDES = \ + ws_mempbrk.h \ + ws_mempbrk_int.h \ + ws_printf.h \ +- wsjsmn.h ++ wsjsmn.h \ ++ wstmpdir.h + + # Header files for functions in libwsutil's ABI on this platform. + libwsutil_abi_INCLUDES = \ +@@ -155,7 +156,8 @@ libwsutil_la_SOURCES = \ + unicode-utils.c \ + ws_mempbrk.c \ + wsgcrypt.c \ +- wsjsmn.c ++ wsjsmn.c \ ++ wstmpdir.c + + if HAVE_MACOS_FRAMEWORKS + libwsutil_la_SOURCES += cfutils.c cfutils.h +diff --git a/wsutil/tempfile.c b/wsutil/tempfile.c +index 8e1f8dc..dcf2f78 100644 +--- a/wsutil/tempfile.c ++++ b/wsutil/tempfile.c +@@ -36,6 +36,7 @@ + + #include "tempfile.h" + #include ++#include /* for get_tmp_dir() */ + + #ifndef __set_errno + #define __set_errno(x) errno=(x) +@@ -142,7 +143,7 @@ mkdtemp (char *path_template) + */ + char *get_tempfile_path(const char *filename) + { +- return g_strdup_printf("%s" G_DIR_SEPARATOR_S "%s", g_get_tmp_dir(), filename); ++ return g_strdup_printf("%s" G_DIR_SEPARATOR_S "%s", get_tmp_dir(), filename); + } + + #define MAX_TEMPFILES 3 +@@ -199,7 +200,7 @@ create_tempfile(char **namebuf, const char *pfx, const char *sfx) + tf[idx].path = (char *)g_malloc(tf[idx].len); + } + +- tmp_dir = g_get_tmp_dir(); ++ tmp_dir = get_tmp_dir(); + + #ifdef _WIN32 + _tzset(); +@@ -237,7 +238,7 @@ create_tempfile(char **namebuf, const char *pfx, const char *sfx) + + /** + * Create a directory with the given prefix (e.g. "wireshark"). The path +- * is created using g_get_tmp_dir and mkdtemp. ++ * is created using get_tmp_dir and mkdtemp. + * + * @param namebuf + * @param pfx A prefix for the temporary directory. +@@ -265,7 +266,7 @@ create_tempdir(char **namebuf, const char *pfx) + /* + * We can't use get_tempfile_path here because we're called from dumpcap.c. + */ +- tmp_dir = g_get_tmp_dir(); ++ tmp_dir = get_tmp_dir(); + + while (g_snprintf(td_path[idx], td_path_len[idx], "%s%c%s" TMP_FILE_SUFFIX, tmp_dir, G_DIR_SEPARATOR, pfx) > td_path_len[idx]) { + td_path_len[idx] *= 2; +diff --git a/wsutil/tempfile.h b/wsutil/tempfile.h +index 1dca2df..bb3160c 100644 +--- a/wsutil/tempfile.h ++++ b/wsutil/tempfile.h +@@ -45,7 +45,7 @@ WS_DLL_PUBLIC char *get_tempfile_path(const char *filename); + + /** + * Create a tempfile with the given prefix (e.g. "wireshark"). The path +- * is created using g_get_tmp_dir and mkstemp. ++ * is created using get_tmp_dir and mkstemp. + * + * @param namebuf [in,out] If not NULL, receives the full path of the temp file. + * Must NOT be freed. +@@ -58,7 +58,7 @@ WS_DLL_PUBLIC int create_tempfile(char **namebuf, const char *pfx, const char *s + + /** + * Create a directory with the given prefix (e.g. "wireshark"). The path +- * is created using g_get_tmp_dir and mkdtemp. ++ * is created using get_tmp_dir and mkdtemp. + * + * @param namebuf If not NULL, receives the full path of the temp directory. + * Must NOT be freed. +diff --git a/wsutil/wstmpdir.c b/wsutil/wstmpdir.c +new file mode 100644 +index 0000000..d8b733b +--- /dev/null ++++ b/wsutil/wstmpdir.c +@@ -0,0 +1,70 @@ ++/* 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 ++ */ ++ ++#include "config.h" ++ ++#include ++#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'; ++ } ++#endif /* P_tmpdir */ ++ ++ if (tmp == NULL || *tmp == '\0') { ++ g_free(tmp); ++ tmp = g_strdup("/var/tmp"); ++ } ++ ++ g_once_init_leave(&tmp_dir, tmp); ++ } ++ ++ return tmp_dir; ++} +diff --git a/wsutil/wstmpdir.h b/wsutil/wstmpdir.h +new file mode 100644 +index 0000000..07ac583 +--- /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 ++ */ ++ ++#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.13.0 + diff --git a/wireshark-0008-move-default-temporary-directory-to-var-tmp.patch b/wireshark-0008-move-default-temporary-directory-to-var-tmp.patch deleted file mode 100644 index c289969..0000000 --- a/wireshark-0008-move-default-temporary-directory-to-var-tmp.patch +++ /dev/null @@ -1,358 +0,0 @@ -commit 26725d2cdac4bca0f779cf6fbbcd96a00912d1b9 -Author: Peter Hatina -Date: Tue Jan 12 13:56:59 2016 +0100 - - Move default temporary directory to /var/tmp - -diff --git a/ui/gtk/about_dlg.c b/ui/gtk/about_dlg.c -index 06c1d9a..bf521f1 100644 ---- a/ui/gtk/about_dlg.c -+++ b/ui/gtk/about_dlg.c -@@ -29,6 +29,7 @@ - - #include - #include -+#include /* for get_tmp_dor() */ - #include - #ifdef HAVE_LIBSMI - #include -@@ -421,7 +422,7 @@ about_folders_page_new(void) - "capture files"); - - /* temp */ -- about_folders_row(table, "Temp", g_get_tmp_dir(), -+ about_folders_row(table, "Temp", get_tmp_dir(), - "untitled capture files"); - - /* pers conf */ -diff --git a/ui/gtk/proto_help.c b/ui/gtk/proto_help.c -index 8632feb..dc9a2a0 100644 ---- a/ui/gtk/proto_help.c -+++ b/ui/gtk/proto_help.c -@@ -37,6 +37,8 @@ - #include "../../file.h" - - -+#include /* for get_tmp_dir() */ -+ - #include "ui/gtk/proto_help.h" - - /* -@@ -155,7 +157,7 @@ void proto_help_init(void) - /* Start loop */ - - #ifdef PH_DEBUG_LOG -- ph_log_path = g_strdup_printf("%s" G_DIR_SEPARATOR_S "%s", g_get_tmp_dir(), PH_FILE_LOG); -+ ph_log_path = g_strdup_printf("%s" G_DIR_SEPARATOR_S "%s", get_tmp_dir(), PH_FILE_LOG); - #endif - - for (i = 0; i < PH_CONF_DIRS; i++) { -diff --git a/ui/qt/about_dialog.cpp b/ui/qt/about_dialog.cpp -index 733fc55..a1068cd 100644 ---- a/ui/qt/about_dialog.cpp -+++ b/ui/qt/about_dialog.cpp -@@ -49,6 +49,7 @@ - #include "file.h" - #include "wsutil/file_util.h" - #include "wsutil/tempfile.h" -+#include "wsutil/wstmpdir.h" /* for get_tmp_dir() */ - #include "wsutil/plugins.h" - #include "wsutil/copyright_info.h" - #include "ws_version_info.h" -@@ -213,7 +214,7 @@ AboutDialog::AboutDialog(QWidget *parent) : - message += about_folders_row("\"File\" dialogs", get_last_open_dir(), "capture files"); - - /* temp */ -- message += about_folders_row("Temp", g_get_tmp_dir(), "untitled capture files"); -+ message += about_folders_row("Temp", get_tmp_dir(), "untitled capture files"); - - /* pers conf */ - message += about_folders_row("Personal configuration", -diff --git a/ui/qt/iax2_analysis_dialog.cpp b/ui/qt/iax2_analysis_dialog.cpp -index eb76952..bb815f6 100644 ---- a/ui/qt/iax2_analysis_dialog.cpp -+++ b/ui/qt/iax2_analysis_dialog.cpp -@@ -41,6 +41,8 @@ - #include - #include - -+#include /* for get_tmp_dir() */ -+ - #include - #include - #include -@@ -271,10 +273,10 @@ 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 = QString("%1/wireshark_iax2_f").arg(QDir::tempPath()); -+ QString tempname = QString("%1/wireshark_iax2_f").arg(get_tmp_dir()); - fwd_tempfile_ = new QTemporaryFile(tempname, this); - fwd_tempfile_->open(); -- tempname = QString("%1/wireshark_iax2_r").arg(QDir::tempPath()); -+ tempname = QString("%1/wireshark_iax2_r").arg(get_tmp_dir()); - rev_tempfile_ = new QTemporaryFile(tempname, this); - rev_tempfile_->open(); - -diff --git a/ui/qt/rtp_analysis_dialog.cpp b/ui/qt/rtp_analysis_dialog.cpp -index e12da20..87be751 100644 ---- a/ui/qt/rtp_analysis_dialog.cpp -+++ b/ui/qt/rtp_analysis_dialog.cpp -@@ -38,6 +38,8 @@ - #include - #include - -+#include /* for get_tmp_dir() */ -+ - #include - #include - #include -@@ -323,10 +325,10 @@ RtpAnalysisDialog::RtpAnalysisDialog(QWidget &parent, CaptureFile &cf, struct _r - - // We keep our temp files open for the lifetime of the dialog. The GTK+ - // UI opens and closes at various points. -- QString tempname = QString("%1/wireshark_rtp_f").arg(QDir::tempPath()); -+ QString tempname = QString("%1/wireshark_rtp_f").arg(get_tmp_dir()); - fwd_tempfile_ = new QTemporaryFile(tempname, this); - fwd_tempfile_->open(); -- tempname = QString("%1/wireshark_rtp_r").arg(QDir::tempPath()); -+ tempname = QString("%1/wireshark_rtp_r").arg(get_tmp_dir()); - rev_tempfile_ = new QTemporaryFile(tempname, this); - rev_tempfile_->open(); - -diff --git a/ui/qt/rtp_audio_stream.cpp b/ui/qt/rtp_audio_stream.cpp -index 7bd072e..db9bd85 100644 ---- a/ui/qt/rtp_audio_stream.cpp -+++ b/ui/qt/rtp_audio_stream.cpp -@@ -37,6 +37,7 @@ - #include - - #include -+#include /* for get_tmp_dir() */ - - #include - #include -@@ -75,7 +76,7 @@ RtpAudioStream::RtpAudioStream(QObject *parent, _rtp_stream_info *rtp_stream) : - visual_sample_rate_, SPEEX_RESAMPLER_QUALITY_MIN, NULL); - speex_resampler_skip_zeros(visual_resampler_); - -- QString tempname = QString("%1/wireshark_rtp_stream").arg(QDir::tempPath()); -+ QString tempname = QString("%1/wireshark_rtp_stream").arg(get_tmp_dir()); - tempfile_ = new QTemporaryFile(tempname, this); - tempfile_->open(); - -diff --git a/wsutil/Makefile.am b/wsutil/Makefile.am -index 95c57d2..acd7837 100644 ---- a/wsutil/Makefile.am -+++ b/wsutil/Makefile.am -@@ -90,7 +90,8 @@ - ws_cpuid.h \ - ws_mempbrk.h \ - ws_mempbrk_int.h \ -- ws_printf.h -+ ws_printf.h \ -+ wstmpdir.h - - # Header files for functions in libwsutil's ABI on this platform. - libwsutil_abi_INCLUDES = \ -@@ -154,7 +155,8 @@ libwsutil_la_SOURCES = \ - time_util.c \ - type_util.c \ - unicode-utils.c \ -- ws_mempbrk.c -+ ws_mempbrk.c \ -+ wstmpdir.c - - if HAVE_OS_X_FRAMEWORKS - libwsutil_la_SOURCES += cfutils.c cfutils.h -diff --git a/wsutil/tempfile.c b/wsutil/tempfile.c -index 7391fbf..9add952 100644 ---- a/wsutil/tempfile.c -+++ b/wsutil/tempfile.c -@@ -36,6 +36,7 @@ - - #include "tempfile.h" - #include -+#include /* for get_tmp_dir() */ - - #ifndef __set_errno - #define __set_errno(x) errno=(x) -@@ -142,7 +143,7 @@ mkdtemp (char *path_template) - */ - char *get_tempfile_path(const char *filename) - { -- return g_strdup_printf("%s" G_DIR_SEPARATOR_S "%s", g_get_tmp_dir(), filename); -+ return g_strdup_printf("%s" G_DIR_SEPARATOR_S "%s", get_tmp_dir(), filename); - } - - #define MAX_TEMPFILES 3 -@@ -198,7 +199,7 @@ create_tempfile(char **namebuf, const char *pfx, const char *sfx) - tf[idx].path = (char *)g_malloc(tf[idx].len); - } - -- tmp_dir = g_get_tmp_dir(); -+ tmp_dir = get_tmp_dir(); - - #ifdef _WIN32 - _tzset(); -@@ -232,7 +233,7 @@ create_tempfile(char **namebuf, const char *pfx, const char *sfx) - - /** - * Create a directory with the given prefix (e.g. "wireshark"). The path -- * is created using g_get_tmp_dir and mkdtemp. -+ * is created using get_tmp_dir and mkdtemp. - * - * @param namebuf - * @param pfx A prefix for the temporary directory. -@@ -260,7 +261,7 @@ create_tempdir(char **namebuf, const char *pfx) - /* - * We can't use get_tempfile_path here because we're called from dumpcap.c. - */ -- tmp_dir = g_get_tmp_dir(); -+ tmp_dir = get_tmp_dir(); - - while (g_snprintf(td_path[idx], td_path_len[idx], "%s%c%s" TMP_FILE_SUFFIX, tmp_dir, G_DIR_SEPARATOR, pfx) > td_path_len[idx]) { - td_path_len[idx] *= 2; -diff --git a/wsutil/tempfile.h b/wsutil/tempfile.h -index 1dca2df..bb3160c 100644 ---- a/wsutil/tempfile.h -+++ b/wsutil/tempfile.h -@@ -45,7 +45,7 @@ WS_DLL_PUBLIC char *get_tempfile_path(const char *filename); - - /** - * Create a tempfile with the given prefix (e.g. "wireshark"). The path -- * is created using g_get_tmp_dir and mkstemp. -+ * is created using get_tmp_dir and mkstemp. - * - * @param namebuf [in,out] If not NULL, receives the full path of the temp file. - * Must NOT be freed. -@@ -58,7 +58,7 @@ WS_DLL_PUBLIC int create_tempfile(char **namebuf, const char *pfx, const char *s - - /** - * Create a directory with the given prefix (e.g. "wireshark"). The path -- * is created using g_get_tmp_dir and mkdtemp. -+ * is created using get_tmp_dir and mkdtemp. - * - * @param namebuf If not NULL, receives the full path of the temp directory. - * Must NOT be freed. -diff --git a/wsutil/wstmpdir.c b/wsutil/wstmpdir.c -new file mode 100644 -index 0000000..d8b733b ---- /dev/null -+++ b/wsutil/wstmpdir.c -@@ -0,0 +1,70 @@ -+/* 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 -+ */ -+ -+#include "config.h" -+ -+#include -+#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'; -+ } -+#endif /* P_tmpdir */ -+ -+ if (tmp == NULL || *tmp == '\0') { -+ g_free(tmp); -+ tmp = g_strdup("/var/tmp"); -+ } -+ -+ g_once_init_leave(&tmp_dir, tmp); -+ } -+ -+ return tmp_dir; -+} -diff --git a/wsutil/wstmpdir.h b/wsutil/wstmpdir.h -new file mode 100644 -index 0000000..021b615 ---- /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 -+ */ -+ -+#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 // __WS_TMP_DIR_H__ diff --git a/wireshark-0009-Fix-paths-in-a-wireshark.desktop-file.patch b/wireshark-0009-Fix-paths-in-a-wireshark.desktop-file.patch deleted file mode 100644 index a762194..0000000 --- a/wireshark-0009-Fix-paths-in-a-wireshark.desktop-file.patch +++ /dev/null @@ -1,20 +0,0 @@ -From: Kenneth Soerensen -Date: Wed, 29 Jan 2014 16:04:12 +0400 -Subject: [PATCH] Fix paths in a wireshark.desktop file - - -diff --git a/wireshark.desktop b/wireshark.desktop -index 669c6f1..f7df1f3 100644 ---- a/wireshark.desktop -+++ b/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=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: diff --git a/wireshark-0010-Patch-fixing-the-wireshark-autoconf-macros.patch b/wireshark-0010-Patch-fixing-the-wireshark-autoconf-macros.patch deleted file mode 100644 index 162f11f..0000000 --- a/wireshark-0010-Patch-fixing-the-wireshark-autoconf-macros.patch +++ /dev/null @@ -1,41 +0,0 @@ -From: Patrick Monnerat -Date: Fri, 23 Oct 2015 11:23:11 -0400 -Subject: [PATCH] Patch fixing the wireshark autoconf macros. - -When configuring a project using a wireshark detection macro on a 64-bit -system, the detection fails because a configuration test program -crashes. - -epan/epan.h include is missing in configuration test program. This is -needed to define epan_get_version() as char *. Failure to doing so uses -a 32-bit integer as a string address --> segfault. - -diff --git a/wireshark-autoconf.m4 b/wireshark-autoconf.m4 -index d8015d8..6d7b177 100644 ---- a/wireshark-autoconf.m4 -+++ b/wireshark-autoconf.m4 -@@ -33,6 +33,7 @@ AC_DEFUN([AM_PATH_WIRESHARK],[ - #include - #include - #include -+#include - - int - main() -@@ -40,7 +41,7 @@ main() - { - int ws_major_version, ws_minor_version, ws_micro_version; - int major, minor, micro; -- char **tmp_version; -+ char *tmp_version; - - tmp_version = (char *) strdup("$min_wireshark_version"); - major = 0; -@@ -76,6 +77,7 @@ main() - #include - #include - #include -+#include - ], [puts(epan_get_version());])], [WIRESHARK_VERSION=`./conftest$ac_exeext`], - wireshark_found=no) - diff --git a/wireshark.spec b/wireshark.spec index 25a015f..0ddb4ed 100644 --- a/wireshark.spec +++ b/wireshark.spec @@ -4,13 +4,13 @@ Summary: Network traffic analyzer Name: wireshark -Version: 2.2.7 +Version: 2.4.0rc2 Release: 1%{?dist} License: GPL+ Group: Applications/Internet Url: http://www.wireshark.org/ -Source0: http://wireshark.org/download/src/%{name}-%{version}.tar.bz2 +Source0: https://wireshark.org/download/src/%{name}-%{version}.tar.xz Source1: 90-wireshark-usbmon.rules Requires: %{name}-cli = %{version}-%{release} @@ -22,16 +22,12 @@ Patch1: wireshark-0001-enable-Lua-support.patch Patch2: wireshark-0002-Customize-permission-denied-error.patch # Will be proposed upstream Patch3: wireshark-0003-fix-string-overrun-in-plugins-profinet.patch -# Will be proposed upstream -Patch4: wireshark-0004-adds-autoconf-macro-file.patch # Fedora-specific -Patch5: wireshark-0005-Restore-Fedora-specific-groups.patch +Patch4: wireshark-0004-Restore-Fedora-specific-groups.patch # Fedora-specific -Patch8: wireshark-0008-move-default-temporary-directory-to-var-tmp.patch +Patch5: wireshark-0005-Fix-paths-in-a-wireshark.desktop-file.patch # Fedora-specific -Patch9: wireshark-0009-Fix-paths-in-a-wireshark.desktop-file.patch -# Fedora-specific, see https://bugzilla.redhat.com/1274831 -Patch10: wireshark-0010-Patch-fixing-the-wireshark-autoconf-macros.patch +Patch6: wireshark-0006-Move-tmp-to-var-tmp.patch BuildRequires: bzip2-devel BuildRequires: c-ares-devel @@ -328,22 +324,25 @@ update-mime-database %{?fedora:-n} %{_datadir}/mime &> /dev/null || : %files cli %license COPYING %doc AUTHORS INSTALL NEWS README* -%{_bindir}/editcap -%{_bindir}/tshark -%{_bindir}/mergecap -%{_bindir}/text2pcap -%{_bindir}/dftest %{_bindir}/capinfos %{_bindir}/captype +%{_bindir}/dftest +%{_bindir}/editcap +%{_bindir}/mergecap %{_bindir}/randpkt %{_bindir}/reordercap +%{_bindir}/sharkd +%{_bindir}/text2pcap +%{_bindir}/tshark %attr(0750, root, wireshark) %caps(cap_net_raw,cap_net_admin=ep) %{_bindir}/dumpcap %{_bindir}/rawshark %{_udevrulesdir}/90-wireshark-usbmon.rules %{python2_sitearch}/*.py* %{_libdir}/lib*.so.* %dir %{_libdir}/wireshark +%dir %{_libdir}/wireshark/extcap %dir %{_libdir}/wireshark/plugins +%{_libdir}/wireshark/extcap/udpdump %{_libdir}/wireshark/plugins/*.so %{_mandir}/man1/editcap.* %{_mandir}/man1/tshark.* @@ -368,7 +367,6 @@ update-mime-database %{?fedora:-n} %{_datadir}/mime &> /dev/null || : %{_datadir}/applications/wireshark-gtk.desktop %{_datadir}/icons/hicolor/*/apps/* %{_datadir}/icons/hicolor/*/mimetypes/* -%{_datadir}/icons/hicolor/scalable/apps/wireshark.svg %{_datadir}/mime/packages/wireshark.xml %{_bindir}/wireshark-gtk %{_mandir}/man1/wireshark.* @@ -379,7 +377,6 @@ update-mime-database %{?fedora:-n} %{_datadir}/mime &> /dev/null || : %{_datadir}/applications/wireshark.desktop %{_datadir}/icons/hicolor/*/apps/* %{_datadir}/icons/hicolor/*/mimetypes/* -%{_datadir}/icons/hicolor/scalable/apps/wireshark.svg %{_datadir}/mime/packages/wireshark.xml %{_bindir}/wireshark-qt %{_mandir}/man1/wireshark.* @@ -395,6 +392,9 @@ update-mime-database %{?fedora:-n} %{_datadir}/mime &> /dev/null || : %{_libdir}/pkgconfig/%{name}.pc %changelog +* Thu Jun 29 2017 Martin Sehnoutka - 2.4.0rc2-1 +- New upstream version + * Mon Jun 12 2017 Martin Sehnoutka - 2.2.7-1 - New upstream release 2.2.7