diff options
author | pav <pav@FreeBSD.org> | 2008-04-11 22:09:59 +0800 |
---|---|---|
committer | pav <pav@FreeBSD.org> | 2008-04-11 22:09:59 +0800 |
commit | 6d40740c095bda79d708db93c6869a40a17053a3 (patch) | |
tree | 408f89cb822919cfc823d79a3184ddadb54e52cd /sysutils | |
parent | 0df1ea637d8eb6b0c05bf2a7dd396ef897cd9d27 (diff) | |
download | freebsd-ports-gnome-6d40740c095bda79d708db93c6869a40a17053a3.tar.gz freebsd-ports-gnome-6d40740c095bda79d708db93c6869a40a17053a3.tar.zst freebsd-ports-gnome-6d40740c095bda79d708db93c6869a40a17053a3.zip |
- Update to 0.24.4
- Register puppet UID
PR: ports/122628
Submitted by: Tomoyuki Sakurai <cherry@trombik.org> (maintainer)
Diffstat (limited to 'sysutils')
-rw-r--r-- | sysutils/puppet-devel/Makefile | 34 | ||||
-rw-r--r-- | sysutils/puppet-devel/distinfo | 6 | ||||
-rw-r--r-- | sysutils/puppet-devel/files/patch-optional-p-P | 15 | ||||
-rw-r--r-- | sysutils/puppet-devel/files/pkg-install.in | 42 | ||||
-rw-r--r-- | sysutils/puppet-devel/files/pkg-message.in | 11 | ||||
-rw-r--r-- | sysutils/puppet-devel/files/puppetd.in | 5 | ||||
-rw-r--r-- | sysutils/puppet-devel/files/puppetmasterd.in | 6 | ||||
-rw-r--r-- | sysutils/puppet-devel/pkg-plist | 48 |
8 files changed, 91 insertions, 76 deletions
diff --git a/sysutils/puppet-devel/Makefile b/sysutils/puppet-devel/Makefile index e66cc23d2483..953ed4c52489 100644 --- a/sysutils/puppet-devel/Makefile +++ b/sysutils/puppet-devel/Makefile @@ -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 @@ EXTRACT_SUFX= .tgz 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 @@ CONFLICTS= puppet-[0-9]* 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 @@ post-install: .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 @@ post-install: ${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 --git a/sysutils/puppet-devel/distinfo b/sysutils/puppet-devel/distinfo index 872b8252b70d..cc34c21598f9 100644 --- a/sysutils/puppet-devel/distinfo +++ b/sysutils/puppet-devel/distinfo @@ -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 --git a/sysutils/puppet-devel/files/patch-optional-p-P b/sysutils/puppet-devel/files/patch-optional-p-P deleted file mode 100644 index 91316ab0564d..000000000000 --- a/sysutils/puppet-devel/files/patch-optional-p-P +++ /dev/null @@ -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 --git a/sysutils/puppet-devel/files/pkg-install.in b/sysutils/puppet-devel/files/pkg-install.in new file mode 100644 index 000000000000..9abe03a0e148 --- /dev/null +++ b/sysutils/puppet-devel/files/pkg-install.in @@ -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 --git a/sysutils/puppet-devel/files/pkg-message.in b/sysutils/puppet-devel/files/pkg-message.in new file mode 100644 index 000000000000..6f90cbeecc9e --- /dev/null +++ b/sysutils/puppet-devel/files/pkg-message.in @@ -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 --git a/sysutils/puppet-devel/files/puppetd.in b/sysutils/puppet-devel/files/puppetd.in index 897da3ccf415..e417ae6bd8f7 100644 --- a/sysutils/puppet-devel/files/puppetd.in +++ b/sysutils/puppet-devel/files/puppetd.in @@ -19,9 +19,8 @@ command_interpreter="%%PREFIX%%/bin/ruby18" 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 --git a/sysutils/puppet-devel/files/puppetmasterd.in b/sysutils/puppet-devel/files/puppetmasterd.in index cdb817faf448..3afb97663a24 100644 --- a/sysutils/puppet-devel/files/puppetmasterd.in +++ b/sysutils/puppet-devel/files/puppetmasterd.in @@ -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 @@ puppetmasterd_checkconfig() { 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 --git a/sysutils/puppet-devel/pkg-plist b/sysutils/puppet-devel/pkg-plist index 8576364541bd..8751c5fdf14d 100644 --- a/sysutils/puppet-devel/pkg-plist +++ b/sysutils/puppet-devel/pkg-plist @@ -7,54 +7,8 @@ bin/puppetdoc 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 |