Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 31 Aug 2015 09:29:18 +0000 (UTC)
From:      Babak Farrokhi <farrokhi@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r395657 - in head: . net-mgmt net-mgmt/fastnetmon net-mgmt/fastnetmon/files
Message-ID:  <201508310929.t7V9TI8c073148@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: farrokhi
Date: Mon Aug 31 09:29:17 2015
New Revision: 395657
URL: https://svnweb.freebsd.org/changeset/ports/395657

Log:
  New Port: net-mgmt/fastnetmon 1.1.2 - high performance DoS/DDoS load analyzer
  
  Approved by:	 mat
  Differential Revision:	https://reviews.freebsd.org/D3532

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

Modified: head/GIDs
==============================================================================
--- head/GIDs	Mon Aug 31 08:57:38 2015	(r395656)
+++ head/GIDs	Mon Aug 31 09:29:17 2015	(r395657)
@@ -219,6 +219,7 @@ monkeysphere:*:641:
 aox:*:666:
 riak:*:667:
 bnetd:*:700:
+fastnetmon:*:701:
 bopm:*:717:
 openxpki:*:777:
 zetacoin:*:780:

Modified: head/UIDs
==============================================================================
--- head/UIDs	Mon Aug 31 08:57:38 2015	(r395656)
+++ head/UIDs	Mon Aug 31 09:29:17 2015	(r395657)
@@ -224,6 +224,7 @@ monkeysphere:*:641:641::0:0:Monkeysphere
 aox:*:666:666::0:0:Archiveopteryx user:/nonexistent:/usr/sbin/nologin
 riak:*:667:667::0:0:Riak user:/usr/local/lib/riak:/bin/sh
 bnetd:*:700:700::0:0:Bnetd user:/nonexistent:/usr/sbin/nologin
+fastnetmon:*:701:701::0:0:FastNetMon user:/nonexistent:/usr/sbin/nologin
 bopm:*:717:717::0:0:Blitzed Open Proxy Monitor:/nonexistent:/bin/sh
 openxpki:*:777:777::0:0:OpenXPKI Owner:/nonexistent:/usr/sbin/nologin
 zetacoin:*:780:780::0:0:ZetaCoin Daemon:/nonexistent:/usr/sbin/nologin

Modified: head/net-mgmt/Makefile
==============================================================================
--- head/net-mgmt/Makefile	Mon Aug 31 08:57:38 2015	(r395656)
+++ head/net-mgmt/Makefile	Mon Aug 31 09:29:17 2015	(r395657)
@@ -57,6 +57,7 @@
     SUBDIR += etherape
     SUBDIR += ettercap
     SUBDIR += ezradius
+    SUBDIR += fastnetmon
     SUBDIR += fetchconfig
     SUBDIR += flow-extract
     SUBDIR += flow-tools

