Re: Keeping FreeBSD with custom kernel up to date: freebsd-update no option?

2013-04-21 Thread andreas scherrer
Thank you, Polytropon.

I have (as far as I can tell) successfully upgraded to 9.1-RELEASE-p2
now. For this I moved /usr/src (SVN) out of the way and followed the
upgrade process described in 25.2.3.2 Performing the Upgrade in the
Handbook [1].

on 17.4.13 22:55  Polytropon said the following:
 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.

OK. I will check if my /usr/src(/sys) ever changes now. I too think it
should.

 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?

That would still interest me (also see below).

 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.

So how would I follow -RELEASE. Or how does freebsd-update what I want
to follow (see above)?
I don't want to, so this is an academic question...

And something else is bugging me: Is there a way I can contact someone
(Tom Rhodes?) about the outdated freebsd-update documentation
(concerning the custom kernel handling) in the Handbook (FreeBSD
Update [2])? Colin Percival's email is in the man page, would that be
the way to go? The Handbook states that Tom Rhodes wrote the
freebsd-update section but does not reveal an email address...


Kind regards
andreas

[1]
http://www.freebsd.org/doc/handbook/updating-upgrading-freebsdupdate.html
[2]
http://www.freebsd.org/doc/en/books/handbook/updating-upgrading-freebsdupdate.html
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Keeping FreeBSD with custom kernel up to date: freebsd-update no option?

2013-04-17 Thread Alexandre
Hi Andreas and Polytropon,

In the case your are tracking -RELEASE branch, you can use freebsd-update
tool to apply binary security patches on your system and upgrade versions
(e.g. 9.0 to 9.1 or 9.x to 10.0 when available).
Freebsd-update tool apply binary updates to your system and GENERIC kernel.
Furthermore, this tool syncs sources (by default). So if you are using
custom kernel, you just have to rebuild and install your custom kernel.
It is recommended to not use SVN to update your system sources if you are
using freebsd-update tool to avoid troubles.

Regards,
Alexandre


