[csw-devel] SF.net SVN: gar:[6844] csw/mgar/pkg/nsca/trunk

j_arndt at users.sourceforge.net j_arndt at users.sourceforge.net
Mon Oct 12 19:15:18 CEST 2009


Revision: 6844
          http://gar.svn.sourceforge.net/gar/?rev=6844&view=rev
Author:   j_arndt
Date:     2009-10-12 17:15:17 +0000 (Mon, 12 Oct 2009)

Log Message:
-----------
nsca: switched to dynamic gspec, packages uses cswusergroup, config and var moved to /etc/opt/csw and /var/opt/csw

Modified Paths:
--------------
    csw/mgar/pkg/nsca/trunk/Makefile
    csw/mgar/pkg/nsca/trunk/checksums
    csw/mgar/pkg/nsca/trunk/files/CSWnsca.preinstall
    csw/mgar/pkg/nsca/trunk/files/CSWnsca.prototype
    csw/mgar/pkg/nsca/trunk/files/CSWsendnsca.preinstall
    csw/mgar/pkg/nsca/trunk/files/CSWsendnsca.prototype

Added Paths:
-----------
    csw/mgar/pkg/nsca/trunk/files/CSWnsca.cswusergroup
    csw/mgar/pkg/nsca/trunk/files/CSWsendnsca.cswusergroup

Removed Paths:
-------------
    csw/mgar/pkg/nsca/trunk/files/CSWnsca.checkinstall

Modified: csw/mgar/pkg/nsca/trunk/Makefile
===================================================================
--- csw/mgar/pkg/nsca/trunk/Makefile	2009-10-12 09:12:22 UTC (rev 6843)
+++ csw/mgar/pkg/nsca/trunk/Makefile	2009-10-12 17:15:17 UTC (rev 6844)
@@ -11,23 +11,38 @@
 
 MASTER_SITES = http://mesh.dl.sourceforge.net/sourceforge/nagios/
 DISTFILES  = $(GARNAME)-$(GARVERSION).tar.gz
-DISTFILES += $(call admfiles,CSWnsca, prototype checkinstall preinstall )
-DISTFILES += $(call admfiles,CSWsendnsca, prototype preinstall )
-DISTFILES += cswnsca
 
+#
+## Distfiles for CSWnsca
+#
+
+DISTFILES += CSWnsca.prototype CSWnsca.preinstall
+DISTFILES += cswnsca CSWnsca.cswusergroup
+
+#
+## Distfiles for CSWsendnsca
+#
+
+DISTFILES += CSWsendnsca.prototype CSWsendnsca.preinstall
+DISTFILES += CSWsendnsca.cswusergroup
+
 PATCHFILES += submit_check_results.diff
 
+PACKAGES = CSWnsca CSWsendnsca
+CATALOGNAME_CSWnsca = nsca
+CATALOGNAME_CSWsendnsca = send_nsca
+
 REQUIRED_PKGS_CSWnsca     = CSWlibmcrypt CSWlibtoolrt CSWcswclassutils
 REQUIRED_PKGS_CSWsendnsca = CSWlibmcrypt CSWlibtoolrt CSWcswclassutils
 
-SPKG_CLASSES_CSWnsca = none cswpreserveconf cswinitsmf
-SPKG_CLASSES_CSWsendnsca = none cswpreserveconf
+SPKG_CLASSES_CSWnsca = none cswusergroup cswpreserveconf cswinitsmf
+SPKG_CLASSES_CSWsendnsca = none cswusergroup cswpreserveconf
 
 NOISALIST = 1
 
 CONFIGURE_ARGS = $(DIRPATHS)
 CONFIGURE_ARGS += --with-nsca-port=5667
-CONFIGURE_ARGS += --localstatedir=/opt/csw/nagios/var
+CONFIGURE_ARGS += --localstatedir=/var/opt/csw/nagios
 
 BUILD_TARGETS = nsca
 
@@ -37,8 +52,7 @@
 
 BINDIR=$(prefix)/bin
 NAGIOSBINDIR=$(prefix)/nagios/bin
-CFGDIR=$(prefix)/etc
-NAGIOSCFGDIR=$(prefix)/nagios/etc
+NAGIOSCFGDIR=/etc$(prefix)/nagios
 NSCADOCDIR=$(prefix)/share/doc/nsca
 SENDNSCADOCDIR=$(prefix)/share/doc/send_nsca
 
