[Asterisk-bsd] port update recipe using portmanager
Dr. Rich Murphey
Rich at WhiteOakLabs.com
Mon Jan 9 10:30:21 CST 2006
For those that use FreeBSD ports, here's
a recipe for updating ports using portmanager.
First, ensure that portmanager, etc., are installed:
pkg_add -r portmanager fastest_cvsup cvsup-without-gui
Then, add definitions to make.conf to define
how /usr/ports is updated:
cat <<EOF >>/etc/make.conf
SUP_UPDATE=yes
PORTSSUPFILE=/usr/share/examples/cvsup/ports-supfile
SUPHOST=`fastest_cvsup -Q -c US`
SUPFLAGS=-g -L 0
EOF
Note: Change US to your country code if you're not in the US.
Then, update the ports. This can be done on
a daily basis:
cat <<EOF >>/etc/daily.local
cd /usr/ports
make update fetchindex
portmanager -u -y -l
pkgdb --autofix
portsclean -CDD
EOF
However, if this is done on a daily basis, it will fail
to restart services that are updated unless portmanager
is configured specifically to restart them using
something like this.
cat <<EOF >>/usr/local/etc/portmanager/pm-020.conf
STOP|/net/asterisk /usr/local/etc/rc.d/asterisk stop|
START|/net/asterisk /usr/local/etc/rc.d/asterisk start|
EOF
Cheers,
Rich
More information about the Asterisk-BSD
mailing list