Updating: patch version?

Hello.

I installed new system and have:

# uname -v
Code:
FreeBSD 9.0-RELEASE

After I run freebsd-install fetch/update - I have:

# uname -v
Code:
FreeBSD 9.0-RELEASE-p3

But - if I looking into source I see:

# grep -A 2 'TYPE="' /usr/src/sys/conf/newvers.sh
Code:
TYPE="FreeBSD"
REVISION="9.0"
BRANCH="RELEASE-p7"

Also, if run freebsd-update fetch again - I also see:
Code:
No updates needed to update system to 9.0-RELEASE-p7.

So, what patch version I have really on this system? p3 or p7? Or maybe I don't quite understand the difference in BRANCH stroke?

Thanks.
 
This leads up to the question how you obtained /usr/src?

Did you install that during the initial installation or did you obtain it afterwards?

The reason I'm asking: I installed my FreeBSD server without the source code but later took some interest in it (thanks to lots of storage space provided by my hosting provider). Because I already had devel/subversion installed I decided to follow this thread and went on from those tips (just reminded myself to thank phoenix :) ).

In the end I simply used something like this: # svn co [url=http://svn.freebsd.org/base/releng/9.1/]http://svn.freebsd.org/base/releng/9.1/[/url] /usr/src.

And that resulted in this:

Code:
smtp2:/home/peter $ uname -v
FreeBSD 9.1-RELEASE-p3 #0: Mon Apr 29 18:27:25 UTC 2013     root@amd64-builder.daemonology.net:/usr/obj/usr/src/sys/GENERIC
smtp2:/home/peter $ grep -A 2 'TYPE="' /usr/src/sys/conf/newvers.sh
TYPE="FreeBSD"
REVISION="9.1"
BRANCH="RELEASE-p3"
Now; do keep in mind I'm still quite a FreeBSD newbie myself. Even so; I can't help wonder where the source came from.
 
There's a little side effect of using freebsd-update(8) instead of the full source based update combined with updates that do not change the kernel. If the kernel does not change with an update the output of uname -a will not change either. You can have a 9.0-RELEASE-p7 system that still reports 9.0-RELEASE-p3 in uname -a. All of this because the kernel is not rebuilt for updates that only touch the world.

I have to admit that the choise of using BRANCH in /usr/src/sys/conf/newvers.sh is bit confusing because "branch" can also mean the SVN branch and here BRANCH alone identifies the patch level (RELEASE-p3) only, not the full SVN branch releng/9.1.
 
Yes, @kpa, I really used freebsd-update and that update doesn't touch the kernel.

Thanks to all.
 
Last edited by a moderator:
Not every patch touches the kernel. Thus, the kernel patch level never changes, the kernel is not rebuilt on the freebsd-update servers, and what's shown by uname is what's compiled into the kernel.

If you manually update from source, the kernel is rebuilt, and the patch level is update to what is set in the source tree.
 
So, what is the canonical way to get the current patch level of an installation of FreeBSD that uses freebsd-update for updates?
 
dave said:
So, what is the canonical way to get the current patch level of an installation of FreeBSD that uses freebsd-update for updates?

Well, may be that way:

kernel version
# uname -v

world version:
# uname -r
 
Run freebsd-update and see if it finds any available updates. If it doesn't, then you're at the latest patch level. Otherwise, run the update. :)
 
Back
Top