Catalyst

adventures in webdev with perl

install on freebsd

OK, this is an easy one. The secret is either to start from scratch or to keep your ports up to date.

Starting from scratch

This means install a fresh FreeBSD system. With ports mind you. And after that install net/cvsup or net/cvsup-without-gui. An optional step is to update your system. Just install sysutils/sysupdate, read the instructions and run sysupdate.sh. Sysupdate will also update your ports tree so you can skip the next step but you might want to check it out for keeping your ports updated after that.

Keeping your ports up to date

This is definitely a good idea, even if you start from scratch. I use a little shell script which looks like this:

#!/bin/sh
cd /usr/ports
cvsup -g -z -L 2 ~/make/ports-supfile -h cvsup${1:-3}.freebsd.org && make fetchindex && pkg_version -l '<' | awk '{print $1}' > ~/pkg.upg.list

The ~/make/ports-supfile file is just a copy of /usr/share/examples/cvsup/ports-supfile edited to replace CHANGE_THIS with my favorite cvsup server.

By default it updates your ports tree from cvsup3.freebsd.org, but you can give it another number or a TLD (ex. .de or .ca) to switch to another server.

The script creates a file pkg.upg.list which contains the names ofall the ports that need updating. Before updating any you should also check /usr/ports/UPDATING to see if there are any gotchas or special update procedures for these ports.

Making your life easier

Another useful tool is sysutils/portupgrade. It takes care of everything you need in upgrading a port. Except on special occasions when it just fails. Usually when there's cruft around (i.e. older ports) or when two ports get merged into one (happened recently). Shit happens (not as often as advertise though).

Just install the damn thing already

OK, here we go:

 portinstall www/p5-Task-Catalyst

Grab a beer or a tea and watch a movie. It will take some time (especially if you start from scratch). This will get the following Catalyst ports installed (along with their dependencies):

p5-Catalyst
p5-Params-Validate
p5-Catalyst-Log-Log4perl
p5-Date-Calc
p5-Catalyst-Plugin-HTML-Widget
p5-Catalyst-Plugin-StackTrace
p5-Catalyst-Plugin-Prototype
p5-Catalyst-Plugin-Singleton
p5-Catalyst-Plugin-DefaultEnd
p5-Catalyst-Plugin-SubRequest
p5-Catalyst-Plugin-Session
p5-Catalyst-Plugin-Session-Store-File
p5-Catalyst-Plugin-Session-State-Cookie
p5-Catalyst-Plugin-Session-State-URI
p5-Catalyst-Plugin-Authentication
p5-Catalyst-Plugin-Authentication-Store-DBIC
p5-Catalyst-Plugin-Authentication-Store-Htpasswd
p5-Catalyst-Plugin-Authorization-ACL
p5-Catalyst-Plugin-Authorization-Roles
p5-Catalyst-Plugin-I18N
p5-XML-Parser
p5-Catalyst-Plugin-XMLRPC
p5-Catalyst-Plugin-Pluggable
p5-Catalyst-Model-DBIC-Schema
p5-Catalyst-View-TT
p5-Test-WWW-Mechanize-Catalyst
p5-DBD-SQLite

There are others and they all match in /usr/ports/www/p5-Catalyst-*, so to see them all:

ls -d /usr/ports/www/p5-Catalyst-*

Currently that makes 51 ports of which p5-Task-Catalyst installs 22 (this is of 01 May 2006) so there's plentymore to choose from. Enjoy!