8

After upgrading to OS X 10.8 (Mountain Lion) I find that my SVN server is broken. Under 10.7 I had it set up to use the httpd server to provide access, but after the upgrade the LoadModules for dav_svn_module and authz_svn_module (mod_dav_svn.so and mod_authz_svn.so) are missing.

Does anyone know how to get these for the standard Apple-provided subversion (v1.6.18)?

thanks, Thom

Thom DeCarlo
  • 159
  • 2
  • 12
  • possible duplicate of [Mountain Lion - SVN Missing](http://stackoverflow.com/questions/11657749/mountain-lion-svn-missing) – Pekka Jul 29 '12 at 19:40
  • 1
    Not a dup, I think. The other question seems to be asking about the svn client, not about problems with the server. – Thom DeCarlo Jul 30 '12 at 17:59

6 Answers6

4

You can restore svn over http support on OS X 10.8, aka Mountain Lion.

Two Apache httpd modules need to be built from source. The two modules are:

  • mod_dav_svn.so
  • mod_authz_svn.so

The steps required are detailed in this article, Serving svn with httpd on OS X.

For Mac OS X 10.8, the condensed steps are below, but worth reading the linked article first to understand what is going on:

curl 'http://archive.apache.org/dist/subversion/subversion-1.6.18.tar.bz2' > ~/Downloads/subversion-1.6.18.tar.bz2
cd ~/Downloads
bunzip2 subversion-1.6.18.tar.bz2
tar -xf subversion-1.6.18.tar
cd subversion-1.6.18
./configure
make
cp subversion/mod_dav_svn/.libs/mod_dav_svn.so /usr/libexec/apache2/.
cp subversion/mod_authz_svn/.libs/mod_authz_svn.so /usr/libexec/apache2/.
echo "LoadModule dav_svn_module libexec/apache2/mod_dav_svn.so" >> /etc/apache2/httpd.conf
echo "LoadModule dav_svn_module libexec/apache2/mod_authz_svn.so" >> /etc/apache2/httpd.conf
Graham Miln
  • 2,724
  • 3
  • 33
  • 33
  • I've done this and can access it via browser, but if I try and check out I get a forbidden error. I've tried searching around the Internet and others have the same problem, including http://stackoverflow.com/questions/12020382 - running a separate Apache misses the point :-/ – hood Nov 20 '12 at 00:41
  • In response to myself, I found the solution. Edit the /Library/Server/Web/Config/apache2/httpd_webdavsharing.conf file, adding `RewriteCond %{REQUEST_URI} !^/svn/.*` just above the last `RewriteRule`. Not sure about the permanence of this fix, but got it to work. – hood Nov 20 '12 at 01:33
  • Though last two commands gives you permission denied but it works without running those commands – Inder Kumar Rathore May 09 '13 at 13:24
1

I've seen a lot of stuff dropped in the base OS X Mountain Lion, but around in other locations. For example, to get the command line tools, you have to get XCode, then go into the XCode preferences and download the command line tools. X11 is now a separate open source project called XQuartz that you have to download in order to get that X11 support that use to come with the Mac.

All the CalDev stuff has been moved off to OS X Server and I suspect, but can't verify that those Subversion Apache modules are also in OS X Server which is a $20 purchase.

Of course, you can try CollabNet's Subversion Edge which is free. However, it's a community binary which means it's not from CollabNet itself, and it's marked as being for Mac OS X 10.7. It installs itself in the /opt directory and contains its own version of Apache with all the required modules for Subversion.

If I find anything else, I'll let you know.

David W.
  • 105,218
  • 39
  • 216
  • 337
  • Wow, I thought that was a typo. The last time I looked at an OS X Server license it was over $500. That is definitely something to consider. But, I don't see subversion listed on their website as one of the services in the package. I'll have to check further... – Thom DeCarlo Jul 30 '12 at 18:55
1

I decided to go, in the short-term, with a source code build solution. I downloaded the source for v1.6.18 from subversion.apache.org and compiled, but did NOT install, it on my Mac. I then dug into the resulting directory hierarchy to find the missing *.so files. (They were hidden in a .lib directory.) After copying them to /usr/libexec/apache2 and restarting the httpd, I was able to get to my subversion server through its URL.

This probably isn't the "best" fix, but it seems to be working.

Thom DeCarlo
  • 159
  • 2
  • 12
1

I have the same problem and failed building the subversion on Mountain Lion. So I get the mod_dav_svn.so and mod_authz_svn.so from the TimeMachine of Lion and put them on the current Mountain Lion.

As far as I tested, it works fine without any problem. This is not perfect solution, however, it will be good way as tentative solution.

yusami
  • 184
  • 2
  • 4
1

I can confirm that these Apache 2 modules are NOT provided by OS X Server 10.8. (If you have 10.8's Server.app installed, you can see the list of extra Apache 2 modules it provides thus:

ls /Applications/Server.app/Contents/ServerRoot/usr/libexec/apache2

Your best bet is to use a 3rd-party provided release. I prefer Fink's (http://www.finkproject.org/). Once you have Fink installed, you can install Fink's svn into /sw on your server thus:

fink install libapache2-mod-svn

and then edit Apache 2's httpd.conf to point to the Fink svn modules.

bleater
  • 5,098
  • 50
  • 48
0

Maybe this can be helpful. That's config that work on my upgraded Mountain Lion:

https://discussions.apple.com/thread/4181495?start=15&tstart=0

Thanks Thom DeCarlo

jpcid
  • 1