月份:十一月 2013

Mac OS X mavericks with Subversion + Apache

Posted on Updated on

  1. should rebuild subversion to x86_64 architecture
    • make link for Xcode, because subversion detect build tool chain with a specific rule but Mavericks as no such path for Xcode.

% sudo ln -s /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/  /Applications/Xcode.app/Contents/Developer/Toolchains/OSX10.9.xctoolchain

    • download svn (v1.8.3) download svn 1.6.18 (1.8.3 cannot work)
 http://archive.apache.org/dist/subversion/subversion-1.6.18.tar.gz
    • make and make install
% cd ~/Downloads/subversion-1.6.18
% cd ./configure
% make
    • copy mod_authz_svn.so and mod_svn.so to /usr/libexec/apache2 or anywhere you want to locate the module binary files, this would be referenced in httpd_server_app.conf for Web Server.

% 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

  1. in /Library/Server/Web/Config/apache2/httpd_server_app.conf
    • add

LoadModule dav_svn_module libexec/apache2/mod_dav_svn.so
LoadModule authz_svn_module libexec/apache2/mod_authz_svn.so

    • notice the order, if mod_dav_svn.so loaded after mod_authz_svn.so, you got the error as launch web server.

httpd: Syntax error on line XXX of /Library/Server/Web/Config/apache2/httpd_server_app.conf: Cannot load /usr/libexec/apache2/mod_authz_svn.so into server: dlopen(/usr/libexec/apache2/mod_authz_svn.so, 10): Symbol not found: _dav_svn_split_uri\n  Referenced from: /usr/libexec/apache2/mod_authz_svn.so\n  Expected in: flat namespace\n in /usr/libexec/apache2/mod_authz_svn.so