[olug] CVS: cvsup on FreeBSD

Sean Kelly smkelly at zombie.org
Mon Sep 15 15:19:48 UTC 2003


On Mon, Sep 15, 2003 at 07:49:11AM -0500, neal rauhauser wrote:
>   The BSD world keeps the kernel source and much of the OS itself in
> /usr/src.

Actually, all of FreeBSD sans the ports collection resides under /usr/src.
/usr/src is commonly referred to as "the world" or "the system."

> If you want to update you load the cvsup utility, either by
> using /stand/sysinstall and installing the binary package, or by
> changing to /usr/ports/net/cvsup-without-gui and compiling/installing.

You can also update your source tree in a few other methods:
* CVS (not CVSup) - This is how I do it. I actually keep a local mirror of
  the entire FreeBSD repository, but that isn't necessary to use CVS.
* CVSup - As you described it. This is a nicer interface to CVS which has
  the advantages of rsync.
* CTM - Patches are e-mailed to you and a script automatically applies them
  every night.

For more information on these, see the FreeBSD Handbook:
http://www.FreeBSD.org/doc/en_US.ISO8859-1/books/handbook/synching.html

...
>   Sounds complex? An upgrade to the current patches in a given version
> requires just these commands:
> 
> cvsup -g -L 2 <config file>
> cd /usr/src
> make buildworld
> make installworld
> cd /usr/src/sys/compile/<machine's kernel directory>
> make depend
> make
> make install
> shutdown -r now

This is no longer the approved and suggested method to update one's kernel
and world. I don't think it has been since the beginning of FreeBSD 4.x.
The proper way is listed in /usr/src/UPDATING, which should be read every
time you update your source tree. That method is:

        make buildworld
        make buildkernel KERNCONF=YOUR_KERNEL_HERE
        make installkernel KERNCONF=YOUR_KERNEL_HERE
        reboot  (in single user)
        make installworld
        mergemaster
        reboot

Or, if you are like me and don't bother with singleuser mode since you are
a desktop system and you've put the KERNCONF= line in /etc/make.conf, just
do:

   make buildworld
   make buildkernel
   make installkernel
   make installworld
   mergemaster
   reboot

...
>   There is a good article here http://www.onlamp.com/lpt/a/4111 about
> something called portupgrade - an automagic method for finding installed
> ports and updating them. I just discovered it so I'm not yet a wizard
> with it, but it seems very promising - the binary package management on
> FBSD will be as smooth as the OS upgrade path already is :-)

There was supposedly talk about the Binary Update system at BSDCon '03 over
the weekend during the Security BoF. However, I didn't attend BSDCon so I
don't really know anything about it. However, portupgrade rules.

-- 
Sean Kelly         | PGP KeyID: D2E5E296
smkelly at zombie.org | http://www.zombie.org


More information about the OLUG mailing list