Updating the system

There are two ways to retrieve the source code and ports collection of OpenBSD. One is with CVS and one is with CVSup. The latter is preferred by me and described on its own page. The CVS way follows below.
PS: this page will be restructured soon.

Introduction

With OpenBSD updating the kernel, the system utilities or the ports collection is a rather simple and straightforward process. All sources of the above mentioned pieces that make up the OpenBSD operating system are stored in CVS.

CVS is a system that allows for Concurrent Versions Control for one or more software projects. It allows the people of the OpenBSD project to work on the same set of sources.

For you, the end-user of OpenBSD it is handy too. It allows you to retrieve via a simple CVS command to retrieve the latest set of patches from a certain branch of OpenBSD.

Here, we’ll concentrate on updating the stable branch of the OpenBSD 3.4 kernel and system utilities.

Getting the sources

First, we need to lay our hands on the system sources. There are roughly three places to get them:

  1. One of the two of your OpenBSD CDs if you have those
  2. A FTP mirror containing a OpenBSD tree
  3. From a OpenBSD CVS server

I myself prefer method two, for it’s faster than downloading it from CVS and I don’t have the official CDs. On one of the many mirrors you should cd your way into the subtree of the OpenBSD version you’re interested in and download the following three files:

  1. ports.tar.gz
  2. src.tar.gz
  3. srcsys.tar.gz

Create a directory called src in /usr if it doens’t exists. cd to /usr/src and extract the filessrc.tar.gz and srcsys.tar.gz in that directory.
cd to /usr and extract ports.tar.gz.

# cd /usr/src
# tar xfz ~alex/download/src.tar.gz
# tar xfz ~alex/download/srcsys.tar.gz
# cd ..
# tar xfz ~alex/download/ports.tar.gz

Updating the sources

Now, we’ll try to contact a friendly CVS server and try to squeeze some updates and/or patches out of it.

First, set these environment variables:

export CVS_RSH="/usr/bin/ssh"
export CVSROOT="anoncvs@anoncvs.se.openbsd.org:/cvs"
export CVS_IGNORE_REMOTE_ROOT="1"

Then change your working directory to /usr/src and update the source tree by issueing this command:

cvs -d $CVSROOT -q update -rOPENBSD_3_4 -Pd

Recompiling the kernel

See Configuring the kernel for this.

Recompiling the software in the base system

su to root and change directory to /usr/src/dir/toolname

# cd /usr/src
# cd libexec/telnetd
# make obj
# make depend
# make
# make install

Recompiling software in the ports collection

Coming soon..

One Response - Add Yours+

  1. [...] file and disable it by putting a hash-sign (#) in front of that line. See the section updating for more information on recompiling your [...]