svn commit: r425746 - in head/net-mgmt/fastnetmon: . files

Babak Farrokhi farrokhi at FreeBSD.org
Tue Nov 8 15:15:33 UTC 2016


Author: farrokhi
Date: Tue Nov  8 15:15:32 2016
New Revision: 425746
URL: https://svnweb.freebsd.org/changeset/ports/425746

Log:
  Update net-mgmt/fastnetmon to 1.1.3
  
  Reviewed by:	mat, bapt
  Approved by:	mat
  Differential Revision:	https://reviews.freebsd.org/D8470

Added:
  head/net-mgmt/fastnetmon/files/patch-src_fast__dpi.cpp   (contents, props changed)
Modified:
  head/net-mgmt/fastnetmon/Makefile
  head/net-mgmt/fastnetmon/distinfo
  head/net-mgmt/fastnetmon/files/patch-src_CMakeLists.txt
  head/net-mgmt/fastnetmon/pkg-descr
  head/net-mgmt/fastnetmon/pkg-plist

Modified: head/net-mgmt/fastnetmon/Makefile
==============================================================================
--- head/net-mgmt/fastnetmon/Makefile	Tue Nov  8 15:14:08 2016	(r425745)
+++ head/net-mgmt/fastnetmon/Makefile	Tue Nov  8 15:15:32 2016	(r425746)
@@ -2,7 +2,7 @@
 # $FreeBSD$
 
 PORTNAME=	fastnetmon
-PORTVERSION=	1.1.2
+PORTVERSION=	1.1.3
 DISTVERSIONPREFIX=	v
 CATEGORIES=	net-mgmt security
 
@@ -15,10 +15,14 @@ LICENSE_FILE=	${WRKSRC}/LICENSE
 BROKEN_powerpc64=	Does not build
 
 LIB_DEPENDS=	libboost_regex.so:devel/boost-libs \
-		liblog4cpp.so:devel/log4cpp
+		liblog4cpp.so:devel/log4cpp \
+		libndpi.so:net/ndpi \
+		libluajit-5.1.so:lang/luajit \
+		libmongoc-1.0.so:devel/mongo-c-driver \
+		libjson-c.so:devel/json-c
 
 USE_GITHUB=	yes
-GH_ACCOUNT=	FastVPSEestiOu
+GH_ACCOUNT=	pavel-odintsov
 
 USERS=	${PORTNAME}
 GROUPS=	${PORTNAME}
@@ -26,9 +30,14 @@ GROUPS=	${PORTNAME}
 USES=	cmake
 CMAKE_SOURCE_PATH=	${WRKSRC}/src
 
+CMAKE_ARGS+=	-DDISABLE_PF_RING_SUPPORT=ON
+CMAKE_INSTALL_PREFIX=	${PREFIX}
+
 USE_RC_SUBR=	${PORTNAME}
 
-OPTIONS_DEFINE=	DOCS
+OPTIONS_DEFINE=	DOCS REDIS
+
+REDIS_LIB_DEPENDS=	libhiredis.so:databases/hiredis
 
 PORTDOCS=	*
 
@@ -44,7 +53,11 @@ post-patch:
 post-install:
 	${MV} ${STAGEDIR}${PREFIX}/etc/${PORTNAME}.conf \
 		${STAGEDIR}${PREFIX}/etc/${PORTNAME}.conf.sample
-	cd ${WRKSRC} && ${COPYTREE_SHARE} "README.md docs" ${STAGEDIR}${DOCSDIR}
 	${MKDIR} ${STAGEDIR}/var/run/fastnetmon ${STAGEDIR}/var/log/fastnetmon
+	${INSTALL_MAN} ${WRKSRC}/src/man/fastnetmon.1 ${STAGEDIR}${MANPREFIX}/man/man1
+	${INSTALL_MAN} ${WRKSRC}/src/man/fastnetmon_client.1 ${STAGEDIR}${MANPREFIX}/man/man1
+
+post-install-DOCS-on:
+	cd ${WRKSRC} && ${COPYTREE_SHARE} "README.md docs" ${STAGEDIR}${DOCSDIR}
 
 .include <bsd.port.mk>