On Tue, Apr 16, 2013 at 10:18 PM, Polytropon free...@edvax.de wrote:

 On Tue, 16 Apr 2013 21:38:16 +0200, andreas scherrer wrote:
  Dear FreeBSD savvies
 
  I am (still) struggling to understand how to keep my FreeBSD system up
  to date (world/system, not ports). I want to track RELEASE (not a
  development branch) and I want to receive security related updates. And
  I want to run a custom kernel.

 Without actually havint tested it, it seems that if you want
 to use freebsd-update (binary updating), you should note this:

 In /etc/freebsd-update.conf, you should have the line for what
 to update as Components src world.

 This should prevent overwriting of the kernel, but you need to
 compile your kernel and install it. The component src will
 make sure you have the proper kernel sources. I assume a custom
 kernel configuration file in /usr/src/sys/{i386|amd64}/conf/
 is _not_ being overwritten by freebsd-update.

 Use the -r option of freebsd-update to specify the correct
 release if required. It should follow -RELEASE-pN for the
 currentl patchlevel N (which you intend to follow) normally.



  From what I understand I cannot use freebsd-update in this case
  because it will invariably either overwrite my custom kernel (if I have
  Components kernel in the config file) or not update the kernel sources
  in /usr/src/sys (when I do not have Components kernel in the config
  file). See [1].

 As far as I read from man freebsd-update.conf, the src component
 will not exclude kernel sources; kernel refers to the kernel and
 the modules as binary stuff.

 This is the relevant text passage:

 The components are ``src''
 (source code), ``world'' (non-kernel binaries),
 and ``kernel''; the sub-components are the indi-
 vidual distribution sets generated as part of
 the release process (e.g., ``src/base'',
 ``src/sys'', ``world/base'', ``world/catpages'',
 ``kernel/smp'').  Note that prior to
 FreeBSD 6.1, the ``kernel'' component was dis-
 tributed as part of ``world/base''.

 So src will include src/sys which is the kernel sources you
 will need to build your custom kernel.



  This leaves me with the only possibility to use SVN to update /usr/src,
  right?

 No, but it might be the more advanced alternative, and it should
 work. Note that in _this_ case, you will also have to rebuild the
 world, so kernel and world are in sync after an update. Refer to
 the comment header of /usr/src/Makefile for the whole process that
 has to be performed after updating (or see in the Handbook: the
 section about updating by source).



  I have a copy of the SVN sources (for the outdated RELEASE-9.0.0
  but that's a different story), see below for svn info). As I
  understand [2] I cannot mix freebsd-update and SVN, right?

 It could cause trouble. Deciding for _one_ way should be better.



  So I can run svn update in /usr/src whenever I like. But what then? Do
  I need to rebuild the world and my custom kernel every time I run svn
  update (and there are some updates)?

 Yes, or better: As soon as it is required. This depends on _what_
 has been part of the update. For example, kernel updates _can_
 require updates of userland programs or libraries, but it's also
 possible that it's not the case. To be sure, rebuild.



  I'm on a low powered consumer
  device and it takes considerable amount of time to build the world and
  kernel (plus I still don't feel comfortable doing such tasks remotely).

 In this case, use freebsd-update as explained at the beginning of
 my message: Update components world and src, leave out kernel,
 the rebuild the kernel by source and install it. Then reboot.



  Is this really the way to do it or am I missing something?

 There are _several_ ways to do it. :-)



  There are quite some posts, websites and threads out there (see [3] or
  [4] for example) about this topic but (surprisingly?) I could not (yet)
  find a conclusive answer.

 This is because the answer depends on what you actually want to do
 (follow RELEASE, STABLE, CURRENT), and how you want to do it (binary,
 by source).




 --
 Polytropon
 Magdeburg, Germany
 Happy FreeBSD user since 4.0
 Andra moi ennepe, Mousa, ...
 ___
 freebsd-questions@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/freebsd-questions
 To 

Re: Keeping FreeBSD with custom kernel up to date: freebsd-update no option?

2013-04-17 Thread andreas scherrer
Thank you very much for your detailed answer!

on 16.4.13 22:18  Polytropon said the following:
 On Tue, 16 Apr 2013 21:38:16 +0200, andreas scherrer wrote:
 I am (still) struggling to understand how to keep my FreeBSD system up
 to date (world/system, not ports). I want to track RELEASE (not a
 development branch) and I want to receive security related updates. And
 I want to run a custom kernel.
 
 Without actually havint tested it, it seems that if you want
 to use freebsd-update (binary updating), you should note this:
 
 In /etc/freebsd-update.conf, you should have the line for what
 to update as Components src world.

That's what I thought (and currently have).

 This should prevent overwriting of the kernel, but you need to
 compile your kernel and install it. The component src will
 make sure you have the proper kernel sources. I assume a custom
 kernel configuration file in /usr/src/sys/{i386|amd64}/conf/
 is _not_ being overwritten by freebsd-update.

A custom kernel configuration file is *not* overwritten by
freebsd-update, I can confirm this. Of course I will have to compile and
install my custom kernel manually.

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

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?

[snip]

 I'm on a low powered consumer
 device and it takes considerable amount of time to build the world and
 kernel (plus I still don't feel comfortable doing such tasks remotely).
 
 In this case, use freebsd-update as explained at the beginning of
 my message: Update components world and src, leave out kernel,
 the rebuild the kernel by source and install it. Then reboot.

That's what I am planning to do. Let's see.

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? I think this should work, right? I
am just not sure if freebsd-update still knows what sources/binaries
to track (see my previous comment about how freebsd-update knows what
source to use).


Cheers
andreas
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Keeping FreeBSD with custom kernel up to date: freebsd-update no option?

2013-04-17 Thread Polytropon
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, ...
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Keeping FreeBSD with custom kernel up to date: freebsd-update no option?

2013-04-16 Thread andreas scherrer
Dear FreeBSD savvies

I am (still) struggling to understand how to keep my FreeBSD system up
to date (world/system, not ports). I want to track RELEASE (not a
development branch) and I want to receive security related updates. And
I want to run a custom kernel.

From what I understand I cannot use freebsd-update in this case
because it will invariably either overwrite my custom kernel (if I have
Components kernel in the config file) or not update the kernel sources
in /usr/src/sys (when I do not have Components kernel in the config
file). See [1].

This leaves me with the only possibility to use SVN to update /usr/src,
right? I have a copy of the SVN sources (for the outdated RELEASE-9.0.0
but that's a different story), see below for svn info). As I
understand [2] I cannot mix freebsd-update and SVN, right?

So I can run svn update in /usr/src whenever I like. But what then? Do
I need to rebuild the world and my custom kernel every time I run svn
update (and there are some updates)? I'm on a low powered consumer
device and it takes considerable amount of time to build the world and
kernel (plus I still don't feel comfortable doing such tasks remotely).

Is this really the way to do it or am I missing something?

There are quite some posts, websites and threads out there (see [3] or
[4] for example) about this topic but (surprisingly?) I could not (yet)
find a conclusive answer.

Any hints, help, tutorials or corrections would be greatly appreciated.


Kind regards
andreas

[1]
http://lists.freebsd.org/pipermail/freebsd-questions/2013-January/247763.html
[2]
http://lists.freebsd.org/pipermail/freebsd-questions/2013-April/250461.html
[3] http://forums.freebsd.org/showthread.php?t=26140
[4] http://forums.freebsd.org/showthread.php?t=3

-
# svn info
Path: .
Working Copy Root Path: /usr/src
URL: https://svn0.us-east.freebsd.org/base/release/9.0.0
Repository Root: https://svn0.us-east.freebsd.org/base
Repository UUID: ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Revision: 248546
Node Kind: directory
Schedule: normal
Last Changed Author: kensmith
Last Changed Rev: 229307
Last Changed Date: 2012-01-02 19:59:55 +0100 (Mon, 02 Jan 2012)
-

Ps.: Is there a way I can contact someone (Tom Rhodes?) about the
outdated freebsd-update documentation (concerning the custom kernel
handling) in the Handbook (FreeBSD Update [5])?

[5]
http://www.freebsd.org/doc/en/books/handbook/updating-upgrading-freebsdupdate.html
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Keeping FreeBSD with custom kernel up to date: freebsd-update no option?

2013-04-16 Thread Polytropon
On Tue, 16 Apr 2013 21:38:16 +0200, andreas scherrer wrote:
 Dear FreeBSD savvies
 
 I am (still) struggling to understand how to keep my FreeBSD system up
 to date (world/system, not ports). I want to track RELEASE (not a
 development branch) and I want to receive security related updates. And
 I want to run a custom kernel.

Without actually havint tested it, it seems that if you want
to use freebsd-update (binary updating), you should note this:

In /etc/freebsd-update.conf, you should have the line for what
to update as Components src world.

This should prevent overwriting of the kernel, but you need to
compile your kernel and install it. The component src will
make sure you have the proper kernel sources. I assume a custom
kernel configuration file in /usr/src/sys/{i386|amd64}/conf/
is _not_ being overwritten by freebsd-update.

Use the -r option of freebsd-update to specify the correct
release if required. It should follow -RELEASE-pN for the
currentl patchlevel N (which you intend to follow) normally.



 From what I understand I cannot use freebsd-update in this case
 because it will invariably either overwrite my custom kernel (if I have
 Components kernel in the config file) or not update the kernel sources
 in /usr/src/sys (when I do not have Components kernel in the config
 file). See [1].

As far as I read from man freebsd-update.conf, the src component
will not exclude kernel sources; kernel refers to the kernel and
the modules as binary stuff.

This is the relevant text passage:

The components are ``src''
(source code), ``world'' (non-kernel binaries),
and ``kernel''; the sub-components are the indi-
vidual distribution sets generated as part of
the release process (e.g., ``src/base'',
``src/sys'', ``world/base'', ``world/catpages'',
``kernel/smp'').  Note that prior to
FreeBSD 6.1, the ``kernel'' component was dis-
tributed as part of ``world/base''.

So src will include src/sys which is the kernel sources you
will need to build your custom kernel.



 This leaves me with the only possibility to use SVN to update /usr/src,
 right?

No, but it might be the more advanced alternative, and it should
work. Note that in _this_ case, you will also have to rebuild the
world, so kernel and world are in sync after an update. Refer to
the comment header of /usr/src/Makefile for the whole process that
has to be performed after updating (or see in the Handbook: the
section about updating by source).



 I have a copy of the SVN sources (for the outdated RELEASE-9.0.0
 but that's a different story), see below for svn info). As I
 understand [2] I cannot mix freebsd-update and SVN, right?

It could cause trouble. Deciding for _one_ way should be better.



 So I can run svn update in /usr/src whenever I like. But what then? Do
 I need to rebuild the world and my custom kernel every time I run svn
 update (and there are some updates)?

Yes, or better: As soon as it is required. This depends on _what_
has been part of the update. For example, kernel updates _can_
require updates of userland programs or libraries, but it's also
possible that it's not the case. To be sure, rebuild.



 I'm on a low powered consumer
 device and it takes considerable amount of time to build the world and
 kernel (plus I still don't feel comfortable doing such tasks remotely).

In this case, use freebsd-update as explained at the beginning of
my message: Update components world and src, leave out kernel,
the rebuild the kernel by source and install it. Then reboot.



 Is this really the way to do it or am I missing something?

There are _several_ ways to do it. :-)



 There are quite some posts, websites and threads out there (see [3] or
 [4] for example) about this topic but (surprisingly?) I could not (yet)
 find a conclusive answer.

This is because the answer depends on what you actually want to do
(follow RELEASE, STABLE, CURRENT), and how you want to do it (binary,
by source).




-- 
Polytropon
Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org