Date: Sat, 28 Jul 2007 11:39:03 -0700 From: leres@ee.lbl.gov (Craig Leres) To: freebsd-gnats-submit@FreeBSD.org Subject: ports/114994: [sysutils/3dm] install/uninstall issues that impact the config file Message-ID: <200707281839.l6SId3PT086722@fun.ee.lbl.gov> Resent-Message-ID: <200707281840.l6SIe63A088046@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 114994 >Category: ports >Synopsis: [sysutils/3dm] install/uninstall issues that impact the config file >Confidential: no >Severity: non-critical >Priority: medium >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Sat Jul 28 18:40:06 GMT 2007 >Closed-Date: >Last-Modified: >Originator: Craig Leres >Release: FreeBSD 6.2-RELEASE i386 >Organization: Lawrence Berkeley National Laboratory >Environment: # uname -a FreeBSD hagar.lbl.gov 6.2-RELEASE FreeBSD 6.2-RELEASE #1: Mon Jan 15 11:31:32 PST 2007 leres@fox.ee.lbl.gov:/usr/src/6.2-RELEASE/sys/i386/compile/LBLSMP i386 >Description: There are a couple of issues with the way this port deals with the config file, 3dm2.conf. (1) An existing 3dm2.conf is clobbered on install. (2) If 3dm2.conf is always set to mode 600 even if it existed before installing the port or package. >How-To-Repeat: (1) Install 3dm, customize 3dm2.conf and then pkg_delete 3dm. Then install 3dm again and notice that 3dm2.conf has reverted to the contents of 3dm2.conf.sample (2) Examine sysutils/3dm/Makefile >Fix: See appended patch. The changes to pkg-plist fix (1) and the changes to the Makefile fix (2) ------- =_aaaaaaaaaa0 Content-Type: text/plain; name="3dm-patch.txt"; charset="us-ascii" Content-ID: <86700.1185647838.2@fun.ee.lbl.gov> --- Makefile.virgin Sat Jan 27 04:27:19 2007 +++ Makefile Sat Jul 28 11:28:16 2007 @@ -95,11 +95,10 @@ .endif post-install: - ${INSTALL_DATA} ${WRKSRC}/3dm2.conf.sample ${PREFIX}/etc/3dm2/ + ${INSTALL_DATA} -m 600 ${WRKSRC}/3dm2.conf.sample ${PREFIX}/etc/3dm2/ [ -f ${PREFIX}/etc/3dm2/3dm2.conf ] || \ - ${CP} ${PREFIX}/etc/3dm2/3dm2.conf.sample \ + ${INSTALL_DATA} -m 600 ${WRKSRC}/3dm2.conf.sample \ ${PREFIX}/etc/3dm2/3dm2.conf - @${CHMOD} 600 ${PREFIX}/etc/3dm2/3dm2.conf.sample ${PREFIX}/etc/3dm2/3dm2.conf # 3ware uses a hardcoded config dir location that doesn't match hier(9) --- pkg-plist.virgin Sat Jan 27 04:27:20 2007 +++ pkg-plist Sat Jul 28 11:26:20 2007 @@ -1,7 +1,7 @@ @unexec %D/etc/rc.d/3dm2.sh 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; fi etc/3dm2/msg/tdm_msg_en etc/3dm2/msg/tw_msg_en sbin/3dm2 ------- =_aaaaaaaaaa0-- >Release-Note: >Audit-Trail: >Unformatted: ------- =_aaaaaaaaaa0 Content-Type: text/plain; charset="us-ascii" Content-ID: <86700.1185647838.1@fun.ee.lbl.gov> amav-milter does not
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200707281839.l6SId3PT086722>