From owner-freebsd-arch@FreeBSD.ORG Mon Sep 8 07:37:49 2003 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 683) id E00DB16A4C0; Mon, 8 Sep 2003 07:37:49 -0700 (PDT) Date: Mon, 8 Sep 2003 07:37:49 -0700 From: Eivind Eklund To: "Adam C. Migus" Message-ID: <20030908073749.A71336@FreeBSD.org> References: <49222.192.168.4.2.1062744486.squirrel@mail.migus.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5.1i In-Reply-To: <49222.192.168.4.2.1062744486.squirrel@mail.migus.org> cc: freebsd-arch@FreeBSD.org cc: Kris Kennaway Subject: Re: config files in packages (Re: (proposal) new flag forpkg_delete) X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 Sep 2003 14:37:50 -0000 On Fri, Sep 05, 2003 at 02:48:06AM -0400, Adam C. Migus wrote: > I agree with the something like the Debian approach but perhaps with > more emphasis on comparison and automation than user interaction. > It takes the worry out of the hands of the port maintainers, it > keeps users from screwing up their installations, it's been done and > shown to work it can be improved by offering a diff feature. See ports/sysutils/etcmerge for an implementation of 3-way merges of /etc I did a little while ago. It handle conflicts reasonably (or what I think is reasonable, at least), including the case where a config file is deleted. Usually, it will completely automate upgrades. In order to do this, etcmerge requires a copy of the initial ("sample") configuration files as distributed by the vendor (FreeBSD, for the present). For the present case, the easy way to get this is to run mergemaster and copy the tree it creates in /var/tmp. It is not possible to use a copy of the /etc just after install, as sysinstall writes modifications to /etc before the user gets access to it, and these modifications would be lost if it was copied as "base". It should be fairly simple to extend the technique to also cover ports. If we choose to do this, we should also make sysinstall store a copy of the initial /etc, to remove the need to run mergemaster to get a copy. Eivind.