SVN on OS X with Fink (Part I: Installation)
Every good dev environment needs and uses source control. If you’re a programmer, and you don’t use source control of some sort, well, then you’re not really a programmer.
Let’s get started. To be clear, we use the current stable SVN server and client packages availabe through Fink at the time of this writing, SVN 1.2.3-1012.
Prerequisites
- Fink
- Apache2 with mod_ssl installed
Installing the SVN Server
We need to install the SVN-server and SVN-client packages separately. While most users will only need the client, those wishing to run a local SVN server instance on their mac for local source revision control will need to install the server packages.
Installation of the server packages is easy. If you want to authenticate SVN clients over http using ssl, you will need mod_ssl on apache in addition to an ssl-enabled SVN server. Initiate the server installation by calling…
$ sudo fink install svn
of, for the ssl enabled package, call…
$ sudo fink install svn-ssl
If you’re unsure of whether or not you’ll need or use ssl, install the ssl-enabled server since it permits both modes of operation: non-ssl and ssl.
During the installation procedure you may be prompted with a few virtual dependency warnings:
fink needs help picking an alternative to satisfy a virtual dependency. The candidates:
(1) python: Interpreted, object-oriented language
(2) python-nox: Interpreted, object-oriented language
and
fink needs help picking an alternative to satisfy a virtual dependency. The candidates:
(1) db42-ssl: Berkeley DB embedded database - ssl
(2) db42: Berkeley DB embedded database - non crypto
In both cases choosing the default [1] is fine.
Depending on the breakdown of your currently installed packages, this installation may take a while since it requires python, ruby, and a slew of other tools. On my 1.33Ghz G4 Powerbook it took between 2 and 3 hours to complete compiling and installing roughly 40 packages. (I went out to lunch while all this took place).
For those of you who cannot wait, prefer binaries, or are general weenies, you can avoid compiling the code yourself by using the apt-get binary installer by calling
$ sudo apt-get install svn
or
$ sudo apt-get install svn-ssl
This will download and install the binaries, sparing you the compilation wait.
Installing the SVN Client
Setting up the client is similar to the procedure used to setup the server. Simply fire up a shell and call
$ sudo fink install svn-client
or
$ sudo fink install svn-client-ssl
making sure to choose the appropriate client for your server installation type. Note that the ssl-enabled client will play nice with both non-ssl- and ssl- enabled SVN hosts, while the standard SVN client will not.
You now have a fully functional SVN client and server. Now we just need to install some Apache addons so that we can serve SVN using Apache2.
Installing Apache2 Addons
First, we need to download and install the appropriate modules to serve SVN content over http with Apache2. This is simple enough:
$ sudo fink install libapache2-ssl-mod-svn
Done. Now we need to enable the module in our httpd.conf:
If you are using the Fink Apache2 installation, httpd.conf is located at
/sw/etc/apache2/httpd.conf
and you need to uncomment the following line (or add it if it does not already exist)
LoadModule dav_svn_module
/sw/lib/apache2/modules/mod_dav_svn.so
to the set of LoadModule statements near line 265.
If you are using the OS X original Apache2 installation (i.e. you did NOT install Apache2 using Fink), httpd.conf is located at
/etc/httpd/httpd.conf
and you need to add the following line (if it does not already exist)
LoadModule dav_svn_module modules/mod_dav_svn.so
to the set of LoadModule statements near line 240.
You need to restart Apache for these changes to take effect:
$ sudo apachectl restart
Now we’re all set to configure and set up a repository. We’ll do this in Part II, next time.
Posting your comment
Be a Good Daughter | November 18, 2007 @ 12:57 pm
Thanks the article is amazing.
I will definitely read your blog..
Thanks