Bug 222880

Summary: freebsd-update should explain how to update ports after updating to a new release
Product: Base System Reporter: Dan MacDonald <allcoms>
Component: binAssignee: freebsd-bugs (Nobody) <bugs>
Status: New ---    
Severity: Affects Only Me CC: emaste
Priority: ---    
Version: CURRENT   
Hardware: Any   
OS: Any   

Description Dan MacDonald 2017-10-09 15:03:08 UTC
I have just finished upgrading my FreeBSD 11.0 to 11.1. This was the first time I've ever upgraded from one FreeBSD release to another and thankfully it went without any real problems apart from the fact that I had to search for documentation on how to update all of my installed ports because freebsd-update didn't tell me what I needed to do and neither did the official 11.1 upgrade instructions here:

https://www.freebsd.org/releases/11.1R/installation.html#upgrade-binary

Ideally, the user wouldn't need to search the web nor read any man pages (which ones?) in order to fully update their system. After the second run of freebsd-update install it tells you to update third party software and remove old libraries but without giving the user any hints beyond that.

I could be more lucky than some in that I don't need any custom build options for any of the ports I use in FreeBSD so in my case it seems all I needed to do to fully update my system was to run:

 
# pkg-static install -f pkg
# pkg upgrade -f

After the second run of `freebsd-update install`. In my case I didn't need to run the first command as pkg was already up-to-date, but maybe this command should be recommended/run just in case?

I think the updating of ports after upgrading to a new release should also be covered in the Handbook for the sake of completeness:

https://www.freebsd.org/doc/handbook/updating-upgrading-freebsdupdate.html

Maybe the process is a little more involved if users have customised port build options?
Comment 1 Ed Maste freebsd_committer freebsd_triage 2023-09-29 17:43:50 UTC
For a major upgrade pkg should do the right thing -- `pkg upgrade` after the 2nd freebsd-update install (i.e., after rebooting to the new kernel and installing new files) should be sufficient. pkg will prompt to upgrade itself, and will prompt to reinstall packages as the ABI string has changed.

These steps shoud definitely be documented in the handbook and in the freebsd-update man page. We probably cannot provide a single, common recipe for folks who have ports installed with custom options, miscellaneous 3rd party software not from ports, etc. installed but ought to at least clearly document the point at which things should be rebuilt/reinstalled.