[wplug-bsd] How do you update ports.

Brian Roberts brian at shot1.org
Fri Apr 9 11:11:19 EDT 2004


The other thread got me thinking.   I've been using a pretty straight 
forward and clumsy script to update my ports and get a report of what is 
up to date.   I'm just wondering if anyone has any suggestions on 
cleaning it up and/or letting me know how others run the process.

This runs on a handful of 5.2 boxes soon to be 5.2.1

#!/bin/sh
/usr/local/bin/cvsup -g -L 2 /etc/cvsupfile
/usr/local/sbin/pkgdb -aF
/usr/local/sbin/portsdb -Uu
/usr/local/sbin/portsclean -C
/usr/local/sbin/pkgdb -fu
echo "NEEDS UPDATING"
/usr/sbin/pkg_version -v | /usr/bin/grep "<"


Basically cron runs it and sends an email with the following.

1) sync ports and source if needed (I usually turn the verbose down for 
the email)
2) Update the package database for portupgrade and auto fix any problems 
it finds
3) Update the Ports database and /usr/ports INDEX file
4) Clean up any trash including the work directories in /usr/ports
5) Update the database with the new INDEX regardless of timestamps
6)Generate a list of all ports installed on they box that are not up to 
date


I'm also wondering how people handle multiple servers,  do you share 
/usr/src, /usr/obj, and /usr/ports via NFS?    Do you make ports on one 
box install them on others?   Is there an easy way to utilize a more 
powerful box for compile and package up the end result to move it to a 
slower system?


Thanks in advance,
Brian




More information about the wplug-bsd mailing list