[csw-devel] SF.net SVN: gar:[18287] csw/mgar/pkg/munin/trunk

j_arndt at users.sourceforge.net j_arndt at users.sourceforge.net
Sat Jun 9 17:07:27 CEST 2012


Revision: 18287
          http://gar.svn.sourceforge.net/gar/?rev=18287&view=rev
Author:   j_arndt
Date:     2012-06-09 15:07:26 +0000 (Sat, 09 Jun 2012)
Log Message:
-----------
munin/trunk: fixed path issues, added postinstall messages and default configs

Modified Paths:
--------------
    csw/mgar/pkg/munin/trunk/Makefile
    csw/mgar/pkg/munin/trunk/files/0001-paths-in-Makefile.config.patch

Added Paths:
-----------
    csw/mgar/pkg/munin/trunk/files/CSWmunin-master.README.CSW
    csw/mgar/pkg/munin/trunk/files/CSWmunin-master.preinstall
    csw/mgar/pkg/munin/trunk/files/CSWmunin-node.README.CSW
    csw/mgar/pkg/munin/trunk/files/apache-munin-cgi.conf

Removed Paths:
-------------
    csw/mgar/pkg/munin/trunk/files/README.CSW
    csw/mgar/pkg/munin/trunk/files/apache-munin-cgi.conf.CSW
    csw/mgar/pkg/munin/trunk/files/apache-munin.conf.CSW

Modified: csw/mgar/pkg/munin/trunk/Makefile
===================================================================
--- csw/mgar/pkg/munin/trunk/Makefile	2012-06-09 14:44:02 UTC (rev 18286)
+++ csw/mgar/pkg/munin/trunk/Makefile	2012-06-09 15:07:26 UTC (rev 18287)
@@ -12,8 +12,10 @@
 DISTFILES  = $(NAME)-$(VERSION).tar.gz
 DISTFILES += cswmuninnode
 DISTFILES += cswusergroup
-DISTFILES += apache-munin.conf.CSW apache-munin-cgi.conf.CSW
-DISTFILES += README.CSW
+DISTFILES += apache-munin-cgi.conf
+DISTFILES += CSWmunin-master.preinstall
+DISTFILES += CSWmunin-master.README.CSW
+DISTFILES += CSWmunin-node.README.CSW
 
 PATCHFILES	+= 0001-Expand-paths-with-DESTDIR.patch
 PATCHFILES	+= 0001-paths-in-Makefile.config.patch
@@ -50,13 +52,6 @@
 REINPLACE_FILES_perl 	+= node/bin/*
 REINPLACE_FILES_perl 	+= node/sbin/*
 
-# replace cgi-bin with cgi
-
-REINPLACEMENTS		+= cgi
-REINPLACE_MATCH_cgi	 = cgi-bin
-REINPLACE_WITH_cgi	 = cgi
-REINPLACE_FILES_cgi	+= master/static/dynazoom.html
-
 #
 # Package definitions
 #
@@ -116,6 +111,7 @@
 MUNINNODE_USERGROUP	= /opt/csw/etc/pkg/CSWmunin-node/cswusergroup
 MUNINNODE_EXECS		= .*munin-node .*munin-node-configure.* .*munindoc.* .*munin-run.* .*munin-sched.*
 MUNINNODE_CONF		= .*munin-node.conf .*munin-node.conf.5 .*munin-node.1 /etc/opt/csw/munin/munin-conf.d /etc/opt/csw/munin/plugin-conf.d
+MUNINNODE_POSTMSG	 = /opt/csw/share/doc/munin_node/CSWmunin-node.README.CSW
 
 PKGFILES_CSWmunin-node += .*muninnode.* .*CSWmunin-node.*
 PKGFILES_CSWmunin-node += .*plugins.*
@@ -143,12 +139,13 @@
 
 MUNINMASTER_UGFILES	 = /var/opt/csw/munin.* /etc/opt/csw/munin/apache.* /etc/opt/csw/munin/templates.*
 MUNINMASTER_UGFILES	+= /etc/opt/csw/munin/static.*
+MUNINMASTER_UGFILES	+= /etc/opt/csw/munin/munin.conf
 MUNINMASTER_USERGROUP	 = /opt/csw/etc/pkg/CSWmunin-master/cswusergroup
 MUNINMASTER_EXECS	 = .*munin-check.* .*munin-cron.* .*munin-graph.* .*munin-html.* .*munin-limits.* .*munin-update.*
 MUNINMASTER_EXECS	+= .*munin-datafile2storable.* .*munin-storable2datafile.* .*munin-cgi-graph.* .*munin-cgi-html.*
 MUNINMASTER_FONTS	 = .*ttf.*
 MUNINMASTER_CRONTABS	 = /etc/opt/csw/pkg/CSWmunin-master/crontabs/munin
-MUNINMASTER_POSTMSG	 = /opt/csw/share/doc/munin_master/README.CSW
+MUNINMASTER_POSTMSG	 = /opt/csw/share/doc/munin_master/CSWmunin-master.README.CSW
 
 PKGFILES_CSWmunin-master += .*muninmaster.*
 PKGFILES_CSWmunin-master += .*Munin::Master.*
@@ -166,12 +163,20 @@
 PROTOTYPE_GROUP_muninmaster_ugfiles = munin
 PROTOTYPE_CLASS_muninmaster_ugfiles = ugfiles
 
+PROTOTYPE_MODIFIERS		+= munin_log_dir
+PROTOTYPE_FILES_munin_log_dir	 = /var/opt/csw/munin/log /var/opt/csw/munin/db/cgi-tmp
+PROTOTYPE_PERMS_munin_log_dir	 = 0775
+PROTOTYPE_USER_munin_log_dir	 = munin
+PROTOTYPE_GROUP_munin_log_dir	 = munin
+PROTOTYPE_CLASS_munin_log_dir	 = ugfiles
+
 ############### End of prototype filters for the different packages ###############
 
 INITSMF 	+= $(MUNINNODE_SMF)
 USERGROUP	+= $(MUNINNODE_USERGROUP)
 USERGROUP	+= $(MUNINMASTER_USERGROUP)
 POSTMSG		+= $(MUNINMASTER_POSTMSG)
+POSTMSG		+= $(MUNINNODE_POSTMSG)
 CRONTABS	+= $(MUNINMASTER_CRONTABS)
 
 #
@@ -227,9 +232,7 @@
 	@ginstall -d $(DESTDIR)/opt/csw/etc/templates/CSWmunin-master/var/opt/csw/munin/www
 	@mv $(DESTDIR)/etc/opt/csw/munin/munin-node.conf $(DESTDIR)/opt/csw/etc/templates/CSWmunin-node/etc/opt/csw/munin/
 	@mv $(DESTDIR)/etc/opt/csw/munin/munin.conf $(DESTDIR)/opt/csw/etc/templates/CSWmunin-master/etc/opt/csw/munin/
-	@ginstall -m 644 $(FILEDIR)/apache-munin.conf.CSW \
-		$(DESTDIR)/opt/csw/etc/templates/CSWmunin-master/etc/opt/csw/munin/apache/apache-munin.conf
-	@ginstall -m 644 $(FILEDIR)/apache-munin-cgi.conf.CSW \
+	@ginstall -m 644 $(FILEDIR)/apache-munin-cgi.conf \
 		$(DESTDIR)/opt/csw/etc/templates/CSWmunin-master/etc/opt/csw/munin/apache/apache-munin-cgi.conf
 	@mv $(DESTDIR)/var/opt/csw/munin/www/.htaccess $(DESTDIR)/opt/csw/etc/templates/CSWmunin-master/var/opt/csw/munin/www/
 	@#
@@ -259,7 +262,9 @@
 	@#
 	@ginstall -d $(DESTDIR)/opt/csw/share/doc
 	@ginstall -d $(DESTDIR)/opt/csw/share/doc/munin_master
-	@ginstall -m 644 $(FILEDIR)/README.CSW $(DESTDIR)/opt/csw/share/doc/munin_master/README.CSW
+	@ginstall -m 644 $(FILEDIR)/CSWmunin-master.README.CSW $(DESTDIR)/opt/csw/share/doc/munin_master/CSWmunin-master.README.CSW
+	@ginstall -d $(DESTDIR)/opt/csw/share/doc/munin_node
+	@ginstall -m 644 $(FILEDIR)/CSWmunin-node.README.CSW $(DESTDIR)/opt/csw/share/doc/munin_node/CSWmunin-node.README.CSW
 	@#
 	@# handle some other files
 	@#

Modified: csw/mgar/pkg/munin/trunk/files/0001-paths-in-Makefile.config.patch
===================================================================
--- csw/mgar/pkg/munin/trunk/files/0001-paths-in-Makefile.config.patch	2012-06-09 14:44:02 UTC (rev 18286)
+++ csw/mgar/pkg/munin/trunk/files/0001-paths-in-Makefile.config.patch	2012-06-09 15:07:26 UTC (rev 18287)
@@ -43,7 +43,7 @@
 -HTMLDIR    = $(PREFIX)/www/docs
 -CGIDIR     = $(PREFIX)/www/cgi
 +HTMLDIR    = /var/opt/csw/munin/www
-+CGIDIR     = /var/opt/csw/munin/www/cgi
++CGIDIR     = /var/opt/csw/munin/www/cgi-bin
  
  # Where to put RRD files and other internal data, both master and node
 -DBDIR      = $(DESTDIR)/var/opt/munin

Added: csw/mgar/pkg/munin/trunk/files/CSWmunin-master.README.CSW
===================================================================
--- csw/mgar/pkg/munin/trunk/files/CSWmunin-master.README.CSW	                        (rev 0)
+++ csw/mgar/pkg/munin/trunk/files/CSWmunin-master.README.CSW	2012-06-09 15:07:26 UTC (rev 18287)
@@ -0,0 +1,35 @@
+
+=======================================================================
+
+To get Munin running, please follow these steps:
+
+(1) Edit the Apache configuration for Munin: 
+
+       /etc/opt/csw/munin/apache/apache-munin-cgi.conf
+
+(2) Add the following line to your Apache configuration:
+
+       Include /etc/opt/csw/munin/apache/apache-munin-cgi.conf
+
+(3) Add the user your webserver is running under (nobody for Apache) to
+    the group "munin", i.e.:
+
+       munin::100:nobody
+
+(4) Restart your webserver:
+
+    svcadm restart cswapache2
+
+(5) When upgrading from a Munin version 1.4 or earlier to 2.0 or later
+    you need to merge your existing master configuration with the 
+    master configuration delivered with the package:
+
+       /etc/opt/csw/munin/munin.conf
+       /opt/csw/etc/templates/CSWmunin-master/etc/opt/csw/munin/munin.conf
+
+    The new config file includes some new options regarding the graph
+    generation via cgi. It's reasonable preconfigured, so all in all
+    you should need only some copy and paste.
+
+=======================================================================
+

Added: csw/mgar/pkg/munin/trunk/files/CSWmunin-master.preinstall
===================================================================
--- csw/mgar/pkg/munin/trunk/files/CSWmunin-master.preinstall	                        (rev 0)
+++ csw/mgar/pkg/munin/trunk/files/CSWmunin-master.preinstall	2012-06-09 15:07:26 UTC (rev 18287)
@@ -0,0 +1,23 @@
+echo "Executing preinstall"
+
+cat << EOF
+
+=======================================================================
+
+If you are about to upgrade Munin from a version 1.4 or earlier to
+the current version 2.x.x be sure to have a backup of your RRD data
+base files. The upgrade shouldn't cause data loss, but you never know.
+
+         The installation will proceed in 15 seconds.
+             Press CTRL+C if you want to stop now.
+
+=======================================================================
+EOF
+
+for i in 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1
+do
+        printf "$i "
+        sleep 1
+done
+
+echo

Added: csw/mgar/pkg/munin/trunk/files/CSWmunin-node.README.CSW
===================================================================
--- csw/mgar/pkg/munin/trunk/files/CSWmunin-node.README.CSW	                        (rev 0)
+++ csw/mgar/pkg/munin/trunk/files/CSWmunin-node.README.CSW	2012-06-09 15:07:26 UTC (rev 18287)
@@ -0,0 +1,16 @@
+
+=======================================================================
+
+To get the Munin node running, please follow these steps:
+
+(1) Edit the local config file /etc/opt/csw/munin/munin-node.conf
+
+	Point "host_name" to your host name
+	Change "allow" to the IP address of your munin master
+
+(2) Restart the node
+
+    svcadm restart cswmuninnode
+
+=======================================================================
+

Deleted: csw/mgar/pkg/munin/trunk/files/README.CSW
===================================================================
--- csw/mgar/pkg/munin/trunk/files/README.CSW	2012-06-09 14:44:02 UTC (rev 18286)
+++ csw/mgar/pkg/munin/trunk/files/README.CSW	2012-06-09 15:07:26 UTC (rev 18287)
@@ -1,25 +0,0 @@
-
-=======================================================================
-
-To get Munin running, please follow these steps:
-
-(1) Edit the Apache configuration for Munin: 
-    "Normal" mode: /etc/opt/csw/munin/apache/apache-munin.conf
-    CGI mode: /etc/opt/csw/munin/apache/apache-munin-cgi.conf
-
-    (These files should work by default)
-
-(2) Add the following line to your Apache configuration:
-
-    "Normal" mode: Include /etc/opt/csw/munin/apache/apache-munin.conf
-    CGI mode: Include /etc/opt/csw/munin/apache/apache-munin-cgi.conf
-
-(3) Add the user your webserver is running under (nobody for Apache) to
-    the group "munin"
-
-(4) Restart your webserver:
-
-    svcadm restart cswapache2
-
-=======================================================================
-

Added: csw/mgar/pkg/munin/trunk/files/apache-munin-cgi.conf
===================================================================
--- csw/mgar/pkg/munin/trunk/files/apache-munin-cgi.conf	                        (rev 0)
+++ csw/mgar/pkg/munin/trunk/files/apache-munin-cgi.conf	2012-06-09 15:07:26 UTC (rev 18287)
@@ -0,0 +1,58 @@
+<VirtualHost *:80>
+	ServerName	munin
+
+	ServerAdmin	root at munin
+
+	DocumentRoot	/var/opt/csw/munin/www
+
+	ErrorLog	/opt/csw/apache2/var/log/munin-error.log
+	CustomLog	/opt/csw/apache2/var/log/munin-access.log	Combined
+
+	ServerSignature	Off
+
+	Alias		/static	/etc/opt/csw/munin/static
+
+	#
+	# Rewrite definitions
+	#
+
+	RewriteEngine	On
+
+	# Rewrites for HTML
+
+	RewriteCond	%{REQUEST_URI}	!^/static
+	RewriteCond	%{REQUEST_URI}	.html$ [or]
+	RewriteCond	%{REQUEST_URI}	=/
+	RewriteRule	^/(.*)		/var/opt/csw/munin/www/cgi-bin/munin-cgi-html/$1 [L]
+
+	# Rewrites for Images
+
+	RewriteRule	^/cgi-bin/munin-cgi-graph/(.*)	/$1
+
+	RewriteCond	%{REQUEST_URI}	!^/static
+	RewriteCond	%{REQUEST_URI}	.png$
+	RewriteRule	^/(.*)		/var/opt/csw/munin/www/cgi-bin/munin-cgi-graph/$1 [L]
+
+	#
+	# Ensure we can run (fast)cgi scripts
+	#
+
+	<Directory "/var/opt/csw/munin/www/cgi-bin">
+		Order allow,deny
+		Allow from all
+
+		Options +ExecCGI
+
+		<IfModule mod_fcgid.c>
+			SetHandler fcgid-script
+		</IfModule>
+		<IfModule !mod_fcgid.c>
+			SetHandler cgi-script
+		</IfModule>
+	</Directory>
+
+	<Directory "/etc/opt/csw/munin/static">
+		Order allow,deny
+		Allow from all
+	</Directory>
+</VirtualHost>

Deleted: csw/mgar/pkg/munin/trunk/files/apache-munin-cgi.conf.CSW
===================================================================
--- csw/mgar/pkg/munin/trunk/files/apache-munin-cgi.conf.CSW	2012-06-09 14:44:02 UTC (rev 18286)
+++ csw/mgar/pkg/munin/trunk/files/apache-munin-cgi.conf.CSW	2012-06-09 15:07:26 UTC (rev 18287)
@@ -1,17 +0,0 @@
-# Apache configuration to support munin-cgi-graph
-#
-# In addition, the Munin log files and html area should be writable
-# to the web server. Therefor add the apache user to the munin group.
-#
-# Documentation for this is in http://munin.projects.linpro.no/wiki/CgiHowto
-
-ScriptAlias /munin/dyn/ /var/opt/csw/munin/www/cgi/
-
-<Directory /var/opt/csw/munin/www/cgi>
-	AllowOverride None
-	Options ExecCGI -MultiViews +SymLinksIfOwnerMatch
-	Order allow,deny
-	Allow from all
-</Directory>
-
-

Deleted: csw/mgar/pkg/munin/trunk/files/apache-munin.conf.CSW
===================================================================
--- csw/mgar/pkg/munin/trunk/files/apache-munin.conf.CSW	2012-06-09 14:44:02 UTC (rev 18286)
+++ csw/mgar/pkg/munin/trunk/files/apache-munin.conf.CSW	2012-06-09 15:07:26 UTC (rev 18287)
@@ -1,10 +0,0 @@
-# Apache configurations for accessing munin 
-
-Alias /munin/ "/var/opt/csw/munin/www/"
-
-<Directory "/var/opt/csw/munin/www/">
-	Options None
-	AllowOverride None
-	Order allow,deny
-	Allow from all
-</Directory>

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