unlike some operating systems, FreeBSD has a disciplined group of developers, who make use of a central CVS tree to organize their efforts. this has some major benefits we'll get into later, but knowing that makes some of this other stuff make more sense.

FreeBSD is run by a group of core developers (called, strangely enough, core) who make major decisions. around them there is a larger group of committers (meaning people who have commit access to the CVS tree) who do most of the day to day development. around them is a community of users and developers who test, find bugs, fix bugs, and generally bitch a lot on mailing lists. most of you probably fall into the later category. if you know a little about how the FreeBSD development process works, you'll be much less annoying when you bitch on the mailing lists.

there are several versions of FreeBSD out there in the world at any given time. first, there's the CURRENT branch, which is the bleeding edge unstable version where all the neat development gets done. this is not intended for use by non developers, but if you can handle the instability, it's there. second, there's the various RELEASE versions, which are the versions that get stamped on CD's and sold to the world. RELEASES are basically snapshots of yet another version, the STABLE tree. this might sound complicated, but it's not, you're just dumb. at any point in time there are at least two development branches of FreeBSD (at the moment there is 5.0-CURRENT and 4.1-STABLE). most of the development is done in -CURRENT, and when things have been shown to be relatively stable, they are merged back to -STABLE (often to several -STABLE's if they're security fixes... nowadays both 4.1-STABLE and 3.5.1-STABLE are getting fixes committed to them when possible). this is called an MFC (merge from current, not microsoft foundation classes) and now that you know that you're one step ahead of all the clueless newbies who see MFC in the cvs logs and wonder what it means. from time to time (about every 6 months i believe) -STABLE is frozen, and made as stable as possible and a RELEASE is made from it. this is generally what most people install.

so what's the point of having this STABLE branch if most people only install the RELEASE versions? the point is that since FreeBSD uses CVS, you can use a neat program called cvsup to update your local source to whatever version you want (either STABLE if you're running a production server and just want the latest bugfixes, or CURRENT if you're a developer working on the latest and greatest stuff). the build system is structured such that it's really easy to download the new source, rebuild everything, and reboot with a whole new version of the OS. this process is called doing a make world.

"so how do i do this?" you're asking yourself...

  1. you do this by using cvsup, which is available in the ports tree (see the next section for how to install it. short version, type pkg_add -r cvsup-bin as root).
  2. but before you do that, you go subscribe to the mailing list for the version of FreeBSD you wish to upgrade to (freebsd-stable@freebsd.org or freebsd-current@freebsd.org) so that you can hear all the answers to all the questions you're likely to have about how to fix your system when it stops working because you fucked up the build or didn't follow directions or just cvsuped at a bad time and caught half an update.
  3. then you edit one of the sample supfiles (a supfile is a config file for cvsup) to tell cvsup what version you want to get and where to put it and most importantly where to get it from. (the sample supfiles are in /usr/share/examples/cvsup/)
  4. then you do something like cvsup my-supfile to download the source.
  5. then you read /usr/src/UPDATING and find out what problems you're likely to run into.
  6. then you go to /usr/src and type, as root make buildworld.
  7. then you go get a cup of $CAFFINATED_BEVERAGE_OF_CHOICE because this will take a while.
  8. now you need to build a new kernel to go with your new world. you can't do this the normal way though, because the new kernel sources might depend on changes to the c compiler that only exist in the version you just downloaded. so you type make buildkernel KERNEL=KERNELNAEM where KERNELNAEM is the name of your kernel config file (hah, you thought i misspelled it, but it doesn't matter if i misspelled it, as long as it's consistent ;-P ).
  9. then type make installkernel KERNEL=KERNELNAEM to install your new kernel and modules.
  10. now you go to single user mode (strictly this isn't necessary, but it's a good idea) by typing reboot and then boot -s at the boot prompt.
  11. then you do a make installworld to install all the stuff you just compiled.
  12. now, you run a program called mergemaster which will help you merge the necessary changes into the /etc directory, so your system will be able to work correctly.
  13. then you reboot again.

more info on rebuilding the world from source is available in, you guessed it, the FreeBSD handbook