From owner-freebsd-ports-bugs@FreeBSD.ORG Mon Aug 6 01:10:11 2007 Return-Path: Delivered-To: freebsd-ports-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2980716A418 for ; Mon, 6 Aug 2007 01:10:11 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 06E1213C46C for ; Mon, 6 Aug 2007 01:10:11 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.14.1/8.14.1) with ESMTP id l761AAsP091352 for ; Mon, 6 Aug 2007 01:10:10 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.1/8.14.1/Submit) id l761AACV091350; Mon, 6 Aug 2007 01:10:10 GMT (envelope-from gnats) Date: Mon, 6 Aug 2007 01:10:10 GMT Message-Id: <200708060110.l761AACV091350@freefall.freebsd.org> To: freebsd-ports-bugs@FreeBSD.org From: Darren Pilgrim Cc: Subject: Re: ports/114994: sysutils/3dm: install/uninstall issues that impact the config file X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Darren Pilgrim List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 06 Aug 2007 01:10:11 -0000 The following reply was made to PR ports/114994; it has been noted by GNATS. From: Darren Pilgrim To: bug-followup@FreeBSD.org, leres@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 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 @@ -@unexec %D/etc/rc.d/3dm2.sh stop > /dev/null 2>&1 || true +@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 -@exec if [ -f %B/3dm2.conf ] ; then cp -p %D/%F %B/3dm2.conf; fi +@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--