Ports Update

Following procedure is used by me to setup and update FreeBSD ports.

Basic steps:

  1. Install cvsup-without-gui via port
    # cd /usr/ports/net/cvsup-without-gui
    # make install clean
    or package
    # pkg_add -r cvsup-without-gui
  2. Create /etc/make.conf file or just copy one which is used by me: make.conf

    You would also need stable-supfile and ports-supfile files
    to be copied to /root/update/ directory
    # cd /root
    # mkdir update
    # cp path_to_the_directory/stable-supfile update
    # cp path_to_the_directory/ports-supfile update

  3. Update ports:
    # cd /usr/ports
    # make update
  4. Now you have updated ports tree.
    Next steps will update installed ports or packages.
    First you need to install portupgrade
    # cd /usr/ports/sysutils/portupgrade
    # make install clean
  5. Update ports database
    # pkgdb -F
  6. You can check ports to be upgraded with command
    pkg_version -v |grep -v up-to-date |less
    Update installed ports or packages
    # portupgrade -a
  7. Now your installed ports are updated.
    If something went wrong repeat steps 3-6.
    For more info see man portupgrade.

Some notes:

  • You need to have ports tree installed on your system.
  • Your actual make.conf file could be very different from the one provided by me.
  • Main point is that this make.conf has a reference to the ports-supfile which is used by cvsup for to update the ports.
  • You can put supfiles wherever you like or alternatively you can modify these which come with the system, just update the reference in your make.conf.
  • Set cvsup server name in the supfiles and the make.conf to the one which is closer to your current location.
  • In make.conf set value of
    KERNCONF=OSBORNE
    to the actual name of the kernel file on your system.
    It is needed for to update base system.
  • Use fastest_cvsup for to detect the one:
    # cd /usr/ports/sysutils/fastest_cvsup
    # make install clean
  • stable-supfile is needed if you are going to update the base system.
  • portupgrade could be used for to install a new port. For example:
    # portinstall nedit
  • I have some command aliased in my .cshrc. You can use it as a reference for this subject.
  • For advanced setup tricks see Configuration and Gnome Install.

References: