ports/114994: sysutils/3dm: install/uninstall issues that impact the config file
Darren Pilgrim
ports.maintainer at evilphi.com
Mon Aug 6 01:10:11 UTC 2007
The following reply was made to PR ports/114994; it has been noted by GNATS.
From: Darren Pilgrim <ports.maintainer at evilphi.com>
To: bug-followup at FreeBSD.org, leres at ee.lbl.gov
Cc:
Subject: Re: ports/114994: sysutils/3dm: install/uninstall issues that impact
the config file
Date: Sun, 05 Aug 2007 17:45:00 -0700
This is a multi-part message in MIME format.
--------------090109090504070508030306
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
Attached is the maintainer-approved patch to the port skeleton. It
touches Makefile and pkg-plist. Please use include the following in the
commit message:
This port revision contains the following bug fixes and changes:
- When installing the port using the package, an existing
${PREFIX}/etc/3dm2/3dm2.conf file gets clobbered. The error was in the
pkg-plist, which had an incorrect file existence test to determine if a
new 3dm2.conf file should be installed.
- ${PREFIX}/etc/3dm2/3dm2.conf.sample is now installed with file
permissions 400.
- An existing ${PREFIX}/etc/3dm2/3dm2.conf does not have its file
permissions reset to 600.
- Update pkg-plist to use rcNG naming scheme (line 1).
Thanks to Craig Leres <leres at ee.lbl.gov> for bringing the config file
clobbering and file permissions issues to the attention of the port
maintainer.
--------------090109090504070508030306
Content-Type: text/plain;
name="pr114994_followup.diff"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
filename="pr114994_followup.diff"
--- Makefile.orig Fri Jan 26 06:57:30 2007
+++ Makefile Sun Aug 5 14:15:18 2007
@@ -8,6 +8,7 @@
PORTNAME= 3dm
PORTVERSION= 2.04.00.035
PORTEPOCH= 1
+PORTREVISION= 1
CATEGORIES= sysutils
MASTER_SITES= http://3ware.com/download/Escalade9650SE-Series/9.4.0.1/
DISTNAME= 3DM2-freebsd-9.4.0.1
@@ -96,10 +97,11 @@
post-install:
${INSTALL_DATA} ${WRKSRC}/3dm2.conf.sample ${PREFIX}/etc/3dm2/
- [ -f ${PREFIX}/etc/3dm2/3dm2.conf ] || \
- ${CP} ${PREFIX}/etc/3dm2/3dm2.conf.sample \
- ${PREFIX}/etc/3dm2/3dm2.conf
- @${CHMOD} 600 ${PREFIX}/etc/3dm2/3dm2.conf.sample ${PREFIX}/etc/3dm2/3dm2.conf
+ ${CHMOD} 400 ${PREFIX}/etc/3dm2/3dm2.conf.sample
+ [ -f ${PREFIX}/etc/3dm2/3dm2.conf ] || ( \
+ ${INSTALL_DATA} ${WRKSRC}/3dm2.conf.sample ${PREFIX}/etc/3dm2/3dm2.conf && \
+ ${CHMOD} 600 ${PREFIX}/etc/3dm2/3dm2.conf \
+ )
# 3ware uses a hardcoded config dir location that doesn't match hier(9)
--- pkg-plist.orig Fri Jan 26 06:57:30 2007
+++ pkg-plist Sun Aug 5 14:20:27 2007
@@ -1,7 +1,7 @@
- at unexec %D/etc/rc.d/3dm2.sh stop > /dev/null 2>&1 || true
+ at unexec %D/etc/rc.d/3dm2 stop > /dev/null 2>&1 || true
@unexec if cmp -s %D/etc/3dm2/3dm2.conf.sample %D/etc/3dm2/3dm2.conf; then rm -f %D/etc/3dm2/3dm2.conf; fi
etc/3dm2/3dm2.conf.sample
- at exec if [ -f %B/3dm2.conf ] ; then cp -p %D/%F %B/3dm2.conf; fi
+ at exec if [ ! -f %B/3dm2.conf ] ; then cp -p %D/%F %B/3dm2.conf && chmod 600 %B/3dm2.conf; fi
etc/3dm2/msg/tdm_msg_en
etc/3dm2/msg/tw_msg_en
sbin/3dm2
--------------090109090504070508030306--
More information about the freebsd-ports-bugs
mailing list