# Updating: patch version?



## setevoy (Jun 2, 2013)

Hello.

I installed new system and have:

`# uname -v`

```
FreeBSD 9.0-RELEASE
```

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

`# uname -v`

```
FreeBSD 9.0-RELEASE-p3
```

But - if I looking into source I see:

`# grep -A 2 'TYPE="' /usr/src/sys/conf/newvers.sh`

```
TYPE="FreeBSD"
REVISION="9.0"
BRANCH="RELEASE-p7"
```

Also, if run `freebsd-update fetch` again - I also see:

```
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.


----------



## ShelLuser (Jun 2, 2013)

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:


```
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.


----------



## kpa (Jun 2, 2013)

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.


----------



## setevoy (Jun 2, 2013)

Yes, @kpa, I really used freebsd-update and that update doesn't touch the kernel.

Thanks to all.


----------



## SirDice (Jun 2, 2013)

Please update to 9.1, 9.0 has been end-of-life since March 2013. Which means the NFS server bug and any future security bug isn't going to be fixed.

http://www.freebsd.org/security/unsupported.html

http://www.freebsd.org/security/advisories/FreeBSD-SA-13:05.nfsserver.asc


----------



## phoenix (Jun 2, 2013)

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.


----------



## dave (Jun 3, 2013)

So, what is the canonical way to get the current patch level of an installation of FreeBSD that uses freebsd-update for updates?


----------



## setevoy (Jun 3, 2013)

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`


----------



## phoenix (Jun 4, 2013)

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.


----------

