This morning, I finally updated my web server to FreeBSD 10.2-p6 using freebsd-update. Normally I like freebsd-update, but this morning it decided to be cranky.
As usual, it was cranky because I didn’t know what I was doing.
First, I should say that I don’t need to update my hosts that often. If there’s, say, a mountd(8) security advisory, I don’t bother. And when I ran bunches of FreeBSD boxes, I ran freebsd-update through ansible.
This means I’m not terribly familiar with the output.
So, I run:
# freebsd-update -F -r 10.2-RELEASE upgrade
There’s the usual “downloading metadata” messages, then a bunch of stuff on updating patches.
I then get presented with an /etc/mail/sendmail.cf diff, saying some of the innards of that file has changed. Fine.
Then I get:
The following file will be removed, as it no longer exists in
FreeBSD 10.2-RELEASE: /etc/ntp.conf
Does this look reasonable (y/n)?
Wait… FreeBSD dropped /etc/ntp.conf? What, did they drop ntpd? Who do they think they are, OpenBSD? I’m sure that’s in the release notes, had I bothered to read the release notes. Fine, I’ll install openntpd from packages after the upgrade. No biggie. But I want /etc/ntp.conf to stick around, as I have custom twiddles in there. I think. It’s been a while.
So I answer n
. Just like I would with mergemaster.
And freebsd-update ends.
Fine. That’s all the updates, right? I saw stuff download. I then do:
# freebsd-update install
No updates are available to install.
Run '/usr/sbin/freebsd-update fetch' first.
What fresh hell is this? I saw all sorts of stuff download!
I rerun the freebsd-update command, and this time I notice in the output:
/usr/sbin/freebsd-update: cannot open files/.gz: No such file or directory
Something’s missing.
I add -F, to say “hey, re-download everything.”
Same result.
Eventually, I let freebsd-update take /etc/ntp.conf. The upgrade kept running after that, downloading a bunch more stuff and finally telling me to reboot and run freebsd-update install
.
The takeaways here are:
1) freebsd-update is not mergemaster. Answering n anywhere makes the update stop before it’s finished.
2) Read the release notes.
BTW, ntpd is still part of FreeBSD 10.2. I don’t know why the update wanted to blow away my ntp.conf rather than point out any diffs.