[csw-devel] SF.net SVN: gar:[13243] csw/mgar/pkg/ntop/trunk
jonbcraig at users.sourceforge.net
jonbcraig at users.sourceforge.net
Thu Feb 10 06:31:35 CET 2011
Revision: 13243
http://gar.svn.sourceforge.net/gar/?rev=13243&view=rev
Author: jonbcraig
Date: 2011-02-10 05:31:35 +0000 (Thu, 10 Feb 2011)
Log Message:
-----------
ntop: fixes for /usr/local references
Modified Paths:
--------------
csw/mgar/pkg/ntop/trunk/Makefile
csw/mgar/pkg/ntop/trunk/files/CSWntop.postinstall
csw/mgar/pkg/ntop/trunk/files/CSWntop.postremove
Added Paths:
-----------
csw/mgar/pkg/ntop/trunk/files/0007-Update-defaults-from-usr-local-to-opt-csw-etc-opt-cs.patch
Modified: csw/mgar/pkg/ntop/trunk/Makefile
===================================================================
--- csw/mgar/pkg/ntop/trunk/Makefile 2011-02-09 19:49:21 UTC (rev 13242)
+++ csw/mgar/pkg/ntop/trunk/Makefile 2011-02-10 05:31:35 UTC (rev 13243)
@@ -29,6 +29,7 @@
PATCHFILES += 0004-Strip-default-Solaris-library-pathes-as-we-set-our-o.patch
PATCHFILES += 0005-Change-default-PID-file-location-to-var-opt-csw-ntop.patch
PATCHFILES += 0006-Temporary-Fix-for-Broken-sourceforge-CVS-access.patch
+PATCHFILES += 0007-Update-defaults-from-usr-local-to-opt-csw-etc-opt-cs.patch
# We define upstream file regex so we can be notifed of new upstream software release
UPSTREAM_MASTER_SITES = $(SF_PROJECT_SHOWFILE)=17233
@@ -44,7 +45,9 @@
RUNTIME_DEP_PKGS_CSWntop += CSWlibgdbm3
RUNTIME_DEP_PKGS_CSWntop += CSWzlib
RUNTIME_DEP_PKGS_CSWntop += CSWiconv
+RUNTIME_DEP_PKGS_CSWntop += CSWgraphviz
+
BUILD_DEP_PKGS = $(RUNTIME_DEP_PKGS_CSWntop)
BUILD_DEP_PKGS += CSWlibtool CSWautoconf CSWautomake
BUILD_DEP_PKGS += CSWlibpcapdevel CSWossldevel
@@ -88,6 +91,26 @@
#CHECKPKG_OVERRIDES_CSWntop += shared-lib-pkgname-mismatch|sonames=['libcpacketPlugin-4.0.3.so',|'libicmpPlugin-4.0.3.so',|'libnetflowPlugin-4.0.3.so',|'libntop-4.0.3.so',|'libntopreport-4.0.3.so',|'librrdPlugin-4.0.3.so',|'libsflowPlugin-4.0.3.so']|pkgname=CSWntop|expected=['CSWlib4-0-3']|
CHECKPKG_OVERRIDES_CSWntop += shared-lib-pkgname-mismatch
+# Bad content files - Documentation
+CHECKPKG_OVERRIDES_CSWntop += file-with-bad-content|/usr/local|root/opt/csw/share/ntop/html/faq.html
+CHECKPKG_OVERRIDES_CSWntop += file-with-bad-content|/usr/share|root/opt/csw/share/ntop/html/faq.html
+CHECKPKG_OVERRIDES_CSWntop += file-with-bad-content|/usr/local|root/opt/csw/share/ntop/html/ntop.html
+CHECKPKG_OVERRIDES_CSWntop += file-with-bad-content|/usr/local|root/opt/csw/share/man/man8/ntop.8
+
+# Bad content files - Shared libraries (Captured Build Info for Version Output)
+#CHECKPKG_OVERRIDES_CSWntop += file-with-bad-content|/usr/local|root/opt/csw/lib/libicmpPlugin-4.0.3.so
+#CHECKPKG_OVERRIDES_CSWntop += file-with-bad-content|/usr/local|root/opt/csw/lib/libsflowPlugin-4.0.3.so
+#CHECKPKG_OVERRIDES_CSWntop += file-with-bad-content|/usr/local|root/opt/csw/lib/libntop-4.0.3.so
+#CHECKPKG_OVERRIDES_CSWntop += file-with-bad-content|/usr/local|root/opt/csw/lib/libntopreport-4.0.3.so
+#CHECKPKG_OVERRIDES_CSWntop += file-with-bad-content|/usr/local|root/opt/csw/lib/libnetflowPlugin-4.0.3.so
+#CHECKPKG_OVERRIDES_CSWntop += file-with-bad-content|/usr/local|root/opt/csw/lib/librrdPlugin-4.0.3.so
+#CHECKPKG_OVERRIDES_CSWntop += file-with-bad-content|/usr/local|root/opt/csw/lib/libcpacketPlugin-4.0.3.so
+#CHECKPKG_OVERRIDES_CSWntop += file-with-bad-content|/usr/local|root/opt/csw/lib/ntop/plugins/sflowPlugin.so
+#CHECKPKG_OVERRIDES_CSWntop += file-with-bad-content|/usr/local|root/opt/csw/lib/ntop/plugins/cpacketPlugin.so
+#CHECKPKG_OVERRIDES_CSWntop += file-with-bad-content|/usr/local|root/opt/csw/lib/ntop/plugins/rrdPlugin.so
+#CHECKPKG_OVERRIDES_CSWntop += file-with-bad-content|/usr/local|root/opt/csw/lib/ntop/plugins/netflowPlugin.so
+#CHECKPKG_OVERRIDES_CSWntop += file-with-bad-content|/usr/local|root/opt/csw/lib/ntop/plugins/icmpPlugin.so
+
include gar/category.mk
pre-configure-modulated:
Added: csw/mgar/pkg/ntop/trunk/files/0007-Update-defaults-from-usr-local-to-opt-csw-etc-opt-cs.patch
===================================================================
--- csw/mgar/pkg/ntop/trunk/files/0007-Update-defaults-from-usr-local-to-opt-csw-etc-opt-cs.patch (rev 0)
+++ csw/mgar/pkg/ntop/trunk/files/0007-Update-defaults-from-usr-local-to-opt-csw-etc-opt-cs.patch 2011-02-10 05:31:35 UTC (rev 13243)
@@ -0,0 +1,43 @@
+From 22dd84d99aea4bfb4868e4e08df255d615a4733e Mon Sep 17 00:00:00 2001
+From: Jon Craig <jcraig at opencsw.org>
+Date: Thu, 10 Feb 2011 06:24:08 +0100
+Subject: [PATCH] Update defaults from /usr/local to /opt/csw - /etc/opt/csw
+
+---
+ globals-defines.h | 6 +++---
+ report.c | 2 +-
+ 2 files changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/globals-defines.h b/globals-defines.h
+index a412617..7096add 100644
+--- a/globals-defines.h
++++ b/globals-defines.h
+@@ -2767,9 +2767,9 @@ struct ip6_hdr
+
+ /* *************************** */
+
+-#define DEFAULT_NTOP_PLUGINS_INSTALL "/usr/local/lib/ntop/plugins"
+-#define DEFAULT_NTOP_HTML_INSTALL "/usr/local/share/ntop"
+-#define DEFAULT_NTOP_CFG_CONFIGFILE_DIR "/usr/local/etc/ntop"
++#define DEFAULT_NTOP_PLUGINS_INSTALL "/opt/csw/lib/ntop/plugins"
++#define DEFAULT_NTOP_HTML_INSTALL "/opt/csw/share/ntop"
++#define DEFAULT_NTOP_CFG_CONFIGFILE_DIR "/etc/opt/csw/ntop"
+
+ #define DOMAIN_VIEW 0
+ #define NETWORK_VIEW 1
+diff --git a/report.c b/report.c
+index 0e62c8d..cbe6b7b 100644
+--- a/report.c
++++ b/report.c
+@@ -2353,7 +2353,7 @@ void makeDot() {
+ if(fetchPrefsValue("dot.path", buf, sizeof(buf)) != -1) {
+ snprintf(dotPath, sizeof(dotPath), "%s", buf);
+ } else {
+- snprintf(dotPath, sizeof(dotPath), "/usr/local/bin/dot");
++ snprintf(dotPath, sizeof(dotPath), "/opt/csw/bin/dot");
+ storePrefsValue("dot.path", dotPath); /* Set the default */
+ }
+
+--
+1.7.3.2
+
Modified: csw/mgar/pkg/ntop/trunk/files/CSWntop.postinstall
===================================================================
--- csw/mgar/pkg/ntop/trunk/files/CSWntop.postinstall 2011-02-09 19:49:21 UTC (rev 13242)
+++ csw/mgar/pkg/ntop/trunk/files/CSWntop.postinstall 2011-02-10 05:31:35 UTC (rev 13243)
@@ -1,27 +1,39 @@
#!/sbin/sh
-CONFDIR=$BASEDIR/etc/opt/etc/ntop
+CONFDIR=$BASEDIR/etc/opt/csw/ntop
DATADIR=$BASEDIR/var/opt/csw/ntop
PATH=/bin:/usr/bin:/usr/sbin:"$PATH"
export PATH
if [ ! -f "$CONFDIR/ntop.conf" ]; then
+ echo "Installing CSWntop default config"
cp -p $CONFDIR/ntop.conf.CSW $CONFDIR/ntop.conf
fi
if [ ! -d "$DATADIR" ]; then
- mkdir -p $DATADIR
+ echo "Making DATADIR $DATADIR"
+ mkdir -p $DATADIR
fi
-if [ ! -d "$DATADIR/rrd ]; then
- mkdir -p $DATADIR/rrd
- chown nobody:nobody $DATADIR/rrd
- chmod 0711 $DATADIR/rrd
+if [ ! -d "$DATADIR/rrd" ]; then
+ echo "Making $DATADIR/rrd"
+ mkdir -p $DATADIR/rrd
+ chown nobody:nobody $DATADIR/rrd
+ chmod 0711 $DATADIR/rrd
fi
if [ ! -f "$DATADIR/ntop_pw.db" ]; then
+ echo "Setting admin password"
$BASEDIR/opt/csw/bin/ntop -P $DATADIR -u nobody --set-admin-password=$ADMIN_PW
+else
+ echo "Keeping the existing $DATADIR/ntop_pw.db password."
fi
echo "\nURL to access ntop is http://hostname:3000"
+
+if [ -x /etc/init.d/cswntop ]; then
+ /etc/init.d/cswntop start
+else
+ svcadm enable /network/cswntop
+fi
Modified: csw/mgar/pkg/ntop/trunk/files/CSWntop.postremove
===================================================================
--- csw/mgar/pkg/ntop/trunk/files/CSWntop.postremove 2011-02-09 19:49:21 UTC (rev 13242)
+++ csw/mgar/pkg/ntop/trunk/files/CSWntop.postremove 2011-02-10 05:31:35 UTC (rev 13243)
@@ -3,7 +3,7 @@
CONFDIR=$BASEDIR/etc/opt/csw/ntop
DATADIR=$BASEDIR/var/opt/csw/ntop
-if [ -d "$CONFDIR" || -d "$DATADIR" ]; then
+if [ -d "$CONFDIR" -o -d "$DATADIR" ]; then
echo ""
echo "You might want to manually remove files in:"
if [ -d "$CONFDIR" ]; then
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the devel
mailing list