From nobody@FreeBSD.org  Wed Jan 20 15:29:24 2010
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 2B09810656A6
	for <freebsd-gnats-submit@FreeBSD.org>; Wed, 20 Jan 2010 15:29:24 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (www.freebsd.org [IPv6:2001:4f8:fff6::21])
	by mx1.freebsd.org (Postfix) with ESMTP id C96918FC32
	for <freebsd-gnats-submit@FreeBSD.org>; Wed, 20 Jan 2010 15:29:23 +0000 (UTC)
Received: from www.freebsd.org (localhost [127.0.0.1])
	by www.freebsd.org (8.14.3/8.14.3) with ESMTP id o0KFTNub080894
	for <freebsd-gnats-submit@FreeBSD.org>; Wed, 20 Jan 2010 15:29:23 GMT
	(envelope-from nobody@www.freebsd.org)
Received: (from nobody@localhost)
	by www.freebsd.org (8.14.3/8.14.3/Submit) id o0KFTNpE080893;
	Wed, 20 Jan 2010 15:29:23 GMT
	(envelope-from nobody)
Message-Id: <201001201529.o0KFTNpE080893@www.freebsd.org>
Date: Wed, 20 Jan 2010 15:29:23 GMT
From: Alexander Kriventsov <avk@vl.ru>
To: freebsd-gnats-submit@FreeBSD.org
Subject: [PATCH] sysutils/puppet: add possobility to rc script run server as a mongrel
X-Send-Pr-Version: www-3.1
X-GNATS-Notify: raj@csub.edu

>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:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          update
>Submitter-Id:   current-users
>Arrival-Date:   Wed Jan 20 15:30:06 UTC 2010
>Closed-Date:    Thu Feb 03 10:42:31 UTC 2011
>Last-Modified:  Thu Feb 03 10:42:31 UTC 2011
>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:
State-Changed-From-To: open->feedback 
State-Changed-By: edwin 
State-Changed-When: Wed Jan 20 15:30:35 UTC 2010 
State-Changed-Why:  
Awaiting maintainers feedback (via the GNATS Auto Assign Tool) 

http://www.freebsd.org/cgi/query-pr.cgi?pr=143024 

From: Edwin Groothuis <edwin@FreeBSD.org>
To: raj@csub.edu
Cc: bug-followup@FreeBSD.org
Subject: Re: ports/143024: [PATCH] sysutils/puppet: add possobility to rc script run server as a mongrel
Date: Wed, 20 Jan 2010 15:30:32 UT

 Maintainer of sysutils/puppet,
 
 Please note that PR ports/143024 has just been submitted.
 
 If it contains a patch for an upgrade, an enhancement or a bug fix
 you agree on, reply to this email stating that you approve the patch
 and a committer will take care of it.
 
 The full text of the PR can be found at:
     http://www.freebsd.org/cgi/query-pr.cgi?pr=ports/143024
 
 -- 
 Edwin Groothuis via the GNATS Auto Assign Tool
 edwin@FreeBSD.org

From: Russell Jackson <raj@csub.edu>
To: bug-followup@FreeBSD.ORG
Cc:  
Subject: Re: ports/143024: [PATCH] sysutils/puppet: add possobility to rc
 script run server as a mongrel
Date: Wed, 20 Jan 2010 17:35:24 -0800

 On 01/20/2010 07:30 AM, Edwin Groothuis wrote:
 > Maintainer of sysutils/puppet,
 >
 > Please note that PR ports/143024 has just been submitted.
 >
 > If it contains a patch for an upgrade, an enhancement or a bug fix
 > you agree on, reply to this email stating that you approve the patch
 > and a committer will take care of it.
 >
 > The full text of the PR can be found at:
 >      http://www.freebsd.org/cgi/query-pr.cgi?pr=ports/143024
 >
 
 This will make all the client-only hosts depend on extra unnecessary ruby bits. I'd rather 
 see the port split into client and server sub ports; then, have the server port use the 
 options framework to select between different backend app servers 
 (webrick/mongrel/passenger/etc...).
 
 sysutils/puppet-client
 sysutils/puppet-server
 
 -- 
 Russell A. Jackson <raj@csub.edu>
 Network Analyst
 California State University, Bakersfield
State-Changed-From-To: feedback->suspended 
State-Changed-By: linimon 
State-Changed-When: Thu Jan 21 04:53:04 UTC 2010 
State-Changed-Why:  
Maintainer would rather see puppet get split into 'client' and 'server' 
ports.  Mark suspended awaiting someone to come up with some patches. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=143024 
State-Changed-From-To: suspended->open 
State-Changed-By: pgollucci 
State-Changed-When: Wed Sep 1 22:35:31 UTC 2010 
State-Changed-Why:  
I am able to allocate $work and ASF resources to this one during Sept 
2010 


Responsible-Changed-From-To: freebsd-ports-bugs->pgollucci 
Responsible-Changed-By: pgollucci 
Responsible-Changed-When: Wed Sep 1 22:35:31 UTC 2010 
Responsible-Changed-Why:  
I am able to allocate $work and ASF resources to this one during Sept 
2010 

http://www.freebsd.org/cgi/query-pr.cgi?pr=143024 
State-Changed-From-To: open->suspended 
State-Changed-By: pgollucci 
State-Changed-When: Thu Sep 9 22:59:02 UTC 2010 
State-Changed-Why:  
analyzed; work time allocated for Octoberish; will split port to 
client/server 

http://www.freebsd.org/cgi/query-pr.cgi?pr=143024 
Responsible-Changed-From-To: pgollucci->freebsd-ports-bugs 
Responsible-Changed-By: pgollucci 
Responsible-Changed-When: Tue Dec 14 00:50:12 UTC 2010 
Responsible-Changed-Why:  
back to the pool 

http://www.freebsd.org/cgi/query-pr.cgi?pr=143024 
State-Changed-From-To: suspended->closed 
State-Changed-By: arved 
State-Changed-When: Thu Feb 3 10:42:12 UTC 2011 
State-Changed-Why:  
Maintainer rejected patch. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=143024 
>Unformatted:
