Page created: 2013-01-27
This page is being linked to by various *BSD news sources and user groups, (Patrick McEvoy et. al.), we'll try to keep this page up to date with the current state of this issue. Eventually, I hope this page exists merely to announce it's own deprecation- once there is a resolution accepted the FreeBSD community at large.
Most of the contents of this page are seriously out of date.
There is now an in-base version of svn, as /usr/bin/svnlite. This is a stripped down but fully functional client but has the bulky API / language bindings removed. It has a relatively lightweight footprint and no external dependencies. svnlite will make use of the ca_root_nss package in order to validate https certificates, if it is present.
If you do not have svnlite, or prefer to use the official packaged version, it can be securely obtained:
# pkg install ca_root_nss # pkg install subversion
If you wish to use secure https urls with svnlite, you should install the ca_root_nss package to obtain the current root certificate lists.
# pkg install ca_root_nss
You should use https://svn.freebsd.org/ where practical and so long as ca_root_nss is installed and up to date, the certificate should be automatically checked and securely verified.
svn.freebsd.org connects you to the closest project-operated mirror. The old legacy mirror names should not be used.
Official documentation is here: https://www.freebsd.org/doc/handbook/svn.html
As of writing:
Partially obsolete information follows:
There is now a working svnup(1) utility, which is tested functional!
Fetch ports sources, then:
# pkg install svnup # svnup stable -h svn.freebsd.org
Currently it's a port- but it's such a small binary, it's absolutely a perfect candidate to replace csup(1) in base! Please note, however, that this port does not yet support fetching over a secure channel (i.e. https), and therefore should only be used on trusted networks.
At the time of this writing, there is no in-base solution for fetching canonical RELEASE sources, (to build and maintain production grade systems).
UPDATE: no longer true; svnlite is in-base
For FreeBSD users, (particularly systems administrators and integrators), fetching source has always been easy - via either c[v]sup or CTM. Until recently, these tools could also be used to fetch the ports collection. CTM has not been heavily promoted and has not been as widely used as c[v]sup, but has a strong user base.
CVS has been deprecated in FreeBSD development for several years now, and all FreeBSD development has moved to the more modern SVN. While SVN is a great leap forward for the development process, c[v]sup has been heavily used by server administrators and system integrators for source management - and a replacement has fallen behind as the CVS infrastructure is being phased out.
The objective: ability to fetch sources for everything using just the tools in base.
UPDATE: An early version is functional, but not in base. (2013 02 23)
The work has been added as a port, net/svnup.
John Mehr is currently working on "a "lightweight, dependency-free, BSD licensed program to pull source using the svn protocol. svnup is still being optimized, but is tested functional. The original (very small) sources are available on his website.
This feels like the obvious solution, to put a small program in base. portsnap(8) is in base, for similar reason Arrigo Marchiori discusses DES's svnup
http://lists.freebsd.org/pipermail/freebsd-stable/2013-January/071836.html} I personally (maintainer of subversion port!) prefer csup over all other methods for "non-developers" systems too, and I'll be happy to see "svnup" when (if?) it will be created... - Black Lion AKA Lev Serebryakov <lev@FreeBSD.org>
An early svnsup was started by DES, but not completed.
Stripping down the SVN dependencies, its still 7.3% the size of the entire FreeBSD base/src:
That's a pretty big utility, to want a home in /usr/bin. SVN is also quite fat for many applied uses, e.g. when automating system installs, (with custom kernels, stripped down userland, etc…)
The CVS/cvsup infrastructure is, in the meantime, falling into disrepair- and could even considered a security liability. The FreeBSD developers are being spread even more thinly with growth pains right now, supporting CVS just for cvsup is quite a burden. It's got to turn off sometime… (And for the sake of time wasted in the FreeBSD project, the sooner- the better…)
Users face a daunting change when cvsup / csup(1) is eventually end-of-lifed, the current state of SVN for users poses some seriously time consuming 'ouroboros' problems, evident below:
Reference: http://www.freebsd.org/doc/handbook/ctm.html
It is unclear at this time weather or not CTM support will continue when the CVS servers are eventually turned off, (CTM is not tied to CVS directly, but the CTM deltas need to be generated regularly).
Example based on notes from Stephen Montgomery-Smith:
## fetch 'xEmpty' file from FTP servers: # fetch ftp://ftp.freebsd.org/pub/FreeBSD/CTM/src-9/src-9.0400xEmpty.gz ## src dir must be empty, to start # mkdir -p /usr/src # cd /usr/src && ctm /path/to/src-9.0400xEmpty.gz ## fetch the rest of the CTM patch whose number is greater than ## the xEmpty file you downloaded, and do: ## ftp://ftp.freebsd.org/pub/FreeBSD/CTM/src-9/ # cd /usr/src && ctm /path/to/src-9.04*
Now in /usr/src, you will have a reasonably up to date version of 9.x-stable.
You can keep it up to date by getting more files, either from the ftp site, or by email, and doing again cd /usr/src && ctm the-rest-of-the-files* It will automatically ignore the files already applied.
Similar instructions for all the other stable/currents and ports. Main thing to remember - start with an empty directory.
Also making local changes is not permitted. If ctm tries to modify a file whose md5 checksum has changed, it will quit with an error message. (But it won't leave your system in an unusable state - if you put that file back to its original state, then ctm will work again.)
Now, if you want something not offered by ctm (e.g. 8.2-release), then you need to use svn. You can get svn via ctm. But you (1) need to apply the patch, (2) install the svn port, and (3) install the xz port if your FreeBSD is really old.
# csup /path/to/ports-sup # move on to file or, from muscle memory, # csup -h cvsup14.us.freebsd.org /usr/share/examples/standard-supfile note: need to replace CHANGE_THIS.FreeBSD.org in the config file, or use -h flag when calling the csup utility
# pkg install ca_root_nss
# pkg install subversion
# svnlite checkout https://svn.FreeBSD.org/base/head /usr/src
or:
# svn checkout https://svn.FreeBSD.org/base/head /usr/src
A Generation Lost in the Bazaar Poul-Henning Kamp, 2012 http://queue.acm.org/detail.cfm?id=2349257
FreeBSD, csup/cvsup, portsnap, and svn Jeremy Chadwick, 2013 http://koitsu.wordpress.com/2013/01/02/freebsd-csupcvsup-portsnap-and-svn/
Similar situation, before cvsup Kent S. Gordon, 1997 http://www.mavetju.org/mail/view_message.php?list=freebsd-current&id=209027