Upstream release 2.4.0rc2

This commit is contained in:
Martin Sehnoutka 2017-06-29 10:53:33 +02:00
parent 288d9022a0
commit 4cab850339
8 changed files with 88 additions and 246 deletions

1
.gitignore vendored
View File

@ -1 +1,2 @@
/wireshark-*.tar.bz2
/wireshark-*.tar.xz

View File

@ -1 +1 @@
SHA512 (wireshark-2.2.7.tar.bz2) = 417836810eb895b3f2a6ac1cfd138fb0275382ea2edc60fc5f5e5f8ce433b56b8120aa8b58b4f77296986630fdf49e4c5c3859b2c2c5e26b1ce0651393b7d716
SHA512 (wireshark-2.4.0rc2.tar.xz) = 2df36aa6465256d63d95e69137a9e8bb828940c629dacec5afc4f9ceab158bd023d006bf5c44a50e7f6d1d94d704a7c5f7ecf4bf5d34ddfcb9af9ca1abd7887d

View File

@ -1,113 +0,0 @@
From: =?UTF-8?q?Radek=20Vok=C3=A1l?= <rvokal@fedoraproject.org>
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 <stdlib.h>
+#include <stdio.h>
+#include <string.h>
+#include <gmodule.h>
+#include <epan/packet.h>
+#include <epan/prefs.h>
+
+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, &micro);
+ 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 <stdlib.h>
+#include <stdio.h>
+#include <string.h>
+#include <gmodule.h>
+#include <epan/packet.h>
+#include <epan/prefs.h>
+], [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)
+])

View File

@ -1,22 +1,38 @@
commit 26725d2cdac4bca0f779cf6fbbcd96a00912d1b9
Author: Peter Hatina <phatina@gmail.com>
Date: Tue Jan 12 13:56:59 2016 +0100
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
Move default temporary directory 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 06c1d9a..bf521f1 100644
index 22ca841..6bcb527 100644
--- a/ui/gtk/about_dlg.c
+++ b/ui/gtk/about_dlg.c
@@ -29,6 +29,7 @@
@@ -28,6 +28,7 @@
#include <gtk/gtk.h>
#include <wsutil/filesystem.h>
+#include <wsutil/wstmpdir.h> /* for get_tmp_dir() */
#include <wsutil/copyright_info.h>
+#include <wsutil/wstmpdir.h> /* for get_tmp_dor() */
#include <ws_version_info.h>
#ifdef HAVE_LIBSMI
#include <epan/oids.h>
@@ -421,7 +422,7 @@ about_folders_page_new(void)
@@ -427,7 +428,7 @@ about_folders_page_new(void)
"capture files");
/* temp */
@ -25,41 +41,19 @@ index 06c1d9a..bf521f1 100644
"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 <wsutil/wstmpdir.h> /* 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
index 31dc581..2f74285 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) :
@@ -26,6 +26,7 @@
#include "wireshark_application.h"
#include <wsutil/filesystem.h>
+#include <wsutil/wstmpdir.h> /* for get_tmp_dir() */
#ifdef HAVE_LIBSMI
#include <epan/oids.h>
@@ -204,7 +205,7 @@ AboutDialog::AboutDialog(QWidget *parent) :
message += about_folders_row("\"File\" dialogs", get_last_open_dir(), "capture files");
/* temp */
@ -69,19 +63,18 @@ index 733fc55..a1068cd 100644
/* 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
index ee4e5fd..fe17a95 100644
--- a/ui/qt/iax2_analysis_dialog.cpp
+++ b/ui/qt/iax2_analysis_dialog.cpp
@@ -41,6 +41,8 @@
@@ -37,6 +37,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>
+#include <wsutil/wstmpdir.h> /* for get_tmp_dir() */
+
#include <QFileDialog>
#include <QMessageBox>
#include <QPushButton>
@@ -271,10 +273,10 @@ Iax2AnalysisDialog::Iax2AnalysisDialog(QWidget &parent, CaptureFile &cf) :
@@ -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.
@ -95,19 +88,18 @@ index eb76952..bb815f6 100644
rev_tempfile_->open();
diff --git a/ui/qt/rtp_analysis_dialog.cpp b/ui/qt/rtp_analysis_dialog.cpp
index e12da20..87be751 100644
index 5d82e46..8008984 100644
--- a/ui/qt/rtp_analysis_dialog.cpp
+++ b/ui/qt/rtp_analysis_dialog.cpp
@@ -38,6 +38,8 @@
@@ -37,6 +37,7 @@
#include <wsutil/g711.h>
#include <wsutil/pint.h>
+#include <wsutil/wstmpdir.h> /* for get_tmp_dir() */
+
#include <QFileDialog>
#include <QMessageBox>
#include <QPushButton>
@@ -323,10 +325,10 @@ RtpAnalysisDialog::RtpAnalysisDialog(QWidget &parent, CaptureFile &cf, struct _r
@@ -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.
@ -121,7 +113,7 @@ index e12da20..87be751 100644
rev_tempfile_->open();
diff --git a/ui/qt/rtp_audio_stream.cpp b/ui/qt/rtp_audio_stream.cpp
index 7bd072e..db9bd85 100644
index fde66c8..b9531d2 100644
--- a/ui/qt/rtp_audio_stream.cpp
+++ b/ui/qt/rtp_audio_stream.cpp
@@ -37,6 +37,7 @@
@ -132,7 +124,7 @@ index 7bd072e..db9bd85 100644
#include <QAudioFormat>
#include <QAudioOutput>
@@ -75,7 +76,7 @@ RtpAudioStream::RtpAudioStream(QObject *parent, _rtp_stream_info *rtp_stream) :
@@ -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_);
@ -142,31 +134,31 @@ index 7bd072e..db9bd85 100644
tempfile_->open();
diff --git a/wsutil/Makefile.am b/wsutil/Makefile.am
index 95c57d2..acd7837 100644
index 2af1b6c..aa149a2 100644
--- a/wsutil/Makefile.am
+++ b/wsutil/Makefile.am
@@ -90,7 +90,8 @@
ws_cpuid.h \
@@ -91,7 +91,8 @@ libwsutil_nonrepl_INCLUDES = \
ws_mempbrk.h \
ws_mempbrk_int.h \
- ws_printf.h
+ ws_printf.h \
ws_printf.h \
- wsjsmn.h
+ wsjsmn.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 \
@@ -155,7 +156,8 @@ libwsutil_la_SOURCES = \
unicode-utils.c \
- ws_mempbrk.c
+ ws_mempbrk.c \
ws_mempbrk.c \
wsgcrypt.c \
- wsjsmn.c
+ wsjsmn.c \
+ wstmpdir.c
if HAVE_OS_X_FRAMEWORKS
if HAVE_MACOS_FRAMEWORKS
libwsutil_la_SOURCES += cfutils.c cfutils.h
diff --git a/wsutil/tempfile.c b/wsutil/tempfile.c
index 7391fbf..9add952 100644
index 8e1f8dc..dcf2f78 100644
--- a/wsutil/tempfile.c
+++ b/wsutil/tempfile.c
@@ -36,6 +36,7 @@
@ -186,7 +178,7 @@ index 7391fbf..9add952 100644
}
#define MAX_TEMPFILES 3
@@ -198,7 +199,7 @@ create_tempfile(char **namebuf, const char *pfx, const char *sfx)
@@ -199,7 +200,7 @@ create_tempfile(char **namebuf, const char *pfx, const char *sfx)
tf[idx].path = (char *)g_malloc(tf[idx].len);
}
@ -195,7 +187,7 @@ index 7391fbf..9add952 100644
#ifdef _WIN32
_tzset();
@@ -232,7 +233,7 @@ create_tempfile(char **namebuf, const char *pfx, const char *sfx)
@@ -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
@ -204,7 +196,7 @@ index 7391fbf..9add952 100644
*
* @param namebuf
* @param pfx A prefix for the temporary directory.
@@ -260,7 +261,7 @@ create_tempdir(char **namebuf, const char *pfx)
@@ -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.
*/
@ -313,7 +305,7 @@ index 0000000..d8b733b
+}
diff --git a/wsutil/wstmpdir.h b/wsutil/wstmpdir.h
new file mode 100644
index 0000000..021b615
index 0000000..07ac583
--- /dev/null
+++ b/wsutil/wstmpdir.h
@@ -0,0 +1,39 @@
@ -355,4 +347,7 @@ index 0000000..021b615
+}
+#endif // __cplusplus
+
+#endif // __WS_TMP_DIR_H__
+#endif
--
2.13.0

View File

@ -1,41 +0,0 @@
From: Patrick Monnerat <patrick.monnerat@dh.com>
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 <gmodule.h>
#include <epan/packet.h>
#include <epan/prefs.h>
+#include <epan/epan.h>
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 <gmodule.h>
#include <epan/packet.h>
#include <epan/prefs.h>
+#include <epan/epan.h>
], [puts(epan_get_version());])], [WIRESHARK_VERSION=`./conftest$ac_exeext`],
wireshark_found=no)

View File

@ -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 <msehnout@redhat.com> - 2.4.0rc2-1
- New upstream version
* Mon Jun 12 2017 Martin Sehnoutka <msehnout@redhat.com> - 2.2.7-1
- New upstream release 2.2.7