Modified: head/net-mgmt/fastnetmon/distinfo
==============================================================================
--- head/net-mgmt/fastnetmon/distinfo	Tue Nov  8 15:14:08 2016	(r425745)
+++ head/net-mgmt/fastnetmon/distinfo	Tue Nov  8 15:15:32 2016	(r425746)
@@ -1,2 +1,3 @@
-SHA256 (FastVPSEestiOu-fastnetmon-v1.1.2_GH0.tar.gz) = f2c554aa402e608b9837132b17da79b49f1b998c17934344779ddc9a397261b4
-SIZE (FastVPSEestiOu-fastnetmon-v1.1.2_GH0.tar.gz) = 6072730
+TIMESTAMP = 1473567716
+SHA256 (pavel-odintsov-fastnetmon-v1.1.3_GH0.tar.gz) = e996d8258336bf06887b4fbd47f55a8ac1769e6b3f4dd32f5c245ce4f7258af4
+SIZE (pavel-odintsov-fastnetmon-v1.1.3_GH0.tar.gz) = 4173717

Modified: head/net-mgmt/fastnetmon/files/patch-src_CMakeLists.txt
==============================================================================
--- head/net-mgmt/fastnetmon/files/patch-src_CMakeLists.txt	Tue Nov  8 15:14:08 2016	(r425745)
+++ head/net-mgmt/fastnetmon/files/patch-src_CMakeLists.txt	Tue Nov  8 15:15:32 2016	(r425746)
@@ -1,46 +1,102 @@
---- src/CMakeLists.txt.orig	2015-06-02 16:43:16 UTC
+
+$FreeBSD$
+
+--- src/CMakeLists.txt.orig	2016-06-22 05:22:26 UTC
 +++ src/CMakeLists.txt
-@@ -14,8 +14,8 @@ set (Tutorial_VERSION_MAJOR 1)
- set (Tutorial_VERSION_MINOR 1)
- 
- # It's pretty safe and provide big speedup for our packet processor and patricia code
--set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -O2 ")
--set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O2")
-+set(CMAKE_C_FLAGS_RELEASE "-O2")
-+set(CMAKE_CXX_FLAGS_RELEASE "-O2")
+@@ -27,6 +27,13 @@ project(FastNetMon)
+ set (FASTNETMON_VERSION_MAJOR 1)
+ set (FASTNETMON_VERSION_MINOR 1)
+ 
++# Respect PREFIX variable in FreeBSD
++if($ENV{PREFIX})
++    set(PREFIX $ENV{PREFIX})
++else()
++    set(PREFIX "/usr/local")
++endif()
++
+ 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
+ 
+ message(STATUS "C++ compilation flags: ${CMAKE_CXX_FLAGS_RELEASE}")
+ 
+-set(HIREDIS_CUSTOM_INSTALL_PATH "/opt/libhiredis_0_13")
+-set(LOG4CPP_CUSTOM_INSTALL_PATH "/opt/log4cpp1.1.1")
+-set(JSONC_CUSTOM_INSTALL_PATH "/opt/json-c-0.12")
+-set(PFRING_CUSTOM_INSTALL_PATH "/opt/pf_ring_6.0.3")
+-set(LIBPCAP_CUSTOM_INSTALL_PATH "/opt/libpcap_1.7.4")
+-set(MONGO_C_CUSTOM_INSTALL_PATH "/opt/mongo_c_driver_1_1_9")
++set(HIREDIS_CUSTOM_INSTALL_PATH ${PREFIX})
++set(LOG4CPP_CUSTOM_INSTALL_PATH ${PREFIX})
++set(JSONC_CUSTOM_INSTALL_PATH ${PREFIX})
++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)
  
-@@ -91,11 +91,13 @@ target_link_libraries(netflow_plugin ipf
- add_library(pcap_plugin STATIC pcap_plugin/pcap_collector.cpp)
- target_link_libraries(pcap_plugin pcap)
+@@ -190,15 +199,15 @@ if (ENABLE_DPI_SUPPORT) 
  
-+find_package(Threads)
-+
- if (ENABLE_PFRING_SUPPORT) 
-     add_library(pfring_plugin STATIC pfring_plugin/pfring_collector.cpp)
-     target_link_libraries(pfring_plugin ${PFRING_LIBRARIES})
-     target_link_libraries(pfring_plugin numa)
--    target_link_libraries(pfring_plugin pthread)
-+    target_link_libraries(pfring_plugin ${CMAKE_THREAD_LIBS_INIT})
- endif()
+     add_library(fast_dpi STATIC fast_dpi.cpp)
+ 
+-    set(NDPI_INCLUDE_DIRS "/opt/ndpi/include/libndpi-1.7.1")
+-
+-    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)
+         message(FATAL_ERROR "Could not find nDPI library")
+     endif()
  
