Solved Is running freebsd-update for the third time necessary?

I just upgraded from 11.2 to 12-RELEASE and it was smooth. This is my first time upgrading FreeBSD and I would like to keep the old shared libraries that this step is supposed to remove. I issued # freebsd-update install for the first time after downloading all the patches, then rebooted, then the Handbook mentions running that command again to delete old shared libraries and objects. I skipped that step and reinstalled all packages with # pkg upgrade -f. My system is working normally and the update seems to be complete. But the Handbook says that I should run # freebsd-update install again to "tie all loose ends".

Will it go to that phase or to the one I skipped? How can I finish updating properly without deleting the libraries? Can I just keep using my system like this?
 
While I don't have an explicit answer to your question (I don't know enough about how freebsd-update works), here is a warning:

Sooner or later, you will run freebsd-update again. For example to go from 12.0 to 12.1. And at that point, it will do the cleanup that you are fearing. My suggestion is this: Even if you fear that this cleanup will cause you pain, you are better of with having the pain now rather than later. So set aside half an hour, run it again, and then carefully check that everything you need or want is still working correctly. If it isn't, fix it.

As a general background: As long as you are only using "standard" stuff (which was installed from the base system), then after an upgrade, nothing should rely on older libraries. In that case, you have nothing to fear. On the other hand, it is quite possible that you are using ports or packages that do rely on older stuff, and it is quite possible that some of those will get broken by an upgrade. If you have manually installed software that is not even controlled by ports or packages, this is even more possible. For example, I have a 10-year old Python program that used to rely on an ancient version of Berkeley DB and the Python interface to that, and it broke after a recent upgrade (I think FreeBSD 9 -> 11, not sure). Took me all evening to fix. But you are still better off dealing with that kind of pain early, and at a convenient time of your choice.
 
I generally run freebsd-update install several times, at least until it starts telling me there's nothing more to do.
 
I ran freebsd-update install on my system. freebsd-version -uk shows
Code:
11.2-RELEASE-p5
11.2-RELEASE-p6
. Why both are not shown as p6?
 
As SirDice said you can run as many times as you want the install command it won't harm. I have another advise for your. When you are performing Major update aways check if your system can boot with the new kernel before doing the actual update. You can do this by simple create a USB boot image with the release which are you going to update to and check if your hardware is detected properly.

gnath
it's normal to have different patch levels read freebsd-version(1) for more info.
 
Yes, the reason I feared this is that I sometimes use old programs manually compiled from source, and I ran into this sort of problem before in linux. In the end I simply revoked freebsd-update's permission to delete files in /etc/freebsd-update.conf.

Also, thanks a lot ralphbsz for sharing your experience.
 
Yes, the reason I feared this is that I sometimes use old programs manually compiled from source, and I ran into this sort of problem before in linux. In the end I simply revoked freebsd-update's permission to delete files in /etc/freebsd-update.conf.
I can't say I have a lot of Linux experience, but I certainly do have plenty of FreeBSD experience.
I've been using it since 4.x and ever since freebsd-update came out, I've been upgrading my systems that way.
In short, the three phases it executes are:
1. install kernel (reboot)
2. install userland
3. remove old userland

Leaving that third step out isn't a massive big deal, but it will leave a lot of untracked old libraries on your system.
If you're worried that old programs will no longer run, you can distinguish between two cases:
* upgrading within a major release (e.g. 11.1 to 11.2)
* upgrading to a newer release (e.g. 11.2 to 12.0)

The first case should always be safe. The FreeBSD dev team goes through great pains in order to ensure binary compatibility between versions.*
The second is also safe, assuming you install a single extra package. In this case that would be compat11x-amd64 (assuming you're on amd64).
That one package contains everything (well, the base system components) needed to run older executables on the newer release of FreeBSD.
Should you notice that your executable doesn't run anymore, just install that package and everything should be up an running again.

I recently did the test when I upgraded my desktop to 12.0-RELEASE. I have several executables compiled that I'm hosting for download and was
wondering if I needed to recompile them for the people on 12.0. They ran without issues with the compat11x package and they're pretty
demanding (Unreal Engine 4) executables - see Thread unreal-engine-4-20-4-21.66785 for more info about that specifically.

* I'm not a FreeBSD dev, I can't give guarantees on ABI compatibility. But I do know they take it a lot more seriously than several Linux devs.
 
I use the compat package temporary when I upgrade FreeBSD from 9 to 10 and 10 to 11. When you recompile all ports then is not needed any more.
 
Back
Top