ports/127078: [MAINTAINER] sysutils/puppet-devel: create and delete work directories
Tomoyuki Sakurai
cherry at trombik.org
Thu Sep 4 01:40:01 UTC 2008
>Number: 127078
>Category: ports
>Synopsis: [MAINTAINER] sysutils/puppet-devel: create and delete work directories
>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 Sep 04 01:40:00 UTC 2008
>Closed-Date:
>Last-Modified:
>Originator: Tomoyuki Sakurai
>Release: FreeBSD 7.0-STABLE amd64
>Organization:
>Environment:
System: FreeBSD spica.trombik.org 7.0-STABLE FreeBSD 7.0-STABLE #5: Thu Jul 10 22:29:26 JST 2008
>Description:
- after install: and deinstall:, create and delete work directories for puppet. this fixes ports/126968
- fix typos in pkg-message
Added file(s):
- files/pkg-deinstall.in
Generated with FreeBSD Port Tools 0.77
>How-To-Repeat:
>Fix:
--- puppet-devel-0.24.5.patch begins here ---
diff -ruN --exclude=CVS /usr/ports/sysutils/puppet-devel/Makefile /usr/home/cherry/svk/ports/sysutils/puppet-devel/Makefile
--- /usr/ports/sysutils/puppet-devel/Makefile 2008-08-01 20:54:10.000000000 +0900
+++ /usr/home/cherry/svk/ports/sysutils/puppet-devel/Makefile 2008-09-04 10:26:33.000000000 +0900
@@ -28,10 +28,12 @@
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>
diff -ruN --exclude=CVS /usr/ports/sysutils/puppet-devel/files/pkg-deinstall.in /usr/home/cherry/svk/ports/sysutils/puppet-devel/files/pkg-deinstall.in
--- /usr/ports/sysutils/puppet-devel/files/pkg-deinstall.in 1970-01-01 09:00:00.000000000 +0900
+++ /usr/home/cherry/svk/ports/sysutils/puppet-devel/files/pkg-deinstall.in 2008-09-04 10:10:41.000000000 +0900
@@ -0,0 +1,13 @@
+#!/bin/sh
+# $FreeBSD:$
+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 -ruN --exclude=CVS /usr/ports/sysutils/puppet-devel/files/pkg-install.in /usr/home/cherry/svk/ports/sysutils/puppet-devel/files/pkg-install.in
--- /usr/ports/sysutils/puppet-devel/files/pkg-install.in 2008-04-11 23:09:59.000000000 +0900
+++ /usr/home/cherry/svk/ports/sysutils/puppet-devel/files/pkg-install.in 2008-09-04 09:30:28.000000000 +0900
@@ -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 -ruN --exclude=CVS /usr/ports/sysutils/puppet-devel/files/pkg-message.in /usr/home/cherry/svk/ports/sysutils/puppet-devel/files/pkg-message.in
--- /usr/ports/sysutils/puppet-devel/files/pkg-message.in 2008-04-11 23:09:59.000000000 +0900
+++ /usr/home/cherry/svk/ports/sysutils/puppet-devel/files/pkg-message.in 2008-09-04 09:09:05.000000000 +0900
@@ -5,7 +5,7 @@
to /etc/rc.conf
-Indivisual config files such as %%PREFIX%%/etc/puppetmasterd.conf are
-deprecated. Use a single file, %%PREFIX%%/puppet/puppet.conf.
+Indivisual 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 -ruN --exclude=CVS /usr/ports/sysutils/puppet-devel/pkg-plist /usr/home/cherry/svk/ports/sysutils/puppet-devel/pkg-plist
--- /usr/ports/sysutils/puppet-devel/pkg-plist 2008-04-11 23:09:59.000000000 +0900
+++ /usr/home/cherry/svk/ports/sysutils/puppet-devel/pkg-plist 2008-09-04 09:54:55.000000000 +0900
@@ -11,4 +11,3 @@
@dirrmtry etc/puppet/ssl
@dirrmtry etc/puppet/manifests
@dirrmtry etc/puppet
- at dirrmtry /var/run/puppet
--- puppet-devel-0.24.5.patch ends here ---
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-ports-bugs
mailing list