Videoblogging theoretics, being the media, and the completely improvised future of a world currently without rhyme, reason or good beetroot fertiliser.
There's an absence of information on how to get a Subversion server running on Mac OS X, and what information there is on the web gives the impression that it's difficult. It's not.
I used to run an application called Mac SVN Server - MAS, a standalone app with Apache and a Subversion server all built in, by Uli Kusterer. You just run it and you have an instant web based svn server. But it's all packaged up, meaning it's not that easy to upgrade to new versions of svn, and is pretty heavy weight considering it's an entire Apache 2 web server.
Instead, contrary to what most web sites seem to say, you can just run svnserve, the Subversion custom server component with Mac OS X. Here's how I did it:
The server is now installed. To run it, simply log in as the default user and run the server with svnserve -d -r /Users/deafultuser/svn. You can now access it from any client (1.4 is built into Mac OS X 10.5 so no need to install the client anywhere) by doing a standard svn check out: svn co svn://ipaddress-of-svnmac/repositorypath
But instead of running it manually, we can run it automatically when the server Mac starts up by using launchd. You can read up on Getting Started with launchd, but basically it's the new startup process in Mac OS X 10.4 (Tiger). So, to start svnserve automatically, create the file /Library/LaunchAgents/org.tigris.subversion.svnserve.plist, and put the following in it:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Disabled</key>
<false/>
<key>Label</key>
<string>org.tigris.subversion.svnserve</string>
<key>ProgramArguments</key>
<array>
<string>/usr/local/bin/svnserve</string>
<string>--inetd</string>
<string>--root=/Users/defaultuser/svn</string>
</array>
<key>ServiceDescription</key>
<string>Subversion Standalone Server</string>
<key>Sockets</key>
<dict>
<key>Listeners</key>
<array>
<dict>
<key>SockFamily</key>
<string>IPv4</string>
<key>SockServiceName</key>
<string>svn</string>
<key>SockType</key>
<string>stream</string>
</dict>
<dict>
<key>SockFamily</key>
<string>IPv6</string>
<key>SockServiceName</key>
<string>svn</string>
<key>SockType</key>
<string>stream</string>
</dict>
</array>
</dict>
<key>inetdCompatibility</key>
<dict>
<key>Wait</key>
<false/>
</dict>
</dict>
</plist>
This automatically starts the server when it boots. It also switches it from a standalone daemon to running under inetd, but it makes no real difference. There are a lot of different versions of this plist out there, but this is the only one I got to work. Unfortunately I can't remember the site I borrowed it from. Email me if it's you.
You're done.
If you found this blog post useful, then please consider sending me a couple of bucks PayPal donation to help cover my hosting expenses.
Did you find this post interesting or useful? Or do you have some other comments/feedback on it? Please add a comment.