Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 17 Apr 2013 22:55:32 +0200
From:      Polytropon <freebsd@edvax.de>
To:        andreas scherrer <ascherrer@gmail.com>
Cc:        freebsd-questions@freebsd.org
Subject:   Re: Keeping FreeBSD with custom kernel up to date: freebsd-update no option?
Message-ID:  <20130417225532.4fcd15f9.freebsd@edvax.de>
In-Reply-To: <516F07F2.7020201@gmail.com>
References:  <516DA8A8.5040305@gmail.com> <20130416221851.5d898701.freebsd@edvax.de> <516F07F2.7020201@gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, 17 Apr 2013 22:37:06 +0200, andreas scherrer wrote:
> For some reason I was under the impression that /usr/src/sys is not
> being updated by freebsd-update if I remove "kernel" from the
> "Components" directive in freebsd-update.conf. But I might be wrong (I
> will check).

According to the documentation, /usr/src (and therefor the
/usr/src/sys subtree) is part of the "src" component, not
of "kernel", so it should be updated properly.



> Maybe related to this: how does freebsd-update "know" what
> sources/binaries to get when I don't use the "-r" switch? Does it rely
> on /usr/src/sys/conf/newvers.sh?
> 
> Could it be that I never saw a change to my kernel sources
> (/usr/src/sys) because freebsd-update was tracking some static sources?

Not neccessarily. For example, if only a userland program has
received a security update, and the kernel was kept the same,
no change would be done in /usr/src/sys. In this case, the
kernel version output (as seen by the "uname" program) would
not have changed.



> As I currently have a checkout from SVN in /urs/src I need to get rid of
> this. Can I just copy (read: move) back my previous /usr/src directory
> and continue to use freebsd-update?

You should not switch between both methods, it may cause problems.
The simplest way would be to

	# mv /usr/src /usr/src.svn

and let freebsd-update populate the sources with the required
version. Note that it will install the world your (custom) kernel
will finally have to match, and so it should make sure you have
the correct revision of the sources to avoid a version conflict.

However, it's basically not a problem to use SVN to track -RELEASE,
but in this case, you should recompile world and kernel from that
sources, instead of relying on freebsd-update for a binary update
of the world only. But as you said you're only interested in a
custom kernel (which _requires_ building from source), you can
safely leave everything else to freebsd-update and don't use SVN.
(It would be a totally different thing if you would track -STABLE
or -CURRENT which is not possible with freebsd-update, and which
would _force_ you to build everything from source.)

By following -RELEASE, freebsd-update will "apply _that_ snapshot
of the source tree and the prebuild world and kernel at the
revision when X.Y-RELEASE-pZ has been verified", sloppily said.
So it basically doesn't matter what sources you have on your
machine (or even if you have any sources) as long as you're not
going to compile anything. But because this is a requirement in
your specific setting, freebsd-update will take care of that by
having the "src" component on its list.




-- 
Polytropon
Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20130417225532.4fcd15f9.freebsd>