config files in packages (Re: (proposal) new flag forpkg_delete)

Eivind Eklund eivind at FreeBSD.org
Mon Sep 8 07:37:50 PDT 2003


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.


More information about the freebsd-arch mailing list