@@ -57,11 +71,15 @@
 	ginstall -m 755 $(WORKSRC)/src/send_nsca $(DESTDIR)$(BINDIR)
 	ginstall -m 755 -d $(DESTDIR)$(SENDNSCADOCDIR)
 	ginstall -m 755 $(WORKSRC)/src/submit_check_result-sample $(DESTDIR)$(SENDNSCADOCDIR)
-	ginstall -m 600 $(WORKSRC)/sample-config/send_nsca.cfg $(DESTDIR)$(CFGDIR)/send_nsca.cfg.CSW
+	ginstall -m 600 $(WORKSRC)/sample-config/send_nsca.cfg $(DESTDIR)$(NAGIOSCFGDIR)/send_nsca.cfg.CSW
 	ginstall -m 644 $(WORKSRC)/Changelog $(DESTDIR)$(SENDNSCADOCDIR)
 	ginstall -m 644 $(WORKSRC)/LEGAL $(DESTDIR)$(SENDNSCADOCDIR)
 	ginstall -m 644 $(WORKSRC)/README $(DESTDIR)$(SENDNSCADOCDIR)
 	ginstall -m 644 $(WORKSRC)/SECURITY $(DESTDIR)$(SENDNSCADOCDIR)
 	ginstall -d $(DESTDIR)/etc/opt/csw/init.d/
 	ginstall -m 755 $(FILEDIR)/cswnsca $(DESTDIR)/etc/opt/csw/init.d/
+	@ginstall -m 755 -d $(DESTDIR)/opt/csw/etc/pkg/CSWsendnsca
+	@ginstall -m 644 $(FILEDIR)/CSWsendnsca.cswusergroup $(DESTDIR)/opt/csw/etc/pkg/CSWsendnsca/cswusergroup
+	@ginstall -m 755 -d $(DESTDIR)/opt/csw/etc/pkg/CSWnsca
+	@ginstall -m 644 $(FILEDIR)/CSWnsca.cswusergroup $(DESTDIR)/opt/csw/etc/pkg/CSWnsca/cswusergroup
 	@$(MAKECOOKIE)

Modified: csw/mgar/pkg/nsca/trunk/checksums
===================================================================
--- csw/mgar/pkg/nsca/trunk/checksums	2009-10-12 09:12:22 UTC (rev 6843)
+++ csw/mgar/pkg/nsca/trunk/checksums	2009-10-12 17:15:17 UTC (rev 6844)
@@ -1,10 +1,9 @@
-33a98e7975f633a9489d7a8938ed6131  download/nsca-2.7.2.tar.gz
-82f1144c12dc6247524609dbeefc3023  download/CSWnsca.gspec
-6c3e8f2bf654a03cc7e993bf26bb066d  download/CSWnsca.prototype
-1886b15eafd2e2a5a4b230918960ea9a  download/CSWnsca.checkinstall
-7fef893e65bb68bc0762434dbeace713  download/CSWnsca.preinstall
-0f458cf358b1aab192c02fd0d37b1220  download/CSWsendnsca.gspec
-664e84201491b489ae20b983a150d72a  download/CSWsendnsca.prototype
-8bf9882f3115e8514ae6d9a866397c71  download/CSWsendnsca.preinstall
+e9ed8b90404f0aebfc6f77355d8c9bbe  download/CSWnsca.cswusergroup
+ec54b953469889200d99a86669653173  download/CSWnsca.preinstall
+c9578d6892ce725133fcef365adcc6fe  download/CSWnsca.prototype
+0a98ba4dd462e50f23239433117bae5e  download/CSWsendnsca.cswusergroup
+e275462ffbf488fe5f7e29dd3abab0ae  download/CSWsendnsca.preinstall
+d8d3eeee6cb8fbc3534734590d83a13b  download/CSWsendnsca.prototype
 55a1c5523b2fe1ee66b45a2807e80bd6  download/cswnsca
+33a98e7975f633a9489d7a8938ed6131  download/nsca-2.7.2.tar.gz
 cbb38cacd3ca318f00dfa0877b6017df  download/submit_check_results.diff

