Wednesday, 17 April 2013

HOWTO: Updating ports and sources using svnup on FreeBSD

If you're used to using cvsup/csup , they're deprecated/End of Life. It's time you moved to subversion which is now the official method of updating from source. However subversion has a long list of dependencies (try a pkg_add -r subversion and see). Now there's a lite version in ports,  svnup:

#pkg_add -r svnup , OR
#cd /usr/ports/net/svnup && make install clean

Syntax is simple too. To update ports tree,

#svnup -h svn.freebsd.org -b ports/head -l /usr/ports

To update to 8-STABLE sources,

#svnup -h svn.freebsd.org -b base/stable/8 -l /usr/src


One note of warning. Svnup does not support subversion's .svn directory. Use one or the other only.

More info: http://www.freshports.org/net/svnup/

Update (6 Jun 2013): Latest version (0.73) does not appear to work with above cmd lines. There is now a .conf file in /usr/local/etc/svnup.conf. Edit that, change protocol from https to svn, uncomment hostname. I get a segfault though.

<snip>

( get-file ( 30:/contrib/libreadline/display.c ( 251374 ) true false ) )
==========
>> Response:
Segmentation fault (core dumped)c/gnu/usr.bin/groff/src/devices/grohtml/Makefile

Probably best to use the full subversion port at this time since svnup seems to be a work in progress.

Update (26 July): Svnup works. To get it working, chg protocol as per above, choose which stable branch you want, then merely run

#svnup stable

Much easier than remembering parameters.



1 comment:

  1. My fingers know "make update" and don't know "svnup stable."

    The FreeBSD source make hierarchy wants to run svn with an argument of "update" which is not understood by the default install of svnup.

    I have been able to replicate the former utility of "cd /usr/src; make update" with svnup(1) by doing the following:

    install svnup

    add to make.conf:

    SVN_UPDATE= yes
    SVN= "/usr/local/bin/svnup"
    SVNFLAGS= ""

    add a section to /usr/local/etc/svnup.conf:

    [update]
    branch=base/stable/9
    target=/usr/src


    ReplyDelete