Added: head/net-mgmt/fastnetmon/Makefile
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/net-mgmt/fastnetmon/Makefile	Mon Aug 31 09:29:17 2015	(r395657)
@@ -0,0 +1,46 @@
+# Created by: Babak Farrokhi <farrokhi@FreeBSD.org>
+# $FreeBSD$
+
+PORTNAME=	fastnetmon
+PORTVERSION=	1.1.2
+DISTVERSIONPREFIX=	v
+CATEGORIES=	net-mgmt security
+
+MAINTAINER=	farrokhi@FreeBSD.org
+COMMENT=	Very fast DDoS analyzer with sflow/netflow/mirror support
+
+LICENSE=	GPLv2
+LICENSE_FILE=	${WRKSRC}/LICENSE
+
+LIB_DEPENDS=	libboost_regex.so:${PORTSDIR}/devel/boost-libs \
+		liblog4cpp.so:${PORTSDIR}/devel/log4cpp
+
+USE_GITHUB=	yes
+GH_ACCOUNT=	FastVPSEestiOu
+
+USERS=	${PORTNAME}
+GROUPS=	${PORTNAME}
+
+USES=	cmake
+CMAKE_SOURCE_PATH=	${WRKSRC}/src
+
+USE_RC_SUBR=	${PORTNAME}
+
+OPTIONS_DEFINE=	DOCS
+
+PORTDOCS=	*
+
+post-patch:
+	@${REINPLACE_CMD} -e 's|/usr/local|${LOCALBASE}|' ${WRKSRC}/src/CMakeLists.txt
+	@${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
+
+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
+
+.include <bsd.port.mk>

Added: head/net-mgmt/fastnetmon/distinfo
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/net-mgmt/fastnetmon/distinfo	Mon Aug 31 09:29:17 2015	(r395657)
@@ -0,0 +1,2 @@
+SHA256 (FastVPSEestiOu-fastnetmon-v1.1.2_GH0.tar.gz) = f2c554aa402e608b9837132b17da79b49f1b998c17934344779ddc9a397261b4
+SIZE (FastVPSEestiOu-fastnetmon-v1.1.2_GH0.tar.gz) = 6072730

Added: head/net-mgmt/fastnetmon/files/fastnetmon.in
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/net-mgmt/fastnetmon/files/fastnetmon.in	Mon Aug 31 09:29:17 2015	(r395657)
@@ -0,0 +1,28 @@
+#!/bin/sh
+
+# PROVIDE: fastnetmon
+# REQUIRE: NETWORKING SERVERS LOGIN
+# BEFORE:  securelevel
+# KEYWORD: shutdown
+
+# Add the following line to /etc/rc.conf to enable 'fastnetmon':
+#
+# fastnetmon_enable="YES"
+#
+
+. /etc/rc.subr
+
+name=fastnetmon
+desc="fastnetmon startup script"
+rcvar=fastnetmon_enable
+
+load_rc_config "$name"
+
+: ${fastnetmon_enable:=NO}
+: ${fastnetmon_user:=fastnetmon}
+: ${fastnetmon_flags:=--daemonize}
+
+command=%%PREFIX%%/bin/fastnetmon
+pidfile=/var/run/fastnetmon/$name.pid
+
+run_rc_command "$1"

Added: head/net-mgmt/fastnetmon/files/patch-src_CMakeLists.txt
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/net-mgmt/fastnetmon/files/patch-src_CMakeLists.txt	Mon Aug 31 09:29:17 2015	(r395657)
@@ -0,0 +1,46 @@
+--- src/CMakeLists.txt.orig	2015-06-02 16:43:16 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")
+ 
+ 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)
+ 
++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()
+ 
+ # example plugin
+@@ -169,7 +171,7 @@ endif()
+ 
+ target_link_libraries(fastnetmon ${LOG4CPP_LIBRARY_PATH})
+ 
+-target_link_libraries(fastnetmon pthread)
++target_link_libraries(fastnetmon ${CMAKE_THREAD_LIBS_INIT})
+ 
+ # Our libs
+ target_link_libraries(fastnetmon patricia)
+@@ -217,6 +219,8 @@ endif()
+ install(TARGETS fastnetmon DESTINATION bin)
+ install(TARGETS fastnetmon_client DESTINATION bin)
+ 
++install(FILES fastnetmon.conf DESTINATION etc)
++
+ # Configure cpack package builder
+ # Run it with: cd build; cpack -G DEB ..
+ set(CPACK_PACKAGE_NAME "fastnetmon")

Added: head/net-mgmt/fastnetmon/pkg-descr
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/net-mgmt/fastnetmon/pkg-descr	Mon Aug 31 09:29:17 2015	(r395657)
@@ -0,0 +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

Added: head/net-mgmt/fastnetmon/pkg-plist
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/net-mgmt/fastnetmon/pkg-plist	Mon Aug 31 09:29:17 2015	(r395657)
@@ -0,0 +1,5 @@
+bin/fastnetmon
+bin/fastnetmon_client
+@sample etc/fastnetmon.conf.sample
+@dir(fastnetmon,fastnetmon) /var/run/fastnetmon
+@dir(fastnetmon,fastnetmon) /var/log/fastnetmon



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