ports/129185: [PATCH] sysutils/puppet update to 0.24.6
Leon Meßner
l.messner at physik.tu-berlin.de
Tue Nov 25 17:00:14 UTC 2008
>Number: 129185
>Category: ports
>Synopsis: [PATCH] sysutils/puppet update to 0.24.6
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: freebsd-ports-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: change-request
>Submitter-Id: current-users
>Arrival-Date: Tue Nov 25 17:00:13 UTC 2008
>Closed-Date:
>Last-Modified:
>Originator: Leon Meßner
>Release: 7.0-RELEASE-p5
>Organization:
>Environment:
FreeBSD sussmann.physik-pool.tu-berlin.de 7.0-RELEASE-p5 FreeBSD 7.0-RELEASE-p5 #0: Thu Oct 9 23:33:11 CEST 2008 master at sussmann.physik-pool.tu-berlin.de:/usr/obj/export/source/csup-standard/src/sys/GENERIC amd64
>Description:
The port sysutils/puppet is outdated. There have been made major enhancements esp. when using ldap nodes. This is the puppet version currently referred to as stable.
This patch used the -devel port as a template.
The following files were added:
Only in puppet/files: pkg-deinstall.in
>How-To-Repeat:
>Fix:
Patch attached with submission follows:
diff -urN puppet.orig/Makefile puppet/Makefile
--- puppet.orig/Makefile 2008-07-24 21:19:49.000000000 +0200
+++ puppet/Makefile 2008-11-19 13:43:07.000000000 +0100
@@ -6,7 +6,7 @@
#
PORTNAME= puppet
-PORTVERSION= 0.24.4
+PORTVERSION= 0.24.6
CATEGORIES= sysutils
MASTER_SITES= http://www.reductivelabs.com/downloads/puppet/
EXTRACT_SUFX= .tgz
@@ -18,19 +18,22 @@
portupgrade>0:${PORTSDIR}/ports-mgmt/portupgrade
RUN_DEPENDS= ${BUILD_DEPENDS}
-CONFLICTS= puppet-devel-[0-9]*
+CONFLICTS= puppet-devel-[0-9]*
NO_BUILD= yes
USE_RUBY= yes
USE_RC_SUBR= puppetmasterd puppetd
-DOCS= CHANGELOG README LICENSE COPYING
+PORTDOCS= CHANGELOG README LICENSE COPYING
+PORTEXAMPLES= *
PUPPET_USER:= puppet
PUPPET_GROUP:= ${PUPPET_USER}
PUPPET_RUNDIR:= /var/run/${PORTNAME}
-SUB_FILES+= pkg-install pkg-message
+PUPPET_WORKDIR:= /var/${PORTNAME}
+SUB_FILES+= pkg-install pkg-message pkg-deinstall
SUB_LIST+= PUPPET_RUNDIR="${PUPPET_RUNDIR}" \
PUPPET_USER="${PUPPET_USER}" \
- PUPPET_GROUP="${PUPPET_GROUP}"
+ PUPPET_GROUP="${PUPPET_GROUP}" \
+ PUPPET_WORKDIR="${PUPPET_WORKDIR}"
.include <bsd.port.pre.mk>
@@ -44,20 +47,7 @@
@${SETENV} PKG_PREFIX=${PREFIX} ${SH} ${PKGINSTALL} ${PKGNAME} PRE-INSTALL
do-install:
- cd ${WRKSRC} && \
- ${SETENV} DSTDIR=${DSTDIR}/${PREFIX} \
- ${RUBY} ${WRKSRC}/install.rb --full
- ${INSTALL} -d ${DOCSDIR}
-.if !defined(NOPORTDOCS)
-.for FILE in ${DOCS}
- ${INSTALL_DATA} ${WRKSRC}/${FILE} ${DOCSDIR}
-.endfor
-.endif
-.if !defined(NOPORTEXAMPLES)
- ${INSTALL} -d ${EXAMPLESDIR}
- ${CP} -R ${WRKSRC}/examples/* ${EXAMPLESDIR}
- @${CHOWN} -R ${SHAREOWN}:${SHAREGRP} ${EXAMPLESDIR}
-.endif
+ cd ${WRKSRC} && ${SETENV} PREFIX=${PREFIX} ${RUBY} ${WRKSRC}/install.rb
post-install:
${INSTALL} -d ${PREFIX}/etc/${PORTNAME}
@@ -74,21 +64,16 @@
${SED} 's,^${PREFIX}/,,' >> ${TMPPLIST}
@${FIND} ${RUBY_SITELIBDIR}/${PORTNAME} -type f | \
${SED} 's,^${PREFIX}/,,' >> ${TMPPLIST}
-.if !defined(NOPORTEXAMPLES)
- @${FIND} ${EXAMPLESDIR} -type f | \
- ${SED} 's,^${PREFIX}/,,' >> ${TMPPLIST}
- @${FIND} ${EXAMPLESDIR} -type d | ${SORT} -r | \
- ${SED} 's,^${PREFIX}/, at dirrm ,' >> ${TMPPLIST}
-.endif
-.if !defined(NOPORTDOCS)
- @${FIND} ${DOCSDIR} -type f | \
- ${SED} 's,^${PREFIX}/,,' >> ${TMPPLIST}
- @${FIND} ${DOCSDIR} -type d | ${SORT} -r | \
- ${SED} 's,^${PREFIX}/, at dirrm ,' >> ${TMPPLIST}
-.endif
@${FIND} ${RUBY_SITELIBDIR}/${PORTNAME} -type d | ${SORT} -r | \
${SED} 's,^${PREFIX}/, at dirrm ,' >> ${TMPPLIST}
@${SETENV} PKG_PREFIX=${PREFIX} ${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL
+.if !defined(NOPORTDOCS)
+ ${INSTALL} -d ${DOCSDIR}
+ cd ${WRKSRC} && ${INSTALL_DATA} ${PORTDOCS} ${DOCSDIR}
+.endif
+.if !defined(NOPORTEXAMPLES)
+ cd ${WRKSRC}/examples/ && ${COPYTREE_SHARE} . ${EXAMPLESDIR}
+.endif
@${CAT} ${PKGMESSAGE}
.include <bsd.port.post.mk>
diff -urN puppet.orig/distinfo puppet/distinfo
--- puppet.orig/distinfo 2008-07-24 21:19:49.000000000 +0200
+++ puppet/distinfo 2008-11-18 20:11:43.000000000 +0100
@@ -1,3 +1,3 @@
-MD5 (puppet-0.24.4.tgz) = 9658624ed3745e8954772b3fbfdcc438
-SHA256 (puppet-0.24.4.tgz) = 0d54f6db7cf1210d123264bcb35b07b36837ebc12a4f2bd01aee6127836adfb9
-SIZE (puppet-0.24.4.tgz) = 652572
+MD5 (puppet-0.24.6.tgz) = dcc84cd9bc5c411536ab88589079459b
+SHA256 (puppet-0.24.6.tgz) = 1cf0f7914b6ed13314bff2f517a42fd224ef24bd99b46e323d2bc793fe58b936
+SIZE (puppet-0.24.6.tgz) = 894124
diff -urN puppet.orig/files/pkg-deinstall.in puppet/files/pkg-deinstall.in
--- puppet.orig/files/pkg-deinstall.in 1970-01-01 01:00:00.000000000 +0100
+++ puppet/files/pkg-deinstall.in 2008-11-18 17:49:13.000000000 +0100
@@ -0,0 +1,13 @@
+#!/bin/sh
+# $FreeBSD: ports/sysutils/puppet-devel/files/pkg-deinstall.in,v 1.1 2008/09/04 19:08:58 beech Exp $
+PATH="/bin:/sbin:/usr/bin:/usr/sbin"
+
+RUNDIR=%%PUPPET_RUNDIR%%
+WORKDIR=%%PUPPET_WORKDIR%%
+
+if [ "$2" = "POST-DEINSTALL" ]; then
+ echo "=> Deleting ${RUNDIR} if empty..."
+ rm -d ${RUNDIR} 2>/dev/null || true
+ echo "=> Deleting ${WORKDIR} if empty..."
+ rm -d ${WORKDIR} 2>/dev/null || true
+fi
diff -urN puppet.orig/files/pkg-install.in puppet/files/pkg-install.in
--- puppet.orig/files/pkg-install.in 2008-07-24 21:19:49.000000000 +0200
+++ puppet/files/pkg-install.in 2008-11-18 17:49:13.000000000 +0100
@@ -1,5 +1,5 @@
#!/bin/sh
-# $FreeBSD: ports/sysutils/puppet/files/pkg-install.in,v 1.1 2008/07/24 19:19:49 beech Exp $
+# $FreeBSD: ports/sysutils/puppet-devel/files/pkg-install.in,v 1.2 2008/09/04 19:08:58 beech Exp $
PATH="/bin:/sbin:/usr/bin:/usr/sbin"
PUPPET_USER=%%PUPPET_USER%%
@@ -8,6 +8,7 @@
GID=$UID
RUNDIR=%%PUPPET_RUNDIR%%
+WORKDIR=%%PUPPET_WORKDIR%%
PW="pw"
CHOWN="chown"
@@ -36,7 +37,18 @@
fi
elif [ "$2" = "POST-INSTALL" ]; then
- ${INSTALL_DIR} ${RUNDIR}
+ if [ -d ${RUNDIR} ]; then
+ echo "=> ${RUNDIR} already exists."
+ else
+ echo -n "=> Creating RUNDIR ${RUNDIR}... "
+ ${INSTALL_DIR} ${RUNDIR} || echo "failed"
+ fi
+ if [ -d ${WORKDIR} ]; then
+ echo "=> ${WORKDIR} already exists."
+ else
+ echo -n "=> Creating WORKDIR ${WORKDIR}... "
+ ${INSTALL_DIR} ${WORKDIR} || echo "failed"
+ fi
fi
exit 0
diff -urN puppet.orig/files/pkg-message.in puppet/files/pkg-message.in
--- puppet.orig/files/pkg-message.in 2008-07-24 21:19:49.000000000 +0200
+++ puppet/files/pkg-message.in 2008-11-18 17:49:13.000000000 +0100
@@ -1,3 +1,4 @@
+
To enable puppetd and/or puppetmasterd, add:
puppetd_enable="YES"
@@ -5,7 +6,7 @@
to /etc/rc.conf
-Indivisual config files such as %%PREFIX%%/etc/puppetmasterd.conf are
-deprecated. Use a single file, %%PREFIX%%/puppet/puppet.conf.
+Individual config files such as %%PREFIX%%/etc/puppet/puppetmasterd.conf are
+deprecated. Use a single file, %%PREFIX%%/etc/puppet/puppet.conf.
Now the default PID directory is %%PUPPET_RUNDIR%%.
diff -urN puppet.orig/files/puppetd.in puppet/files/puppetd.in
--- puppet.orig/files/puppetd.in 2008-07-24 21:19:49.000000000 +0200
+++ puppet/files/puppetd.in 2008-11-18 17:49:13.000000000 +0100
@@ -1,6 +1,6 @@
#!/bin/sh
#
-# $FreeBSD: ports/sysutils/puppet/files/puppetd.in,v 1.4 2008/07/24 19:19:49 beech Exp $
+# $FreeBSD: ports/sysutils/puppet-devel/files/puppetd.in,v 1.5 2008/04/11 14:09:59 pav Exp $
#
# PROVIDE: puppetd
# REQUIRE: NETWORK
diff -urN puppet.orig/files/puppetmasterd.in puppet/files/puppetmasterd.in
--- puppet.orig/files/puppetmasterd.in 2008-07-24 21:19:49.000000000 +0200
+++ puppet/files/puppetmasterd.in 2008-11-18 17:49:13.000000000 +0100
@@ -1,6 +1,6 @@
#!/bin/sh
#
-# $FreeBSD: ports/sysutils/puppet/files/puppetmasterd.in,v 1.4 2008/07/24 19:19:49 beech Exp $
+# $FreeBSD: ports/sysutils/puppet-devel/files/puppetmasterd.in,v 1.5 2008/04/11 14:09:59 pav Exp $
#
# PROVIDE: puppetmasterd
# REQUIRE: NETWORK
diff -urN puppet.orig/pkg-plist puppet/pkg-plist
--- puppet.orig/pkg-plist 2008-07-24 21:19:49.000000000 +0200
+++ puppet/pkg-plist 2008-11-19 13:34:15.000000000 +0100
@@ -1,14 +1,14 @@
- at comment $FreeBSD: ports/sysutils/puppet/pkg-plist,v 1.5 2008/07/24 19:19:49 beech Exp $
bin/filebucket
-bin/puppetd
-bin/puppetca
bin/puppet
+bin/puppetca
+bin/puppetd
bin/puppetdoc
-bin/puppetrun
bin/puppetmasterd
+bin/puppetrun
bin/ralsh
etc/puppet/puppet.conf-dist
+ at exec mkdir -p %D/etc/puppet/ssl
+ at exec mkdir -p %D/etc/puppet/manifests
@dirrmtry etc/puppet/ssl
@dirrmtry etc/puppet/manifests
@dirrmtry etc/puppet
- at dirrmtry /var/run/puppet
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-ports-bugs
mailing list