Click to See Complete Forum and Search --> : Subversion server setup; dav svn module


Cerf
06-18-2006, 10:58 PM
Hey,

I'm trying to setup a subversion server, and I'm trying to configure the apache server for subversion.

In the INSTALL readme, in section C:


But if apache gives you an error like "Unknown
DAV provider: svn", then you may want to verify that this line
exists in your httpd.conf:

LoadModule dav_svn_module modules/mod_dav_svn.so

NOTE: if you built mod_dav as a dynamic module as well, make sure
the above line appears after the one that loads mod_dav.so.


When I modifiy the httpd.conf, and restart apache2 I get the following error:

root@lucifer:/opt/subversion# /usr/sbin/httpd restart
Syntax error on line 238 of /etc/apache/httpd.conf:
Cannot load /usr/module/mod_dav_svn.so into server: /usr/module/mod_dav_svn.so: cannot open shared object file: No such file or directory


I am assuming that the file does not exist, and I think that subversion was not built properly.

When building and installing subversion, I ran the following commands:

./configure
./configure --with-apxs=/usr/local/apache2/bin/apxs
rm /usr/local/lib/libsvn*
make clean && make && make install


I also did a quick updatedb, and then "slocate mod_dav_svn.so" to see if I could find the file, but it came back empty.

Does anyone know what I need to do?

blingbling!!
06-19-2006, 05:11 AM
Does the build of subversion succeed? There are a lot of dependencies for subversion, could be that the build process is failing.
Also, the paths in the apache error logs look wrong, the line

Cannot load /usr/module/mod_dav_svn.so into server: /usr/module/mod_dav_svn.so: cannot open shared object file: No such file or directory

looks like it's reading from a funny location, all the apache modules should be under the apache build root. You may have to use --prefix=/path/to/your/apache if you've not used the default install location for your apache build.
As a last reort, if Subversion is building OK, and producing mod_dav_svn.so you could try putting an absolute path in your httpd.conf.

hth
--Robin

Cerf
06-19-2006, 10:34 PM
Does the build of subversion succeed?

I built from source, and I found no errors in the install process

There are a lot of dependencies for subversion, could be that the build process is failing.


I also built apache from source as described in the INSTALL file


Also, the paths in the apache error logs look wrong, the line

Cannot load /usr/module/mod_dav_svn.so into server: /usr/module/mod_dav_svn.so: cannot open shared object file: No such file or directory

looks like it's reading from a funny location, all the apache modules should be under the apache build root. You may have to use --prefix=/path/to/your/apache if you've not used the default install location for your apache build.
As a last reort, if Subversion is building OK, and producing mod_dav_svn.so you could try putting an absolute path in your httpd.conf.

hth
--Robin

Here is what I added to my httpd.conf file:

Just under all the other LoadModule statements:
LoadModule dav_svn_module /usr/local/apache2/modules/mod_dav_svn.so


And at the very bottom of the file:

<Location /opt/repos>
DAV svn
SVNPath /opt/repos
</Location>


I know the module exists

root@lucifer:/usr/local/apache2/modules# ls -l
total 744
-rw-r--r-- 1 root root 8904 2006-06-19 19:46 httpd.exp
-rwxr-xr-x 1 root root 84563 2006-06-19 21:02 mod_authz_svn.so
-rwxr-xr-x 1 root root 651487 2006-06-19 21:02 mod_dav_svn.so


Again, I recieve a similar error:

root@lucifer:/tmp# /usr/sbin/httpd restart
Syntax error on line 238 of /etc/apache/httpd.conf:
Cannot load /usr/local/apache2/modules/mod_dav_svn.so into server: libsvn_repos-1.so.0: cannot open shared object file: No such file or directory


Any more ideas?

EDIT:

I found this (http://svn.haxx.se/users/archive-2004-11/0390.shtml), it helped alittlebit

I added /usr/local/lib to my /etc/ld.so.conf and then ran /sbin/ldconfig

now I'm getting a different error:

root@lucifer:/home/cerf# /usr/sbin/httpd restart
Syntax error on line 238 of /etc/apache/httpd.conf:
Cannot load /usr/local/apache2/modules/mod_dav_svn.so into server: /usr/local/apache2/modules/mod_dav_svn.so: undefined symbol: ap_filter_flush


I have yet to look into it in detail, but could it be beause I am running an incompatable version of apache2?

blingbling!!
06-20-2006, 10:01 AM
could it be beause I am running an incompatable version of apache2?

This should not matter, as you're building the whole lot from source, the dependencies should be worked out at that point.

I added /usr/local/lib to my /etc/ld.so.conf and then ran /sbin/ldconfig

Hmm... I prefer the first error message personally! Try "locate libsvn_repos-1.so" - it could be that you've got libsvn_repos-1.so.1 or something similar.... if so then remove the extra lines from ld.so.conf and simlink libsvn_repos-1.so.X -> libsvn_repos-1.so.0.

hth
--Robin

Cerf
06-20-2006, 11:59 PM
I was messing around with apache and subversion, and I was able to make a repository in /tmp/repos, and I was able to create a project tempProject in file:///tmp/repos


root@lucifer:/home/cerf# svn list --verbose file:///tmp/repos
1 root Jun 20 22:40 tempProject/


But, how can I view these projects in a web browser?

ie:

root@lucifer:/tmp# svn co http://localhost/svn/tmpProject wc
svn: PROPFIND request failed on '/svn/tmpProject'
svn: PROPFIND of '/svn/tmpProject': 405 Method Not Allowed (http://localhost)


The error log in /usr/local/apache2/logs/error_log is

...
[Tue Jun 20 22:47:19 2006] [error] [client xxx.xxx.xxx.xxx] File does not exist: /usr/local/apache2/htdocs/svn


Do I need to create a symbolic link from svn to /tmp/repos?

blingbling!!
06-21-2006, 09:52 AM
Looks like subversion is not configured properly in httpd.conf. Read the chapter on apache in the svn book, page 99 onwards.

http://svnbook.red-bean.com/

hth
--Robin