aboutsummaryrefslogtreecommitdiffstats
path: root/net-mgmt/nfsen-devel
diff options
context:
space:
mode:
authormiwi <miwi@FreeBSD.org>2007-08-02 18:01:58 +0800
committermiwi <miwi@FreeBSD.org>2007-08-02 18:01:58 +0800
commit00a1279656afc2fdbf1c50837b32cd192de42919 (patch)
tree470e86b17638b311d8841f3b281c89c22e7720ac /net-mgmt/nfsen-devel
parent738fcfef297e89796682295d4fb4df3d22f80418 (diff)
downloadfreebsd-ports-gnome-00a1279656afc2fdbf1c50837b32cd192de42919.tar.gz
freebsd-ports-gnome-00a1279656afc2fdbf1c50837b32cd192de42919.tar.zst
freebsd-ports-gnome-00a1279656afc2fdbf1c50837b32cd192de42919.zip
- Update to 2007312
PR: 113466 Submitted by janos.mohacsi@bsd.hu (maintainer)
Diffstat (limited to 'net-mgmt/nfsen-devel')
-rw-r--r--net-mgmt/nfsen-devel/Makefile33
-rw-r--r--net-mgmt/nfsen-devel/distinfo6
-rw-r--r--net-mgmt/nfsen-devel/files/patch-bin_testPlugin25
-rw-r--r--net-mgmt/nfsen-devel/files/patch-html_alerting.php13
-rw-r--r--net-mgmt/nfsen-devel/files/patch-html_nfsen.php33
-rw-r--r--net-mgmt/nfsen-devel/files/patch-install.pl20
-rw-r--r--net-mgmt/nfsen-devel/files/patch-libexec_NfSen.pm53
-rw-r--r--net-mgmt/nfsen-devel/pkg-plist54
8 files changed, 210 insertions, 27 deletions
diff --git a/net-mgmt/nfsen-devel/Makefile b/net-mgmt/nfsen-devel/Makefile
index 4ccbe861d967..fecf1fc21a8e 100644
--- a/net-mgmt/nfsen-devel/Makefile
+++ b/net-mgmt/nfsen-devel/Makefile
@@ -1,23 +1,25 @@
-# New ports collection makefile for: nfsen
-# Date created: 25 March 2005
+# New ports collection makefile for: nfsen-devel
+# Date created: 21 May 2007
# Whom: janos.mohacsi@bsd.hu
#
# $FreeBSD$
#
PORTNAME= nfsen
-PORTVERSION= 1.2.4.20060810
+DISTVERSION= 20070312
CATEGORIES= net-mgmt
-MASTER_SITES= ${MASTER_SITE_SOURCEFORGE} \
- http://nfsen.sourceforge.net/
-MASTER_SITE_SUBDIR= ${PORTNAME}
-DISTNAME= ${PORTNAME}-snapshot-20060810
+MASTER_SITES= SF
+PKGNAMESUFFIX= -devel
+DISTNAME= nfsen-snapshot-${PORTVERSION}
MAINTAINER= janos.mohacsi@bsd.hu
-COMMENT= Web based frontend to nfdump netflow collector
+COMMENT= Development version of web based frontend to nfdump
-RUN_DEPENDS= ${SITE_PERL}/RRDp.pm:${PORTSDIR}/databases/rrdtool \
- nfdump:${PORTSDIR}/net-mgmt/nfdump
+RUN_DEPENDS= nfdump:${PORTSDIR}/net-mgmt/nfdump \
+ ${SITE_PERL}/Mail/Header.pm:${PORTSDIR}/mail/p5-Mail-Tools \
+ ${SITE_PERL}/RRDp.pm:${PORTSDIR}/databases/rrdtool
+
+CONFLICTS= nfsen-[0-9]*
USE_ICONV= yes
USE_PERL5= yes
@@ -26,12 +28,6 @@ NO_BUILD= yes
PLIST_SUB+= PORTNAME=${PORTNAME}
USE_RC_SUBR= nfsen.sh
-.include <bsd.port.pre.mk>
-
-.if ${PERL_LEVEL} < 500600
-IGNORE= requires at least perl 5.6.0
-.endif
-
pre-everything::
@${ECHO_MSG} ""
@${ECHO_MSG} "*****************************************************"
@@ -46,6 +42,7 @@ post-patch:
@${REINPLACE_CMD} -e 's,%%PREFIX%%,${PREFIX},' -e 's,%%PORTNAME%%,${PORTNAME},' \
${WRKSRC}/etc/nfsen-dist.conf
@${RM} ${WRKSRC}/etc/nfsen-dist.conf.*
+ @${RM} ${WRKSRC}/bin/testPlugin.orig
@${REINPLACE_CMD} -e 's,%%PERL%%,${PERL},' -e 's,%%PREFIX%%,${PREFIX},' ${WRKSRC}/install.pl
do-install:
@@ -61,6 +58,6 @@ do-install:
cd ${WRKSRC} ;${PERL} ${WRKSRC}/install.pl ${WRKSRC}/etc/nfsen-dist.conf; \
fi
@${ECHO_MSG} "Configure your ${LOCALBASE}/etc/nfsen.conf to have necessary sources ";
- @${ECHO_MSG} "Then run 'nfsen -R ${LOCALBASE}/etc/nfsen.conf' to correctly setup source, RRD, and profile files";
+ @${ECHO_MSG} "Then run 'nfsen reconfig' to correctly setup source, RRD, and profile files";
-.include <bsd.port.post.mk>
+.include <bsd.port.mk>
diff --git a/net-mgmt/nfsen-devel/distinfo b/net-mgmt/nfsen-devel/distinfo
index d34da0a50fc1..f10b57864f16 100644
--- a/net-mgmt/nfsen-devel/distinfo
+++ b/net-mgmt/nfsen-devel/distinfo
@@ -1,3 +1,3 @@
-MD5 (nfsen-snapshot-20060810.tar.gz) = 4274e60f8a007e4a01923e975a18ef65
-SHA256 (nfsen-snapshot-20060810.tar.gz) = 11c73c5207ea608a2a1d50d84cddeee6ecbd59e048d0622b322e07100e8af50d
-SIZE (nfsen-snapshot-20060810.tar.gz) = 3362157
+MD5 (nfsen-snapshot-20070312.tar.gz) = 2fc895f020b88f94f1edc9b1d7ccd8b4
+SHA256 (nfsen-snapshot-20070312.tar.gz) = 85aef7c40c1f1e5c4eee97137bb45d02f4c9abc812a5defd0ba7596710586dfd
+SIZE (nfsen-snapshot-20070312.tar.gz) = 3478630
diff --git a/net-mgmt/nfsen-devel/files/patch-bin_testPlugin b/net-mgmt/nfsen-devel/files/patch-bin_testPlugin
new file mode 100644
index 000000000000..86004d1ee713
--- /dev/null
+++ b/net-mgmt/nfsen-devel/files/patch-bin_testPlugin
@@ -0,0 +1,25 @@
+
+$FreeBSD$
+
+--- bin/testPlugin.orig
++++ bin/testPlugin
+@@ -50,6 +50,7 @@
+
+ use NfConf;
+ use NfSen;
++use NfProfile;
+ use Log;
+
+ my $VERSION = '$Id: testPlugin 60 2007-01-09 12:26:47Z peter $';
+@@ -164,7 +165,10 @@
+ print "Run plugin '$plugin' with profile '$profile' at '$timeslot'\n";
+ my $sub = "${plugin}::run";
+ no strict 'refs';
+-&$sub($profile, $timeslot);
++&$sub({
++ profile => $profile,
++ timeslot => $timeslot,
++});
+ use strict 'refs';
+ print "Plugin run successfully, at least as far as I can tell ...\n" ;
+
diff --git a/net-mgmt/nfsen-devel/files/patch-html_alerting.php b/net-mgmt/nfsen-devel/files/patch-html_alerting.php
new file mode 100644
index 000000000000..624067699a06
--- /dev/null
+++ b/net-mgmt/nfsen-devel/files/patch-html_alerting.php
@@ -0,0 +1,13 @@
+
+$FreeBSD$
+
+--- html/alerting.php.orig
++++ html/alerting.php
+@@ -449,6 +449,7 @@
+ foreach ( $alert_condition_plugin as $plugin) {
+ $selected = $alert['condition'][0] == $plugin ? 'selected' : '';
+ print " <option value='$i' $selected>" . $plugin . "</option>\n";
++ $i++;
+ }
+ }
+ ?>
diff --git a/net-mgmt/nfsen-devel/files/patch-html_nfsen.php b/net-mgmt/nfsen-devel/files/patch-html_nfsen.php
new file mode 100644
index 000000000000..a2c5d1424e98
--- /dev/null
+++ b/net-mgmt/nfsen-devel/files/patch-html_nfsen.php
@@ -0,0 +1,33 @@
+
+$FreeBSD$
+
+--- html/nfsen.php.orig
++++ html/nfsen.php
+@@ -489,7 +489,8 @@
+ if ( count($BookmarkVars) == count($_vars) ) {
+ for ( $i=0; $i<count($BookmarkVars); $i++ ) {
+ if ( $_vars[$i] != '-' )
+- $_POST[$BookmarkVars[$i]] = $_vars[$i];
++ $_POST[$BookmarkVars[$i]] =
++ str_replace('!','|',$_vars[$i]);
+ }
+ } else {
+ SetMessage('warning', "Bookmark processing error");
+@@ -749,7 +750,16 @@
+ // Generate bookmark
+ $vars = array();
+ foreach ( $BookmarkVars as $var ) {
+- $vars[] = array_key_exists($var, $_SESSION) ? $_SESSION[$var] : '-';
++ if (array_key_exists($var, $_SESSION)) {
++ $vars[] = $_SESSION[$var];
++ }
++ elseif (array_key_exists('detail_opts', $_SESSION) and
++ array_key_exists($var, $_SESSION['detail_opts'])) {
++ $vars[] = str_replace('|','!',$_SESSION['detail_opts'][$var]);
++ }
++ else {
++ $vars[] = '-';
++ }
+ }
+
+ $_SESSION['bookmark'] = urlencode(base64_encode(implode('|', $vars)));
diff --git a/net-mgmt/nfsen-devel/files/patch-install.pl b/net-mgmt/nfsen-devel/files/patch-install.pl
index 4b4113a85cc1..05ae145eb312 100644
--- a/net-mgmt/nfsen-devel/files/patch-install.pl
+++ b/net-mgmt/nfsen-devel/files/patch-install.pl
@@ -9,7 +9,7 @@ $FreeBSD$
#
#
# Copyright (c) 2004, SWITCH - Teleinformatikdienste fuer Lehre und Forschung
-@@ -81,33 +81,7 @@
+@@ -83,33 +83,7 @@
# Get Perl
sub GetPerl {
@@ -44,3 +44,21 @@ $FreeBSD$
} # End of GetPerl
+@@ -620,7 +594,7 @@
+ exit 1;
+ }
+
+-my $hints = NfSen::LoadHints();
++my $hints = NfSen::LoadHints_startup();
+ if ( $$$hints{'version'} == -1 ) {
+ # initial NfSen install or upgrade from old version without hints
+ $$$hints{'version'} = $nfsen_version;
+@@ -725,7 +699,7 @@
+
+
+ Nfsources::Reconfig();
+-NfSen::StoreHints();
++NfSen::StoreHints_startup();
+ chown $nfsen_uid, $www_gid, "$NfConf::PROFILESTATDIR/hints" || die "Can't chown hints db: $!\n";
+ print "Setup done.\n\n";
+
diff --git a/net-mgmt/nfsen-devel/files/patch-libexec_NfSen.pm b/net-mgmt/nfsen-devel/files/patch-libexec_NfSen.pm
new file mode 100644
index 000000000000..875b98ce0f55
--- /dev/null
+++ b/net-mgmt/nfsen-devel/files/patch-libexec_NfSen.pm
@@ -0,0 +1,53 @@
+
+$FreeBSD$
+
+--- libexec/NfSen.pm.orig
++++ libexec/NfSen.pm
+@@ -705,6 +705,25 @@
+
+ } # End of LoadHints
+
++sub LoadHints_startup {
++
++ eval {
++ local $SIG{'__DIE__'} = 'DEFAULT';
++ $hints = lock_retrieve "$NfConf::PROFILESTATDIR/hints";
++ };
++
++ if ( my $err = $@ ) {
++ warn "Error reading hints: $err\n";
++ warn "Initialize hints to defaults.\n";
++ $$hints{'version'} = -1; # unknown
++ $$hints{'installed'} = 0;
++ $$hints{'subdirlayout'} = $NfConf::SUBDIRLAYOUT;
++ }
++
++ return \$hints;
++
++} # End of LoadHints_startup
++
+ sub StoreHints {
+
+ eval {
+@@ -717,6 +736,20 @@
+ return $err;
+ }
+
+-} # End of StoreAlertStatus
++} # End of StoreHints
++
++sub StoreHints_startup {
++
++ eval {
++ local $SIG{'__DIE__'} = 'DEFAULT';
++ lock_store $hints, "$NfConf::PROFILESTATDIR/hints";
++ };
++
++ if ( my $err = $@ ) {
++ warn "Error store hints: $err\n";
++ return $err;
++ }
++
++} # End of StoreHints_startup
+
+ 1;
diff --git a/net-mgmt/nfsen-devel/pkg-plist b/net-mgmt/nfsen-devel/pkg-plist
index f57b7798bf94..75d392b44b9f 100644
--- a/net-mgmt/nfsen-devel/pkg-plist
+++ b/net-mgmt/nfsen-devel/pkg-plist
@@ -3,14 +3,17 @@ bin/nfsen.rc
bin/nfsend
bin/RebuildHierarchy.pl
bin/testPlugin
+bin/nfcomm.pl
@unexec if cmp -s %D/etc/nfsen.conf %D/etc/nfsen-dist.conf; then rm -f %D/etc/nfsen.conf; fi
@exec [ -f %D/etc/nfsen.conf ] || cp %D/etc/nfsen-dist.conf %D/etc/nfsen.conf
etc/nfsen-dist.conf
libexec/%%PORTNAME%%/CopyRecursive.pm
-libexec/%%PORTNAME%%/GenGraph.pl
libexec/%%PORTNAME%%/Log.pm
+libexec/%%PORTNAME%%/Lookup.pm
+libexec/%%PORTNAME%%/NfAlert.pm
libexec/%%PORTNAME%%/NfConf.pm
libexec/%%PORTNAME%%/NfProfile.pm
+libexec/%%PORTNAME%%/NfSen.pm.orig
libexec/%%PORTNAME%%/NfSen.pm
libexec/%%PORTNAME%%/NfSenRC.pm
libexec/%%PORTNAME%%/NfSenRRD.pm
@@ -22,22 +25,60 @@ libexec/%%PORTNAME%%/plugins/demoplugin.pm
www/%%PORTNAME%%/conf.php
www/%%PORTNAME%%/EmptyGraph.gif
www/%%PORTNAME%%/ErrorGraph.gif
+www/%%PORTNAME%%/alerting.php.orig
+www/%%PORTNAME%%/alerting.php
+www/%%PORTNAME%%/colour_palette.html
+www/%%PORTNAME%%/colour_palette_custom.php
+www/%%PORTNAME%%/colour_picker.html
www/%%PORTNAME%%/css-admin.html
www/%%PORTNAME%%/css.html
www/%%PORTNAME%%/details.php
-www/%%PORTNAME%%/edit.png
www/%%PORTNAME%%/info.php
www/%%PORTNAME%%/invisible.gif
+www/%%PORTNAME%%/lookup.php
www/%%PORTNAME%%/navigator.php
-www/%%PORTNAME%%/navigator.php.orig
+www/%%PORTNAME%%/nfsen.php.orig
www/%%PORTNAME%%/nfsen.php
www/%%PORTNAME%%/nfsenutil.php
+www/%%PORTNAME%%/noscript.html
www/%%PORTNAME%%/overview.php
www/%%PORTNAME%%/pic.php
www/%%PORTNAME%%/process.php
www/%%PORTNAME%%/profileadmin.php
www/%%PORTNAME%%/rrdgraph.php
-www/%%PORTNAME%%/trash.png
+www/%%PORTNAME%%/css/alerting.css
+www/%%PORTNAME%%/css/detail.css
+www/%%PORTNAME%%/css/lookup.css
+www/%%PORTNAME%%/css/nfsen.css
+www/%%PORTNAME%%/css/profileadmin.css
+www/%%PORTNAME%%/icons/arrow.blue.down.png
+www/%%PORTNAME%%/icons/arrow.blue.right.png
+www/%%PORTNAME%%/icons/arrow.yellow.down.png
+www/%%PORTNAME%%/icons/arrow.yellow.right.png
+www/%%PORTNAME%%/icons/close.gif
+www/%%PORTNAME%%/icons/cursor-line.gif
+www/%%PORTNAME%%/icons/cursor-start.gif
+www/%%PORTNAME%%/icons/cursor-stop.gif
+www/%%PORTNAME%%/icons/edit.png
+www/%%PORTNAME%%/icons/help.png
+www/%%PORTNAME%%/icons/invisible.gif
+www/%%PORTNAME%%/icons/minus.gif
+www/%%PORTNAME%%/icons/ok.png
+www/%%PORTNAME%%/icons/plus.gif
+www/%%PORTNAME%%/icons/plus.png
+www/%%PORTNAME%%/icons/progress.png
+www/%%PORTNAME%%/icons/save.png
+www/%%PORTNAME%%/icons/shade.gif
+www/%%PORTNAME%%/icons/shadeactive.gif
+www/%%PORTNAME%%/icons/space.png
+www/%%PORTNAME%%/icons/spyglas.png
+www/%%PORTNAME%%/icons/trash.png
+www/%%PORTNAME%%/js/ColorPicker2.js
+www/%%PORTNAME%%/js/alerting.js
+www/%%PORTNAME%%/js/detail.js
+www/%%PORTNAME%%/js/global.js
+www/%%PORTNAME%%/js/menu.js
+www/%%PORTNAME%%/js/profileadmin.js
www/%%PORTNAME%%/plugins/demoplugin.php
www/%%PORTNAME%%/doc/BSD-license.html
www/%%PORTNAME%%/doc/Bookmark.png
@@ -78,7 +119,10 @@ www/%%PORTNAME%%/doc/selectprofile.png
www/%%PORTNAME%%/doc/stat.png
www/%%PORTNAME%%/doc/views-2.png
www/%%PORTNAME%%/doc/views.png
+@dirrm www/%%PORTNAME%%/css
@dirrm www/%%PORTNAME%%/plugins
+@dirrm www/%%PORTNAME%%/icons
+@dirrm www/%%PORTNAME%%/js
@dirrm www/%%PORTNAME%%/doc
@dirrm www/%%PORTNAME%%
@exec mkdir -p %D/var/%%PORTNAME%%/profiles/live/upstream1
@@ -86,7 +130,7 @@ var/%%PORTNAME%%/profiles/live/upstream1.rrd
var/%%PORTNAME%%/profiles/live/profile.dat
@exec mkdir -p %D/var/%%PORTNAME%%/run
@exec mkdir -p %D/var/%%PORTNAME%%/filters
-@dirrm var/%%PORTNAME%%/run
+@dirrmtry var/%%PORTNAME%%/run
@dirrm var/%%PORTNAME%%/filters
@dirrmtry var/%%PORTNAME%%/profiles/live/upstream1
@dirrmtry var/%%PORTNAME%%/profiles/live