Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 10 Apr 2008 23:37:33 +0900 (JST)
From:      Tomoyuki Sakurai <cherry@trombik.org>
To:        FreeBSD-gnats-submit@FreeBSD.org
Subject:   ports/122628: [MAINTAINER] sysutils/puppet-devel: update to 0.24.4
Message-ID:  <20080410143733.905513C041D@spica.trombik.org>
Resent-Message-ID: <200804101440.m3AEe4Qb094627@freefall.freebsd.org>

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

>Number:         122628
>Category:       ports
>Synopsis:       [MAINTAINER] sysutils/puppet-devel: update to 0.24.4
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          maintainer-update
>Submitter-Id:   current-users
>Arrival-Date:   Thu Apr 10 14:40:03 UTC 2008
>Closed-Date:
>Last-Modified:
>Originator:     Tomoyuki Sakurai
>Release:        FreeBSD 6.2-STABLE-200706 i386
>Organization:
>Environment:
System: FreeBSD x60.i.trombik.org 6.3-STABLE FreeBSD 6.3-STABLE #6: Sat Mar 29 17:03:57 JST 2008
>Description:

Please also add "puppet" entry in /usr/ports/UIDs and GIDs.
puppet:*:814:814:Puppet Daemon:/nonexistent:/sbin/nologin

- Update to 0.24.4
- add puppet user and group if missing
- more TMPPLIST
- remove patch already in the upstream
- remove puppetmasterd.conf in favor of puppet.conf
- PID files are created in /var/run/puppet

Added file(s):
- files/pkg-install.in
- files/pkg-message.in

Removed file(s):
- files/patch-optional-p-P

Generated with FreeBSD Port Tools 0.77
>How-To-Repeat:
>Fix:

--- puppet-devel-0.24.4.patch begins here ---
diff -ruN --exclude=CVS /usr/ports/sysutils/puppet-devel/Makefile /usr/home/cherry/svn/ports/sysutils/puppet-devel/Makefile
--- /usr/ports/sysutils/puppet-devel/Makefile	Fri Sep 28 08:18:39 2007
+++ /usr/home/cherry/svn/ports/sysutils/puppet-devel/Makefile	Thu Apr 10 23:31:18 2008
@@ -6,7 +6,7 @@
 #
 
 PORTNAME=	puppet
-PORTVERSION=	0.23.2
+PORTVERSION=	0.24.4
 CATEGORIES=	sysutils
 MASTER_SITES=	http://www.reductivelabs.com/downloads/puppet/
 PKGNAMESUFFIX=	-devel
@@ -15,7 +15,8 @@
 MAINTAINER=	cherry@trombik.org
 COMMENT=	A configuration management framework written in Ruby
 
-BUILD_DEPENDS=	${RUBY_SITELIBDIR}/facter.rb:${PORTSDIR}/sysutils/facter
+BUILD_DEPENDS=	${RUBY_SITELIBDIR}/facter.rb:${PORTSDIR}/sysutils/facter \
+	portupgrade>0:${PORTSDIR}/ports-mgmt/portupgrade
 RUN_DEPENDS=	${BUILD_DEPENDS}
 
 CONFLICTS=	puppet-[0-9]*
@@ -23,14 +24,25 @@
 NO_BUILD=	yes
 USE_RUBY=	yes
 USE_RC_SUBR=	puppetmasterd puppetd
-
 DOCS=	CHANGELOG README LICENSE COPYING
+PUPPET_USER:=	puppet
+PUPPET_GROUP:=	${PUPPET_USER}
+PUPPET_RUNDIR:=	/var/run/${PORTNAME}
+SUB_FILES+=	pkg-install pkg-message
+SUB_LIST+=	PUPPET_RUNDIR="${PUPPET_RUNDIR}" \
+			PUPPET_USER="${PUPPET_USER}" \
+			PUPPET_GROUP="${PUPPET_GROUP}"
 
 .include <bsd.port.pre.mk>
 
 post-patch:
 	${REINPLACE_CMD} -e "s|/etc/puppet|${PREFIX}/etc/puppet|" \
