bmw
December 9th, 2007, 15:37
This is just a recommendation to anyone setting-up a new FreeBSD box about the fastest and lightest way to install and upgrade ports and maintain the ports tree.
In the past I have used CVSup to sync the ports tree and portupgrade to install and maintain ports. Trouble is (a) neither is native (b) they both require huge and unwieldy languages (Modula3 and Ruby) which themselves need fairly frequent upgrading. Also, portupgrade seems to mess its own database up all the time and complain about random things that I have trouble repairing.
My new favourite mechanism: portsnap and portmaster. portsnap syncs the ports tree very fast and is built-in to FreeBSD since 6.0. portmaster is a port, but it's a simple shell script and has no dependencies at all.
In a nutshell, to get your ports tree sync'ed, run this once:
# portsnap fetch extract
Then when you need the ports tree updated, run:
# portsnap fetch update
See the manpage if you want to run it from cron.
To install a new port, run something like this:
# portmaster /usr/ports/net/samba3
To list any ports that may need upgrading ...
# portmaster -na
BTW: if you're new to ports, to install portmaster ...
# cd /usr/ports/ports-mgmt/portmaster
# make install clean
In the past I have used CVSup to sync the ports tree and portupgrade to install and maintain ports. Trouble is (a) neither is native (b) they both require huge and unwieldy languages (Modula3 and Ruby) which themselves need fairly frequent upgrading. Also, portupgrade seems to mess its own database up all the time and complain about random things that I have trouble repairing.
My new favourite mechanism: portsnap and portmaster. portsnap syncs the ports tree very fast and is built-in to FreeBSD since 6.0. portmaster is a port, but it's a simple shell script and has no dependencies at all.
In a nutshell, to get your ports tree sync'ed, run this once:
# portsnap fetch extract
Then when you need the ports tree updated, run:
# portsnap fetch update
See the manpage if you want to run it from cron.
To install a new port, run something like this:
# portmaster /usr/ports/net/samba3
To list any ports that may need upgrading ...
# portmaster -na
BTW: if you're new to ports, to install portmaster ...
# cd /usr/ports/ports-mgmt/portmaster
# make install clean