Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 11 Aug 2024 11:09:22 GMT
From:      Babak Farrokhi <farrokhi@FreeBSD.org>
To:        ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org
Subject:   git: 90fc03b99996 - main - net-mgmt/fastnetmon: Update to 1.2.7
Message-ID:  <202408111109.47BB9M9B017538@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch main has been updated by farrokhi:

URL: https://cgit.FreeBSD.org/ports/commit/?id=90fc03b99996ebb9f040ac305794fe627a8856d3

commit 90fc03b99996ebb9f040ac305794fe627a8856d3
Author:     Babak Farrokhi <farrokhi@FreeBSD.org>
AuthorDate: 2024-08-11 11:06:19 +0000
Commit:     Babak Farrokhi <farrokhi@FreeBSD.org>
CommitDate: 2024-08-11 11:06:19 +0000

    net-mgmt/fastnetmon: Update to 1.2.7
    
    Release Notes: https://github.com/pavel-odintsov/fastnetmon/releases/tag/v1.2.7
    
    PR:             280367
    Reported by:    Marek Zarychta <zarychtam@plan-b.pwste.edu.pl>
    Sponsored by:   PANS Jarosław
---
 net-mgmt/fastnetmon/Makefile                       | 27 ++++++++-----------
 net-mgmt/fastnetmon/distinfo                       |  8 +++---
 net-mgmt/fastnetmon/files/patch-CMakeLists.txt     | 30 ----------------------
 net-mgmt/fastnetmon/files/patch-src_fastnetmon.cpp | 29 ---------------------
 .../fastnetmon/files/patch-src_man_fastnetmon.8    | 11 --------
 .../patch-src_netmap__plugin_netmap__collector.cpp | 10 --------
 net-mgmt/fastnetmon/pkg-plist                      |  1 +
 7 files changed, 14 insertions(+), 102 deletions(-)

diff --git a/net-mgmt/fastnetmon/Makefile b/net-mgmt/fastnetmon/Makefile
index 4e0e66cad815..57e6501f518a 100644
--- a/net-mgmt/fastnetmon/Makefile
+++ b/net-mgmt/fastnetmon/Makefile
@@ -1,15 +1,11 @@
-PORTNAME=	fastnetmon
+PORTNAME=		fastnetmon
 DISTVERSIONPREFIX=	v
-DISTVERSION=	1.2.6
-PORTREVISION=	2
-CATEGORIES=	net-mgmt security
+DISTVERSION=		1.2.7
+CATEGORIES=		net-mgmt security
 
-PATCH_SITES=	https://github.com/pavel-odintsov/${PORTNAME}/commit/
-PATCHFILES=	fad8757b8986226024d549a6dfb40abbab01643e.patch:-p2
-
-MAINTAINER=	farrokhi@FreeBSD.org
-COMMENT=	Very fast DDoS analyzer with sflow/netflow/mirror support
-WWW=		https://fastnetmon.com
+MAINTAINER=		farrokhi@FreeBSD.org
+COMMENT=		Very fast DDoS analyzer with sflow/netflow/mirror support
+WWW=			https://fastnetmon.com
 
 LICENSE=	GPLv2
 LICENSE_FILE=	${WRKSRC}/../LICENSE
@@ -49,18 +45,15 @@ CMAKE_ON=	ENABLE_NETMAP_SUPPORT \
 OPTIONS_DEFINE=	DOCS
 
 post-patch:
-	@${REINPLACE_CMD} -e 's|/usr/local|${PREFIX}|; \
-		s|/var/run|&/fastnetmon|g; s|/var/log|&/fastnetmon|g; \
-		s|"/etc/|"${PREFIX}/etc/|g; s|/root/fastnetmon|${DATADIR}|g' \
-		${WRKSRC}/fastnetmon.conf ${WRKSRC}/fastnetmon.cpp
-	@${REINPLACE_CMD} -e 's|%%PREFIX%%|${PREFIX}|g' \
-		${WRKSRC}/man/fastnetmon.8
+	@${REINPLACE_CMD} -e 's|/etc/networks|${PREFIX}/etc/networks|g' \
+		-e 's|/var/run|/var/run/${PORTNAME}|g' ${WRKSRC}/fastnetmon.conf
+	@${REINPLACE_CMD} -e 's|/etc/|${PREFIX}/etc/|g' ${WRKSRC}/man/fastnetmon.8
 
 post-install:
 	${INSTALL_DATA} ${WRKSRC}/fastnetmon.conf ${STAGEDIR}${PREFIX}/etc/fastnetmon.conf.sample
 	${INSTALL_DATA} ${WRKSRC}/networks_list ${STAGEDIR}${PREFIX}/etc/networks_list.sample
 	${INSTALL_DATA} ${WRKSRC}/networks_whitelist ${STAGEDIR}${PREFIX}/etc/networks_whitelist.sample
