There has to be a better way of merging /etc during a major freebsd-update

Peter Olsson list-freebsd-stable at jyborn.se
Tue Mar 10 12:28:26 UTC 2015


This flag to mergemaster saved a lot of work when I did
upgrades the old way, with cvsup and the make steps and
then mergemaster:
"
# Install the new file if it differs only by VCS Id ($FreeBSD)
FREEBSD_ID=yes
"
Is there some equivalent to this flag in freebsd-update/merge?

I just did my first major upgrade (8.4-RELEASE-p24 ->
9.3-RELEASE-p10) with freebsd-update. It took more than
an hour of manual keyboard activity, most of which could
probably be done automatically. (And here I thought that
computers were supposed to free us from tedious routine
work...)

First robotically pressing dd..j.ZZ in a lot of files.
Occasionally combined with /<<< to find more places that
needed changing in files that didn't fit in the screen.
Eg sendmail.cf.

Of all these files that needed manual editing I had made
my own changes in only one file (/etc/hosts), the rest of
them just had this kind of change:

The following file could not be merged automatically: /etc/rc.d/nisdomain
Press Enter to edit this file in vi and resolve the conflicts
manually...

<<<<<<< current version
# $FreeBSD: src/etc/rc.d/nisdomain,v 1.5.2.2 2013/03/28 13:02:44 svnexp Exp $
=======
# $FreeBSD: releng/9.3/etc/rc.d/nisdomain 193197 2009-06-01 04:55:13Z dougb $
>>>>>>> 9.3-RELEASE

And then, after all these edits, I had to wade through entering
y to "Does this look reasonable (y/n)?" for all these files!
This is of course a necessary step to avoid being bitten by
any <<< === >>> lines left behind by mistake (easy to do when
you lose your concentration after more than a hundred files),
but most of this step could be entirely avoided by automatically
accepting the ID changes.
(I amused myself by counting all files during this stage.
I had to answer y to about 320 files, most of which only
had changes in the ID.)

This was my first upgrade from 8.4 to 9.3. I have 30 more to go
before the 8.4 EoL this summer. I see 30 completely unnecessarily
wasted hours in my future...
And think of the combined lost man hours worldwide in these upgrades!
Merge seems to be a really stupid choice for major upgrades.
(Unless of course there is some flag to freebsd-update which makes
this kind of change automatically accepted. But I see no such flag
in man freebsd-update in 8.4, 9.3 or 10.1.)

And yes, I could maybe copy most of /etc from the first
upgraded server to the rest of them before upgrading, but
that seems error-prone and not really a good solution for
every FreeBSD user.

-- 
Peter Olsson


More information about the freebsd-stable mailing list