Deleted: csw/mgar/pkg/nsca/trunk/files/CSWnsca.checkinstall
===================================================================
--- csw/mgar/pkg/nsca/trunk/files/CSWnsca.checkinstall	2009-10-12 09:12:22 UTC (rev 6843)
+++ csw/mgar/pkg/nsca/trunk/files/CSWnsca.checkinstall	2009-10-12 17:15:17 UTC (rev 6844)
@@ -1,32 +0,0 @@
-# checkinstall script for nsca
-# Verify that the external command group nagioscm exists
-# 2007-12-02 Fix PKG_INSTALL_ROOT usage.  BASEDIR is not used for non
-#            relocatable packages.
-#
-# See if group are needed
-NEEDCMDGROUP=0
-
-# First check target machines group file, THEN check
-# NIS/NIS+/whatever
-
-/usr/bin/grep '^nagioscm:' /etc/group >/dev/null
-if [ $? -ne 0 ] ; then
-        /usr/bin/getent group nagioscm >/dev/null
-        if [ $? -ne 0 ] ; then
-                NEEDCMDGROUP=1
-        fi
-fi
-
-if [ "$NEEDCMDGROUP" = 1 ] ; then
-        echo "***"
-        echo "Group nagioscm must exist for this package install."
-        echo "nagioscm group will be added."
-        ADDCMDGROUP=1
-else
-        echo "nagioscm group detected"
-fi
-
-cat >$1 <<!
-CLASSES='$CLASSES'
-NEEDCMDGROUP='$NEEDCMDGROUP'
-!

Added: csw/mgar/pkg/nsca/trunk/files/CSWnsca.cswusergroup
===================================================================
--- csw/mgar/pkg/nsca/trunk/files/CSWnsca.cswusergroup	                        (rev 0)
+++ csw/mgar/pkg/nsca/trunk/files/CSWnsca.cswusergroup	2009-10-12 17:15:17 UTC (rev 6844)
@@ -0,0 +1 @@
+:nagioscm:::::

Modified: csw/mgar/pkg/nsca/trunk/files/CSWnsca.preinstall
===================================================================
--- csw/mgar/pkg/nsca/trunk/files/CSWnsca.preinstall	2009-10-12 09:12:22 UTC (rev 6843)
+++ csw/mgar/pkg/nsca/trunk/files/CSWnsca.preinstall	2009-10-12 17:15:17 UTC (rev 6844)
@@ -3,16 +3,21 @@
 # 2007-12-02 Fix PKG_INSTALL_ROOT usage.  BASEDIR is not used for non
 #            relocatable packages.
 
-if [ "$ADDCMDGROUP" = "1" ] ; then
-        /usr/sbin/groupadd nagioscm
-        echo "Added nagioscm group."
-        /usr/sbin/usermod -G nagioscm nagios
-        echo "Added nagios user to nagioscm group."
-        echo "**"
-        echo "To use external commands, you must add your apache"
-        echo "  user to the nagioscm group."
-        echo "Example: usermod -G nagioscm apache"
-        echo "**"
-fi
-#
+cat << EOF
+
+=======================================================================
+
+From NSCA 2.7.2,REV=2009.10.12 on the configuration file for the
+OpenCSW package is stored in /etc/opt/csw/nagios/.
+
+No further action is needed (to have a backup is always a good idea).
+
+            Installation will proceed in 10 seconds.
+             Press CTRL+C if you want to stop now.
+             
+=======================================================================
+EOF
+
+sleep 10
+
 exit 0

Modified: csw/mgar/pkg/nsca/trunk/files/CSWnsca.prototype
===================================================================
--- csw/mgar/pkg/nsca/trunk/files/CSWnsca.prototype	2009-10-12 09:12:22 UTC (rev 6843)
+++ csw/mgar/pkg/nsca/trunk/files/CSWnsca.prototype	2009-10-12 17:15:17 UTC (rev 6844)
@@ -1,11 +1,12 @@
 1 f none /opt/csw/nagios/bin/nsca 0755 root bin
-1 f cswpreserveconf /opt/csw/nagios/etc/nsca.cfg.CSW 0644 root bin
+1 f cswpreserveconf /etc/opt/csw/nagios/nsca.cfg.CSW 0644 root bin
 1 d none /opt/csw/share/doc/nsca 0755 root bin
 1 f none /opt/csw/share/doc/nsca/Changelog 0644 root bin
 1 f none /opt/csw/share/doc/nsca/LEGAL 0644 root bin
 1 f none /opt/csw/share/doc/nsca/README 0644 root bin
 1 f none /opt/csw/share/doc/nsca/SECURITY 0644 root bin
+d none /opt/csw/etc/pkg/CSWnsca 0755 root bin
+f cswusergroup /opt/csw/etc/pkg/CSWnsca/cswusergroup 0644 root bin
 f cswinitsmf /etc/opt/csw/init.d/cswnsca 0755 root bin
