View | Details | Raw Unified | Return to bug 276516 | Differences between
and this patch

Collapse All | Expand All

(-)b/net-mgmt/fastnetmon/Makefile (-38 / +28 lines)
Lines 1-78 Link Here
1
PORTNAME=	fastnetmon
1
PORTNAME=	fastnetmon
2
PORTVERSION=	1.2.5
3
DISTVERSIONPREFIX=	v
2
DISTVERSIONPREFIX=	v
4
PORTREVISION=	3
3
DISTVERSION=	1.2.6
5
CATEGORIES=	net-mgmt security
4
CATEGORIES=	net-mgmt security
6
5
6
PATCH_SITES=	https://github.com/pavel-odintsov/${PORTNAME}/commit/
7
PATCHFILES=	fad8757b8986226024d549a6dfb40abbab01643e.patch:-p2
8
7
MAINTAINER=	farrokhi@FreeBSD.org
9
MAINTAINER=	farrokhi@FreeBSD.org
8
COMMENT=	Very fast DDoS analyzer with sflow/netflow/mirror support
10
COMMENT=	Very fast DDoS analyzer with sflow/netflow/mirror support
9
WWW=		https://fastnetmon.com
11
WWW=		https://fastnetmon.com
10
12
11
LICENSE=	GPLv2
13
LICENSE=	GPLv2
12
LICENSE_FILE=	${WRKSRC}/LICENSE
14
LICENSE_FILE=	${WRKSRC}/../LICENSE
13
15
14
BROKEN_armv6=		does not build: invokes x86 assembler
16
BROKEN_armv6=	does not build: invokes x86 assembler
15
BROKEN_armv7=		does not build: invokes x86 assembler
17
BROKEN_armv7=	does not build: invokes x86 assembler
16
18
17
LIB_DEPENDS=	libboost_regex.so:devel/boost-libs \
19
LIB_DEPENDS=	libboost_regex.so:devel/boost-libs \
18
		liblog4cpp.so:devel/log4cpp \
20
		liblog4cpp.so:devel/log4cpp \
19
		libmongoc-1.0.so:devel/mongo-c-driver \
21
		libmongoc-1.0.so:devel/mongo-c-driver \
20
		libjson-c.so:devel/json-c \
21
		libbson-1.0.so:devel/libbson \
22
		libbson-1.0.so:devel/libbson \
22
		libcapnp.so:devel/capnproto \
23
		libcapnp.so:devel/capnproto \
23
		libgrpc.so:devel/grpc142 \
24
		libgrpc.so:devel/grpc \
24
		libprotobuf.so:devel/protobuf \
25
		libprotobuf.so:devel/protobuf \
25
		libabsl_base.so:devel/abseil \
26
		libabsl_base.so:devel/abseil \
26
		libhiredis.so:databases/hiredis
27
		libhiredis.so:databases/hiredis
27
28
28
USES=	cmake compiler:c++17-lang pkgconfig localbase:ldflags ssl
29
USES=		cmake compiler:c++20-lang localbase:ldflags pkgconfig ssl
29
USE_CXXSTD=	c++17
30
30
USE_GITHUB=	yes
31
USE_GITHUB=	yes
31
GH_ACCOUNT=	pavel-odintsov
32
GH_ACCOUNT=	pavel-odintsov
32
USE_RC_SUBR=	${PORTNAME}
33
34
CMAKE_ARGS+=	-DENABLE_NETMAP_SUPPORT=ON \
35
		-DLINK_WITH_ABSL=ON \
36
		-DSET_ABSOLUTE_INSTALL_PATH=OFF \
37
		-DCMAKE_INSTALL_MANDIR=${PREFIX}/man
38
CMAKE_INSTALL_PREFIX=	${PREFIX}
39
CMAKE_SOURCE_PATH=	${WRKSRC}/src
40
41
CFLAGS_i386=	-march=i586
42
CXXFLAGS+=	-DBOOST_STACKTRACE_GNU_SOURCE_NOT_REQUIRED \
43
		-D_GNU_SOURCE
44
LDFLAGS+=	-labsl_log_internal_message -labsl_log_internal_nullguard
45
33
46
USERS=	${PORTNAME}
34
WRKSRC_SUBDIR=	src
47
GROUPS=	${PORTNAME}
48
35
36
USE_RC_SUBR=	${PORTNAME}
37
USERS=		${PORTNAME}
38
GROUPS=		${PORTNAME}
49
PORTDOCS=	*
39
PORTDOCS=	*
50
40
51
OPTIONS_DEFINE=	DOCS
41
CFLAGS_i386=	-march=i586
52
42
CXXFLAGS+=	-D_GNU_SOURCE
53
.include <bsd.port.options.mk>
54
43
55
.if ${OPSYS} == FreeBSD && ( ${OSVERSION} >= 1400091 || ( ${OSVERSION} >= 1302505 && ${OSVERSION} < 1400000 ))
44
CMAKE_OFF=	SET_ABSOLUTE_INSTALL_PATH
56
USES+=	llvm:max=15
45
CMAKE_ON=	ENABLE_NETMAP_SUPPORT \
57
.endif
46
		LINK_WITH_ABSL
58
47
59
.include <bsd.port.pre.mk>
48
OPTIONS_DEFINE=	DOCS
60
49
61
post-patch:
50
post-patch:
62
	@${REINPLACE_CMD} -e 's|/usr/local|${PREFIX}|; \
51
	@${REINPLACE_CMD} -e 's|/usr/local|${PREFIX}|; \
63
		s|/var/run|&/fastnetmon|g; s|/var/log|&/fastnetmon|g; \
52
		s|/var/run|&/fastnetmon|g; s|/var/log|&/fastnetmon|g; \
64
		s|"/etc/|"${PREFIX}/etc/|g; s|/root/fastnetmon|${DATADIR}|g' \
53
		s|"/etc/|"${PREFIX}/etc/|g; s|/root/fastnetmon|${DATADIR}|g' \
65
		${WRKSRC}/src/fastnetmon.conf ${WRKSRC}/src/fastnetmon.cpp
54
		${WRKSRC}/fastnetmon.conf ${WRKSRC}/fastnetmon.cpp
66
	@${REINPLACE_CMD} -e 's|%%PREFIX%%|${PREFIX}|g' \
55
	@${REINPLACE_CMD} -e 's|%%PREFIX%%|${PREFIX}|g' \
67
		${WRKSRC}/src/man/fastnetmon.8
56
		${WRKSRC}/man/fastnetmon.8
68
57
69
post-install:
58
post-install:
70
	${MV} ${STAGEDIR}${PREFIX}/etc/${PORTNAME}.conf \
59
	${INSTALL_DATA} ${WRKSRC}/fastnetmon.conf ${STAGEDIR}${PREFIX}/etc/fastnetmon.conf.sample
71
		${STAGEDIR}${PREFIX}/etc/${PORTNAME}.conf.sample
60
	${INSTALL_DATA} ${WRKSRC}/networks_list ${STAGEDIR}${PREFIX}/etc/networks_list.sample
61
	${INSTALL_DATA} ${WRKSRC}/networks_whitelist ${STAGEDIR}${PREFIX}/etc/networks_whitelist.sample
72
	${MKDIR} ${STAGEDIR}/var/run/fastnetmon ${STAGEDIR}/var/log/fastnetmon_attacks
62
	${MKDIR} ${STAGEDIR}/var/run/fastnetmon ${STAGEDIR}/var/log/fastnetmon_attacks
73
	${INSTALL_SCRIPT} ${WRKSRC}/src/notify_about_attack.sh ${STAGEDIR}${PREFIX}/bin
63
	${INSTALL_SCRIPT} ${WRKSRC}/notify_about_attack.sh ${STAGEDIR}${PREFIX}/bin/notify_about_attack.sh.sample
74
64
75
post-install-DOCS-on:
65
post-install-DOCS-on:
76
	cd ${WRKSRC} && ${COPYTREE_SHARE} "README.md docs" ${STAGEDIR}${DOCSDIR}
66
	cd ${WRKSRC}/../ && ${COPYTREE_SHARE} "README.md docs" ${STAGEDIR}${DOCSDIR}
