Upgrade documentation

Hi,

Been using FreeBSD since 2009 and I love it, the documentation is always spot on - except for this one thing, which I don't understand even as an old user why its not more clear, on the upgrade page for every single minor och major version this step is just not mentioning exactly how to proceed as best practise.


"Upgrade the Userland

After rebooting, run freebsd-update(8) again to install the new userland components:
freebsd-update install
freebsd-update(8) may prompt to rebuild or reinstall all third-party software due to changes in system libraries. Follow those instructions as needed."

-------------------
The prompter just says the same thing as above, why not say exactly how to rebuild or reinstall 3rd party softare, the explicit commands that is.


Like:
pkg-static upgrade -f, which I guess is the proper way?
Because "pkg upgrade" isn't always optimal here, right?

Or should I run all of these commands to be sure?
pkg-static install -f pkg
pkg update
pkg upgrade

and then finishing off with freebsd-update install to clear out the old, which is actually says to do after upgrading/rebuilding the packages.


--

Or am I missing something that is clear for everyone else? :)
 
After rebooting, run freebsd-update(8) again to install the new userland components:
freebsd-update install
freebsd-update(8) may prompt to rebuild or reinstall all third-party software due to changes in system libraries. Follow those instructions as needed."
Only after a major version upgrade.

Or should I run all of these commands to be sure?
pkg-static install -f pkg
pkg update
pkg upgrade
pkg bootstrap -f
pkg upgrade

No need for pkg-update(8) unless you feel your locally cached catalog might be out of whack.
 
alright, but why isn't this information in the prompt or clear in the manual?

everything else is always clear with examples, here it just tells you to do something, as a new user you usually feel very vulnerable at this stage when doing major upgrades.
 
So, first... I don't get what it is you're hinting at. Where exactly did you find that documentation snippet? If you're commenting on something then always try to be precise, especially because FreeBSD documentation isn't limited to just the handbook or manualpages or maybe command output...

I'm pretty sure people don't mind taking a new (open minded) loko, but that vibe quickly evaporates when you need to actively search for it. I checked update-freebsd(8), I checked chapter 27 of the handbook and I just can't find what it is you're talking about.

(edit) Still, always keep in mind that the handbook is a thing. If you need more elaborate examples... that's where to look.
 
So basically the complaint is "the documentation says you may need to upgrade thrid party stuff" instead of saying that and listing the specific commands needed to do that?
 
So basically the complaint is "the documentation says you may need to upgrade thrid party stuff" instead of saying that and listing the specific commands needed to do that?
Yes, you nailed it.

But seriously not everyone knows how to upgrade it so that its linked to the correct ABI's, I'm a bit confused why this very important part is not relayed in the info above, everything else is crystal clear - it would be nice if the exact commands to proceed were specified for this part as well, not just glosed over as if everyone knew about this once or twice a year command by heart.

Might not be as a big problem today with llms, but still.
 
  • Like
Reactions: mer
As a matter of encouragement - years ago, I was trying to produce patch for something in ports, but wording in the Porters Handbook was too generic, because everybody know how to get patch in the right format, right? So I created PR, got my answer and example command appeared in the handbook.
 
It's useful because it runs pkg(7) (which comes with the OS), not pkg(8).
Is the bootstrap really useful, or is it just paranoia?
pkg(7), until fairly recently, wasn't able to handle multiple enabled repositories, see here. Then, you had to either disable the problem causing repositories, or use pkg-static(8) because its library/ies are statically linked and not affected by an OS update in order to get the package pkg. However, for the last one you need to have ports-mgmt/pkg (i.e. pkg(8)) already installed.
 
For me doing upgrades across releases (14.x to 15.0, 15.0 to 15.1) I do the manually create new BE and do freebsd-update/pkg commands into chroot stuff so I'm not modifying "the BE I am currently booted into".
When doing this I believe the pkg commands actually look at version/abi versions of the chroot not what is currently running which should get me updates based on say 15.1-RELEASE (the BE) instead of currently running 15.0-RELEASE.
In this situation, would running pkg bootstrap in the chroot (the new version) be the right thing to do before running pkg upgrade in the BE? I'm thinking about how the pkg command gets versioning information, how it gets the remote repos information for that version.

Regardless, when I do this in the new BE (the one containing the new release) I comment out any problematic modules (i915kms, nvidia, etc) from rc.conf and loader.conf before reboot, then manually run pkg delete/pkg install to ensure I have correct pkgs for my running version.
Trying to figure out how to streamline things before they all get mucked up with mandatory pkgbase :)
 
pkg(7), until fairly recently, wasn't able to handle multiple enabled repositories, see here. Then, you had to either disable the problem causing repositories, or use pkg-static(8) because its library/ies are statically linked and not affected by an OS update in order to get the package pkg. However, for the last one you need to have ports-mgmt/pkg (i.e. pkg(8)) already installed.
Based on the manual, I thought that the base system pkg was only there to bootstrap the version installed from packages and consequently everyone had pkg(8) unless they never used the package system.

I've just noticed that "which pkg" gives /usr/sbin/pkg, is that the correct path? Does pkg(7) offload commands to pkg(8)?
 
For me doing upgrades across releases (14.x to 15.0, 15.0 to 15.1) I do the manually create new BE and do freebsd-update/pkg commands into chroot stuff so I'm not modifying "the BE I am currently booted into".
When doing this I believe the pkg commands actually look at version/abi versions of the chroot not what is currently running which should get me updates based on say 15.1-RELEASE (the BE) instead of currently running 15.0-RELEASE.
In this situation, would running pkg bootstrap in the chroot (the new version) be the right thing to do before running pkg upgrade in the BE? I'm thinking about how the pkg command gets versioning information, how it gets the remote repos information for that version.

Regardless, when I do this in the new BE (the one containing the new release) I comment out any problematic modules (i915kms, nvidia, etc) from rc.conf and loader.conf before reboot, then manually run pkg delete/pkg install to ensure I have correct pkgs for my running version.
Trying to figure out how to streamline things before they all get mucked up with mandatory pkgbase :)

I do an automated source build with DESTDIR set to a mounted BE. I have been thinking of including an automatic update of just the kmod packages, and
was wondering whether -c $DESTDIR would suffice or whether it was necessary to set ABI and OSVERSION.

FWIW I don't take any special precautions outside of a major update, I just run the script, shutdown as normal and boot into the new version the next day - it's a long time since I've seen startx, or anything else, fail - I am still on 14.4 though. I'm inclined to leave it for a while, just to see how I goes.
 
Back
Top