How to easy CVS update your SRC and Ports tree with a simple Bash script (v2)
This is an update to this post: How to easy CVS update your SRC and Ports tree with a simple Bash script
I adjusted the script to use the local csup version of the FreeBSD World system and moved the cvsup files to /etc.
First install a simple tool to get the fastest cvs server
pkg_add -r fastest_cvsup
Or from Ports (if you have the collection already):
cd /usr/ports/sysutils/fastest_cvsup/ make install clean
Setup config and binary to easy update the repository for SRC and PORTS.
mkdir /etc/cvsup cd /usr/share/examples/cvsup cp stable-supfile /etc/cvsup cp ports-supfile /etc/cvsup cp doc-supfile /etc/cvsup cd /etc/cvsup
Edit stable-supfile and change:
*default release=cvs tag=RELENG_8_2
Set this to your release version.
Edit /usr/local/sbin/runcvsup and add:
#!/bin/sh arg=$@ sType="tld,nl" # Can be: all / tld / tld,nl,de,fr,us if SERVER=`/usr/local/bin/fastest_cvsup -q -c $sType`; then echo "Using server: ${SERVER}" case "$arg" in "stable") echo "Updating: stable" /usr/bin/csup -L 2 -g -z -h ${SERVER} /etc/cvsup/stable-supfile ;; "ports") echo "Updating: ports" /usr/bin/csup -L 2 -g -z -h ${SERVER} /etc/cvsup/ports-supfile ;; "doc") echo "Updating: doc" /usr/bin/csup -L 2 -g -z -h ${SERVER} /etc/cvsup/doc-supfile ;; *) echo "Updating: all" /usr/bin/csup -L 2 -g -z -h ${SERVER} /etc/cvsup/stable-supfile /usr/bin/csup -L 2 -g -z -h ${SERVER} /etc/cvsup/ports-supfile /usr/bin/csup -L 2 -g -z -h ${SERVER} /etc/cvsup/doc-supfile ;; esac fi
Set the right permissions:
chmod 700 /usr/local/sbin/runcvsup
Update everything:
runcvsup
How to easy CVS update your SRC and Ports tree with a simple Bash script
Check this updated post: How to easy CVS update your SRC and Ports tree with a simple Bash script (v2)
Its advised to run this in Screen, you can install it from /usr/ports/sysutils/screen.
First install a simple tool to get the fastest cvs server
pkg_add -r fastest_cvsup
Or from Ports (if you have the collection already):
cd /usr/ports/sysutils/fastest_cvsup/ make install clean
Install CVSUP
pkg_add -r cvsup-without-gui
Or from Ports (if you have the collection already):
cd /usr/ports/net/cvsup-without-gui make install clean
Setup config and binary to easy update the repository for SRC and PORTS.
mkdir /usr/local/etc/cvsup cd /usr/share/examples/cvsup cp stable-supfile /usr/local/etc/cvsup cp ports-supfile /usr/local/etc/cvsup cp doc-supfile /usr/local/etc/cvsup cd /usr/local/etc/cvsup
Edit stable-supfile and change:
*default release=cvs tag=RELENG_7_1
Set this to your release version.
Edit /usr/local/etc/cvsup/runcvsup and add:
#!/bin/sh arg=$@ sType="tld,nl" # Can be: all / tld / tld,nl,de,fr,us if SERVER=`/usr/local/bin/fastest_cvsup -q -c $sType` then echo "Using server: ${SERVER}" case "$arg" in "stable") echo "Updating: stable" /usr/local/bin/cvsup -L 2 -g -z -h ${SERVER} /usr/local/etc/cvsup/stable-supfile ;; "ports") echo "Updating: ports" /usr/local/bin/cvsup -L 2 -g -z -h ${SERVER} /usr/local/etc/cvsup/ports-supfile ;; "doc") echo "Updating: doc" /usr/local/bin/cvsup -L 2 -g -z -h ${SERVER} /usr/local/etc/cvsup/doc-supfile ;; *) echo "Updating: all" /usr/local/bin/cvsup -L 2 -g -z -h ${SERVER} /usr/local/etc/cvsup/stable-supfile /usr/local/bin/cvsup -L 2 -g -z -h ${SERVER} /usr/local/etc/cvsup/ports-supfile /usr/local/bin/cvsup -L 2 -g -z -h ${SERVER} /usr/local/etc/cvsup/doc-supfile ;; esac fi
Set the right permissions:
chmod 700 runcvsup
Link the script so it can be reached.
ln -s /usr/local/etc/cvsup/runcvsup /usr/local/bin/runcvsup rehash
Update everything:
runcvsup
How to upgrade CakePHP or any other package that is under subversion control with Rsync
Actually this is more simple than you might think.
First you checkout your current version. Then download and un-tar the new version and simply run the following command on your shell/terminal:
rsync -av --exclude '.svn' --exclude '._*' my/new/cakephp-cakephp-efb6e08/ my-old-cakephp/
This will exclude your Subversion .svn directories and it will also exclude the META-data files created by Mac OS X.
Good luck with upgrading!
How to upgrade Perl 5.8.x to 5.10.x on FreeBSD.
In the ports collection you can find /usr/ports/UPDATING. Here you can read how to upgrade Perl 5.8.x to the new release 5.10.x.
The description below is copied from the updating file.
Note: you might need to manually upgrade some ports after this. For example, I had to recompile APR, Apache and Subversion.
Portupgrade users:
0) Fix pkgdb.db (for safety):
pkgdb -Ff1) Reinstall perl with new 5.10:
env DISABLE_CONFLICTS=1 portupgrade -o lang/perl5.10 -f perl-5.8.*
2) Reinstall everything that depends on Perl:
portupgrade -fr perl
Portmaster users:
env DISABLE_CONFLICTS=1 portmaster -o lang/perl5.10 lang/perl5.8 portmaster -r perl-
Note: If the "perl-" glob matches more than one port you will need to specify the name of the perl directory in /var/db/pkg explicitly.




