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

Kernel_Killer
December 9th, 2007, 16:08
Excellent! Cvsup has always been an issue, and quite annoying. I think I'll delete it now, and change to portsnap. ;)

EDIT: Ok, I won't delete cvsup, unless you have a solution for the src as well. :)

bmw
December 9th, 2007, 17:14
Sadly KK, no I haven't got a better sol'n than CVSup for keeping /usr/src up-to-date. So yeah, you may need to keep CVSup. But many (most?) FreeBSD installs only need a ports tree, so for those this is a godsend.

BTW, I've always considered portupgrade and its rather fragile dependency db to be the source of way more annoyances than CVSup. The biggest problem with CVSup is in switching source servers. I stopped using the fastest_cvsup utility in my cron script because of that.

Strog
December 9th, 2007, 18:28
I tend to find a good source server and stick with it. There seems to be less issues that way in case everyone isn't 100% in sync all the time. I'm cron'ing the job anyway so it's not a big deal if it's not always the fastest.

silverback011
December 21st, 2007, 12:26
You can update your source using csup. It is part of the base system in 6.2. I have used it to sync my source and it worked fine for me. I like to use built in tools.

bmw
December 21st, 2007, 12:49
csup! Thanks silverback011, I had heard of csup -- I think back when it was announced -- and completely forgotten about it. Good pointer.

Man page says: "It is a rewrite of the CVSup software in C", and "In most cases, csup can use existing sup supfiles". So that's excellent news.

No reason to use CVSup anymore. I guess that about wraps it up for Modula3. :)