From owner-freebsd-ports-bugs@FreeBSD.ORG Sat Jul 28 18:40:06 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 EFBA016A41F for ; Sat, 28 Jul 2007 18:40:06 +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 C533313C49D for ; Sat, 28 Jul 2007 18:40:06 +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 l6SIe6C4088047 for ; Sat, 28 Jul 2007 18:40:06 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.1/8.14.1/Submit) id l6SIe63A088046; Sat, 28 Jul 2007 18:40:06 GMT (envelope-from gnats) Resent-Date: Sat, 28 Jul 2007 18:40:06 GMT Resent-Message-Id: <200707281840.l6SIe63A088046@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-ports-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, leres@ee.lbl.gov (Craig Leres) Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 98DFC16A421 for ; Sat, 28 Jul 2007 18:39:04 +0000 (UTC) (envelope-from leres@ee.lbl.gov) Received: from fun.ee.lbl.gov (fun.ee.lbl.gov [131.243.2.202]) by mx1.freebsd.org (Postfix) with ESMTP id 4508813C47E for ; Sat, 28 Jul 2007 18:39:04 +0000 (UTC) (envelope-from leres@ee.lbl.gov) Received: from fun.ee.lbl.gov (localhost [127.0.0.1]) by fun.ee.lbl.gov (8.14.1/8.14.1) with ESMTP id l6SId3re086725 for ; Sat, 28 Jul 2007 11:39:03 -0700 (PDT) Received: from fun.ee.lbl.gov (leres@localhost) by fun.ee.lbl.gov (8.14.1/8.14.1/Submit) with ESMTP id l6SId3PT086722 for ; Sat, 28 Jul 2007 11:39:03 -0700 (PDT) Message-Id: <200707281839.l6SId3PT086722@fun.ee.lbl.gov> Date: Sat, 28 Jul 2007 11:39:03 -0700 From: leres@ee.lbl.gov (Craig Leres) To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Cc: Subject: 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 List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 28 Jul 2007 18:40:07 -0000 >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