Updating a stable NetBSD release


Updating the sources (top)

If you are running a stable NetBSD release (such as NetBSD 2.0 ), in a production environment, you should occasionally update your sources and rebuild the system or the kernel, in order to incorporate any security fixes that have been applied to the branch since its release.

You can retrieve or update the sources for your release using anoncvs over ssh by specifying the correct branch tag. For example, to checkout the sources for the NetBSD 2.0 release, you could use:

  $ cd /usr
  $ env CVS_RSH=ssh cvs -d anoncvs@anoncvs.NetBSD.org:/cvsroot co -r netbsd-2-0 -P src

Note

Be sure to take care in selecting the correct and desired branch tag so you don't accidently downgrade your source tree.

To update an existing source tree:

$ cd /usr/src $ env CVS_RSH=ssh cvs update -dP

Building a new kernel (top)

Building a new kernel pretty much follows the steps as described in this document , but please note the differences in the syntax of the build.sh script. build.sh has changed significantly between NetBSD 1.6 and -current; if you are not using -current, you can not use build.sh to build the new kernel!

Updating the userland (top)

Please always refer to build.sh -h and the files UPDATING and BUILDING for details -- it's worth it, there are many options that can be set on the command line or in /etc/mk.conf . In the end, it all boils down to a single command: build.sh -d .

Note that this will update the entire userland!

Updating only parts of the source tree (top)

If a security advisory has been issued, and you want to just rebuild the necessary libraries and applications, your best bet is to follow the instructions provided in the advisory. An example is given below:

  $ cd src
  $ env CVS_RSH=ssh cvs update -d -P -r netbsd-1-6 gnu/dist/sendmail/sendmail
  $ cd gnu/usr.sbin/sendmail
  $ make USETOOLS=no cleandir dependall
  $ su
  # make USETOOLS=no install

Terse summary (top)

Tracking -current (top)

See this document for our documentation on how to track -current.

(contact us)   Generated from %NetBSD: updating.xml,v 1.5 2005/11/05 07:55:19 reed Exp %
Copyright © 1994-2006 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.
NetBSD® is a registered trademark of The NetBSD Foundation, Inc.