Revision: 3774 http://gar.svn.sourceforge.net/gar/?rev=3774&view=rev Author: hson Date: 2009-03-16 03:25:59 +0000 (Mon, 16 Mar 2009)
Log Message: ----------- puppet: Initial commit Added Paths: ----------- csw/mgar/pkg/puppet/ csw/mgar/pkg/puppet/branches/ csw/mgar/pkg/puppet/tags/ csw/mgar/pkg/puppet/trunk/ csw/mgar/pkg/puppet/trunk/Makefile csw/mgar/pkg/puppet/trunk/checksums csw/mgar/pkg/puppet/trunk/files/ csw/mgar/pkg/puppet/trunk/files/CSWpuppet.gspec csw/mgar/pkg/puppet/trunk/files/CSWpuppet.postinstall csw/mgar/pkg/puppet/trunk/files/CSWpuppet.postremove csw/mgar/pkg/puppet/trunk/files/CSWpuppet.preinstall csw/mgar/pkg/puppet/trunk/files/CSWpuppet.preremove csw/mgar/pkg/puppet/trunk/files/cswpuppetd csw/mgar/pkg/puppet/trunk/files/cswpuppetd.xml csw/mgar/pkg/puppet/trunk/files/cswpuppetmasterd csw/mgar/pkg/puppet/trunk/files/cswpuppetmasterd.xml csw/mgar/pkg/puppet/trunk/files/svc-cswpuppetd csw/mgar/pkg/puppet/trunk/files/svc-cswpuppetmasterd Property changes on: csw/mgar/pkg/puppet/trunk ___________________________________________________________________ Added: svn:ignore + cookies download work Added: svn:externals + gar https://gar.svn.sf.net/svnroot/gar/csw/mgar/gar/v2 Added: csw/mgar/pkg/puppet/trunk/Makefile =================================================================== --- csw/mgar/pkg/puppet/trunk/Makefile (rev 0) +++ csw/mgar/pkg/puppet/trunk/Makefile 2009-03-16 03:25:59 UTC (rev 3774) @@ -0,0 +1,58 @@ +GARNAME = puppet +GARVERSION = 0.24.7 +CATEGORIES = apps + +DESCRIPTION = a system configuration tool +define BLURB + Long description +endef + +MASTER_SITES = http://reductivelabs.com/downloads/puppet/ +DISTFILES = $(GARNAME)-$(GARVERSION).tgz +DISTFILES += $(call admfiles,CSWpuppet,preinstall postinstall preremove postremove) +DISTFILES += cswpuppetd cswpuppetd.xml cswpuppetmasterd cswpuppetmasterd.xml +DISTFILES += svc-cswpuppetd svc-cswpuppetmasterd + +REQUIRED_PKGS = CSWfacter + +# We define upstream file regex so we can be notifed of new upstream software release +UFILES_REGEX = $(GARNAME)-(\d+(?:\.\d+)*).tar.gz + +ARCHALL=1 + +CONFIGURE_SCRIPTS = none +BUILD_SCRIPTS = none +TEST_SCRIPTS = none +INSTALL_SCRIPTS = puppet + +include gar/category.mk + +configure-none: + @$(MAKECOOKIE) + +test-none: + @$(MAKECOOKIE) + +build-none: + @$(MAKECOOKIE) + +install-puppet: + @ginstall -d $(DESTDIR) + @ginstall -d $(DESTDIR)/etc/opt/csw/puppet + @ginstall -d $(DESTDIR)/var/opt/csw/puppet/run + @ginstall -d $(DESTDIR)/opt/csw/var/svc/manifest + @ginstall -d $(DESTDIR)/opt/csw/lib/svc/method + (cd $(WORKDIR)/$(DISTNAME) ; \ + gsed -e "s|/var/puppet|/var/opt/csw/puppet|g" < ./lib/puppet/defaults.rb > ./lib/puppet/defaults.rb.csw && gmv ./lib/puppet/defaults.rb.csw ./lib/puppet/defaults.rb; \ + gsed -e "s|/etc/puppet|/etc/opt/csw/puppet|g" < ./lib/puppet/defaults.rb > ./lib/puppet/defaults.rb.csw && gmv ./lib/puppet/defaults.rb.csw ./lib/puppet/defaults.rb; \ + DESTDIR=$(DESTDIR) ruby install.rb ; \ + cd $(DESTDIR)$(mandir)/man8 ; \ + gunzip * ) + (cd $(WORKDIR)/$(DISTNAME)/examples/etc/puppet ; \ + for f in *; do \ + if [ -f $$f ] ; then \ + cp $$f $(DESTDIR)/etc/opt/csw/puppet/$$f.example; \ + chmod 644 $(DESTDIR)/etc/opt/csw/puppet/$$f.example; \ + fi \ + done ) + @$(MAKECOOKIE) Added: csw/mgar/pkg/puppet/trunk/checksums =================================================================== --- csw/mgar/pkg/puppet/trunk/checksums (rev 0) +++ csw/mgar/pkg/puppet/trunk/checksums 2009-03-16 03:25:59 UTC (rev 3774) @@ -0,0 +1,12 @@ +36f57de5c2e069d04752f0539034227d download/puppet-0.24.7.tgz +a8dc43771843b852f506f1795231d6ee download/CSWpuppet.gspec +11c352613cf14412565f26dde2dc7578 download/CSWpuppet.preinstall +b3a1e3bb293bf607368f3479b288f6eb download/CSWpuppet.postinstall +2465374a83d4fbe6e01b6eac410e62a8 download/CSWpuppet.preremove +2b76d69202476fad006d27d26364e59c download/CSWpuppet.postremove +ecf6aae7bb8bd8ad9e064ed40674a7be download/cswpuppetd +dd10b02543d22bbe66994ef89409f7fd download/cswpuppetd.xml +066f9053e1342b19cf83f3f78ce2259c download/cswpuppetmasterd +38e007c1906fca70bc95dc45b5892581 download/cswpuppetmasterd.xml +ecf6aae7bb8bd8ad9e064ed40674a7be download/svc-cswpuppetd +066f9053e1342b19cf83f3f78ce2259c download/svc-cswpuppetmasterd Added: csw/mgar/pkg/puppet/trunk/files/CSWpuppet.gspec =================================================================== --- csw/mgar/pkg/puppet/trunk/files/CSWpuppet.gspec (rev 0) +++ csw/mgar/pkg/puppet/trunk/files/CSWpuppet.gspec 2009-03-16 03:25:59 UTC (rev 3774) @@ -0,0 +1,5 @@ +%var bitname puppet +%var pkgname CSWpuppet +%include url file://%{PKGLIB}/csw_dyndepend.gspec +%copyright url file://%{WORKSRC}/LICENCE +%include url file://%{PKGLIB}/smf_enabled.gspec Added: csw/mgar/pkg/puppet/trunk/files/CSWpuppet.postinstall =================================================================== --- csw/mgar/pkg/puppet/trunk/files/CSWpuppet.postinstall (rev 0) +++ csw/mgar/pkg/puppet/trunk/files/CSWpuppet.postinstall 2009-03-16 03:25:59 UTC (rev 3774) @@ -0,0 +1,12 @@ +PKG_INSTALL_ROOT=\${PKG_INSTALL_ROOT:-/} +/usr/bin/test -d \$PKG_INSTALL_ROOT/opt/csw/etc/puppet || /usr/sbin/chroot \$PKG_INSTALL_ROOT /usr/bin/ln -s /etc/opt/csw/puppet /opt/csw/etc/puppet +/usr/bin/test -d \$PKG_INSTALL_ROOT/etc/puppet || /usr/sbin/chroot \$PKG_INSTALL_ROOT /usr/bin/ln -s /opt/csw/etc/puppet /etc/puppet +/usr/bin/test -d \$PKG_INSTALL_ROOT/opt/csw/var/puppet || /usr/sbin/chroot \$PKG_INSTALL_ROOT /usr/bin/ln -s /var/opt/csw/puppet /opt/csw/var/puppet +/usr/bin/test -d \$PKG_INSTALL_ROOT/var/puppet || /usr/sbin/chroot \$PKG_INSTALL_ROOT /usr/bin/ln -s /var/opt/csw/puppet /var/puppet +touch \$PKG_INSTALL_ROOT/etc/opt/csw/puppet/puppet.conf +/usr/bin/test -f \$PKG_INSTALL_ROOT/opt/csw/etc/csw.conf && . \$PKG_INSTALL_ROOT/opt/csw/etc/csw.conf +/usr/bin/test -f \$PKG_INSTALL_ROOT/etc/opt/csw/csw.conf && . \$PKG_INSTALL_ROOT/etc/opt/csw/csw.conf +if [ "\$autoenable_daemons" != "no" ] ; then + /usr/sbin/chroot \$PKG_INSTALL_ROOT /usr/sbin/svccfg import /opt/csw/var/svc/manifest/puppetd.xml || /bin/true + /usr/sbin/chroot \$PKG_INSTALL_ROOT /usr/sbin/svcadm enable svc:network/puppetd || /bin/true +fi Added: csw/mgar/pkg/puppet/trunk/files/CSWpuppet.postremove =================================================================== --- csw/mgar/pkg/puppet/trunk/files/CSWpuppet.postremove (rev 0) +++ csw/mgar/pkg/puppet/trunk/files/CSWpuppet.postremove 2009-03-16 03:25:59 UTC (rev 3774) @@ -0,0 +1,4 @@ +rm /etc/puppet || /bin/true +rm /opt/csw/etc/puppet || /bin/true +rm /var/puppet || /bin/true +rm /opt/csw/var/puppet || /bin/true Added: csw/mgar/pkg/puppet/trunk/files/CSWpuppet.preinstall =================================================================== --- csw/mgar/pkg/puppet/trunk/files/CSWpuppet.preinstall (rev 0) +++ csw/mgar/pkg/puppet/trunk/files/CSWpuppet.preinstall 2009-03-16 03:25:59 UTC (rev 3774) @@ -0,0 +1,6 @@ +PKG_INSTALL_ROOT=\${PKG_INSTALL_ROOT:-/} +\$PKG_INSTALL_ROOT/usr/sbin/chroot \$PKG_INSTALL_ROOT/ /usr/bin/getent group puppet > /dev/null || /usr/sbin/chroot \$PKG_INSTALL_ROOT /usr/sbin/groupadd puppet +\$PKG_INSTALL_ROOT/usr/sbin/chroot \$PKG_INSTALL_ROOT/ /usr/bin/getent passwd puppet > /dev/null || /usr/sbin/chroot \$PKG_INSTALL_ROOT /usr/sbin/useradd -g puppet -c "Puppet" -d /var/opt/csw/puppet -s "/bin/true" puppet + +mkdir -p \$PKG_INSTALL_ROOT/etc/opt/csw/puppet +chown root:bin \$PKG_INSTALL_ROOT/etc/opt/csw/puppet Added: csw/mgar/pkg/puppet/trunk/files/CSWpuppet.preremove =================================================================== --- csw/mgar/pkg/puppet/trunk/files/CSWpuppet.preremove (rev 0) +++ csw/mgar/pkg/puppet/trunk/files/CSWpuppet.preremove 2009-03-16 03:25:59 UTC (rev 3774) @@ -0,0 +1,2 @@ +/usr/sbin/svcadm disable svc:network/puppetd 2>/dev/null || /bin/true +/usr/sbin/svccfg delete svc:network/puppetd || /bin/true Added: csw/mgar/pkg/puppet/trunk/files/cswpuppetd =================================================================== --- csw/mgar/pkg/puppet/trunk/files/cswpuppetd (rev 0) +++ csw/mgar/pkg/puppet/trunk/files/cswpuppetd 2009-03-16 03:25:59 UTC (rev 3774) @@ -0,0 +1,66 @@ +#!/bin/sh +# This is the /etc/init.d file for puppetd +# Modified for CSW +# +# description: puppetd - Puppet Automation Client +# + +. /lib/svc/share/smf_include.sh + +prefix=/opt/csw +exec_prefix=/opt/csw +sysconfdir=/opt/csw/etc +sbindir=/opt/csw/bin + +pidfile=/var/opt/csw/puppet/run/puppetd.pid + +case "$1" in +start) + cd / + # Start daemons. + + printf "Starting Puppet client services:" + + /opt/csw/bin/puppetd + + printf " puppetd" + echo "" + ;; +stop) + printf "Stopping Puppet client services:" + kill `cat $pidfile` + + printf " puppetd" + echo "" + ;; +restart) + printf "Restarting Puppet client services:" + kill -HUP `cat $pidfile` + + printf " puppetd" + echo "" + ;; +reload) + printf "Reloading Puppet client services:" + + kill -HUP `cat $pidfile` + + printf " puppetd" + echo "" + ;; +status) + if [ -f $pidfile ]; then + pid=`cat $pidfile` + curpid=`pgrep puppetd` + if [ "$pid" -eq "$curpid" ]; then + exit 0 + else + exit 1 + fi + else + exit 1 + fi +esac +exit 0 + +# $Id$ Property changes on: csw/mgar/pkg/puppet/trunk/files/cswpuppetd ___________________________________________________________________ Added: svn:executable + * Added: csw/mgar/pkg/puppet/trunk/files/cswpuppetd.xml =================================================================== --- csw/mgar/pkg/puppet/trunk/files/cswpuppetd.xml (rev 0) +++ csw/mgar/pkg/puppet/trunk/files/cswpuppetd.xml 2009-03-16 03:25:59 UTC (rev 3774) @@ -0,0 +1,77 @@ +<?xml version="1.0"?> +<!DOCTYPE service_bundle SYSTEM "/usr/share/lib/xml/dtd/service_bundle.dtd.1"> + +<!-- Puppetd Manifest: Luke Kanies - reductivelabs.com --> + +<service_bundle type='manifest' name='puppetd'> + + +<service + name='network/puppetd' + type='service' + version='1'> + + <create_default_instance enabled='true'/> + <single_instance/> + + <dependency name='config-file' + grouping='require_all' + restart_on='none' + type='path'> + <service_fmri value='file:///etc/opt/csw/puppet/puppet.conf'/> + </dependency> + + <dependency name='loopback' + grouping='require_all' + restart_on='error' + type='service'> + <service_fmri value='svc:/network/loopback:default'/> + </dependency> + + <dependency name='physical' + grouping='require_all' + restart_on='error' + type='service'> + <service_fmri value='svc:/network/physical:default'/> + </dependency> + + <dependency name='fs-local' + grouping='require_all' + restart_on='none' + type='service'> + <service_fmri value='svc:/system/filesystem/local'/> + </dependency> + + <exec_method + type='method' + name='start' + exec='/opt/csw/lib/svc/method/svc-cswpuppetd start' + timeout_seconds='60' /> + + <exec_method + type='method' + name='stop' + exec='/opt/csw/lib/svc/method/svc-cswpuppetd stop' + timeout_seconds='60' /> + + <exec_method + type='method' + name='refresh' + exec='/opt/csw/lib/svc/method/svc-cswpuppetd reload' + timeout_seconds='60' /> + + <stability value='Unstable' /> + + <template> + <common_name> + <loctext xml:lang='C'>Puppet Client Daemon</loctext> + </common_name> + <documentation> + <manpage title='puppetd' section='1' /> + <doc_link name='reductivelabs.com' + uri='http://www.reductivelabs.com/projects/puppet' /> + </documentation> + </template> +</service> + +</service_bundle> Added: csw/mgar/pkg/puppet/trunk/files/cswpuppetmasterd =================================================================== --- csw/mgar/pkg/puppet/trunk/files/cswpuppetmasterd (rev 0) +++ csw/mgar/pkg/puppet/trunk/files/cswpuppetmasterd 2009-03-16 03:25:59 UTC (rev 3774) @@ -0,0 +1,62 @@ +#!/bin/sh +# + +. /lib/svc/share/smf_include.sh + +prefix=/opt/csw +exec_prefix=/opt/csw +sysconfdir=/opt/csw/etc +sbindir=/opt/csw/sbin + +pidfile=/var/opt/csw/puppet/run/puppetmasterd.pid + +case "$1" in +start) + cd / + # Start daemons. + + printf "Starting Puppet server services:" + + /opt/csw/bin/puppetmasterd + + printf " puppetmaster" + echo "" + ;; +stop) + printf "Stopping Puppet server services:" + kill `cat $pidfile` + + printf " puppetmasterd" + echo "" + ;; +restart) + printf "Restarting Puppet server services:" + kill -HUP `cat $pidfile` + + printf " puppetmasterd" + echo "" + ;; +reload) + printf "Reloading Puppet server services:" + + kill -HUP `cat $pidfile` + + printf " puppetmasterd" + echo "" + ;; +status) + if [ -f $pidfile ]; then + pid=`cat $pidfile` + curpid=`pgrep puppetmasterd` + if [ "$pid" -eq "$curpid" ]; then + exit 0 + else + exit 1 + fi + else + exit 1 + fi +esac +exit 0 + +# $Id$ Property changes on: csw/mgar/pkg/puppet/trunk/files/cswpuppetmasterd ___________________________________________________________________ Added: svn:executable + * Added: csw/mgar/pkg/puppet/trunk/files/cswpuppetmasterd.xml =================================================================== --- csw/mgar/pkg/puppet/trunk/files/cswpuppetmasterd.xml (rev 0) +++ csw/mgar/pkg/puppet/trunk/files/cswpuppetmasterd.xml 2009-03-16 03:25:59 UTC (rev 3774) @@ -0,0 +1,77 @@ +<?xml version="1.0"?> +<!DOCTYPE service_bundle SYSTEM "/usr/share/lib/xml/dtd/service_bundle.dtd.1"> + +<!-- PuppetMasterd Manifest: Luke Kanies - reductivelabs.com --> + +<service_bundle type='manifest' name='puppetmasterd'> + + +<service + name='network/puppetmasterd' + type='service' + version='1'> + + <create_default_instance enabled='true'/> + <single_instance/> + + <dependency name='config-file' + grouping='require_all' + restart_on='none' + type='path'> + <service_fmri value='file:///etc/opt/csw/puppet/puppet.conf'/> + </dependency> + + <dependency name='loopback' + grouping='require_all' + restart_on='error' + type='service'> + <service_fmri value='svc:/network/loopback:default'/> + </dependency> + + <dependency name='physical' + grouping='require_all' + restart_on='error' + type='service'> + <service_fmri value='svc:/network/physical:default'/> + </dependency> + + <dependency name='fs-local' + grouping='require_all' + restart_on='none' + type='service'> + <service_fmri value='svc:/system/filesystem/local'/> + </dependency> + + <exec_method + type='method' + name='start' + exec='/opt/csw/lib/svc/method/svc-cswpuppetmasterd start' + timeout_seconds='60' /> + + <exec_method + type='method' + name='stop' + exec='/opt/csw/lib/svc/method/svc-cswpuppetmasterd stop' + timeout_seconds='60' /> + + <exec_method + type='method' + name='refresh' + exec='/opt/csw/lib/svc/method/svc-cswpuppetmasterd reload' + timeout_seconds='60' /> + + <stability value='Unstable' /> + + <template> + <common_name> + <loctext xml:lang='C'>Puppet Server Daemon</loctext> + </common_name> + <documentation> + <manpage title='puppetmasterd' section='1' /> + <doc_link name='reductivelabs.com' + uri='http://www.reductivelabs.com/projects/puppet' /> + </documentation> + </template> +</service> + +</service_bundle> Added: csw/mgar/pkg/puppet/trunk/files/svc-cswpuppetd =================================================================== --- csw/mgar/pkg/puppet/trunk/files/svc-cswpuppetd (rev 0) +++ csw/mgar/pkg/puppet/trunk/files/svc-cswpuppetd 2009-03-16 03:25:59 UTC (rev 3774) @@ -0,0 +1,66 @@ +#!/bin/sh +# This is the /etc/init.d file for puppetd +# Modified for CSW +# +# description: puppetd - Puppet Automation Client +# + +. /lib/svc/share/smf_include.sh + +prefix=/opt/csw +exec_prefix=/opt/csw +sysconfdir=/opt/csw/etc +sbindir=/opt/csw/bin + +pidfile=/var/opt/csw/puppet/run/puppetd.pid + +case "$1" in +start) + cd / + # Start daemons. + + printf "Starting Puppet client services:" + + /opt/csw/bin/puppetd + + printf " puppetd" + echo "" + ;; +stop) + printf "Stopping Puppet client services:" + kill `cat $pidfile` + + printf " puppetd" + echo "" + ;; +restart) + printf "Restarting Puppet client services:" + kill -HUP `cat $pidfile` + + printf " puppetd" + echo "" + ;; +reload) + printf "Reloading Puppet client services:" + + kill -HUP `cat $pidfile` + + printf " puppetd" + echo "" + ;; +status) + if [ -f $pidfile ]; then + pid=`cat $pidfile` + curpid=`pgrep puppetd` + if [ "$pid" -eq "$curpid" ]; then + exit 0 + else + exit 1 + fi + else + exit 1 + fi +esac +exit 0 + +# $Id$ Property changes on: csw/mgar/pkg/puppet/trunk/files/svc-cswpuppetd ___________________________________________________________________ Added: svn:executable + * Added: csw/mgar/pkg/puppet/trunk/files/svc-cswpuppetmasterd =================================================================== --- csw/mgar/pkg/puppet/trunk/files/svc-cswpuppetmasterd (rev 0) +++ csw/mgar/pkg/puppet/trunk/files/svc-cswpuppetmasterd 2009-03-16 03:25:59 UTC (rev 3774) @@ -0,0 +1,62 @@ +#!/bin/sh +# + +. /lib/svc/share/smf_include.sh + +prefix=/opt/csw +exec_prefix=/opt/csw +sysconfdir=/opt/csw/etc +sbindir=/opt/csw/sbin + +pidfile=/var/opt/csw/puppet/run/puppetmasterd.pid + +case "$1" in +start) + cd / + # Start daemons. + + printf "Starting Puppet server services:" + + /opt/csw/bin/puppetmasterd + + printf " puppetmaster" + echo "" + ;; +stop) + printf "Stopping Puppet server services:" + kill `cat $pidfile` + + printf " puppetmasterd" + echo "" + ;; +restart) + printf "Restarting Puppet server services:" + kill -HUP `cat $pidfile` + + printf " puppetmasterd" + echo "" + ;; +reload) + printf "Reloading Puppet server services:" + + kill -HUP `cat $pidfile` + + printf " puppetmasterd" + echo "" + ;; +status) + if [ -f $pidfile ]; then + pid=`cat $pidfile` + curpid=`pgrep puppetmasterd` + if [ "$pid" -eq "$curpid" ]; then + exit 0 + else + exit 1 + fi + else + exit 1 + fi +esac +exit 0 + +# $Id$ Property changes on: csw/mgar/pkg/puppet/trunk/files/svc-cswpuppetmasterd ___________________________________________________________________ Added: svn:executable + * This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. _______________________________________________ devel mailing list devel@lists.opencsw.org https://lists.opencsw.org/mailman/listinfo/devel