Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 20 Jan 2010 15:29:23 GMT
From:      Alexander Kriventsov <avk@vl.ru>
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   ports/143024: [PATCH] sysutils/puppet: add possobility to rc script run server as a mongrel
Message-ID:  <201001201529.o0KFTNpE080893@www.freebsd.org>
Resent-Message-ID: <201001201530.o0KFU6Yq091569@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         143024
>Category:       ports
>Synopsis:       [PATCH] sysutils/puppet: add possobility to rc script run server as a mongrel
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          update
>Submitter-Id:   current-users
>Arrival-Date:   Wed Jan 20 15:30:06 UTC 2010
>Closed-Date:
>Last-Modified:
>Originator:     Alexander Kriventsov
>Release:        FreeBSD RELENG_8
>Organization:
McHost
>Environment:
FreeBSD RELENG_8
>Description:
This will allow to run puppetmasterd with mongrel server type and run it on several ports and using nginx as a frontend to puppetmasterd.
http://reductivelabs.com/trac/puppet/wiki/UsingMongrelNginx
>How-To-Repeat:

>Fix:


Patch attached with submission follows:

diff -urN puppet.orig/Makefile puppet/Makefile
--- puppet.orig/Makefile	2010-01-18 11:25:44.000000000 +0000
+++ puppet/Makefile	2010-01-20 15:10:46.000000000 +0000
@@ -7,6 +7,7 @@
 
 PORTNAME=	puppet
 PORTVERSION=	0.25.3
+PORTREVISION=	2
 CATEGORIES=	sysutils
 MASTER_SITES=	http://www.reductivelabs.com/downloads/puppet/
 
@@ -14,6 +15,8 @@
 COMMENT=	A configuration management framework written in Ruby
 
 BUILD_DEPENDS=	${RUBY_SITELIBDIR}/facter.rb:${PORTSDIR}/sysutils/facter \
+	${RUBY_ARCHLIBDIR}/iconv.so:${PORTSDIR}/converters/ruby-iconv \
+	rubygem-mongrel>=0:${PORTSDIR}/www/rubygem-mongrel \
 	portupgrade>0:${PORTSDIR}/ports-mgmt/portupgrade
 RUN_DEPENDS=	${BUILD_DEPENDS}
 
diff -urN puppet.orig/files/puppetmasterd.in puppet/files/puppetmasterd.in
--- puppet.orig/files/puppetmasterd.in	2010-01-09 10:55:54.000000000 +0000
+++ puppet/files/puppetmasterd.in	2010-01-20 15:12:01.000000000 +0000
@@ -40,6 +40,20 @@
 : ${puppetmasterd_confdir="%%PREFIX%%/etc/puppet"}
 : ${puppetmasterd_pid="%%PUPPET_RUNDIR%%/${name}.pid"}
 : ${puppetmasterd_flags="--pidfile ${puppetmasterd_pid}"}
+: ${puppetmasterd_ports=""}
 pidfile="$puppetmasterd_pid"
 
-run_rc_command "$1"
+if [ -z "${puppetmasterd_ports}" ]; then
+	run_rc_command "$1"
+else
+	for port in ${puppetmasterd_ports}; do
+		puppetmasterd_pid="%%PUPPET_RUNDIR%%/${name}.${port}.pid"
+		puppetmasterd_flags="--pidfile ${puppetmasterd_pid} --servertype=mongrel --masterport=${port}"
+		pidfile="$puppetmasterd_pid"
+		run_rc_command "$1"
+		case "$1" in
+		*restart) _rc_restart_done=false
+			;;
+		esac	
+	done
+fi


>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201001201529.o0KFTNpE080893>