Updating FreeBSD 5.3 with CVSup and portupgrade


CVSup is a tool that updates your ports tree from the FreeBSD mirrors so that you don't have to. Then you'll use the portupgrade package's commands to collect and install any updates to the packages installed on your system.

Installing CVSup and portupgrade

CVSup and portupgrade are part of the ports collection, so we'll need to build and install them (Code Listing C.1) before we can update our system.

Code listing C.1. Installing CVSup and portupgrade

[View full width]

 bsd# cd /usr/ports/net/cvsup-without-gui bsd# make install clean ===>  Vulnerability check disabled, database not found >> cvsup-snap-16.1h.tar.gz doesn't seem to exist in /usr/ports/distfiles/. >> Attempting to fetch from ftp://ftp.FreeBSD.org/pub/FreeBSD/development/CVSup/snapshots/. . . . bsd# /usr/local/bin/cvsup -g -L 2 -h cvsup.freebsd.org /usr/share/examples/cvsup/ports-supfile Parsing supfile "/usr/share/examples/cvsup/ports-supfile" Connecting to cvsup.freebsd.org Connected to cvsup.freebsd.org Server software version: SNAP_16_1e Negotiating file attribute support Exchanging collection information Establishing multiplexed-mode data connection Running Updating collection ports-all/cvs  Edit ports/INDEX-5   Add delta 1.21 2004.10.14.22.17.33 Kris . . . bsd# cd /usr/ports/sysutils/portupgrade bsd# make install clean ===>  Vulnerability check disabled, database not found >> pkgtools-20040701.tar.bz2 doesn't seem to exist in /usr/ports/distfiles/. >> Attempting to fetch from ftp://ftp.iDaemons.org/pub/distfiles/. . . . bsd# /usr/local/sbin/portsdb -Uu Updating the ports index ... Generating INDEX.tmp - please wait... Done. Done [Updating the portsdb <format:bdb1_btree> in /usr/ports ... - 11846 port entries found ... ......1000.........2000.........3000.........4000.........5000.........6000.........7000... ......8000.........9000.........10000.........11000........ ..... done] 

To build and install CVSup and portupgrade:

1.

cd /usr/ports/net/cvsup-without-gui

This is the directory in the ports tree where CVSup resides. You can use /usr/ports/net/cvsup if you want to build a version with a GUI.

2.

make install clean

Download the CVSup source code and any dependencies, compile it, install it, and then clean up.

3.



 cvsup -g -L 2 -h cvsup.freebsd.org /usr/share/examples/cvsup /ports-supfile 

This synchronizes your ports collection with the versions found on the FreeBSD mirrors. Depending on your connection speed, this could take a while.

If http://cvsup.freebsd.org is busy, pick a local mirror from the list of CVSup servers at www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/cvsup.html#CVSUP-MIRRORS.

4.

cd /usr/ports/sysutils/portupgrade

Next, change to the portupgrade directory in the ports tree.

5.

make install clean

Download the portupgrade code and any dependencies, compile it, install it, and then clean up.

6.

/usr/local/sbin/portsdb -Uu

Update the local ports database. Depending on your CPU and disk speed, this could take a long time. Be patient.

Using CVSup

After CVSup and portupgrade have been installed, you can use them to update the packages installed on your system (Code Listing C.2).

Code listing C.2. Updating the installed packages in the system.

[View full width]

 bsd# /usr/local/bin/cvsup -g -L 2 -h cvsup.freebsd.org /usr/share/examples/cvsup/ports-supfile Parsing supfile "/usr/share/examples/cvsup/ports-supfile" Connecting to cvsup.freebsd.org Connected to cvsup.freebsd.org Server software version: SNAP_16_1e Negotiating file attribute support Exchanging collection information Establishing multiplexed-mode data connection Running Updating collection ports-all/cvs  Edit ports/INDEX-5   Add delta 1.21 2004.10.14.22.17.33 Kris . . . bsd# /usr/local/sbin/portsdb Uu Updating the ports index ... Generating INDEX.tmp - please wait... Done. Done [Updating the portsdb <format:bdb1_btree> in /usr/ports ... - 11846 port entries found ... ......1000.........2000.........3000.........4000.........5000.........6000.........7000... ......8000.........9000.........10000.........11000........ ..... done] bsd# /usr/local/sbin/portversion -l "<" [Rebuilding the pkgdb <format:bdb1_btree> in /var/db/pkg ... - 22 packages found (-0 +22) ...................... done] libtool                     < bsd# /usr/local/sbin/portupgrade arR ->  Upgrading 'libtool-1.5.8' to 'libtool-1.5.10' (devel/libtool15) ->  Building '/usr/ports/devel/libtool15' ===>  Cleaning for libtool-1.5.10 ===>  Vulnerability check disabled, database not found >> libtool-1.5.10.tar.gz doesn't seem to exist in /usr/ports/distfiles/. >> Attempting to fetch from http://ftp.gnu.org/gnu/libtool/. 

To update installed packages with CVSup and portupgrade:

1.



 /usr/local/bin/cvsup -g -L 2 -h cvsup2.freebsd.org /usr/share /examples/cvsup/ports-supfile 

Synchronize your local ports collection with the FreeBSD mirrors.

2.

/usr/local/sbin/portsdb -Uu

Update your ports database. Note that this step can take a long time to complete.

3.

/usr/local/sbin/portversion -l "<"

List the installed ports that need to be updated.

4.

/usr/local/sbin/portupgrade -arR

Finally, update the installed ports.

That's all there is to it! Your FreeBSD system is now up-to-date.



    Unix Advanced. Visual QuickPro Guide
    Unix Advanced: Visual QuickPro Guide
    ISBN: 0321205499
    EAN: 2147483647
    Year: 2003
    Pages: 116

    flylib.com © 2008-2017.
    If you may any questions please contact us: flylib@qtcs.net