From owner-freebsd-ports@FreeBSD.ORG Mon May 29 04:25:41 2006 Return-Path: X-Original-To: ports@freebsd.org Delivered-To: freebsd-ports@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 8C09716A5AC for ; Mon, 29 May 2006 04:25:41 +0000 (UTC) (envelope-from fcash@ocis.net) Received: from smtp.sd73.bc.ca (smtp.sd73.bc.ca [142.24.13.140]) by mx1.FreeBSD.org (Postfix) with ESMTP id 275CE43D55 for ; Mon, 29 May 2006 04:25:41 +0000 (GMT) (envelope-from fcash@ocis.net) Received: from localhost (localhost [127.0.0.1]) by localhost.sd73.bc.ca (Postfix) with ESMTP id C66FB8A0021 for ; Sun, 28 May 2006 21:30:41 -0700 (PDT) Received: from smtp.sd73.bc.ca ([127.0.0.1]) by localhost (smtp.sd73.bc.ca [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 64012-03-7 for ; Sun, 28 May 2006 21:30:35 -0700 (PDT) Received: from webmail.sd73.bc.ca (unknown [10.10.10.17]) by smtp.sd73.bc.ca (Postfix) with ESMTP id 1046F8A003C for ; Sun, 28 May 2006 21:30:30 -0700 (PDT) Received: from webmail.sd73.bc.ca (localhost.localdomain [127.0.0.1]) by webmail.sd73.bc.ca (Postfix) with ESMTP id 53F579000608 for ; Sun, 28 May 2006 21:25:27 -0700 (PDT) Received: from 24.71.118.34 (SquirrelMail authenticated user fcash) by webmail.sd73.bc.ca with HTTP; Sun, 28 May 2006 21:25:27 -0700 (PDT) Message-ID: <61156.24.71.118.34.1148876727.squirrel@webmail.sd73.bc.ca> In-Reply-To: <4477F769.4050803@FreeBSD.org> References: <37663.192.168.0.10.1148686196.squirrel@webmail.sd73.bc.ca> <4477F769.4050803@FreeBSD.org> Date: Sun, 28 May 2006 21:25:27 -0700 (PDT) From: "Freddie Cash" To: ports@freebsd.org User-Agent: SquirrelMail/1.5.1 MIME-Version: 1.0 Content-Type: text/plain;charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Virus-Scanned: by amavisd-new using ClamAV at sd73.bc.ca Cc: Subject: Re: Good examples of not deleting custom config files/installing new config files X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: fcash@ocis.net List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 May 2006 04:25:41 -0000 On Fri, May 26, 2006 11:53 pm, Doug Barton wrote: > Freddie Cash wrote: >> Could someone point me to some ports that do a good job of not >> deleting custom config files when you do updates? I'd like to >> incorporate something similar into my ports. Currently, I just >> install everything with a .sample and put a note in the >> pkg-message. Which works great for upgrades, but not for the initial >> install. And as my ports go into the "multiple-dozens of config >> files in multipls sub-directory" area, it's getting to be a pain for >> the users to copy files around. > You've already had some good answers, but I'd like to add something > if I may. You left out a very important aspect of this issue, which is > whether or not your stuff will run with the default config files or > not. If so, something as simple as: Yes, the port will work with all the default config files, right off the bat. I just haven't installed any of them without the .dist suffix as I hadn't figured out a nice way to do upgrades without overwriting all the customisations done by the user. > for file in `find /usr/local/etc/port -type f`; do if [ ! -s > "${file%.sample}" ]; then > cp -p $file ${file%.sample} fi done I'm guessing that would go into the post-install: target of the port's Makefile. Or would it go into a pkg-install script? > Will handle the initial installation. As a user I also appreciate > those ports that compare the installed version of a config file to the > .sample version, and delete both if they are the same. It makes > cleaning up after a deinstallation (and archiving during an upgrade) a > lot easier. That was the other part I was looking at. Thanks to all for the pointers to ports to look at. Now I'll something to do this week. :) ---- Freddie Cash fcash@ocis.net