svnserve.conf

svnserve.conf() states

Code:
svnserve.conf  controls    the  behavior of the svnserve daemon on    a per-
      repository basis.  It is    located    in the conf subdirectory of the    repos-
       itory.

I can't figure out how this works... When the svnserve daemon starts how does it know the location of the conf subdirectory of the repository so how can it be controlled?
 
Just to clarify things...svnserve.conf ()
Code:
NAME
      svnserve.conf - Repository configuration    file for svnserve

SYNOPSIS
       repository-path/conf/svnserve.conf

Do i take it that 'repository-path' is equivalent to 'svnserve_data' in /etc/rc.conf?

I'm not sure if there can be one common svnserve.conf or is there one for every project under
/var/svn/repo

Either:
/var/svn/repo/conf/svnserve.conf

or:
/var/svn/repo/proj-1/conf/svnserve.conf
/var/svn/repo/proj-2/conf/svnserve.conf
 
...
Do i take it that 'repository-path' is equivalent to 'svnserve_data' in /etc/rc.conf?

Yes, see line 16 of file /usr/local/etc/rc.d/svnserve

I'm not sure if there can be one common svnserve.conf or is there one for every project under /var/svn/repo

Either:
/var/svn/repo/conf/svnserve.conf

or:
/var/svn/repo/proj-1/conf/svnserve.conf
/var/svn/repo/proj-2/conf/svnserve.conf

You can have both, see the last paragraph of svnserve(8)
Code:
       Unless the --config-file option was specified on the command line, once
       the client has selected a repository by transmitting its URL, svnserve
       reads a file named conf/svnserve.conf in the repository directory to
       determine repository-specific settings such as what authentication
       database to use and what authorization policies to apply.  See the
       svnserve.conf(5) man page for details of that file format.
You need to append said --config-file option to the svnserve_flags directive into /etc/rc.conf:
svnserve_flags="-d --listen-port=3690 --listen-host 0.0.0.0 --config-file=/path/to/the/global/svnserve.conf"

There is even a third option, which I use for my repositories, some of which require different credentials than others. I created one conf directory for each group of credentials for the various repositories, and then I symlinked these conf dirs into each repository of the respective group. For example:
# sudo -u svn
$ rm -r /var/svn/repo/proj-1/conf; ln -s /var/svn/config/group1 /var/svn/repo/proj-1/conf
$ rm -r /var/svn/repo/proj-2/conf; ln -s /var/svn/config/group1 /var/svn/repo/proj-2/conf
$ rm -r /var/svn/repo/proj-3/conf; ln -s /var/svn/config/group2 /var/svn/repo/proj-3/conf
$ rm -r /var/svn/repo/proj-4/conf; ln -s /var/svn/config/group2 /var/svn/repo/proj-4/conf
 
I made some changes following your advice and wanted to test them, but when I run

service svnserve stop

The system says Operation not permitted.

I noticed using the 'help' command that there is a 'force' option, but when running

service svnserve force stop

I just get a 'Usage:' response.

Anyone know why I can't stop svnserve?
 
Thanks, I gave that a try...
Code:
# service svnserve forcestop
Stopping svnserve.
kill: 21416: Operation not permitted
Waiting for PIDS: 21416

and it's still waiting 30 mins later...
 
What happens if you run (as root of course): kill 21416 or kill -9 21416 (The last kill(1) will forcefully kill a process, use sparingly, especially with database services because it can leave the database files in a weird state)
 
Back
Top