-		${WRKSRC}/lib/puppet/configuration.rb
+		${WRKSRC}/lib/puppet/reference/configuration.rb
+	${REINPLACE_CMD} -e "s|/etc/puppet|${PREFIX}/etc/puppet|" \
+	${WRKSRC}/lib/puppet/defaults.rb
+
+pre-install:
+	@${SETENV} PKG_PREFIX=${PREFIX} ${SH} ${PKGINSTALL} ${PKGNAME} PRE-INSTALL
 
 do-install:
 	cd ${WRKSRC} && \
@@ -53,7 +65,7 @@
 .endfor
 	${RUBY} -I ${RUBY_SITELIBDIR} ${PREFIX}/bin/puppetmasterd \
 		--confdir=${PREFIX}/etc/${PORTNAME} \
-		--rundir=/var/run \
+		--rundir=${PUPPET_RUNDIR} \
 		--genconfig | \
 		${SED} -e 's/genconfig = true/# genconfig = false/' \
 		> ${PREFIX}/etc/${PORTNAME}/puppet.conf-dist
@@ -61,7 +73,19 @@
 		${SED} 's,^${PREFIX}/,,' >> ${TMPPLIST}
 	@${FIND} ${RUBY_SITELIBDIR}/${PORTNAME} -type f | \
 		${SED} 's,^${PREFIX}/,,' >> ${TMPPLIST}
+.if !defined(NOPORTDOCS)
+	@${FIND} ${EXAMPLESDIR} -type f | \
+		${SED} 's,^${PREFIX}/,,' >> ${TMPPLIST}
+	@${FIND} ${EXAMPLESDIR} -type d | ${SORT} -r | \
+		${SED} 's,^${PREFIX}/,@dirrm ,' >> ${TMPPLIST}
+	@${FIND} ${DOCSDIR} -type f | \
+		${SED} 's,^${PREFIX}/,,' >> ${TMPPLIST}
+	@${FIND} ${DOCSDIR} -type d | ${SORT} -r | \
+		${SED} 's,^${PREFIX}/,@dirrm ,' >> ${TMPPLIST}
+.endif
 	@${FIND} ${RUBY_SITELIBDIR}/${PORTNAME} -type d | ${SORT} -r | \
 		${SED} 's,^${PREFIX}/,@dirrm ,' >> ${TMPPLIST}
