Alien-SVN
view release on metacpan or search on metacpan
src/subversion/INSTALL view on Meta::CPAN
Go back into your subversion working copy and run ./autogen.sh if
you need to. Then, assuming Apache httpd 2.0 is installed in the
standard location, run:
$ ./configure
Note: do *not* configure subversion with "--disable-shared"!
mod_dav_svn *must* be built as a shared library, and it will
look for other libsvn_*.so libraries on your system.
If you see a warning message that the build of mod_dav_svn is
being skipped, this may be because you have Apache httpd 2.X
installed in a non-standard location. You can use the
"--with-apxs=" option to locate the apxs script:
$ ./configure --with-apxs=/usr/local/apache2/bin/apxs
Note: it *is* possible to build mod_dav_svn as a static library
and link it directly into Apache. Possible, but painful. Stick
with the shared library for now; if you can't, then ask.
$ rm /usr/local/lib/libsvn*
If you have old subversion libraries sitting on your system,
libtool will link them instead of the `fresh' ones in your tree.
Remove them before building subversion.
$ make clean && make && make install
After the make install, the Subversion shared libraries are in
/usr/local/lib/. mod_dav_svn.so should be installed in
/usr/local/libexec/ (or elsewhere, such as /usr/local/apache2/modules/,
if you passed --with-apache-libexecdir to configure).
Section II.E explains how to build the server on Windows.
C. Configuring Apache for Subversion
---------------------------------
The following section is an abbreviated version of the
information in the Subversion Book
(http://svnbook.red-bean.com). Please read chapter 6 for more
details.
The following assumes you have already created a repository.
For documentation on how to do that, see README.
The following also assumes that you have modified
/usr/local/apache2/conf/httpd.conf to reflect your setup.
At a minimum you should look at the User, Group and ServerName
directives. Full details on setting up apache can be found at:
http://httpd.apache.org/docs-2.0/
First, your httpd.conf needs to load the mod_dav_svn module.
If you pass --enable-mod-activation to Subversion's configure,
'make install' target should automatically add this line for you.
In any case, if Apache HTTPD 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.
Next, add this to the *bottom* of your httpd.conf:
<Location /svn/repos>
DAV svn
SVNPath /absolute/path/to/repository
</Location>
This will give anyone unrestricted access to the repository. If
you want limited access, read or write, you add these lines to
the Location block:
AuthType Basic
AuthName "Subversion repository"
AuthUserFile /my/svn/user/passwd/file
And:
a) For a read/write restricted repository:
Require valid-user
b) For a write restricted repository:
<LimitExcept GET PROPFIND OPTIONS REPORT>
Require valid-user
</LimitExcept>
c) For separate restricted read and write access:
AuthGroupFile /my/svn/group/file
<LimitExcept GET PROPFIND OPTIONS REPORT>
Require group svn_committers
</LimitExcept>
<Limit GET PROPFIND OPTIONS REPORT>
Require group svn_committers
Require group svn_readers
</Limit>
These are only a few simple examples. For a complete tutorial
on Apache access control, please consider taking a look at the
tutorials found under "Security" on the following page:
http://httpd.apache.org/docs-2.0/misc/tutorials.html
In order for 'svn cp' to work (which is actually implemented as a
DAV COPY command), mod_dav needs to be able to determine the
hostname of the server. A standard way of doing this is to use
Apache's ServerName directive to set the server's hostname. Edit
your /usr/local/apache2/conf/httpd.conf to include:
ServerName svn.myserver.org
( run in 0.899 second using v1.01-cache-2.11-cpan-ceb78f64989 )