From owner-freebsd-ports-bugs@FreeBSD.ORG Mon Aug 6 12:40:02 2007 Return-Path: Delivered-To: freebsd-ports-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8116A16A418 for ; Mon, 6 Aug 2007 12:40:02 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 616F813C457 for ; Mon, 6 Aug 2007 12:40:02 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.14.1/8.14.1) with ESMTP id l76Ce2pG040147 for ; Mon, 6 Aug 2007 12:40:02 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.1/8.14.1/Submit) id l76Ce2KX040146; Mon, 6 Aug 2007 12:40:02 GMT (envelope-from gnats) Resent-Date: Mon, 6 Aug 2007 12:40:02 GMT Resent-Message-Id: <200708061240.l76Ce2KX040146@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-ports-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Piotr Rybicki Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AFF5D16A419 for ; Mon, 6 Aug 2007 12:37:44 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (www.freebsd.org [IPv6:2001:4f8:fff6::21]) by mx1.freebsd.org (Postfix) with ESMTP id 996C713C461 for ; Mon, 6 Aug 2007 12:37:44 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (localhost [127.0.0.1]) by www.freebsd.org (8.14.1/8.14.1) with ESMTP id l76Cbf87083750 for ; Mon, 6 Aug 2007 12:37:41 GMT (envelope-from nobody@www.freebsd.org) Received: (from nobody@localhost) by www.freebsd.org (8.14.1/8.14.1/Submit) id l76CbfZg083749; Mon, 6 Aug 2007 12:37:41 GMT (envelope-from nobody) Message-Id: <200708061237.l76CbfZg083749@www.freebsd.org> Date: Mon, 6 Aug 2007 12:37:41 GMT From: Piotr Rybicki To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-3.0 Cc: Subject: ports/115246: [NEW] net-mgmt/neye port X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 06 Aug 2007 12:40:02 -0000 >Number: 115246 >Category: ports >Synopsis: [NEW] net-mgmt/neye port >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: maintainer-update >Submitter-Id: current-users >Arrival-Date: Mon Aug 06 12:40:01 GMT 2007 >Closed-Date: >Last-Modified: >Originator: Piotr Rybicki >Release: 6.2 >Organization: >Environment: FreeBSD ryba-laptop.cadera.com.pl 6.2-RELEASE-p6 FreeBSD 6.2-RELEASE-p6 #0: Thu Jul 19 20:54:52 CEST 2007 root@ryba-laptop.cadera.com.pl:/usr/obj/usr/src/sys/LAPTOP i386 >Description: Included shar file for new port. Also Updates to UID and GID files are needed (lines included) # shar `find neye` # This is a shell archive. Save it in a file, remove anything before # this line, and then unpack it by entering "sh file". Note, it may # create directories; files and directories will be owned by you and # have default permissions. # # This archive contains: # # neye # neye/distinfo # neye/pkg-descr # neye/pkg-plist # neye/Makefile # neye/files # neye/files/neyed.sh.in # neye/files/patch-parser.c # neye/files/pkg-install.in # neye/files/pkg-message.in # echo c - neye mkdir -p neye > /dev/null 2>&1 echo x - neye/distinfo sed 's/^X//' >neye/distinfo << 'END-of-neye/distinfo' XMD5 (neye-1.0.1.tar.bz2) = 772bb9a84f8c5a26b85f341f07eace0e XSHA256 (neye-1.0.1.tar.bz2) = 3c764197aab9f3b281c44257711f0a2389ca27c5570923b47ab137dd0d96efd5 XSIZE (neye-1.0.1.tar.bz2) = 195765 END-of-neye/distinfo echo x - neye/pkg-descr sed 's/^X//' >neye/pkg-descr << 'END-of-neye/pkg-descr' XNEye (Network Eye) is a NetFlow collector software working on Unix systems Xwhich is capable of receiving flows from Cisco Routers (but not only) and Xstore them in ASCII (for raw grepping), in SQLite databases (for quick & dirty XSELECTs) or in full blown MySQL databases. It's written in C language, making Xuse of POSIX threads if available (thus scalable) and is Open Source (licensed Xunder BITGPL, read LICENSE). X XWWW: http://neye.unsupported.info/ END-of-neye/pkg-descr echo x - neye/pkg-plist sed 's/^X//' >neye/pkg-plist << 'END-of-neye/pkg-plist' Xsbin/neyed Xbin/trafgen X%%DATADIR%%/createdb X@dirrm %%DATADIR%% END-of-neye/pkg-plist echo x - neye/Makefile sed 's/^X//' >neye/Makefile << 'END-of-neye/Makefile' X# ex:ts=8 X# Ports collection makefile for: neye X# Date created: Nov 3, 2002 X# Whom: Piotr Rybicki () X# X# $FreeBSD$ X# X X# maintainer GOTHAS X# You actually HAVE to link with sqlite, no matter if You use it later X# --with|enable-mysql switch in broken - it disables mysql support X# --with|enable-pthreads switch in broken - it disables pthreads support X XPORTNAME= neye XPORTVERSION= 1.0.1 XCATEGORIES= net-mgmt XMASTER_SITES= http://neye.unsupported.info/ X XMAINTAINER= meritus@innervision.pl XCOMMENT= An Open Source Netflow collector to Sqlite or MySQL database X XUSE_RC_SUBR= neyed.sh XUSE_BZIP2= yes X XNEYEDUSER?= neyed XNEYEDGROUP?= ${NEYEDUSER} XDBDIR?= /var/db XPKGINSTALL= ${WRKDIR}/pkg-install XPKGMESSAGE= ${WRKDIR}/pkg-message XSUB_FILES= pkg-message pkg-install XSUB_LIST= NEYEDUSER=${NEYEDUSER} NEYEDGROUP=${NEYEDGROUP} X X# Sorry - You can NOT wish to NOT have sqlite support XUSE_SQLITE= 2 X XUSE_GMAKE= yes XGNU_CONFIGURE= yes XUSE_AUTOTOOLS= automake:16 XAUTOMAKE_ARGS= -c -a XCONFIGURE_TARGET= --build=${ARCH}-portbld-freebsd${OSREL} XCONFIGURE_ARGS+= --with-telcosux X X.if defined(NEYE_WITH_MYSQL) && !defined(NEYE_WITHOUT_MYSQL) X#CONFIGURE_ARGS+= --enable-mysql --with-mysql-lib=${LOCALHOASE}/lib/mysql XCONFIGURE_ARGS+= --with-mysql-libraries=${LOCALBASE}/lib/mysql XUSE_MYSQL= yes X.else XCONFIGURE_ARGS+= --disable-mysql X.endif X X# Sorry - You can NOT wish to NOT have sqlite support X#.if defined(NEYE_WITHOUT_SQLITE) X#CONFIGURE_ARGS+= --disable-sqlite X#.else X#CONFIGURE_ARGS+= --enable-sqlite X#.endif X X.if defined(NEYE_WITHOUT_PTHREADS) XCONFIGURE_ARGS+= --disable-pthreads X#.else X#CONFIGURE_ARGS+= --enable-pthreads X.endif X X.if defined(NEYE_WITH_DMALLOC) XCONFIGURE_ARGS+= --enable-dmalloc XBUILD_DEPENDS+= dmalloc:${PORTSDIR}/devel/dmalloc X.endif X Xpre-fetch: X @${ECHO} "" X @${ECHO} "You may use the following build options:" X @${ECHO} "" X @${ECHO} " NEYE_WITH_MYSQL=yes Use mysql (recommended)." X @${ECHO} " NEYE_WITHOUT_MYSQL=yes Don't use mysql (not recommended)." X @${ECHO} " NEYE_WITHOUT_PTHREADS=yes Don't use pthreads (not recommended)." X @${ECHO} " NEYE_WITH_DMALLOC=yes Use debug malloc package (not recommended)." X @${ECHO} "" X Xpost-install: X ${MKDIR} ${DATADIR} X ${INSTALL_DATA} ${WRKSRC}/neyed/mysql/createdb ${DATADIR}/ X @${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL X @${MKDIR} ${DBDIR}/${PORTNAME} X @${CHOWN} -R ${NEYEDUSER}:${NEYEDGROUP} ${DBDIR}/${PORTNAME} X @${CAT} ${PKGMESSAGE} X X.include X X.include END-of-neye/Makefile echo c - neye/files mkdir -p neye/files > /dev/null 2>&1 echo x - neye/files/neyed.sh.in sed 's/^X//' >neye/files/neyed.sh.in << 'END-of-neye/files/neyed.sh.in' X#!/bin/sh X# X# $FreeBSD$ X# X# PROVIDE: neyed X# REQUIRE: LOGIN X# Xneyed_enable=${neyed_enable-"NO"} Xneyed_flags=${neyed_flags-" -d -x"} # To add mysql support : add -y -m MYSQLHOSTNAME parameter to neyed_flags Xneyed_user=${neyed_user-"neyed"} Xneyed_log_text_path=${neyed_log_text_path-"/var/db/neye/neftlow.log"} Xneyed_log_trash_path=${neyed_log_trash_path-"/var/db/neye/neftlow_trash.log"} Xneyed_log_bin_path=${neyed_log_bin_path-"/var/db/neye/neftlow.db"} X X. %%RC_SUBR%% X Xname="neyed" Xrcvar=`set_rcvar` X X#pidfile="/var/run/${name}.pid" Xload_rc_config ${name} X Xcommand="%%PREFIX%%/sbin/${name}" Xcommand_args="-u ${neyed_user} -l ${neyed_log_text_path} -b ${neyed_log_bin_path} -t ${neyed_log_trash_path} ${neyed_flags}" X Xrun_rc_command "$1" X END-of-neye/files/neyed.sh.in echo x - neye/files/patch-parser.c sed 's/^X//' >neye/files/patch-parser.c << 'END-of-neye/files/patch-parser.c' X--- neyed/parser.c.orig Fri Nov 12 03:57:40 2004 X+++ neyed/parser.c Mon Aug 6 13:53:33 2007 X@@ -26,7 +26,7 @@ X X time_t dstart, dend, now; X X- long uptime,unixseconds,unixnanoseconds,sequence; X+ long uptime,unixseconds,unixnanoseconds,sequence,p1; X unsigned int sport,dport,port; X X NetFlowHeader header; X@@ -120,8 +120,11 @@ X sport = ntohs(entry.src_port); X dport = ntohs(entry.dst_port); X uptime = ntohl(header.uptime); X- dstart = unixseconds + (ntohl(entry.time_start)/1000); X- dend = unixseconds + (ntohl(entry.time_stop)/1000); X+ X+ p1=unixseconds-(uptime/1000); X+ X+ dstart = p1 + (ntohl(entry.time_start)/1000); X+ dend = p1 + (ntohl(entry.time_stop)/1000); X protocol = entry.ip_protocol; X X /* IpProtocol(protocol,strprotocol); */ END-of-neye/files/patch-parser.c echo x - neye/files/pkg-install.in sed 's/^X//' >neye/files/pkg-install.in << 'END-of-neye/files/pkg-install.in' X#!/bin/sh X XPW=/usr/sbin/pw XUID=129 XGID=${UID} XNEYEDUSER="%%NEYEDUSER%%" XNEYEDGROUP="%%NEYEDGROUP%%" XPREFIX="%%PREFIX%%" X Xif [ "$2" != "POST-INSTALL" ]; then X exit 0 Xfi X Xif ${PW} group show "${NEYEDGROUP}" 2>/dev/null; then X echo "You already have a group \"${NEYEDGROUP}\", so I will use it." Xelse X if ${PW} groupadd ${NEYEDGROUP} -g ${GID}; then X echo "Added group \"${NEYEDGROUP}\"." X else X echo "Adding group \"${NEYEDGROUP}\" failed..." X exit 1 X fi Xfi X Xif ${PW} user show "${NEYEDUSER}" 2>/dev/null; then X echo "You already have a user \"${NEYEDUSER}\", so I will use it." Xelse X if ${PW} useradd ${NEYEDUSER} -u ${UID} -g ${NEYEDGROUP} -h - \ X -d "/nonexistent" -s /sbin/nologin -c "Neyed Sandbox" X then X echo "Added user \"${NEYEDUSER}\"." X else X echo "Adding user \"${NEYEDUSER}\" failed..." X exit 1 X fi Xfi X Xexit END-of-neye/files/pkg-install.in echo x - neye/files/pkg-message.in sed 's/^X//' >neye/files/pkg-message.in << 'END-of-neye/files/pkg-message.in' X X========================================================================== XNotes from maintainer: X XYou need to create FLOWDB database and table and 'collector' MySQL user Xwith empty password. X XTable structure to create can be found in %%DATADIR%% XThis version has hardcoded this parameters in includes/defaults.h X XProbably only reasonable setup is when 'collector' user is restricted Xacces only from localhost. X XWhen deleting this port remember to remowe %%NEYEDUSER%% user and %%NEYEDGROUP%% group X XEnjoy! X X========================================================================== X END-of-neye/files/pkg-message.in exit UIDs: neyed:*:129:129:Neyed Sandbox:/nonexistent:/sbin/nologin GIDs: neyed:*:129: >How-To-Repeat: This is a new port request. Thanks. >Fix: This is a new port request. Thanks. >Release-Note: >Audit-Trail: >Unformatted: