Subversion server

I recently replace an older distro with Fedora 14 and wanted to get svnserver working as it had been. Here's a sample of making it work with xinetd.

I have an existing repository located at /usr/local/svn/repositories. None of the examples I found on the web used the svnserve option to restrict the repository location so I had to roll my own.

I elected to use xinetd to provide the subversion service. It was necessary to install subversion and xinetd before I started. yum install xinetd subversion

There are multiple entries for svn in the /etc/services however none for svnserve. I added the following lines to /etc/services. svnserve            3690/tcp                        # Subversion svnserve            3690/udp                        # Subversion

I then had to add a file, /etc/xinetd.d/svnserve which looks like: service svnserve {       socket_type     = stream protocol       = tcp user           = svnadmin wait           = no        disable         = no        server          = /usr/bin/svnserve server_args    = -i -r /usr/local/svn/repositories port           = 3690 }

I elected to add a new user, svnadmin rather than use an existing user.

I edited the /etc/group file and added the following line in the correct numeric order:

svnadmin:x:56:svnadmin The number 56 is not magic, I simply used the same group number as the equivalent on a Ubuntu system.

I then added the svnadmin user via: adduser -u 56 -g 56 svnadmin

I then edited the /etc/password file and changed the svnadmin entry to: svnadmin:x:56:56:Svn Admin:/usr/local/svn/repositories:/sbin/nologin

The existing repository had invalid group and user IDs so I changed the ownership via: chown -R svnadmin.svnadmin /usr/local/svn

If everything is correct, restarting xinetd should make the repository available.

service xinetd restart

A sample check out: svn co svn://192.168.2.44/memdb/trunk memdb A   memdb/validate.php A   memdb/1mygrid.html A   memdb/saverecord.php A   memdb/register.html ...

If it doesn't work, you may find error messages from xinetd in the /var/log/messages file. A sample of one that I encountered:

Jan 2 08:50:37 chinaberry xinetd[11486]: service/protocol combination not in /etc/services: svnserve/tcp Jan 2 08:50:37 chinaberry xinetd[11486]: xinetd Version 2.3.14 started with libwrap loadavg labeled-networking options compiled in. Jan 2 08:50:37 chinaberry xinetd[11486]: Started working: 0 available services

That was before I had place the correct entries in the /etc/services file.

Note that this example was using an already existing repository. If you are creating a new repository using these instructions you may run into issues with respect to subversion security and it may not be xinetd or server configuration related.