[Hackers] Re: A smarter mergemaster

Julian Cowley julian at lava.net
Sat Oct 1 21:19:35 PDT 2005


On Fri, 30 Sep 2005, Yar Tikhiy wrote:
> Obviously, in order to do a 3-way merge, we need information about
> the old versions of original files as well.  However, currently we
> have only the new versions in /usr/src and local versions in /etc
> for mergemaster to work with.  I'll be glad to hear how etcmerge
> approaches this issue.
>
> In any case, we cannot offer the users to access the CVS repo when
> merging /etc.  Personally, I'd like to see a complete copy of current
> unmodified /etc files installed to /usr/share/examples/etc.  They
> could serve as the old original versions for the 3-way merge then.
> Alas, now the copy installed there is rather incomplete, motivation
> of which is unknown to me yet.  Any ideas?

To look outside of mergemaster for a moment, on our systems (FreeBSD
and otherwise), we've traditionally used RCS to maintain system
configuration files.  We keep the system-distributed files on branch
1.1.1 (known as the "vendor branch" in CVS speak), and these increase
1.1.1.1 ... 1.1.1.2 ... 1.1.1.3 with each OS release (we update these
manually).  The trunk is used for our local changes, and we merge
the changes from the vendor branch onto it.  Using RCS, it's easy
to see the local changes that have been made to the vendor release,
and to see the changes that have been made between OS releases.

For instance, to see the differences between a file and its distributed
version, we'd use something like this:

     rcsdiff -r1.1.1 /etc/services

Since CVS is based on RCS (and it seems more appropriate here),
perhaps there could be a system CVS directory for /etc configuration
files.  Using your idea of /usr/share/examples/etc containing the most
recent vendor files, there could be a tool which automatically merges
the files there onto the vendor branch in the system CVS directory.
That way, there would be no need for access to the main CVS repository
each time someone upgrades a server.

Just an idea.

-- 
Even if you're one in a million, there are still 5,000 of you on the planet.


More information about the freebsd-hackers mailing list