wireshark: bump to version 3.0.14 (#6478)

This commit is contained in:
davidkaroly
2021-12-18 22:38:20 +00:00
committed by GitHub
parent 6a9f577f95
commit 3e9f059b3e
3 changed files with 265 additions and 165 deletions

View File

@@ -1,150 +0,0 @@
From f5367bd9194891b76d91fcc9675f58866a3ab51b Mon Sep 17 00:00:00 2001
From: David Karoly <david.karoly@outlook.com>
Date: Tue, 2 Nov 2021 20:11:25 +0100
Subject: fix build with glib 2.68
diff --git a/caputils/capture_ifinfo.h b/caputils/capture_ifinfo.h
index 8e42b64..0e2c792 100644
--- a/caputils/capture_ifinfo.h
+++ b/caputils/capture_ifinfo.h
@@ -10,12 +10,12 @@
#ifndef __CAPTURE_IFINFO_H__
#define __CAPTURE_IFINFO_H__
+#include <glib.h>
+
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
-#include <glib.h>
-
typedef enum {
IF_WIRED,
IF_AIRPCAP,
diff --git a/epan/conversation.h b/epan/conversation.h
index cd8d416..cb7c62f 100644
--- a/epan/conversation.h
+++ b/epan/conversation.h
@@ -13,6 +13,8 @@
#include "ws_symbol_export.h"
+#include "packet.h" /* for conversation dissector type */
+
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
@@ -46,8 +48,6 @@ extern "C" {
/* Flags to handle endpoints */
#define USE_LAST_ENDPOINT 0x08 /* Use last endpoint created, regardless of type */
-#include "packet.h" /* for conversation dissector type */
-
/* Types of port numbers Wireshark knows about. */
typedef enum {
ENDPOINT_NONE, /* no endpoint */
diff --git a/epan/epan.h b/epan/epan.h
index 67e54dc..95f47f8 100644
--- a/epan/epan.h
+++ b/epan/epan.h
@@ -10,11 +10,12 @@
#ifndef __EPAN_H__
#define __EPAN_H__
+#include <glib.h>
+
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
-#include <glib.h>
#include <epan/tvbuff.h>
#include <epan/prefs.h>
#include <epan/frame_data.h>
diff --git a/epan/epan_dissect.h b/epan/epan_dissect.h
index 956a147..9279892 100644
--- a/epan/epan_dissect.h
+++ b/epan/epan_dissect.h
@@ -10,11 +10,12 @@
#ifndef EPAN_DISSECT_H
#define EPAN_DISSECT_H
+#include "epan.h"
+
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
-#include "epan.h"
#include "tvbuff.h"
#include "proto.h"
#include "packet_info.h"
diff --git a/epan/prefs.h b/epan/prefs.h
index 2147a70..1a621d9 100644
--- a/epan/prefs.h
+++ b/epan/prefs.h
@@ -11,12 +11,12 @@
#ifndef __PREFS_H__
#define __PREFS_H__
+#include <glib.h>
+
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
-#include <glib.h>
-
#include <epan/params.h>
#include <epan/range.h>
diff --git a/ui/recent.h b/ui/recent.h
index cfafcc6..a29b681 100644
--- a/ui/recent.h
+++ b/ui/recent.h
@@ -12,11 +12,12 @@
#ifndef __RECENT_H__
#define __RECENT_H__
+#include <glib.h>
+
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
-#include <glib.h>
#include <stdio.h>
#include "epan/timestamp.h"
#include "ui/ws_ui_util.h"
--
2.30.2
From b6c2f3657eb5e3fff7738a594285fcd526198fd3 Mon Sep 17 00:00:00 2001
From: David Karoly <david.karoly@outlook.com>
Date: Mon, 15 Nov 2021 10:26:33 +0000
Subject: use realpath in init_progfile_dir
diff --git a/wsutil/filesystem.c b/wsutil/filesystem.c
index 19ea4e4..ac9069f 100644
--- a/wsutil/filesystem.c
+++ b/wsutil/filesystem.c
@@ -630,6 +630,12 @@ init_progfile_dir(const char *arg0
}
}
+ static char buffer[PATH_MAX + 1];
+ char *res = realpath(prog_pathname, buffer);
+ if (res != NULL) {
+ prog_pathname = buffer;
+ }
+
/*
* OK, we have what we think is the pathname
* of the program.
--
2.30.2

View File

@@ -0,0 +1,253 @@
From c848e32cfcc8b3c188e42c5672c79dce8d3df1b6 Mon Sep 17 00:00:00 2001
From: David Karoly <david.karoly@outlook.com>
Date: Tue, 2 Nov 2021 20:11:25 +0100
Subject: fix build with glib 2.68
diff --git a/caputils/capture_ifinfo.h b/caputils/capture_ifinfo.h
index 83b020c..989576f 100644
--- a/caputils/capture_ifinfo.h
+++ b/caputils/capture_ifinfo.h
@@ -11,12 +11,12 @@
#ifndef __CAPTURE_IFINFO_H__
#define __CAPTURE_IFINFO_H__
+#include <glib.h>
+
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
-#include <glib.h>
-
/*
* Explicitly set the interface_type enum values as these values are exposed
* in the preferences gui.interfaces_hidden_types string.
diff --git a/epan/conversation.h b/epan/conversation.h
index cd8d416..cb7c62f 100644
--- a/epan/conversation.h
+++ b/epan/conversation.h
@@ -13,6 +13,8 @@
#include "ws_symbol_export.h"
+#include "packet.h" /* for conversation dissector type */
+
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
@@ -46,8 +48,6 @@ extern "C" {
/* Flags to handle endpoints */
#define USE_LAST_ENDPOINT 0x08 /* Use last endpoint created, regardless of type */
-#include "packet.h" /* for conversation dissector type */
-
/* Types of port numbers Wireshark knows about. */
typedef enum {
ENDPOINT_NONE, /* no endpoint */
diff --git a/epan/epan.h b/epan/epan.h
index 80d9b6f..66ddd57 100644
--- a/epan/epan.h
+++ b/epan/epan.h
@@ -10,11 +10,12 @@
#ifndef __EPAN_H__
#define __EPAN_H__
+#include <glib.h>
+
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
-#include <glib.h>
#include <epan/tvbuff.h>
#include <epan/prefs.h>
#include <epan/frame_data.h>
diff --git a/epan/epan_dissect.h b/epan/epan_dissect.h
index 956a147..9279892 100644
--- a/epan/epan_dissect.h
+++ b/epan/epan_dissect.h
@@ -10,11 +10,12 @@
#ifndef EPAN_DISSECT_H
#define EPAN_DISSECT_H
+#include "epan.h"
+
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
-#include "epan.h"
#include "tvbuff.h"
#include "proto.h"
#include "packet_info.h"
diff --git a/epan/prefs.h b/epan/prefs.h
index 9e31491..fdd7cb7 100644
--- a/epan/prefs.h
+++ b/epan/prefs.h
@@ -11,12 +11,12 @@
#ifndef __PREFS_H__
#define __PREFS_H__
+#include <glib.h>
+
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
-#include <glib.h>
-
#include <epan/params.h>
#include <epan/range.h>
diff --git a/ui/recent.h b/ui/recent.h
index 9757dda..47f123f 100644
--- a/ui/recent.h
+++ b/ui/recent.h
@@ -12,11 +12,12 @@
#ifndef __RECENT_H__
#define __RECENT_H__
+#include <glib.h>
+
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
-#include <glib.h>
#include <stdio.h>
#include "epan/timestamp.h"
#include "ui/ws_ui_util.h"
--
2.30.2
From b8639c84fdc28707a6cb52a8178f349a27caff88 Mon Sep 17 00:00:00 2001
From: David Karoly <david.karoly@outlook.com>
Date: Mon, 15 Nov 2021 10:26:33 +0000
Subject: use realpath in init_progfile_dir
diff --git a/wsutil/filesystem.c b/wsutil/filesystem.c
index 2ca9247..96a62cb 100644
--- a/wsutil/filesystem.c
+++ b/wsutil/filesystem.c
@@ -650,6 +650,12 @@ init_progfile_dir(const char *arg0
}
}
+ static char buffer[PATH_MAX + 1];
+ char *res = realpath(prog_pathname, buffer);
+ if (res != NULL) {
+ prog_pathname = buffer;
+ }
+
/*
* OK, we have what we think is the pathname
* of the program.
--
2.30.2
From 9503f602e1c201ebf2e4e35b47aa5701d0066567 Mon Sep 17 00:00:00 2001
From: David Karoly <david.karoly@outlook.com>
Date: Thu, 25 Nov 2021 18:24:45 +0000
Subject: remove prefix from PLUGIN_DIR, EXTCAP_DIR, DATA_DIR as they already
contain full path
diff --git a/wsutil/CMakeLists.txt b/wsutil/CMakeLists.txt
index 092746f..68fe4f2 100644
--- a/wsutil/CMakeLists.txt
+++ b/wsutil/CMakeLists.txt
@@ -9,9 +9,9 @@
include(UseABICheck)
-add_definitions(-DPLUGIN_DIR=\"${CMAKE_INSTALL_PREFIX}/${PLUGIN_INSTALL_LIBDIR}\")
-add_definitions(-DEXTCAP_DIR=\"${CMAKE_INSTALL_PREFIX}/${EXTCAP_INSTALL_LIBDIR}\")
-add_definitions(-DDATA_DIR=\"${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_DATADIR}\")
+add_definitions(-DPLUGIN_DIR=\"${PLUGIN_INSTALL_LIBDIR}\")
+add_definitions(-DEXTCAP_DIR=\"${EXTCAP_INSTALL_LIBDIR}\")
+add_definitions(-DDATA_DIR=\"${CMAKE_INSTALL_DATADIR}\")
set(WSUTIL_PUBLIC_HEADERS
adler32.h
--
2.30.2
From 81d7c16ca46cbdd3d2ace962cec20e09fbca1c6f Mon Sep 17 00:00:00 2001
From: David Karoly <david.karoly@outlook.com>
Date: Thu, 25 Nov 2021 18:41:24 +0000
Subject: adjust get_systemfile_dir for Haiku
diff --git a/wsutil/filesystem.c b/wsutil/filesystem.c
index 96a62cb..802b89f 100644
--- a/wsutil/filesystem.c
+++ b/wsutil/filesystem.c
@@ -1143,6 +1143,8 @@ get_systemfile_dir(void)
{
#ifdef _WIN32
return get_datafile_dir();
+#elif __HAIKU__
+ return "/boot/system/settings/etc";
#else
return "/etc";
#endif
--
2.30.2
From 3c9bf86e312c2fd0bcde539490aa41b06a0fbae1 Mon Sep 17 00:00:00 2001
From: David Karoly <david.karoly@outlook.com>
Date: Sun, 5 Dec 2021 21:19:38 +0000
Subject: adjust user dirs for Haiku
diff --git a/wsutil/filesystem.c b/wsutil/filesystem.c
index 802b89f..42d363b 100644
--- a/wsutil/filesystem.c
+++ b/wsutil/filesystem.c
@@ -38,6 +38,10 @@
#endif
#include <pwd.h>
#endif /* _WIN32 */
+#ifdef __HAIKU__
+#include <FindDirectory.h>
+#include <fs_info.h>
+#endif
#include "filesystem.h"
#include <wsutil/report_message.h>
@@ -985,6 +989,13 @@ init_plugin_pers_dir(void)
#if defined(HAVE_PLUGINS) || defined(HAVE_LUA)
#ifdef _WIN32
plugin_pers_dir = get_persconffile_path(PLUGINS_DIR_NAME, FALSE);
+#elif __HAIKU__
+ plugin_pers_dir = get_persconffile_path(PLUGINS_DIR_NAME, FALSE);
+/*
+ char buffer[B_PATH_NAME_LENGTH+B_FILE_NAME_LENGTH];
+ find_directory(B_USER_DATA_DIRECTORY, dev_for_path("/boot"), false, buffer, sizeof(buffer));
+ plugin_pers_dir = g_build_filename(buffer, "wireshark", PLUGINS_DIR_NAME, (gchar *)NULL);
+*/
#else
plugin_pers_dir = g_build_filename(g_get_home_dir(), ".local/lib/wireshark/" PLUGINS_DIR_NAME, (gchar *)NULL);
#endif
@@ -1292,6 +1303,12 @@ get_persconffile_dir_no_profile(void)
*/
persconffile_dir = g_build_filename("C:", "Wireshark", NULL);
return persconffile_dir;
+#elif __HAIKU__
+ //return "/boot/home/config/settings/wireshark/";
+ char buffer[B_PATH_NAME_LENGTH+B_FILE_NAME_LENGTH];
+ find_directory(B_USER_SETTINGS_DIRECTORY, dev_for_path("/boot"), true, buffer, sizeof(buffer));
+ persconffile_dir = g_build_filename(buffer, "wireshark", NULL);
+ return persconffile_dir;
#else
char *xdg_path, *path;
struct passwd *pwd;
--
2.30.2

View File

@@ -15,7 +15,7 @@ COPYRIGHT="1998-2020 Gerald Combs"
LICENSE="GNU GPL v2"
REVISION="1"
SOURCE_URI="https://github.com/wireshark/wireshark/archive/wireshark-$portVersion.tar.gz"
CHECKSUM_SHA256="2af24e851f050f4a4570d59fb3455a9b92046c3faf0db7f81f443578397b88c9"
CHECKSUM_SHA256="fcbde722af8523d98844c981a3279a599311a93b87a4562bc5484b4d56b4f645"
SOURCE_DIR="wireshark-wireshark-$portVersion"
ADDITIONAL_FILES="wireshark.rdef"
PATCHES="wireshark-$portVersion.patchset"
@@ -23,16 +23,16 @@ PATCHES="wireshark-$portVersion.patchset"
ARCHITECTURES="all !x86_gcc2 ?x86"
SECONDARY_ARCHITECTURES="x86"
libwiresharkLibVersion="10.1.20"
libwiresharkLibVersion="12.0.14"
libwiresharkLibVersionCompat="$libwiresharkLibVersion compat >= ${libwiresharkLibVersion%%.*}"
libwiretapLibVersion="8.0.20"
libwiretapLibVersion="9.0.14"
libwiretapLibVersionCompat="$libwiretapLibVersion compat >= ${libwiretapLibVersion%%.*}"
libwscodecsLibVersion="2.0.0"
libwscodecsLibVersionCompat="$libwscodecsLibVersion compat >= ${libwscodecsLibVersion%%.*}"
libwsutilLibVersion="9.0.0"
libwsutilLibVersion="10.0.0"
libwsutilLibVersionCompat="$libwsutilLibVersion compat >= ${libwsutilLibVersion%%.*}"
PROVIDES="
@@ -78,6 +78,7 @@ PROVIDES_gui="
REQUIRES_gui="
haiku$secondaryArchSuffix
wireshark${secondaryArchSuffix} == $portVersion base
lib:libgcrypt$secondaryArchSuffix
lib:libgmodule_2.0$secondaryArchSuffix
lib:libpcap$secondaryArchSuffix
lib:libQt5Core$secondaryArchSuffix
@@ -102,10 +103,8 @@ BUILD_REQUIRES="
devel:libQt5Widgets$secondaryArchSuffix
"
BUILD_PREREQUIRES="
cmd:aclocal
cmd:autoconf
cmd:automake
cmd:bison
cmd:cmake
cmd:flex
cmd:gcc$secondaryArchSuffix
cmd:libtoolize
@@ -118,19 +117,17 @@ BUILD_PREREQUIRES="
BUILD()
{
autoreconf -fi
LIBS=-lnetwork CPPFLAGS="-D_BSD_SOURCE -fPIC" \
runConfigure ./configure --without-gtk3 --bindir=$prefix/bin
mkdir -p build
cd build
cmake .. $cmakeDirArgs \
-DCMAKE_EXE_LINKER_FLAGS="-lnetwork" \
-DCMAKE_BUILD_TYPE=Release
make $jobArgs
}
INSTALL()
{
# disable install-data-local rule as it breaks the build
sed -i 's/install-data-am: install-data-local/install-data-am: /g' Makefile
make install-strip
find $libDir -name '*.la' -delete
make -C build install
prepareInstalledDevelLibs libwireshark libwiretap libwscodecs libwsutil
fixPkgconfig