+	@${SETENV} PKG_PREFIX=${PREFIX} ${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL
+	@${CAT} ${PKGMESSAGE}
 
 .include <bsd.port.post.mk>
diff -ruN --exclude=CVS /usr/ports/sysutils/puppet-devel/distinfo /usr/home/cherry/svn/ports/sysutils/puppet-devel/distinfo
--- /usr/ports/sysutils/puppet-devel/distinfo	Fri Sep 28 08:18:39 2007
+++ /usr/home/cherry/svn/ports/sysutils/puppet-devel/distinfo	Thu Apr 10 23:31:18 2008
@@ -1,3 +1,3 @@
-MD5 (puppet-0.23.2.tgz) = 496373ce2a7affbb639f85bcff38da0b
-SHA256 (puppet-0.23.2.tgz) = eb80e4d4adeb174c2ec5198f73d581f9a77cb07a2cae15114b9b11b13021bfa8
-SIZE (puppet-0.23.2.tgz) = 698593
+MD5 (puppet-0.24.4.tgz) = 9658624ed3745e8954772b3fbfdcc438
+SHA256 (puppet-0.24.4.tgz) = 0d54f6db7cf1210d123264bcb35b07b36837ebc12a4f2bd01aee6127836adfb9
+SIZE (puppet-0.24.4.tgz) = 652572
diff -ruN --exclude=CVS /usr/ports/sysutils/puppet-devel/files/patch-optional-p-P /usr/home/cherry/svn/ports/sysutils/puppet-devel/files/patch-optional-p-P
--- /usr/ports/sysutils/puppet-devel/files/patch-optional-p-P	Fri Sep 28 08:18:40 2007
+++ /usr/home/cherry/svn/ports/sysutils/puppet-devel/files/patch-optional-p-P	Thu Jan  1 09:00:00 1970
@@ -1,15 +0,0 @@
---- lib/puppet/provider/package/ports.rb.orig	Tue Aug  7 21:52:46 2007
-+++ lib/puppet/provider/package/ports.rb	Tue Aug  7 21:53:49 2007
-@@ -17,11 +17,9 @@
-     end
- 
-     def install
--        # -p: create a package
-         # -N: install if the package is missing, otherwise upgrade
--        # -P: prefer binary packages
-         # -M: yes, we're a batch, so don't ask any questions
--        cmd = %w{-p -N -P  -M BATCH=yes} << @resource[:name]
-+        cmd = %w{-N -M BATCH=yes} << @resource[:name]
- 
-         output = portupgrade(*cmd)
-         if output =~ /\*\* No such /
diff -ruN --exclude=CVS /usr/ports/sysutils/puppet-devel/files/pkg-install.in /usr/home/cherry/svn/ports/sysutils/puppet-devel/files/pkg-install.in
--- /usr/ports/sysutils/puppet-devel/files/pkg-install.in	Thu Jan  1 09:00:00 1970
+++ /usr/home/cherry/svn/ports/sysutils/puppet-devel/files/pkg-install.in	Thu Apr 10 23:31:18 2008
@@ -0,0 +1,42 @@
+#!/bin/sh
+# $FreeBSD$
+PATH="/bin:/sbin:/usr/bin:/usr/sbin"
+
+PUPPET_USER=%%PUPPET_USER%%
+PUPPET_GROUP=%%PUPPET_GROUP%%
+UID=814
+GID=$UID
+
+RUNDIR=%%PUPPET_RUNDIR%%
+
+PW="pw"
+CHOWN="chown"
+INSTALL_DIR="install -d -o ${PUPPET_USER} -g ${PUPPET_GROUP} -m 0755"
+
+if [ "$2" = "PRE-INSTALL" ]; then
+
+	if ! ${PW} groupshow ${PUPPET_GROUP} 2>/dev/null 1>&2; then
+		if ${PW} groupadd ${PUPPET_GROUP} -g $GID; then
+			echo "=> Added group \"${PUPPET_GROUP}\"."
+		else
+			echo "=> Adding group \"${PUPPET_GROUP}\" failed..."
+			exit 1
+		fi
+	fi
+
+	if ! ${PW} usershow ${PUPPET_USER} 2>/dev/null 1>&2; then
+		if ${PW} useradd ${PUPPET_USER} -u $UID -g ${PUPPET_GROUP} -h - \
+			-s "/sbin/nologin" -d "/nonexistent" \
+            -c "Puppet Daemon"; then
+			echo "=> Added user \"${PUPPET_USER}\"."
+		else
+			echo "=> Adding user \"${PUPPET_USER}\" failed..."
+			exit 1
+		fi
+	fi
+
+elif [ "$2" = "POST-INSTALL" ]; then
+	${INSTALL_DIR} ${RUNDIR}
+fi
+
+exit 0
diff -ruN --exclude=CVS /usr/ports/sysutils/puppet-devel/files/pkg-message.in /usr/home/cherry/svn/ports/sysutils/puppet-devel/files/pkg-message.in
--- /usr/ports/sysutils/puppet-devel/files/pkg-message.in	Thu Jan  1 09:00:00 1970
+++ /usr/home/cherry/svn/ports/sysutils/puppet-devel/files/pkg-message.in	Thu Apr 10 23:31:18 2008
@@ -0,0 +1,11 @@
+To enable puppetd and/or puppetmasterd, add:
+
+puppetd_enable="YES"
+puppetmasterd_enable="YES"
+
+to /etc/rc.conf
+
+Indivisual config files such as %%PREFIX%%/etc/puppetmasterd.conf are
+deprecated. Use a single file, %%PREFIX%%/puppet/puppet.conf.
+
+Now the default PID directory is %%PUPPET_RUNDIR%%.
diff -ruN --exclude=CVS /usr/ports/sysutils/puppet-devel/files/puppetd.in /usr/home/cherry/svn/ports/sysutils/puppet-devel/files/puppetd.in
--- /usr/ports/sysutils/puppet-devel/files/puppetd.in	Fri Sep 28 08:18:40 2007
+++ /usr/home/cherry/svn/ports/sysutils/puppet-devel/files/puppetd.in	Thu Apr 10 23:31:18 2008
@@ -19,9 +19,8 @@
 
 load_rc_config "$name"
 : ${puppetd_enable="NO"}
-: ${puppetd_confdir="%%PREFIX%%/etc/puppet"}
-: ${puppetd_pid="/var/run/${name}.pid"}
-: ${puppetd_flags="--confdir $puppetd_confdir --rundir /var/run"}
+: ${puppetd_pid="%%PUPPET_RUNDIR%%/${name}.pid"}
+: ${puppetd_flags="--rundir %%PUPPET_RUNDIR%%"}
 pidfile="$puppetd_pid"
 
 run_rc_command "$1"
diff -ruN --exclude=CVS /usr/ports/sysutils/puppet-devel/files/puppetmasterd.in /usr/home/cherry/svn/ports/sysutils/puppet-devel/files/puppetmasterd.in
--- /usr/ports/sysutils/puppet-devel/files/puppetmasterd.in	Fri Sep 28 08:18:40 2007
+++ /usr/home/cherry/svn/ports/sysutils/puppet-devel/files/puppetmasterd.in	Thu Apr 10 23:31:18 2008
@@ -9,7 +9,7 @@
 #
 # puppetmasterd_enable="YES"
 # puppetmasterd_confdir:	Set to %%PREFIX%%/etc/puppet by default
-# puppetmasterd_flags:		Set to --confdir $puppetmasterd_confdir --rundir /var/run" by default
+# puppetmasterd_flags:		Set to "--pidfile ${puppetmasterd_pid}" by default
 #
 
 . %%RC_SUBR%%
@@ -38,8 +38,8 @@
 load_rc_config "$name"
 : ${puppetmasterd_enable="NO"}
 : ${puppetmasterd_confdir="%%PREFIX%%/etc/puppet"}
-: ${puppetmasterd_pid="/var/run/${name}.pid"}
-: ${puppetmasterd_flags="--confdir $puppetmasterd_confdir --rundir /var/run"}
+: ${puppetmasterd_pid="%%PUPPET_RUNDIR%%/${name}.pid"}
+: ${puppetmasterd_flags="--pidfile ${puppetmasterd_pid}"}
 pidfile="$puppetmasterd_pid"
 
 run_rc_command "$1"
diff -ruN --exclude=CVS /usr/ports/sysutils/puppet-devel/pkg-plist /usr/home/cherry/svn/ports/sysutils/puppet-devel/pkg-plist
--- /usr/ports/sysutils/puppet-devel/pkg-plist	Fri Sep 28 08:18:39 2007
+++ /usr/home/cherry/svn/ports/sysutils/puppet-devel/pkg-plist	Thu Apr 10 23:31:18 2008
@@ -7,54 +7,8 @@
 bin/puppetrun
 bin/puppetmasterd
 bin/ralsh
-%%PORTDOCS%%%%DOCSDIR%%/CHANGELOG
-%%PORTDOCS%%%%DOCSDIR%%/README
-%%PORTDOCS%%%%DOCSDIR%%/LICENSE
-%%PORTDOCS%%%%DOCSDIR%%/COPYING
-%%PORTDOCS%%@dirrm %%DOCSDIR%%
-%%PORTDOCS%%%%EXAMPLESDIR%%/root/etc/puppet/tagmail.conf
-%%PORTDOCS%%%%EXAMPLESDIR%%/root/etc/puppet/puppetmasterd.conf
-%%PORTDOCS%%%%EXAMPLESDIR%%/root/etc/puppet/puppetd.conf
-%%PORTDOCS%%%%EXAMPLESDIR%%/root/etc/puppet/namespaceauth.conf
-%%PORTDOCS%%%%EXAMPLESDIR%%/root/etc/puppet/fileserver.conf
-%%PORTDOCS%%%%EXAMPLESDIR%%/root/etc/otherfile
-%%PORTDOCS%%%%EXAMPLESDIR%%/root/etc/init.d/sleeper
-%%PORTDOCS%%%%EXAMPLESDIR%%/root/etc/debian-syslog.conf
-%%PORTDOCS%%%%EXAMPLESDIR%%/root/etc/debian-passwd
-%%PORTDOCS%%%%EXAMPLESDIR%%/root/etc/configfile
-%%PORTDOCS%%%%EXAMPLESDIR%%/root/bin/sleeper
-%%PORTDOCS%%%%EXAMPLESDIR%%/code/svncommit
-%%PORTDOCS%%%%EXAMPLESDIR%%/code/simpletests
-%%PORTDOCS%%%%EXAMPLESDIR%%/code/selectors
-%%PORTDOCS%%%%EXAMPLESDIR%%/code/relationships
-%%PORTDOCS%%%%EXAMPLESDIR%%/code/one
-%%PORTDOCS%%%%EXAMPLESDIR%%/code/nodes
-%%PORTDOCS%%%%EXAMPLESDIR%%/code/mac_pkgdmg.pp
-%%PORTDOCS%%%%EXAMPLESDIR%%/code/mac_netinfo.pp
-%%PORTDOCS%%%%EXAMPLESDIR%%/code/mac_dscl_revert.pp
-%%PORTDOCS%%%%EXAMPLESDIR%%/code/mac_dscl.pp
-%%PORTDOCS%%%%EXAMPLESDIR%%/code/mac_automount.pp
-%%PORTDOCS%%%%EXAMPLESDIR%%/code/importing
-%%PORTDOCS%%%%EXAMPLESDIR%%/code/head
-%%PORTDOCS%%%%EXAMPLESDIR%%/code/groups
-%%PORTDOCS%%%%EXAMPLESDIR%%/code/functions
-%%PORTDOCS%%%%EXAMPLESDIR%%/code/filerecursion
-%%PORTDOCS%%%%EXAMPLESDIR%%/code/fileparsing
-%%PORTDOCS%%%%EXAMPLESDIR%%/code/filedefaults
-%%PORTDOCS%%%%EXAMPLESDIR%%/code/file.bl
-%%PORTDOCS%%%%EXAMPLESDIR%%/code/execs
-%%PORTDOCS%%%%EXAMPLESDIR%%/code/components
-%%PORTDOCS%%%%EXAMPLESDIR%%/code/assignments
-%%PORTDOCS%%%%EXAMPLESDIR%%/code/allatonce
-%%PORTDOCS%%@dirrmtry %%EXAMPLESDIR%%/root/bin
-%%PORTDOCS%%@dirrmtry %%EXAMPLESDIR%%/root/etc/init.d
-%%PORTDOCS%%@dirrmtry %%EXAMPLESDIR%%/root/etc/puppet
-%%PORTDOCS%%@dirrmtry %%EXAMPLESDIR%%/root/etc
-%%PORTDOCS%%@dirrmtry %%EXAMPLESDIR%%/root
-%%PORTDOCS%%@dirrmtry %%EXAMPLESDIR%%/code/modules
-%%PORTDOCS%%@dirrmtry %%EXAMPLESDIR%%/code
-%%PORTDOCS%%@dirrmtry %%EXAMPLESDIR%%
 etc/puppet/puppet.conf-dist
 @dirrmtry etc/puppet/ssl
 @dirrmtry etc/puppet/manifests
 @dirrmtry etc/puppet
+@dirrmtry /var/run/puppet
--- puppet-devel-0.24.4.patch ends here ---

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



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