From nobody Sun Feb 18 16:22:37 2024 X-Original-To: dev-commits-ports-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Td9tk05t7z5B6MX; Sun, 18 Feb 2024 16:22:38 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Td9tj50lfz4HFY; Sun, 18 Feb 2024 16:22:37 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1708273357; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=TFhc9ZXKgO6kN6bnUtVs2ksP7s9S/s0I3GtC0IyPfnk=; b=HAlWVEVudn5Rkds2LA7N8hiN8yDHWxRssPWfDkySIucLbJqCswk6NN8uyJqQrSoRjhq9dJ V12m3Q9SfRqZmW7qKAOE22afauFxnTef/M1aQNZa5ZfoV4vGqkPoX+Y80QS5GUvk0JpWRJ O/6m+O6Zb2eCbirgawQv35Xw2VX+zC+KgqPE/g+B6lmOgViKXYK34NsynkDfg/OT6J0mdn jBxtVMffrxeAdfsfA3ArN0Oq9+gCmR/3OrEYhdBEEoKSVP1FzJTTsjDmK99IobUl4RLlLT mEhdRxtrFoGzEswVZ9Hqp/IfKXiSC00u7Dn7c/d5NRsljeG+daNHngpI+L0EDA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1708273357; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=TFhc9ZXKgO6kN6bnUtVs2ksP7s9S/s0I3GtC0IyPfnk=; b=UQBdObuLqYtTSD/C5oweE48fkibZfWXQDbO/JPyuLXsNlfS6t4cV8vWo7JVwFbZUjaVVwu Lbst0INq8oxsQYABIOZnl7FlAEZ9uoTKS9k5usH67XPWPO7YcwDHJfrLju0L8gy8GatAz0 yoDUhKtp3oV2BIfWDCLCgTUCFJccIh3DEz4FBLQkZkWaXyL8SS6noHbmZxsQq6L8OmdpQS AH+WDoJdo3+sm5FaKY3YjNK985RySHRN4sRJibZ8bP/VeeK27mV/6h/tlZCAWRU0hdFee0 v3swzvT6ZwisiZdNqY/eQZLrUwf7CCeNivvIR4Cv6ixnLrr9TbxYFxnduQpt4A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1708273357; a=rsa-sha256; cv=none; b=H2NVW2VbHRCKNdwREnisefNq9pcSpDBIKC46gKOZGXPW3wAEkNDhKMDw4XLfE/58EEiqBM 6UtnM8WiOkQxGxXvNsnQMKWrsWGhbSlwLBy+CJ6GhUEKUfWS8dYXjPI2pQDt4Fn0ruP+L8 lp5g/LheWclwVLh9wK7RDJ9C6OKl3CvmnitcD45avOq590Qk2RwMkqNLl25SaVGoCyciH/ VgvJvIbaNRvyo4OHnj9WY1SjCBv9Ienz5k9JF2kqjmptsIBd1SATe1btXiQhu3GR1ppTZo 8QfILkJVMkvaBXHs8zpFczwIHDY4WjdNio3hLhPor9DwJxSRYyJMIDN9fwSXNQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Td9tj44pZzxpf; Sun, 18 Feb 2024 16:22:37 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 41IGMbSu026762; Sun, 18 Feb 2024 16:22:37 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 41IGMbWK026759; Sun, 18 Feb 2024 16:22:37 GMT (envelope-from git) Date: Sun, 18 Feb 2024 16:22:37 GMT Message-Id: <202402181622.41IGMbWK026759@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Daniel Engberg Subject: git: 77c0579bf660 - main - net-mgmt/fastnetmon: Update to 1.2.6 List-Id: Commit messages for all branches of the ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-ports-all@freebsd.org X-BeenThere: dev-commits-ports-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: diizzy X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 77c0579bf6608c0691170fcf1e86e620b38a150f Auto-Submitted: auto-generated The branch main has been updated by diizzy: URL: https://cgit.FreeBSD.org/ports/commit/?id=77c0579bf6608c0691170fcf1e86e620b38a150f commit 77c0579bf6608c0691170fcf1e86e620b38a150f Author: Daniel Engberg AuthorDate: 2024-02-18 09:22:53 +0000 Commit: Daniel Engberg CommitDate: 2024-02-18 16:16:12 +0000 net-mgmt/fastnetmon: Update to 1.2.6 * Switch from PORTVERSION to DISTVERSION * Remove USE_CXXSTD (no longer needed) * Drop devel/json-c in LIB_DEPENDS (not used) * Use WRKSRC_SUBDIR * Drop -DBOOST_STACKTRACE_GNU_SOURCE_NOT_REQUIRED switch * Remove LLVM version requirements (no longer needed) * Use CMAKE helpers * Rearrange Makefile for better readability * Disable unsupported -W switches making the build a lot less noisy * Remove bogus include paths Based on patch submitted by Marek Zarychta Changelog: https://github.com/pavel-odintsov/fastnetmon/releases/tag/v1.2.6 PR: 276516 Reported by: Marek Zarychta Reviewed by: farrokhi (maintainer, previous version) Tested by: Marek Zarychta Approved by: portmgr (maintainer timeout, 2+ weeks) --- net-mgmt/fastnetmon/Makefile | 66 +++++++++------------- net-mgmt/fastnetmon/distinfo | 8 ++- net-mgmt/fastnetmon/files/fastnetmon.in | 2 +- net-mgmt/fastnetmon/files/patch-CMakeLists.txt | 30 ++++++++++ net-mgmt/fastnetmon/files/patch-src_fastnetmon.cpp | 4 +- .../fastnetmon/files/patch-src_man_fastnetmon.8 | 4 +- .../patch-src_netmap__plugin_netmap__collector.cpp | 4 +- net-mgmt/fastnetmon/pkg-plist | 10 ++-- 8 files changed, 75 insertions(+), 53 deletions(-) diff --git a/net-mgmt/fastnetmon/Makefile b/net-mgmt/fastnetmon/Makefile index fdd483db3138..25b0aaf72038 100644 --- a/net-mgmt/fastnetmon/Makefile +++ b/net-mgmt/fastnetmon/Makefile @@ -1,78 +1,68 @@ PORTNAME= fastnetmon -PORTVERSION= 1.2.5 DISTVERSIONPREFIX= v -PORTREVISION= 4 +DISTVERSION= 1.2.6 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 LICENSE= GPLv2 -LICENSE_FILE= ${WRKSRC}/LICENSE +LICENSE_FILE= ${WRKSRC}/../LICENSE -BROKEN_armv6= does not build: invokes x86 assembler -BROKEN_armv7= does not build: invokes x86 assembler +BROKEN_armv6= does not build: invokes x86 assembler +BROKEN_armv7= does not build: invokes x86 assembler LIB_DEPENDS= libboost_regex.so:devel/boost-libs \ liblog4cpp.so:devel/log4cpp \ libmongoc-1.0.so:devel/mongo-c-driver \ - libjson-c.so:devel/json-c \ libbson-1.0.so:devel/libbson \ libcapnp.so:devel/capnproto \ - libgrpc.so:devel/grpc142 \ + libgrpc.so:devel/grpc \ libprotobuf.so:devel/protobuf \ libabsl_base.so:devel/abseil \ libhiredis.so:databases/hiredis -USES= cmake compiler:c++17-lang pkgconfig localbase:ldflags ssl -USE_CXXSTD= c++17 +USES= cmake compiler:c++20-lang localbase:ldflags pkgconfig ssl + USE_GITHUB= yes GH_ACCOUNT= pavel-odintsov -USE_RC_SUBR= ${PORTNAME} - -CMAKE_ARGS+= -DENABLE_NETMAP_SUPPORT=ON \ - -DLINK_WITH_ABSL=ON \ - -DSET_ABSOLUTE_INSTALL_PATH=OFF \ - -DCMAKE_INSTALL_MANDIR=${PREFIX}/man -CMAKE_INSTALL_PREFIX= ${PREFIX} -CMAKE_SOURCE_PATH= ${WRKSRC}/src - -CFLAGS_i386= -march=i586 -CXXFLAGS+= -DBOOST_STACKTRACE_GNU_SOURCE_NOT_REQUIRED \ - -D_GNU_SOURCE -LDFLAGS+= -labsl_log_internal_message -labsl_log_internal_nullguard -USERS= ${PORTNAME} -GROUPS= ${PORTNAME} +WRKSRC_SUBDIR= src +USE_RC_SUBR= ${PORTNAME} +USERS= ${PORTNAME} +GROUPS= ${PORTNAME} PORTDOCS= * -OPTIONS_DEFINE= DOCS - -.include +CFLAGS_i386= -march=i586 +CXXFLAGS+= -D_GNU_SOURCE -.if ${OPSYS} == FreeBSD && ( ${OSVERSION} >= 1400091 || ( ${OSVERSION} >= 1302505 && ${OSVERSION} < 1400000 )) -USES+= llvm:max=15 -.endif +CMAKE_OFF= SET_ABSOLUTE_INSTALL_PATH +CMAKE_ON= ENABLE_NETMAP_SUPPORT \ + LINK_WITH_ABSL -.include +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}/src/fastnetmon.conf ${WRKSRC}/src/fastnetmon.cpp + ${WRKSRC}/fastnetmon.conf ${WRKSRC}/fastnetmon.cpp @${REINPLACE_CMD} -e 's|%%PREFIX%%|${PREFIX}|g' \ - ${WRKSRC}/src/man/fastnetmon.8 + ${WRKSRC}/man/fastnetmon.8 post-install: - ${MV} ${STAGEDIR}${PREFIX}/etc/${PORTNAME}.conf \ - ${STAGEDIR}${PREFIX}/etc/${PORTNAME}.conf.sample + ${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 - ${INSTALL_SCRIPT} ${WRKSRC}/src/notify_about_attack.sh ${STAGEDIR}${PREFIX}/bin + ${INSTALL_SCRIPT} ${WRKSRC}/notify_about_attack.sh ${STAGEDIR}${PREFIX}/bin/notify_about_attack.sh.sample post-install-DOCS-on: - cd ${WRKSRC} && ${COPYTREE_SHARE} "README.md docs" ${STAGEDIR}${DOCSDIR} + cd ${WRKSRC}/../ && ${COPYTREE_SHARE} "README.md docs" ${STAGEDIR}${DOCSDIR} -.include +.include diff --git a/net-mgmt/fastnetmon/distinfo b/net-mgmt/fastnetmon/distinfo index ef5b9939a04a..f8d70d4ffad9 100644 --- a/net-mgmt/fastnetmon/distinfo +++ b/net-mgmt/fastnetmon/distinfo @@ -1,3 +1,5 @@ -TIMESTAMP = 1686746794 -SHA256 (pavel-odintsov-fastnetmon-v1.2.5_GH0.tar.gz) = d92a1f16e60b6ab6f5c5e023a215570e9352ce9d0c9a9d7209416f8cd0227ae6 -SIZE (pavel-odintsov-fastnetmon-v1.2.5_GH0.tar.gz) = 1383370 +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 diff --git a/net-mgmt/fastnetmon/files/fastnetmon.in b/net-mgmt/fastnetmon/files/fastnetmon.in index c6ee5b2aa52e..598dbc0382d8 100644 --- a/net-mgmt/fastnetmon/files/fastnetmon.in +++ b/net-mgmt/fastnetmon/files/fastnetmon.in @@ -24,7 +24,7 @@ load_rc_config "$name" : ${fastnetmon_user:=fastnetmon} command=%%PREFIX%%/bin/fastnetmon -command_args="--daemonize --configuration_file ${fastnetmon_conf} ${fastnetmon_flags}" +command_args="--daemonize --configuration_file ${fastnetmon_conf} --pid_logic ${fastnetmon_flags}" pidfile=/var/run/fastnetmon/$name.pid run_rc_command "$1" diff --git a/net-mgmt/fastnetmon/files/patch-CMakeLists.txt b/net-mgmt/fastnetmon/files/patch-CMakeLists.txt new file mode 100644 index 000000000000..d833ac56fc9d --- /dev/null +++ b/net-mgmt/fastnetmon/files/patch-CMakeLists.txt @@ -0,0 +1,30 @@ +--- 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 index 0883c1581808..74155be61ca9 100644 --- a/net-mgmt/fastnetmon/files/patch-src_fastnetmon.cpp +++ b/net-mgmt/fastnetmon/files/patch-src_fastnetmon.cpp @@ -1,5 +1,5 @@ ---- src/fastnetmon.cpp.orig 2023-05-23 06:20:59 UTC -+++ src/fastnetmon.cpp +--- 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"; diff --git a/net-mgmt/fastnetmon/files/patch-src_man_fastnetmon.8 b/net-mgmt/fastnetmon/files/patch-src_man_fastnetmon.8 index bb43f4f3a050..75d8a25831a5 100644 --- a/net-mgmt/fastnetmon/files/patch-src_man_fastnetmon.8 +++ b/net-mgmt/fastnetmon/files/patch-src_man_fastnetmon.8 @@ -1,5 +1,5 @@ ---- src/man/fastnetmon.8.orig 2023-03-03 16:20:18 UTC -+++ src/man/fastnetmon.8 +--- 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). 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 index 19a3f3d8b17d..1bc5cd90e69f 100644 --- a/net-mgmt/fastnetmon/files/patch-src_netmap__plugin_netmap__collector.cpp +++ b/net-mgmt/fastnetmon/files/patch-src_netmap__plugin_netmap__collector.cpp @@ -1,5 +1,5 @@ ---- src/netmap_plugin/netmap_collector.cpp.orig 2023-03-01 14:23:34 UTC -+++ src/netmap_plugin/netmap_collector.cpp +--- 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 diff --git a/net-mgmt/fastnetmon/pkg-plist b/net-mgmt/fastnetmon/pkg-plist index 6c244f25be27..2912f9ef0846 100644 --- a/net-mgmt/fastnetmon/pkg-plist +++ b/net-mgmt/fastnetmon/pkg-plist @@ -1,11 +1,11 @@ bin/fastnetmon bin/fastnetmon_api_client bin/fastnetmon_client -bin/notify_about_attack.sh -etc/networks_list -etc/networks_whitelist -man/man8/fastnetmon.8.gz -man/man1/fastnetmon_client.1.gz +share/man/man8/fastnetmon.8.gz +share/man/man1/fastnetmon_client.1.gz +@sample bin/notify_about_attack.sh.sample +@sample etc/networks_list.sample +@sample etc/networks_whitelist.sample @sample etc/fastnetmon.conf.sample @dir(fastnetmon,fastnetmon) /var/run/fastnetmon @dir(fastnetmon,fastnetmon) /var/log/fastnetmon_attacks