# Buildsheet autogenerated by ravenadm tool -- Do not edit. NAMEBASE= nfsen VERSION= 1.3.11 KEYWORDS= net_mgmt VARIANTS= standard SDESC[standard]= Web based frontend to nfdump netflow collector HOMEPAGE= https://github.com/phaag/nfsen CONTACT= nobody DOWNLOAD_GROUPS= main SITES[main]= GITHUB/phaag:nfsen:v.1.3.11 DISTFILE[1]= generated:main DF_INDEX= 1 SPKGS[standard]= single OPTIONS_AVAILABLE= none OPTIONS_STANDARD= none RUN_DEPENDS= nfdump:single:standard perl-MailTools:single:perl_default perl-Socket6:single:perl_default USES= cpe iconv shebangfix perl php PHP_EXTENSIONS= session sockets DISTNAME= nfsen-v.1.3.11 LICENSE= BSD3CLAUSE:single LICENSE_FILE= BSD3CLAUSE:{{WRKSRC}}/BSD-license.txt LICENSE_SCHEME= solo CPE_PRODUCT= nfsen CPE_VENDOR= nfsen FPC_EQUIVALENT= net-mgmt/nfsen SHEBANG_FILES= bin/testPlugin bin/RebuildHierarchy.pl bin/nfsen bin/nfsend SHEBANG_OLD_PERL= %%PERL%% SKIP_BUILD= yes RC_SUBR= nfsen:single SUB_FILES= pkg-message-single SUB_LIST= PREFIX={{PREFIX}} post-patch: ${SED} -e 's|%%PREFIX%%|${PREFIX}|g' \ -e 's|%%PORTVERSION%%|1.3.11|g' \ ${FILESDIR}/conf.php > ${WRKSRC}/conf.php ${REINPLACE_CMD} -i'' -e "s|/usr/bin/perl|${perl_CMD}|" \ -e 's|%%PREFIX%%|${PREFIX}|g' \ ${WRKSRC}/libexec/Nfcomm.pm \ ${WRKSRC}/etc/nfsen-dist.conf ${REINPLACE_CMD} -i'' -e "s|%%CONFDIR%%|${PREFIX}/etc|" \ ${WRKSRC}/libexec/NfConf.pm .for perlfile in bin/testPlugin bin/nfsen bin/nfsend bin/RebuildHierarchy.pl ${REINPLACE_CMD} -i'' -e "s|%%LIBEXECDIR%%|${PREFIX}/libexec/nfsen|" \ -e "s|perl -w$$|perl|" ${WRKSRC}/${perlfile} .endfor post-configure: ${FIND} ${WRKSRC} -name "*.orig" -delete do-install: ${MKDIR} ${STAGEDIR}${PREFIX}/var/nfsen/profiles-data/live ${MKDIR} ${STAGEDIR}${PREFIX}/var/nfsen/profiles-stat/live ${MKDIR} ${STAGEDIR}${PREFIX}/var/nfsen/profiles/live ${MKDIR} ${STAGEDIR}${PREFIX}/var/nfsen/filters ${MKDIR} ${STAGEDIR}${PREFIX}/var/nfsen/run ${MKDIR} ${STAGEDIR}${PREFIX}/libexec/nfsen/plugins ${MKDIR} ${STAGEDIR}${PREFIX}/www/nfsen/plugins (cd ${WRKSRC}/bin && ${INSTALL_SCRIPT} * ${STAGEDIR}${PREFIX}/bin/) ${INSTALL_DATA} ${WRKSRC}/etc/nfsen-dist.conf ${STAGEDIR}${PREFIX}/etc/ (cd ${WRKSRC}/html && ${COPYTREE_SHARE} . \ ${STAGEDIR}${PREFIX}/www/nfsen/ "! -name \._* -prune") (cd ${WRKSRC}/plugins/frontend/ && ${COPYTREE_SHARE} . \ ${STAGEDIR}${PREFIX}/www/nfsen/plugins/ "! -name \._* -prune") (cd ${WRKSRC}/libexec && ${INSTALL_SCRIPT} * \ ${STAGEDIR}${PREFIX}/libexec/nfsen/) (cd ${WRKSRC}/plugins/backend && ${COPYTREE_SHARE} . \ ${STAGEDIR}${PREFIX}/libexec/nfsen/plugins/ "! -name \._* -prune") ${INSTALL_DATA} ${WRKSRC}/installer-items/CopyRecursive.pm \ ${STAGEDIR}${PREFIX}/libexec/nfsen/ ${INSTALL_DATA} ${WRKSRC}/installer-items/RRDconvertv1.pm \ ${STAGEDIR}${PREFIX}/libexec/nfsen/ ${INSTALL_DATA} ${WRKSRC}/conf.php ${STAGEDIR}${PREFIX}/www/nfsen [FILE:413:descriptions/desc.single] NfSen is a graphical web based front end for the nfdump netflow tools. NfSen allows you to: * Display your netflow data: Flows, Packets and Bytes using RRD (Round Robin Database). * Easily navigate through the netflow data. * Process the netflow data within the specified time span. * Create history as well as continuous profiles. * Write your own plugins to process netflow data on a regular interval [FILE:105:distinfo] a842531f4023913870d0fccf2d375bc335d7ecac9b2eeb7c2aff689a5c1ae962 217135 phaag-nfsen-.1.3.11.tar.gz [FILE:1492:manifests/plist.single] @sample etc/nfsen-dist.conf etc/nfsen.conf bin/ RebuildHierarchy.pl nfsen nfsend testPlugin libexec/nfsen/ AbuseWhois.pm CopyRecursive.pm Log.pm Lookup.pm NfAlert.pm NfConf.pm NfProfile.pm NfSen.pm NfSenRC.pm NfSenRRD.pm NfSenSim.pm Nfcomm.pm Nfsources.pm Nfsync.pm Notification.pm RRDconvertv1.pm libexec/nfsen/plugins/ demoplugin.pm smily.jpg www/nfsen/ alerting.php colour_palette.html colour_picker.html conf.php details.php lookup.php navigator.php nfsen.php nfsenutil.php overview.php pic.php process.php profileadmin.php rrdgraph.php www/nfsen/css/ alerting.css detail.css lookup.css nfsen.css profileadmin.css www/nfsen/icons/ EmptyGraph.png Error.png ErrorGraph.png arrow.blue.down.png arrow.blue.right.png arrow.yellow.down.png arrow.yellow.right.png cancel.png close.png cursor-line.png cursor-start.png cursor-stop.png edit.png help.png invisible.png minus.png ok.png plus.png progress.png save.png shade.gif shade.png shadeactive.png space.png spyglas.png trash.png trigger.png www/nfsen/js/ ColorPicker2.js alerting.js detail.js global.js menu.js profileadmin.js www/nfsen/plugins/demoplugin.php @dir var @dir(www,,) var/nfsen @dir(www,,) var/nfsen/filters @dir(www,,) var/nfsen/profiles @dir(www,,) var/nfsen/profiles-data @dir(www,,) var/nfsen/profiles-data/live @dir(www,,) var/nfsen/profiles-stat @dir(www,,) var/nfsen/profiles-stat/live @dir(www,,) var/nfsen/profiles/live @dir(www,,) var/nfsen/run [FILE:2040:patches/patch-etc_nfsen-dist.conf] --- etc/nfsen-dist.conf.orig 2023-10-06 15:13:20 UTC +++ etc/nfsen-dist.conf @@ -18,7 +18,7 @@ # # Required for default layout -$BASEDIR = "/data/nfsen"; +$BASEDIR = "%%PREFIX%%"; # # Where to install the NfSen binaries @@ -26,7 +26,7 @@ $BINDIR="${BASEDIR}/bin"; # # Where to install the NfSen Perl modules -$LIBEXECDIR="${BASEDIR}/libexec"; +$LIBEXECDIR="${BASEDIR}/libexec/nfsen"; # # Where to install the config files @@ -36,7 +36,7 @@ $CONFDIR="${BASEDIR}/etc"; # NfSen html pages directory: # All php scripts will be installed here. # URL: Entry point for nfsen: http:///nfsen/nfsen.php -$HTMLDIR = "/var/www/nfsen/"; +$HTMLDIR = "%%PREFIX%%/www/nfsen"; # # Where to install the docs @@ -44,7 +44,7 @@ $DOCDIR="${HTMLDIR}/doc"; # # Var space for NfSen -$VARDIR="${BASEDIR}/var"; +$VARDIR="${BASEDIR}/var/nfsen"; # directory for all pid files # $PIDDIR="$VARDIR/run"; @@ -60,15 +60,15 @@ $VARDIR="${BASEDIR}/var"; # # The Profiles stat directory, where all profile information # RRD DBs and png pictures of the profile are stored -$PROFILESTATDIR="${BASEDIR}/profiles-stat"; +$PROFILESTATDIR="${VARDIR}/profiles-stat"; # # The Profiles directory, where all netflow data is stored -$PROFILEDATADIR="${BASEDIR}/profiles-data"; +$PROFILEDATADIR="${VARDIR}/profiles-data"; # # Where go all the backend plugins -$BACKEND_PLUGINDIR="${BASEDIR}/plugins"; +$BACKEND_PLUGINDIR="${LIBEXECDIR}/plugins"; # # Where go all the frontend plugins @@ -76,7 +76,7 @@ $FRONTEND_PLUGINDIR="${HTMLDIR}/plugins" # # nfdump tools path -$PREFIX = '/usr/local/bin'; +$PREFIX = '%%PREFIX%%/bin'; # # nfsend communication socket @@ -88,7 +88,7 @@ $PREFIX = '/usr/local/bin'; # This may be a different or the same uid than your web server. # Note: This user must be in group $WWWGROUP, otherwise nfcapd # is not able to write data files! -$USER = "netflow"; +$USER = "www"; # user and group of the web server process # All netflow processing will be done with this user [FILE:164:files/conf.php] [FILE:1203:files/nfsen.in] #!/bin/sh # # PROVIDE: nfsen # REQUIRE: LOGIN # KEYWORD: shutdown # . /etc/rc.subr name=nfsen rcvar=nfsen_enable load_rc_config $name nfsen_enable=${nfsen_enable-"NO"} #nfsen_flags=${nfsen_flags-""} nfsen_user=${nfsen_user-"www"} command="%%PREFIX%%/bin/nfsen" start_cmd="%%PREFIX%%/bin/nfsen start" stop_cmd="%%PREFIX%%/bin/nfsen stop" reload_cmd="%%PREFIX%%/bin/nfsen reconfig" status_cmd="%%PREFIX%%/bin/nfsen status" start_precmd=nfsen_start_precmd extra_commands=reload nfsen_start_precmd() { # This replicates functionality provided by # the perl install script that we're bypassing. # It also is better because you don't have to reinstall # to get this file back if [ ! -e %%PREFIX%%/var/nfsen/profiles-stat/live/profile.dat ]; then time=$(/bin/date +%s); timeu=$(/bin/expr $time - 300); profile_dat=%%PREFIX%%/var/nfsen/profiles-stat/live/profile.dat /usr/bin/printf "name = live group = . tbegin = $time tcreate = $time tstart = $time tend = $time updated = $timeu expire = 0 maxsize = 0 size = 0 type = 0 locked = 0 status = OK version = 130" | /usr/bin/tr -d '\011' > ${profile_dat} chown ${nfsen_user} ${profile_dat} fi } run_rc_command "$1" [FILE:1144:files/pkg-message-single.in] [[[ Configure your %%PREFIX%%/etc/nfsen.conf to have necessary sources Then run 'nfsen reconfig' to correctly setup source, RRD, and profile files. **** From nfdump/README.md **** Compatibility nfdump-1.7.x is compatible to nfdump-1.6.18, which means it can read files created with nfdump-1.6.18 or newer. Flow files created with earlier nfdump versions may not contain all flow elements. If you have older files, it is recommended to use nfdump-1.6.17 to update the records. Nfdump 1.7.x provides the same set of programs as 1.6.x and can be used almost as a drop-in replacement. This may change in future and older legacy programs may be removed. You can convert any old files from nfdump-1.6 to nfdump-1.7 format by reading/writing files: ./nfdump -r old-flowfile -y -w new-flowfile Please note, that only nfdump may read older flow files. All other programs relay on the new file format. Note for NfSen users: If you use NfSen, you must upgrade NfSen to the latest Github version https://github.com/phaag/nfsen. All specific binaries such as nfprofile and nftrack are still available with nfdump-1.7 but may be removed in future. ]]]