-1 i checkinstall=CSWnsca.checkinstall
 1 i pkginfo=CSWnsca.pkginfo
 1 i preinstall=CSWnsca.preinstall

Added: csw/mgar/pkg/nsca/trunk/files/CSWsendnsca.cswusergroup
===================================================================
--- csw/mgar/pkg/nsca/trunk/files/CSWsendnsca.cswusergroup	                        (rev 0)
+++ csw/mgar/pkg/nsca/trunk/files/CSWsendnsca.cswusergroup	2009-10-12 17:15:17 UTC (rev 6844)
@@ -0,0 +1 @@
+nagios:nagios:Nagios user:/opt/csw/nagios:/bin/false:m:r

Modified: csw/mgar/pkg/nsca/trunk/files/CSWsendnsca.preinstall
===================================================================
--- csw/mgar/pkg/nsca/trunk/files/CSWsendnsca.preinstall	2009-10-12 09:12:22 UTC (rev 6843)
+++ csw/mgar/pkg/nsca/trunk/files/CSWsendnsca.preinstall	2009-10-12 17:15:17 UTC (rev 6844)
@@ -5,38 +5,21 @@
 # 2007-12-02 Fix PKG_INSTALL_ROOT usage.  BASEDIR is not used for non
 #            relocatable packages.
 
-NAGIOSHOME=/opt/csw/nagios
+cat << EOF
 
-#First check target machines password file, THEN check
-#NIS/NIS+/whatever
+=======================================================================
 
-grep '^nagios:' /etc/passwd >/dev/null
-if [ $? -ne 0 ] ; then
-        getent passwd nagios >/dev/null
-        if [ $? -ne 0 ] ; then
-                NEEDUSER=1
-        fi
-fi
+From NSCA 2.7.2,REV=2009.10.05 on the configuration file for the
+OpenCSW package is stored in /etc/opt/csw/nagios/.
 
-grep '^nagios:' /etc/group >/dev/null
-if [ $? -ne 0 ] ; then
-        getent group nagios >/dev/null
-        if [ $? -ne 0 ] ; then
-                NEEDGROUP=1
-        fi
-fi
+No further action is needed (to have a backup is always a good idea).
 
-if [ "$NEEDGROUP" = 1 ] ; then
-        echo adding nagios group
-        /usr/sbin/groupadd nagios
-else
-        echo nagios group detected
-fi
+            Installation will proceed in 10 seconds.
+             Press CTRL+C if you want to stop now.
+             
+=======================================================================
+EOF
 
-if [ "$NEEDUSER" = 1 ] ; then
-        echo adding nagios user
-        /usr/sbin/useradd -g nagios nagios
-        /usr/sbin/usermod -s /bin/false -d $NAGIOSHOME nagios
-else
-        echo nagios user detected
-fi
+sleep 10
+
+exit 0

Modified: csw/mgar/pkg/nsca/trunk/files/CSWsendnsca.prototype
===================================================================
--- csw/mgar/pkg/nsca/trunk/files/CSWsendnsca.prototype	2009-10-12 09:12:22 UTC (rev 6843)
+++ csw/mgar/pkg/nsca/trunk/files/CSWsendnsca.prototype	2009-10-12 17:15:17 UTC (rev 6844)
@@ -1,12 +1,14 @@
 d none /opt/csw/bin 0755 root bin
 f none /opt/csw/bin/send_nsca 0755 root bin
 d none /opt/csw/etc 0755 root bin
-f cswpreserveconf /opt/csw/etc/send_nsca.cfg.CSW 0644 root bin
+f cswpreserveconf /etc/opt/csw/nagios/send_nsca.cfg.CSW 0644 root bin
 d none /opt/csw/share/doc/send_nsca 0755 root bin
 f none /opt/csw/share/doc/send_nsca/Changelog 0644 root bin
 f none /opt/csw/share/doc/send_nsca/LEGAL 0644 root bin
 f none /opt/csw/share/doc/send_nsca/README 0644 root bin
 f none /opt/csw/share/doc/send_nsca/SECURITY 0644 root bin
 f none /opt/csw/share/doc/send_nsca/submit_check_result-sample 0755 root bin
+d none /opt/csw/etc/pkg/CSWsendnsca 0755 root bin
+f cswusergroup /opt/csw/etc/pkg/CSWsendnsca/cswusergroup 0644 root bin
 i pkginfo=CSWsendnsca.pkginfo
 i preinstall=CSWsendnsca.preinstall


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