left header graphic The Network People
Solutions for Hosting Providers
right header graphic

update config files home : internet : mail : toaster : upgrade : upgrade FreeBSD portupgrade

Upgrade FreeBSD.

The best advise you can get is to follow the excellent docs at http://www.freebsd.org/handbook/ Follow the directions for updating your system from sources using CVS. A few things to help you along are:

  • toaster_setup.pl -s sources
  • toaster_setup.pl -s ports

That'll update your FreeBSD sources and ports tree with the latest versions. Then you'll want to upgrade your FreeBSD. I do it this way:

  • cd /usr/src
  • make buildworld
  • make kernel
  • reboot
  • cd /usr/src
  • make installworld
  • mergemaster
  • reboot

The process will vary based on the version of FreeBSD you are upgrading from and to. The above assumes that I've also configured /etc/make.conf. It's ALWAYS best to read the docs first, including /usr/src/UPDATING. Failure to do so can be quite difficult to recover from. If you are upgrading from FreeBSD 4.x to 5.x, be sure to read all the documentation and follow it carefully.

Upgrade your installed ports

After upgrading the OS, you'll want to upgrade all the installed ports with the latest version. If you don't think it's necessary, install portaudit and run it. The results ought to scare you into getting your installed ports up to date. I do so like this:

  • toaster_setup.pl -s ports

This step installs /etc/cvsup-ports (if it doesn't exist), finds the fastest FreeBSD CVSUP server in your country, and then connects to it and brings your ports tree up-to-date.

  • pkgdb -F

Run this command until you've fixed all the problems found. If ports are missing, install them. If duplicates are detected, remove the oldest ones. Once pkgdb -F runs without complaints, you can use portupgrade to upgrade your installed ports. Be sure to read the portupgrade notes.

  • portupgrade -ai

Be very careful when upgrading ports that are manually installed by the toaster, such as qmail, ucspi, etc. You have been warned. If you let portupgrade reinstall qmail and your settings get wiped out, you have yourself to blame.

To make the portupgrade process much less likely to blow up on you, a customized pkgtools.conf file is included in the contrib directory of Mail::Toaster. Install or merge it's contents into /usr/local/etc/pkgtools.conf and that will instruct portupgrade to do The Right Stuff when it upgrades certain ports.

Finally, it's always a good idea to read /usr/ports/UPDATING before running portupgrade. The ports team is very good about documenting changes that affect a given port. If you read this file before breaking your Mail::Toaster with portupgrade, you'll have a pretty good idea why something behaves differently after the upgrade, and a better idea of how you can fix it.


sub-sections
portupgrade

Last modified on 4/9/05.


web this site