Subversion
From openSUSE
| A Concurrent Versioning system similar to but better than CVS.
Subversion does the same thing CVS (Concurrent Versioning System) but has major enhancements compared to CVS. |
|
| |||||||||||||
About
Subversion is an open source version control system, similar to and intending to replace CVS. It allows computer software to be developed in an incremental and controlled fashion by a distributed group of programmers.
For more details see the Wikipedia Article.
Install
Installing Subversion on openSUSE is nearly simple:
- install the subversion package
- see /usr/share/doc/packages/subversion/README.SuSE:
As subversion repositories can be served either via http (wich is the common way), or via the svnserve daemon and a special network protocol, you should decide between the two options. Both can run on the same machine without big problems. But if you already have an apache webserver up and running on your machine, there is no need for an additional daemon like svnserve.
Running svnserve
svnserve should not run as root user. The startup script rcsvnserve expects a user/group named 'svn', but this user/group must be created before first use:
groupadd -r svn useradd -r -g svn svn
BTW, the name of this user is configurable with YAST2 Network Services: select Network Services (xinetd), then select the "svn" service. YAST2 writes this configuration in /etc/sysconfig/svnserve.
Create a repository with the svnadmin create command - see the documentation at the subversion site.
Edit the repository configuration files, which are in the config directory within the repository. This allows you to set access rights.
Make sure that the files of the repository are accessible by the user "svn". It would be best to give exclusive read and write access of the whole repository directory tree to the user svn.
Use YAST2 to set the repository location that svnserve should serve: Network Services - Network Services (xinetd). Select "svn" and edit the Server Arguments to specify the repository root path.
If you want to be able to access the subversion repository through a router (that uses NAT), you have to forward port 3690 to the server. Use the "svn:" prefix to access this repository from the client; most Subversion clients ask for a URL to locate the repository. You should enter something like:
svn://my-account-name.dyndns.org
Configure Apache for SVN
To run a subversion server via apache, you need to configure apache2 to load two apache2 modules: mod_dav and mod_dav_svn. (mod_dav is needed by mod_dav_svn, it is installed together with apache2.)
This is done by adding the dav and dav_svn modules to /etc/sysconfig/apache2 (just add the two modules to the "APACHE_MODULES" line) and restarting the server (rcapache2 restart).
A default/example configuration of the dav_svn module can be found in /etc/apache2/conf.d/subversion.conf. With more recent apache packages, this configuration is *not* loaded automatically by the apache server, since many people configure virtual hosts and it is unlikely that the repositories shall be available from any virtual host. To load the configuration for a certain virtual host, add
Include /etc/apache2/conf.d/subversion.conf
or
Include /path/to/your_subversion_configuration
in the respective virtual host configuration. This *may* be done in the default virtual host (/etc/apache2/default-server.conf).