77
67
78
.include <bsd.port.post.mk>
68
.include <bsd.port.mk>
(-)b/net-mgmt/fastnetmon/distinfo (-3 / +5 lines)
Lines 1-3 Link Here
1
TIMESTAMP = 1686746794
1
TIMESTAMP = 1706176431
2
SHA256 (pavel-odintsov-fastnetmon-v1.2.5_GH0.tar.gz) = d92a1f16e60b6ab6f5c5e023a215570e9352ce9d0c9a9d7209416f8cd0227ae6
2
SHA256 (pavel-odintsov-fastnetmon-v1.2.6_GH0.tar.gz) = b6a7d1e9ba98c1c042d774bff82ea3e8bbf03085e0be43a2676e41d590f668cf
3
SIZE (pavel-odintsov-fastnetmon-v1.2.5_GH0.tar.gz) = 1383370
3
SIZE (pavel-odintsov-fastnetmon-v1.2.6_GH0.tar.gz) = 1421719
4
SHA256 (fad8757b8986226024d549a6dfb40abbab01643e.patch) = 22e739071959c4e2b88cca4ad8278c07be998505c152952d6f18b69227cc8844
5
SIZE (fad8757b8986226024d549a6dfb40abbab01643e.patch) = 2694
(-)b/net-mgmt/fastnetmon/files/fastnetmon.in (-1 / +1 lines)
Lines 24-30 load_rc_config "$name" Link Here
24
: ${fastnetmon_user:=fastnetmon}
24
: ${fastnetmon_user:=fastnetmon}
25
25
26
command=%%PREFIX%%/bin/fastnetmon
26
command=%%PREFIX%%/bin/fastnetmon
27
command_args="--daemonize --configuration_file ${fastnetmon_conf} ${fastnetmon_flags}"
27
command_args="--daemonize --configuration_file ${fastnetmon_conf} --pid_logic ${fastnetmon_flags}"
28
pidfile=/var/run/fastnetmon/$name.pid
28
pidfile=/var/run/fastnetmon/$name.pid
29
29
30
run_rc_command "$1"
30
run_rc_command "$1"
(-)b/net-mgmt/fastnetmon/files/patch-CMakeLists.txt (+30 lines)
Added Link Here
1
--- CMakeLists.txt.orig	2023-10-14 15:48:26 UTC
2
+++ CMakeLists.txt
3
@@ -47,7 +47,8 @@ set(GTEST_INSTALL_PATH "${FASTNETMON_LIBRARIES_GLOBAL_
4
 # 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.
5
 # TODO: return -Wunused-parameter and address all warning later, I started it but did not finish as we have too many of them
6
 # catch-value is documented here: https://patchwork.ozlabs.org/project/gcc/patch/tkrat.8c7b4260a533be2f@netcologne.de/#1680619
7
-add_definitions("-Wreorder -Wunused -Wparentheses -Wimplicit-fallthrough -Wreturn-type -Wuninitialized -Winit-self -Wmaybe-uninitialized -Wcatch-value=3 -Wclass-memaccess")
8
+# add_definitions("-Wreorder -Wunused -Wparentheses -Wimplicit-fallthrough -Wreturn-type -Wuninitialized -Winit-self -Wmaybe-uninitialized -Wcatch-value=3 -Wclass-memaccess")
9
+add_definitions("-Wreorder -Wunused -Wparentheses -Wimplicit-fallthrough -Wreturn-type -Wuninitialized -Winit-self")
10
 
11
 # On Windows we need to build libgcc and libstdc++ statically to avoid need to carry dlls with us
12
 if (${CMAKE_SYSTEM_NAME} STREQUAL "Windows")
13
@@ -81,7 +82,7 @@ option(KAFKA_SUPPORT "Enables Kafka support" OFF)
14
 option(KAFKA_SUPPORT "Enables Kafka support" OFF)
15
 
16
 # We need to add it into include path as gRPC uses it include path
17
-include_directories("${ABSL_INSTALL_PATH}/include")
18
+# include_directories("${ABSL_INSTALL_PATH}/include")
19
 
20
 option(DO_NOT_USE_SYSTEM_LIBRARIES_FOR_BUILD "Disables use of libraries from system path" OFF)
21
 
22
@@ -848,7 +849,7 @@ if (ENABLE_CAPNP_SUPPORT)
23
         message(FATAL_ERROR "Could not find capnp libraries")
24
     endif()
25
 
26
-    include_directories("${CAPNP_CUSTOM_INSTALL_PATH}/include")
27
+    # include_directories("${CAPNP_CUSTOM_INSTALL_PATH}/include")
28
 
29
     target_link_libraries(simple_packet_capnp ${CAPNP_LIBRARY_PATH} ${CAPNP_KJ_LIBRARY_PATH})
30
 
(-)b/net-mgmt/fastnetmon/files/patch-fastnetmon.cpp (-2 / +2 lines)
Lines 1-5 Link Here
1
--- src/fastnetmon.cpp.orig	2023-05-23 06:20:59 UTC
1
--- fastnetmon.cpp.orig	2023-05-23 06:20:59 UTC
2
+++ src/fastnetmon.cpp
2
+++ fastnetmon.cpp
3
@@ -156,7 +156,7 @@ unsigned int stats_thread_initial_call_delay = 30;
3
@@ -156,7 +156,7 @@ unsigned int stats_thread_initial_call_delay = 30;
4
 std::string reporting_server = "community-stats.fastnetmon.com";
4
 std::string reporting_server = "community-stats.fastnetmon.com";
5
 
5
 
(-)b/net-mgmt/fastnetmon/files/patch-man_fastnetmon.8 (-2 / +2 lines)
Lines 1-5 Link Here
1
--- src/man/fastnetmon.8.orig	2023-03-03 16:20:18 UTC
1
--- man/fastnetmon.8.orig	2023-03-03 16:20:18 UTC
2
+++ src/man/fastnetmon.8
2
+++ man/fastnetmon.8
3
@@ -8,7 +8,7 @@ fastnetmon [--daemonize]
3
@@ -8,7 +8,7 @@ fastnetmon [--daemonize]
4
 .SH DESCRIPTION
4
 .SH DESCRIPTION
5
 FastNetMon - a high performance DoS/DDoS load analyzer built on top of multiple packet capture engines (NetFlow, IPFIX, sFlow, port mirror).
5
 FastNetMon - a high performance DoS/DDoS load analyzer built on top of multiple packet capture engines (NetFlow, IPFIX, sFlow, port mirror).
(-)b/net-mgmt/fastnetmon/files/patch-netmap__plugin_netmap__collector.cpp (-2 / +2 lines)
Lines 1-5 Link Here
1
--- src/netmap_plugin/netmap_collector.cpp.orig	2023-03-01 14:23:34 UTC
1
--- netmap_plugin/netmap_collector.cpp.orig	2023-03-01 14:23:34 UTC
2
+++ src/netmap_plugin/netmap_collector.cpp
2
+++ netmap_plugin/netmap_collector.cpp
3
@@ -19,6 +19,7 @@
3
@@ -19,6 +19,7 @@
4
 
4
 
5
 // Disable debug messages from Netmap
5
 // Disable debug messages from Netmap
(-)b/net-mgmt/fastnetmon/pkg-plist (-5 / +5 lines)
Lines 1-11 Link Here
1
bin/fastnetmon
1
bin/fastnetmon
2
bin/fastnetmon_api_client
2
bin/fastnetmon_api_client
3
bin/fastnetmon_client
3
bin/fastnetmon_client
4
bin/notify_about_attack.sh
4
share/man/man8/fastnetmon.8.gz
5
etc/networks_list
5
share/man/man1/fastnetmon_client.1.gz
6
etc/networks_whitelist
6
@sample bin/notify_about_attack.sh.sample
7
man/man8/fastnetmon.8.gz
7
@sample etc/networks_list.sample
8
man/man1/fastnetmon_client.1.gz
8
@sample etc/networks_whitelist.sample
9
@sample etc/fastnetmon.conf.sample
9
@sample etc/fastnetmon.conf.sample
10
@dir(fastnetmon,fastnetmon) /var/run/fastnetmon
10
@dir(fastnetmon,fastnetmon) /var/run/fastnetmon
11
@dir(fastnetmon,fastnetmon) /var/log/fastnetmon_attacks
11
@dir(fastnetmon,fastnetmon) /var/log/fastnetmon_attacks

Return to bug 276516