- # example plugin
-@@ -169,7 +171,7 @@ endif()
+-    link_directories("/opt/ndpi/lib")
++    link_directories(${NDPI_LIBRARIES})
+     include_directories(${NDPI_INCLUDE_DIRS})
  
- target_link_libraries(fastnetmon ${LOG4CPP_LIBRARY_PATH})
+     add_definitions(-DENABLE_DPI)
+@@ -215,8 +224,6 @@ if (ENABLE_LUA_SUPPORT)
  
--target_link_libraries(fastnetmon pthread)
-+target_link_libraries(fastnetmon ${CMAKE_THREAD_LIBS_INIT})
+     add_definitions(-DENABLE_LUA_HOOKS)
  
- # Our libs
- target_link_libraries(fastnetmon patricia)
-@@ -217,6 +219,8 @@ endif()
- install(TARGETS fastnetmon DESTINATION bin)
- install(TARGETS fastnetmon_client DESTINATION bin)
+-    set(LUAJIT_CUSTOM_INSTALL_PATH "/opt/luajit_2.0.4")
+-
+     link_directories("${LUAJIT_CUSTOM_INSTALL_PATH}/lib")
+     include_directories("${LUAJIT_CUSTOM_INSTALL_PATH}/include")
  
-+install(FILES fastnetmon.conf DESTINATION etc)
+@@ -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 ..
- set(CPACK_PACKAGE_NAME "fastnetmon")

Added: head/net-mgmt/fastnetmon/files/patch-src_fast__dpi.cpp
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/net-mgmt/fastnetmon/files/patch-src_fast__dpi.cpp	Tue Nov  8 15:15:32 2016	(r425746)
@@ -0,0 +1,11 @@
+--- src/fast_dpi.cpp.orig	2016-06-22 05:22:26 UTC
++++ src/fast_dpi.cpp
+@@ -35,7 +35,7 @@ struct ndpi_detection_module_struct* ini
+     u_int32_t detection_tick_resolution = 1000;
+     
+     struct ndpi_detection_module_struct* my_ndpi_struct =
+-        ndpi_init_detection_module(detection_tick_resolution, malloc, free, debug_printf);
++        ndpi_init_detection_module();
+ 
+     if (my_ndpi_struct == NULL) {
+         // printf("Can't init nDPI");

Modified: head/net-mgmt/fastnetmon/pkg-descr
==============================================================================
--- head/net-mgmt/fastnetmon/pkg-descr	Tue Nov  8 15:14:08 2016	(r425745)
+++ head/net-mgmt/fastnetmon/pkg-descr	Tue Nov  8 15:15:32 2016	(r425746)
@@ -1,4 +1,4 @@
 FastNetMon - A high performance DoS/DDoS load analyzer built on top of
 multiple packet capture engines (NetFlow, IPFIX, sFLOW, netmap, PF_RING, PCAP).
 
-WWW: https://github.com/FastVPSEestiOu/fastnetmon
+WWW: https://fastnetmon.com

Modified: head/net-mgmt/fastnetmon/pkg-plist
==============================================================================
--- head/net-mgmt/fastnetmon/pkg-plist	Tue Nov  8 15:14:08 2016	(r425745)
+++ head/net-mgmt/fastnetmon/pkg-plist	Tue Nov  8 15:15:32 2016	(r425746)
@@ -1,5 +1,9 @@
 bin/fastnetmon
 bin/fastnetmon_client
+etc/networks_list
+etc/networks_whitelist
+man/man1/fastnetmon.1.gz
+man/man1/fastnetmon_client.1.gz
 @sample etc/fastnetmon.conf.sample
 @dir(fastnetmon,fastnetmon) /var/run/fastnetmon
 @dir(fastnetmon,fastnetmon) /var/log/fastnetmon


More information about the svn-ports-head mailing list