DaemonForums  

Go Back   DaemonForums > OpenBSD > OpenBSD Installation and Upgrading

OpenBSD Installation and Upgrading Installing and upgrading OpenBSD.

Reply
 
Thread Tools Display Modes
  #1   (View Single Post)  
Old 19th May 2009
Greg_Morgan Greg_Morgan is offline
Port Guard
 
Join Date: May 2009
Posts: 13
Default Following Stable. Why uname does NOT show patch #6.

Hi.

I am a newbie. I installed OpenBSD 4.5 release on a laptop. I want my installation to have the latest patches. So I downloaded the latest sources (from the stable branch) and compiled the kernel. When I rebooted the machine, I expected the uname -v to tell that I have patch six. (ie. GENERIC#6). However, I did not get this. I got GENERIC#0.

The first line of dmesg says:
OpenBSD 4.5-stable (GENERIC) #0: Fri May 15 15:34:00 CDT 2009

Please tell me as to what I am doing wrong.

This is the script I use:

#! /bin/ksh

#Step #1: Get the source code.

# Get the complete source code
cd /usr
export CVSROOT=anoncvs@obsd.cec.mtu.edu:/cvs
cvs -d$CVSROOT checkout -rOPENBSD_4_5 -P src ports xenocara

# Get the updates to kernel.
cd /usr/src
export CVSROOT=anoncvs@obsd.cec.mtu.edu:/cvs
cvs -d$CVSROOT up -rOPENBSD_4_5 -Pd

# Get the updates to ports.
cd /usr/ports
export CVSROOT=anoncvs@obsd.cec.mtu.edu:/cvs
cvs -d$CVSROOT up -rOPENBSD_4_5 -Pd

# Get the updates to x-window system(aka xenocara)
cd /usr/xenocara
export CVSROOT=anoncvs@obsd.cec.mtu.edu:/cvs
cvs -d$CVSROOT up -rOPENBSD_4_5 -Pd
#----------------------------------------------------------------------------

# Step #2: Build the kernel.

cd /usr/src/sys/arch/`machine`/conf
/usr/sbin/config GENERIC
cd /usr/src/sys/arch/`machine`/compile/GENERIC
make clean && make depend && make
make install

touch new_kernel_available.000
reboot


NB:
Once I have this squared away, I plan to comment out the checkout lines and just retain update.
I have a companion script, that is run at boot up time. That script, will test the presence of a file "new_kernel_available.000". If one is present, it will re-compile the userland objects, else it will not. If userland is compiled successfully, my script will delete my flag file "new_kernel_avilable.000", so that subsequent reboots, do not force user land re-compile.

In the above script, please tell me where am i going wrong? Why do I not get the latest patches?

Thanks.
Sincerely,
Greg Morgan.
Reply With Quote
  #2   (View Single Post)  
Old 19th May 2009
BSDfan666 BSDfan666 is offline
Real Name: N/A, this is the interweb.
Banned
 
Join Date: Apr 2008
Location: Ontario, Canada
Posts: 2,223
Default

That number simply indicates how many times you've recompiled the kernel, if you have recompiled it each time a kernel errata was released... the number would have increased, presuming you never removed the GENERIC folder in the compile directory.

There have only been 3 kernel patches, 2 user land patches.. that's 5 errata entries.

From the looks of it, you're following -STABLE.. and exporting it from the CVS tree.. all the patches on the errata page are in that branch first, some minor things sometimes don't make it that far.
Reply With Quote
  #3   (View Single Post)  
Old 19th May 2009
ocicat ocicat is offline
Administrator
 
Join Date: Apr 2008
Posts: 3,318
Default

Quote:
Originally Posted by Greg_Morgan View Post
This is the script I use:

#! /bin/ksh

#Step #1: Get the source code.

# Get the complete source code
cd /usr
export CVSROOT=anoncvs@obsd.cec.mtu.edu:/cvs
cvs -d$CVSROOT checkout -rOPENBSD_4_5 -P src ports xenocara
...
While I can understand that the building the system appears tedious, it is best done manually. The above script will work fine assuming that /usr/src/, /usr/xenocara, & /usr/ports are empty. The problem is when you attempt to update the various components the second, third, etc. times. Instead of doing a CVS checkout, you should be doing a CVS update. You should review the information found in Section 5.3.3 & 5.3.4 of the FAQ which covers this process:

http://openbsd.org/faq/faq5.html#BldKernel

...but I highly recommend you rethink whether the decision to automate this process is really what you want to do.
Reply With Quote
  #4   (View Single Post)  
Old 20th May 2009
Greg_Morgan Greg_Morgan is offline
Port Guard
 
Join Date: May 2009
Posts: 13
Default

BSDfan666:
In my earlier post, I made a typo. I said GENERIC#6, when I wanted to say GENERIC#5.

I was misled by the uname -v value I saw. I thought that the system/engine could detect that I have all the patches and show it in the messages.

From your reply, I infer that I can rest assured that I have the latest patches and that I need to ignore the recompile no. shown.

Thanks for taking the time to clear my misunderstanding.

Thanks.






ocicat:
Thanks for taking the time to reply to my post.

As stated in my earlier post, I plan to comment out the line that has CVS checkout and use update only.

Thanks for telling a newbie about the suggested best practices. I appreciate the gesture.

Regards,
Greg Morgan.
Reply With Quote
  #5   (View Single Post)  
Old 20th May 2009
ocicat ocicat is offline
Administrator
 
Join Date: Apr 2008
Posts: 3,318
Default

Quote:
Originally Posted by Greg_Morgan View Post
...I infer that I can rest assured that I have the latest patches and that I need to ignore the recompile no. shown.
To be clear, if you have diligently followed the errata page:

http://openbsd.org/errata45.html

...& you have downloaded the source tree after the date of the last patch & recompiled the portions indicated in the errata, then you can say that all preceding patches have been applied. What file version is pointed to by the CVS tag OPENBSD_4_5 will change as changes are checked into this branch.

As an example, given that you have recompiled the kernel you have some familiarity with the GENERIC configuration file. If you look at the Web page showing the CVS history for this file:

http://www.openbsd.org/cgi-bin/cvswe...6/conf/GENERIC

You will see that version 1.651 (at the time of this posting...) has both tags OPENBSD_4_5 & OPENBSD_4_5_BASE. The OPENBSD_4_5_BASE tag indicates the file versions of what became OpenBSD 4.5-release, & after tagging has occurred, no new files are ever checked into this branch. If for some reason, a patch for OpenBSD 4.5-release (or -stable) ever needs to modify GENERIC, it will be checked into the OPENBSD_4_5 branch, & the tag will point to this new version as opposed to 1.651.

Also, because OPENBSD_4_5_BASE & OPENBSD_4_5 both point to the same file version of GENERIC, one can conclude that there have been no changes to the default kernel configuration during the life of OpenBSD 4.5 thus far.
Reply With Quote
Reply

Tags
open bsd 4.5, patch, stable branch

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Uname still reports 7.0 release maxrussell FreeBSD Installation and Upgrading 6 4th May 2009 12:49 PM
namp show me a 1720 open port ?? killa74 OpenBSD Security 11 11th February 2009 02:55 PM
mplayer do not show subtitle mfaridi OpenBSD Packages and Ports 3 12th November 2008 05:41 AM
Why does smartctl show my temperature threshold is 0? PeterSteele FreeBSD General 0 25th August 2008 03:33 PM
howto change 'uname -a' after base system U/G fallen FreeBSD Installation and Upgrading 8 16th July 2008 01:24 AM


All times are GMT. The time now is 07:18 AM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Content copyright © 2007-2010, the authors
Daemon image copyright ©1988, Marshall Kirk McKusick