freebsd-update from 8.3-RELEASE to 9.0-RELEASE: How to deal with dozens of diffs?
Posted
by
Stefan Lasiewski
on Server Fault
See other posts from Server Fault
or by Stefan Lasiewski
Published on 2012-06-15T18:50:32Z
Indexed on
2012/06/15
21:18 UTC
Read the original article
Hit count: 273
freebsd
|freebsd-update
I am upgrading a FreeBSD 8.3-RELEASE system to FreeBSD 9.0-RELEASE using freebsd-update. This is my first time performing a major version upgrade in FreeBSD.
At one point in the process, freebsd-update performs a diff on files which are different then what is expected for the 9.0-RELEASE. It compares the current version on the system with the new changes added from 9.0-RELEASE. There are dozens of files in the list.
Thus, I am presented with dozens and dozens of diffs which open in a vi window and look like this:
The following file could not be merged automatically: /etc/ntp.conf
Press Enter to edit this file in vi and resolve the conflicts
manually...
### vi window opens
<<<<<<< current version
driftfile /etc/ntp/drift
=======
#
# $FreeBSD: release/9.0.0/etc/ntp.conf 195652 2009-07-13 05:51:33Z dwmalone $
#
# Default NTP servers for the FreeBSD operating system.
#
# Don't forget to enable ntpd in /etc/rc.conf with:
# ntpd_enable="YES"
#
# The driftfile is by default /var/db/ntpd.drift, check
# /etc/defaults/rc.conf on how to change the location.
#
>>>>>>> 9.0-RELEASE
restrict default notrust nomodify ignore
And so on.
This requires that I manually edit each file and remove the strings like <<<<<<< current version
>>>>>>> 9.0-RELEASE
and =======
. As I discovered afterwards, if I don't remove these strings, they end up in the file afterwards. There are dozens of files which differ between 8.3 and 9.0, and I have a dozen local modifications myself.
It appears that freebsd-update
is using a diff, sdiff or mergemaster function of some sort, but I can't tell what it is doing exactly.
Processing these files is tedious. Is there a way that I can just say "Accept new version" or "keep old version" or "Your merge is correct"? There has got to be an easier way to deal with these files. I must be missing something.
This isn't a huge problem for one machine, but eventually I'll be doing this dozens of times and I want to find an easier way.
© Server Fault or respective owner