-	${MKDIR} ${STAGEDIR}/var/run/fastnetmon ${STAGEDIR}/var/log/fastnetmon_attacks
+	${MKDIR} ${STAGEDIR}/var/run/fastnetmon ${STAGEDIR}/var/log/fastnetmon ${STAGEDIR}/var/log/fastnetmon_attacks
 	${INSTALL_SCRIPT} ${WRKSRC}/notify_about_attack.sh ${STAGEDIR}${PREFIX}/bin/notify_about_attack.sh.sample
 
 post-install-DOCS-on:
diff --git a/net-mgmt/fastnetmon/distinfo b/net-mgmt/fastnetmon/distinfo
index f8d70d4ffad9..b1e024e750c0 100644
--- a/net-mgmt/fastnetmon/distinfo
+++ b/net-mgmt/fastnetmon/distinfo
@@ -1,5 +1,3 @@
-TIMESTAMP = 1706176431
-SHA256 (pavel-odintsov-fastnetmon-v1.2.6_GH0.tar.gz) = b6a7d1e9ba98c1c042d774bff82ea3e8bbf03085e0be43a2676e41d590f668cf
-SIZE (pavel-odintsov-fastnetmon-v1.2.6_GH0.tar.gz) = 1421719
-SHA256 (fad8757b8986226024d549a6dfb40abbab01643e.patch) = 22e739071959c4e2b88cca4ad8278c07be998505c152952d6f18b69227cc8844
-SIZE (fad8757b8986226024d549a6dfb40abbab01643e.patch) = 2694
+TIMESTAMP = 1721758522
+SHA256 (pavel-odintsov-fastnetmon-v1.2.7_GH0.tar.gz) = c21fcbf970214dd48ee8aa11e6294e16bea86495085315e7b370a84b316d0af9
+SIZE (pavel-odintsov-fastnetmon-v1.2.7_GH0.tar.gz) = 1443577
diff --git a/net-mgmt/fastnetmon/files/patch-CMakeLists.txt b/net-mgmt/fastnetmon/files/patch-CMakeLists.txt
deleted file mode 100644
index d833ac56fc9d..000000000000
--- a/net-mgmt/fastnetmon/files/patch-CMakeLists.txt
+++ /dev/null
@@ -1,30 +0,0 @@
---- CMakeLists.txt.orig	2023-10-14 15:48:26 UTC
-+++ CMakeLists.txt
-@@ -47,7 +47,8 @@ set(GTEST_INSTALL_PATH "${FASTNETMON_LIBRARIES_GLOBAL_
- # In order to get a warning about an unused function parameter, you must either specify -Wextra -Wunused (note that -Wall implies -Wunused), or separately specify -Wunused-parameter.
- # TODO: return -Wunused-parameter and address all warning later, I started it but did not finish as we have too many of them
- # catch-value is documented here: https://patchwork.ozlabs.org/project/gcc/patch/tkrat.8c7b4260a533be2f@netcologne.de/#1680619
--add_definitions("-Wreorder -Wunused -Wparentheses -Wimplicit-fallthrough -Wreturn-type -Wuninitialized -Winit-self -Wmaybe-uninitialized -Wcatch-value=3 -Wclass-memaccess")
-+# add_definitions("-Wreorder -Wunused -Wparentheses -Wimplicit-fallthrough -Wreturn-type -Wuninitialized -Winit-self -Wmaybe-uninitialized -Wcatch-value=3 -Wclass-memaccess")
-+add_definitions("-Wreorder -Wunused -Wparentheses -Wimplicit-fallthrough -Wreturn-type -Wuninitialized -Winit-self")
- 
- # On Windows we need to build libgcc and libstdc++ statically to avoid need to carry dlls with us
- if (${CMAKE_SYSTEM_NAME} STREQUAL "Windows")
-@@ -81,7 +82,7 @@ option(KAFKA_SUPPORT "Enables Kafka support" OFF)
- option(KAFKA_SUPPORT "Enables Kafka support" OFF)
- 
- # We need to add it into include path as gRPC uses it include path
--include_directories("${ABSL_INSTALL_PATH}/include")
-+# include_directories("${ABSL_INSTALL_PATH}/include")
- 
- option(DO_NOT_USE_SYSTEM_LIBRARIES_FOR_BUILD "Disables use of libraries from system path" OFF)
- 
-@@ -848,7 +849,7 @@ if (ENABLE_CAPNP_SUPPORT)
-         message(FATAL_ERROR "Could not find capnp libraries")
-     endif()
- 
--    include_directories("${CAPNP_CUSTOM_INSTALL_PATH}/include")
-+    # include_directories("${CAPNP_CUSTOM_INSTALL_PATH}/include")
- 
-     target_link_libraries(simple_packet_capnp ${CAPNP_LIBRARY_PATH} ${CAPNP_KJ_LIBRARY_PATH})
- 
diff --git a/net-mgmt/fastnetmon/files/patch-src_fastnetmon.cpp b/net-mgmt/fastnetmon/files/patch-src_fastnetmon.cpp
deleted file mode 100644
index 74155be61ca9..000000000000
--- a/net-mgmt/fastnetmon/files/patch-src_fastnetmon.cpp
+++ /dev/null
@@ -1,29 +0,0 @@
---- fastnetmon.cpp.orig	2023-05-23 06:20:59 UTC
-+++ fastnetmon.cpp
-@@ -156,7 +156,7 @@ unsigned int stats_thread_initial_call_delay = 30;
- std::string reporting_server = "community-stats.fastnetmon.com";
- 
- // Path to temporarily store backtrace when fatal failure happened
--std::string backtrace_path = "/var/log/fastnetmon_backtrace.dump";
-+std::string backtrace_path = "/var/log/fastnetmon/fastnetmon_backtrace.dump";
- 
- // Each this seconds we will check about available data in bucket
- unsigned int check_for_availible_for_processing_packets_buckets = 1;
-@@ -430,7 +430,7 @@ std::string exabgp_community_subnet = "";
- std::string exabgp_community_host   = "";
- 
- 
--std::string exabgp_command_pipe = "/var/run/exabgp.cmd";
-+std::string exabgp_command_pipe = "/var/run/fastnetmon/exabgp.cmd";
- std::string exabgp_next_hop     = "";
- 
- // Graphite monitoring
-@@ -514,7 +514,7 @@ void sigpipe_handler_for_popen(int signo) {
- #ifdef GEOIP
- bool geoip_init() {
-     // load GeoIP ASN database to memory
--    geo_ip = GeoIP_open("/root/fastnetmon/GeoIPASNum.dat", GEOIP_MEMORY_CACHE);
-+    geo_ip = GeoIP_open("/usr/local/share/fastnetmon/GeoIPASNum.dat", GEOIP_MEMORY_CACHE);
- 
-     if (geo_ip == NULL) {
-         return false;
diff --git a/net-mgmt/fastnetmon/files/patch-src_man_fastnetmon.8 b/net-mgmt/fastnetmon/files/patch-src_man_fastnetmon.8
deleted file mode 100644
index 75d8a25831a5..000000000000
--- a/net-mgmt/fastnetmon/files/patch-src_man_fastnetmon.8
+++ /dev/null
@@ -1,11 +0,0 @@
---- man/fastnetmon.8.orig	2023-03-03 16:20:18 UTC
-+++ man/fastnetmon.8
-@@ -8,7 +8,7 @@ fastnetmon [--daemonize]
- .SH DESCRIPTION
- FastNetMon - a high performance DoS/DDoS load analyzer built on top of multiple packet capture engines (NetFlow, IPFIX, sFlow, port mirror).
- 
--For more information about configuration, please look at the comments in /etc/fastnetmon.conf and check the project GitHub page: https://github.com/pavel-odintsov/fastnetmon.
-+For more information about configuration, please look at the comments in %%PREFIX%%/etc/fastnetmon.conf and check the project GitHub page: https://github.com/pavel-odintsov/fastnetmon.
- .SH OPTIONS
- fastnetmon has only a single command line option --daemonize which is used for forking and detaching it from the terminal.
- .SH SEE ALSO
diff --git a/net-mgmt/fastnetmon/files/patch-src_netmap__plugin_netmap__collector.cpp b/net-mgmt/fastnetmon/files/patch-src_netmap__plugin_netmap__collector.cpp
deleted file mode 100644
index 1bc5cd90e69f..000000000000
--- a/net-mgmt/fastnetmon/files/patch-src_netmap__plugin_netmap__collector.cpp
+++ /dev/null
@@ -1,10 +0,0 @@
---- netmap_plugin/netmap_collector.cpp.orig	2023-03-01 14:23:34 UTC
-+++ netmap_plugin/netmap_collector.cpp
-@@ -19,6 +19,7 @@
- 
- // Disable debug messages from Netmap
- #define NETMAP_NO_DEBUG
-+typedef bool _Bool;
- #include <boost/thread.hpp>
- #include <net/netmap_user.h>
- 
diff --git a/net-mgmt/fastnetmon/pkg-plist b/net-mgmt/fastnetmon/pkg-plist
index 2912f9ef0846..624483fe7ab0 100644
--- a/net-mgmt/fastnetmon/pkg-plist
+++ b/net-mgmt/fastnetmon/pkg-plist
@@ -8,4 +8,5 @@ share/man/man1/fastnetmon_client.1.gz
 @sample etc/networks_whitelist.sample
 @sample etc/fastnetmon.conf.sample
 @dir(fastnetmon,fastnetmon) /var/run/fastnetmon
+@dir(fastnetmon,fastnetmon) /var/log/fastnetmon
 @dir(fastnetmon,fastnetmon) /var/log/fastnetmon_attacks



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202408111109.47BB9M9B017538>