Built from source and now freebsd-update is confused?

A few weeks ago I detected an issue with my system being in an inconsistent state w.r.t. missing some system files. There's a backstory there that has to do with how the original vendor built and installed the machine, but I don't think it's terribly relevant to my question.

Until discovering the problem, I'd been maintaining the OS with freebsd-update, and was supposedly at 11.2-RELEASE-p5. To get consistent with that version, I built and installed from source. Something curious happened after that though, in that my nightly maintenance mail started reporting that it would make changes, saying "The following files will be updated as part of updating to 11.2-RELEASE-p5." It was only sixteen files not including the /usr/src ones, but notably including the kernel:

Code:
/boot/kernel/kernel
/boot/kernel/nfscommon.ko
/boot/kernel/nfsd.ko
/boot/kernel/vmm.ko

I put off trying to figure out why it might be saying that, and now we're up to -p7 (and 12.0 of course) and I'm not sure what the best way to proceed is. Is it ill-advised to switch to using freebsd-update again after installing from world? Do I have build and install from source always now? If not, even though freebsd-update didn't think my source-built -p5 was the same as what it thought -p5 should be, can I just use freebsd-update now to go to -p7? Or should I force it to do the original -p5 changes it wanted to make then go to -p7?

Thanks for any insights.
 
If you build from source with a blank src.conf and make.conf, you will end up with a default install of FreeBSD. From there, you can switch to freebsd-update without issues.

If you have any customisations in those files when you build from source, freebsd-update won't work very well.
 
Hmm, I don't even have a src.conf, and /etc/make.conf only has the obsolete "WITHOUT_X11=yes" option. Would that have screwed things up?
 
It was only sixteen files not including the /usr/src ones, but notably including the kernel:
Your source build picked up the new version string from the source. A binary patch update didn't update the kernel with the last patch, it was a userland thing only. That means your source compiled kernel and the binary update differ. The binary update will try to replace the kernel because it notices it's different than what it should be (according to freebsd-update(8) at least).

P4 included a kernel change, so the binary update would show a -p4 kernel. P5 was a userland update, so the binary kernel still shows -p4. If you build the kernel from source at this point your compiled kernel will show a -p5 kernel version. This slight version difference is what you are seeing and why freebsd-update(8) appears to be updating a kernel for a userland change only. In actuality both kernels are exactly the same, only the version string isn't, but this minor superficial change also changes the hash of the whole kernel.
 
So from that last reply it sounds to me like it is safe to just do a source-built -p5 upgrade using freebsd-update to -p7. Agree? (And plan for a 12.0-RELEASE at some point, too.) Thanks for your help!
 
Yes, it should be safe to do. If I recall correctly P7 includes an update to the kernel, so both userland and kernel will have the -p7 version and you'll be completely in sync again.
 
Back
Top