Tuesday, October 8, 2013

Keep FreeBSD up to date with subversion

The freebsd ports tree is quite big and sometimes you need just few packages. You can do that with subversion sparse checkouts.
pkg_add -r subversion
Checkout only immediate top level. The list of svn mirrors is here.
svn checkout --depth=immediates \
    http://svn0.eu.freebsd.org/ports/head /usr/ports
Update tree on as needed basis:
cd /usr/ports
# common
svn up --set-depth=infinity Mk Templates Tools/scripts
# portmaster
svn up ports-mgmt/portmaster ports-mgmt/dialog4ports 
# python
svn up lang/python lang/python2 lang/python27 \
    devel/gettext converters/libiconv
# mercurial
svn up devel/mercurial
# python development
svn up devel/py-distribute py-setuptools \
# vim
svn up editors/vim
# subversion
svn up devel/subversion devel/libtool devel/apr1 \
    databases/db42 databases/gdbm databases/sqlite3 \
    textproc/expat2 www/serf
Consider configure /etc/make.conf as advised here and install packages:
make install clean -sC /usr/ports/ports-mgmt/portmaster
portmaster lang/python27 devel/mercurial \
    devel/py-virtualenv editors/vim \
The above ports require only 12Mb in /usr/ports and next time ports update takes few seconds.