Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 8 Sep 2003 07:37:49 -0700
From:      Eivind Eklund <eivind@FreeBSD.org>
To:        "Adam C. Migus" <adam@migus.org>
Cc:        Kris Kennaway <kris@obsecurity.org>
Subject:    Re: config files in packages (Re: (proposal) new flag forpkg_delete)
Message-ID:  <20030908073749.A71336@FreeBSD.org>
In-Reply-To: <49222.192.168.4.2.1062744486.squirrel@mail.migus.org>
References:  <49222.192.168.4.2.1062744486.squirrel@mail.migus.org>

next in thread | previous in thread | raw e-mail | index | archive | help
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.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20030908073749.A71336>