From owner-svn-ports-head@freebsd.org Tue Oct 1 21:11:17 2019 Return-Path: Delivered-To: svn-ports-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id B0FE3F8A3F; Tue, 1 Oct 2019 21:11:17 +0000 (UTC) (envelope-from farrokhi@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) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 46jX4j4Bxmz4QJ8; Tue, 1 Oct 2019 21:11:17 +0000 (UTC) (envelope-from farrokhi@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 747572130F; Tue, 1 Oct 2019 21:11:17 +0000 (UTC) (envelope-from farrokhi@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x91LBHiM068033; Tue, 1 Oct 2019 21:11:17 GMT (envelope-from farrokhi@FreeBSD.org) Received: (from farrokhi@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x91LBGT5068029; Tue, 1 Oct 2019 21:11:16 GMT (envelope-from farrokhi@FreeBSD.org) Message-Id: <201910012111.x91LBGT5068029@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: farrokhi set sender to farrokhi@FreeBSD.org using -f From: Babak Farrokhi Date: Tue, 1 Oct 2019 21:11:16 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r513533 - in head/net-mgmt/fastnetmon: . files X-SVN-Group: ports-head X-SVN-Commit-Author: farrokhi X-SVN-Commit-Paths: in head/net-mgmt/fastnetmon: . files X-SVN-Commit-Revision: 513533 X-SVN-Commit-Repository: ports MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the ports tree for head List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 Oct 2019 21:11:17 -0000 Author: farrokhi Date: Tue Oct 1 21:11:16 2019 New Revision: 513533 URL: https://svnweb.freebsd.org/changeset/ports/513533 Log: net-mgmt/fastnetmon: Update to 1.1.4 - Update to 1.1.4 - Pet portlint Changes: https://github.com/pavel-odintsov/fastnetmon/releases/tag/v1.1.4 Added: head/net-mgmt/fastnetmon/files/patch-src_fast__platform.h.template (contents, props changed) head/net-mgmt/fastnetmon/files/patch-src_man_fastnetmon.1 (contents, props changed) Deleted: head/net-mgmt/fastnetmon/files/patch-src_fast__dpi.cpp Modified: head/net-mgmt/fastnetmon/Makefile head/net-mgmt/fastnetmon/distinfo head/net-mgmt/fastnetmon/files/patch-src_CMakeLists.txt Modified: head/net-mgmt/fastnetmon/Makefile ============================================================================== --- head/net-mgmt/fastnetmon/Makefile Tue Oct 1 21:07:08 2019 (r513532) +++ head/net-mgmt/fastnetmon/Makefile Tue Oct 1 21:11:16 2019 (r513533) @@ -2,9 +2,8 @@ # $FreeBSD$ PORTNAME= fastnetmon -PORTVERSION= 1.1.3 +PORTVERSION= 1.1.4 DISTVERSIONPREFIX= v -PORTREVISION= 14 CATEGORIES= net-mgmt security MAINTAINER= farrokhi@FreeBSD.org @@ -13,6 +12,10 @@ COMMENT= Very fast DDoS analyzer with sflow/netflow/mi LICENSE= GPLv2 LICENSE_FILE= ${WRKSRC}/LICENSE +BROKEN_armv6= Does not build: invokes x86 assembler +BROKEN_armv7= Does not build: invokes x86 assembler +BROKEN_powerpc64= Does not build + LIB_DEPENDS= libboost_regex.so:devel/boost-libs \ liblog4cpp.so:devel/log4cpp \ libluajit-5.1.so:lang/luajit \ @@ -20,22 +23,14 @@ LIB_DEPENDS= libboost_regex.so:devel/boost-libs \ libjson-c.so:devel/json-c \ libbson-1.0.so:devel/libbson +USES= cmake + USE_GITHUB= yes GH_ACCOUNT= pavel-odintsov USERS= ${PORTNAME} GROUPS= ${PORTNAME} -USES= cmake -CMAKE_SOURCE_PATH= ${WRKSRC}/src - -CMAKE_ARGS+= -DDISABLE_PF_RING_SUPPORT=ON -CMAKE_INSTALL_PREFIX= ${PREFIX} - -BROKEN_armv6= Does not build: invokes x86 assembler -BROKEN_armv7= Does not build: invokes x86 assembler -BROKEN_powerpc64= Does not build - USE_RC_SUBR= ${PORTNAME} OPTIONS_DEFINE= DOCS REDIS @@ -45,6 +40,9 @@ REDIS_LIB_DEPENDS= libhiredis.so:databases/hiredis PORTDOCS= * CFLAGS_i386= -march=i586 +CMAKE_SOURCE_PATH= ${WRKSRC}/src +CMAKE_ARGS+= -DDISABLE_PF_RING_SUPPORT=ON +CMAKE_INSTALL_PREFIX= ${PREFIX} post-patch: @${REINPLACE_CMD} -e 's|/usr/local|${LOCALBASE}|' ${WRKSRC}/src/CMakeLists.txt @@ -52,6 +50,8 @@ post-patch: 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 + @${REINPLACE_CMD} -e 's|%%PREFIX%%|${PREFIX}|g' \ + ${WRKSRC}/src/man/fastnetmon.1 ${WRKSRC}/src/fast_platform.h.template post-install: ${MV} ${STAGEDIR}${PREFIX}/etc/${PORTNAME}.conf \ Modified: head/net-mgmt/fastnetmon/distinfo ============================================================================== --- head/net-mgmt/fastnetmon/distinfo Tue Oct 1 21:07:08 2019 (r513532) +++ head/net-mgmt/fastnetmon/distinfo Tue Oct 1 21:11:16 2019 (r513533) @@ -1,3 +1,3 @@ -TIMESTAMP = 1478621523 -SHA256 (pavel-odintsov-fastnetmon-v1.1.3_GH0.tar.gz) = 1b78c5f7e5d750bf7dbf2c516710a53e430975480b45bfc6996fe00f5bef7de8 -SIZE (pavel-odintsov-fastnetmon-v1.1.3_GH0.tar.gz) = 4173724 +TIMESTAMP = 1555233508 +SHA256 (pavel-odintsov-fastnetmon-v1.1.4_GH0.tar.gz) = 4c13bc3304346db52086938533d6514d69c7014a0ac100655c6cf75ff321e0fb +SIZE (pavel-odintsov-fastnetmon-v1.1.4_GH0.tar.gz) = 665067 Modified: head/net-mgmt/fastnetmon/files/patch-src_CMakeLists.txt ============================================================================== --- head/net-mgmt/fastnetmon/files/patch-src_CMakeLists.txt Tue Oct 1 21:07:08 2019 (r513532) +++ head/net-mgmt/fastnetmon/files/patch-src_CMakeLists.txt Tue Oct 1 21:11:16 2019 (r513533) @@ -1,8 +1,8 @@ ---- src/CMakeLists.txt.orig 2016-06-22 05:22:26 UTC +--- src/CMakeLists.txt.orig 2019-02-13 22:20:23 UTC +++ src/CMakeLists.txt -@@ -27,6 +27,13 @@ project(FastNetMon) - set (FASTNETMON_VERSION_MAJOR 1) - set (FASTNETMON_VERSION_MINOR 1) +@@ -33,6 +33,13 @@ set (FASTNETMON_VERSION_MINOR 1) + set(CMAKE_INSTALL_SYSTEMD_SERVICEDIR "/lib/systemd/system" + CACHE PATH "Location for systemd service files") +# Respect PREFIX variable in FreeBSD +if($ENV{PREFIX}) @@ -14,7 +14,7 @@ if (ENABLE_GOBGP_SUPPORT) # We could not compile gRPC without C++ 11 set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -std=c++11") -@@ -59,12 +66,14 @@ SET(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL +@@ -65,12 +72,12 @@ SET(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_RPATH};/opt/l message(STATUS "C++ compilation flags: ${CMAKE_CXX_FLAGS_RELEASE}") @@ -30,27 +30,25 @@ +set(PFRING_CUSTOM_INSTALL_PATH ${PREFIX}) +set(LIBPCAP_CUSTOM_INSTALL_PATH ${PREFIX}) +set(MONGO_C_CUSTOM_INSTALL_PATH ${PREFIX}) -+set(NDPI_CUSTOM_INSTALL_PATH ${PREFIX}) -+set(LUAJIT_CUSTOM_INSTALL_PATH ${PREFIX}) set(FASTNETMON_PROFILER OFF) -@@ -184,21 +193,21 @@ add_library(sflow_plugin STATIC sflow_pl +@@ -227,21 +234,22 @@ add_library(sflow_plugin STATIC sflow_plugin/sflow_col add_library(netflow_plugin STATIC netflow_plugin/netflow_collector.cpp) target_link_libraries(netflow_plugin ipfix_rfc) --set(ENABLE_DPI_SUPPORT YES) -+#set(ENABLE_DPI_SUPPORT YES) +-option(ENABLE_DPI_SUPPORT "Enable Deep Packet Inspection support" ON) ++option(ENABLE_DPI_SUPPORT "Enable Deep Packet Inspection support" OFF) if (ENABLE_DPI_SUPPORT) message(STATUS "We will enable nDPI support") add_library(fast_dpi STATIC fast_dpi.cpp) - set(NDPI_INCLUDE_DIRS "/opt/ndpi/include/libndpi-1.7.1") -- ++ set(NDPI_INCLUDE_DIRS ${PREFIX}) + - find_library(NDPI_LIBRARIES NAMES ndpi PATHS "/opt/ndpi/lib" NO_DEFAULT_PATH) + file(GLOB NDPI_SEARCH_PATHS "${NDPI_CUSTOM_INSTALL_PATH}/include/libndpi-*") -+ find_path(NDPI_INCLUDE_DIRS NAMES libndpi/ndpi_api.h PATHS ${NDPI_SEARCH_PATHS} NO_DEFAULT_PATH) + find_library(NDPI_LIBRARIES NAMES ndpi PATHS "${NDPI_CUSTOM_INSTALL_PATH}/lib" NO_DEFAULT_PATH) if (NOT NDPI_LIBRARIES) @@ -62,45 +60,29 @@ include_directories(${NDPI_INCLUDE_DIRS}) add_definitions(-DENABLE_DPI) -@@ -215,8 +224,6 @@ if (ENABLE_LUA_SUPPORT) +@@ -258,7 +266,7 @@ if (ENABLE_LUA_SUPPORT) add_definitions(-DENABLE_LUA_HOOKS) - set(LUAJIT_CUSTOM_INSTALL_PATH "/opt/luajit_2.0.4") -- ++ set(LUAJIT_CUSTOM_INSTALL_PATH ${PREFIX}) + link_directories("${LUAJIT_CUSTOM_INSTALL_PATH}/lib") include_directories("${LUAJIT_CUSTOM_INSTALL_PATH}/include") +@@ -656,12 +664,12 @@ install(FILES networks_list DESTINATION "${CMAKE_INSTA + install(FILES networks_whitelist DESTINATION "${CMAKE_INSTALL_SYSCONFDIR}") -@@ -578,14 +585,14 @@ if (BUILD_TESTS) - endif() - - if (${CMAKE_SYSTEM_NAME} STREQUAL "FreeBSD" OR ${CMAKE_SYSTEM_NAME} STREQUAL "DragonFly") -- install(TARGETS fastnetmon DESTINATION bin) -- install(TARGETS fastnetmon_client DESTINATION bin) -+ install(TARGETS fastnetmon DESTINATION ${CMAKE_INSTALL_PREFIX}/bin) -+ install(TARGETS fastnetmon_client DESTINATION ${CMAKE_INSTALL_PREFIX}/bin) - -- install(FILES fastnetmon.conf DESTINATION etc) -+ install(FILES fastnetmon.conf DESTINATION ${CMAKE_INSTALL_PREFIX}/etc) - - # Install blank files for networks list and whitelist -- install(FILES networks_list DESTINATION etc) -- install(FILES networks_whitelist DESTINATION etc) -+ install(FILES networks_list DESTINATION ${CMAKE_INSTALL_PREFIX}/etc) -+ install(FILES networks_whitelist DESTINATION ${CMAKE_INSTALL_PREFIX}/etc) - else() - # Linux - install(TARGETS fastnetmon DESTINATION /usr/sbin) -@@ -599,8 +606,10 @@ else() - endif() - # man pages -install(FILES man/fastnetmon.1 DESTINATION /usr/share/man/man1) -install(FILES man/fastnetmon_client.1 DESTINATION /usr/share/man/man1) +#install(FILES man/fastnetmon.1 DESTINATION /usr/share/man/man1) +#install(FILES man/fastnetmon_client.1 DESTINATION /usr/share/man/man1) -+ -+install(FILES fastnetmon.conf DESTINATION ${CMAKE_INSTALL_PREFIX}/etc) - # Configure cpack package builder - # Run it with: cd build; cpack -G DEB .. + # service files +-configure_file(fastnetmon.service.in "${CMAKE_CURRENT_BINARY_DIR}/fastnetmon.service" @ONLY) +-install(FILES "${CMAKE_CURRENT_BINARY_DIR}/fastnetmon.service" DESTINATION ${CMAKE_INSTALL_SYSTEMD_SERVICEDIR}) ++#configure_file(fastnetmon.service.in "${CMAKE_CURRENT_BINARY_DIR}/fastnetmon.service" @ONLY) ++#install(FILES "${CMAKE_CURRENT_BINARY_DIR}/fastnetmon.service" DESTINATION ${CMAKE_INSTALL_SYSTEMD_SERVICEDIR}) + + if (${OS_ID} MATCHES debian|ubuntu) + install(FILES fastnetmon_init_script_debian_6_7 DESTINATION ${CMAKE_INSTALL_SYSCONFDIR}/init.d RENAME fastnetmon) Added: head/net-mgmt/fastnetmon/files/patch-src_fast__platform.h.template ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/net-mgmt/fastnetmon/files/patch-src_fast__platform.h.template Tue Oct 1 21:11:16 2019 (r513533) @@ -0,0 +1,26 @@ +--- src/fast_platform.h.template.orig 2019-02-13 22:20:23 UTC ++++ src/fast_platform.h.template +@@ -8,19 +8,19 @@ + std::string fastnetmon_version = "${FASTNETMON_APPLICATION_VERSION}"; + + std::string pid_path = "/var/run/fastnetmon.pid"; +-std::string global_config_path = "/etc/fastnetmon.conf"; ++std::string global_config_path = "%%PREFIX%%/etc/fastnetmon.conf"; + + std::string log_file_path = "/var/log/fastnetmon.log"; + std::string attack_details_folder = "/var/log/fastnetmon_attacks"; + + // Default path to notify script +-std::string notify_script_path = "/usr/local/bin/notify_about_attack.sh"; ++std::string notify_script_path = "%%PREFIX%%/bin/notify_about_attack.sh"; + + // Default path to file with networks for whitelising +-std::string white_list_path = "/etc/networks_whitelist"; ++std::string white_list_path = "%%PREFIX%%/etc/networks_whitelist"; + + // Default path to file with all networks listing +-std::string networks_list_path = "/etc/networks_list"; ++std::string networks_list_path = "%%PREFIX%%/etc/networks_list"; + + /* Platform specific paths end */ + Added: head/net-mgmt/fastnetmon/files/patch-src_man_fastnetmon.1 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/net-mgmt/fastnetmon/files/patch-src_man_fastnetmon.1 Tue Oct 1 21:11:16 2019 (r513533) @@ -0,0 +1,11 @@ +--- src/man/fastnetmon.1.orig 2019-02-13 22:20:23 UTC ++++ src/man/fastnetmon.1 +@@ -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, netmap, PF_RING, PCAP). + +-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 /usr/local/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