ports/143024: [PATCH] sysutils/puppet: add possobility to rc script run server as a mongrel
Alexander Kriventsov
avk at vl.ru
Wed Jan 20 15:30:11 UTC 2010
>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:
More information about the freebsd-ports-bugs
mailing list