pavement

Updating the source tree

From FreeBSDwiki
(Difference between revisions)
Jump to: navigation, search
(References: reference about csup is in csup article. It was used for general information about the program, and where this information was introduced.)
m (ctm)
Line 39: Line 39:
  
 
== ctm ==
 
== ctm ==
Ctm is another way to update source files. It appears that this method has security issues. Please see the FreeBSD Handbook (Appendix A), and ctm's man page for details.
+
[[Ctm]] is another way to update source files. It appears that this method has security issues. Please see the FreeBSD Handbook (Appendix A), and ctm's man page for more details.
  
 
== It's updated. Now what? ==
 
== It's updated. Now what? ==

Revision as of 13:43, 18 December 2014

When updating your FreeBSD system, you'll first want to sync your sources to the live sources offered via cvs. csup, available in recent base systems, can update your other ports and source trees. If you hail from a Windows environment, you may think of keeping your sources updated as about the first half of the FreeBSD procedure which corresponds to Windows Update. There are two major systems that most users will want to keep up to date, the source tree (described here), and the ports tree (described in Updating the ports tree).

The source tree is the actual code for the kernel and the fundamental system programs (collectively known as the 'world') for the FreeBSD operating system.

Contents

cvs

Considering that csup comes with the base system in recent releases, installing cvsup is unnecessary for updating the source tree (or ports). Csup uses the same supfile configuration as cvsup, and many of the commands for cvsup also apply to csup.

You can optionally install cvsup or cvsup-without-gui as described in Ports,_Installing. The cvsup program is the same as cvsup-without-gui if you do not have the X system installed, but many people prefer the non-gui version, as the cvsup version defaults to working in an X11 window (overridden with the -g flag).

Selecting your source tree

If you intend to update to a newer version of FreeBSD, you need to select a cvs tag as described in FreeBSD Release Branches.

So it's installed already, how do I update the source tree?

Configuring your supfile

Assuming you have a copy of cvsup installed, you should have a file named standard-supfile or something similer in /usr/share/examples/cvsup. Copy it somewhere else, such as into /root, and open the copy with a text editor. The following is the file that I use:

*default host=cvsup4.jp.FreeBSD.org   pick a nearby server from [1]
*default base=/var/db
*default prefix=/usr                  source will be placed in /usr/src
*default release=cvs tag=RELENG_6     Replace RELENG_6 with your cvsup tag
*default delete use-rel-suffix
*default compress
src-all

This is basically a default supfile, with the host and release cvstag changed.

Save and close this file

Updating your source using the file

Assuming you have the supfile in your root directory named standard-supfile, run as root:

cd /root
cvsup standard-supfile

or

cd /root
cvsup -g standard-supfile

The first time you run this command, it will probably take a significant amount of time. It will go out to the server you picked in the supfile, and attempt to update all of the source code needed to update FreeBSD to whatever version you have picked. Handbook references for gobs of details: Other methods of getting source, Details and optional flags to cvsup.

In a perfect world, that will always work. The only times when it wont are when you don't have connectivity or the server that you're cvsup-ing against is not allowing connections. The -g switch just makes sure that the GUI stuff in the regular CVSup program doesn't run, which many users prefer.

ctm

Ctm is another way to update source files. It appears that this method has security issues. Please see the FreeBSD Handbook (Appendix A), and ctm's man page for more details.

It's updated. Now what?

Well... since you ended up here in the first place... I'm guessing you either came from Upgrading_the_base_system, Custom Kernel or Updating the system. Usually you update the source to do one of the first two.

Personal tools