[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

svnserve-only + ViewCVS HOWTO

From: Keith Smith <keith_at_pharos.co.nz>
Date: 2004-07-21 02:06:57 CEST

Hi

I've recorded the steps that I took to build and install svnserve-only
Subversion with supporting ViewCVS. It deals with specific versions of
the software, so it will age rapidly, but some may still find it useful
as a rough guide.

I have taken a couple of shortcuts in light of the constraints on my
site. Namely,

* I need only one repository. All access URLs have been made as short
as possible with this in mind.

* I don't access the repository via SSH, so the configuration required
for this access method is not described.

* I assume that CGI-capable Apache is already installed. All other
relevant files (Subversion+ViewCVS) are installed to a path named
according to the subversion release. This is done to minimise conflicts
when trying out new releases.

* Permissions are less restrictive than they could be in some places.
In my experience, those that know the difference know how to rectify
matters.

Regards
Keith Smith

How to build and install svnserve-only subversion with ViewCVS
--------------------------------------------------------------

Version numbers in the text were used in a real installation.

1. Build and install SWIG.

$ cd SWIG-1.3.21
$ ./configure --prefix=/usr/local/subversion-1.0.5 --with-python=python2.2
$ make && make runtime
# make install && make install-runtime

2. Build and install Berkeley DB4.

$ cd db-4.2.52/build_unix
$ ../dist/configure --prefix=/usr/local/subversion-1.0.5
$ make
# make install

3. Build and install Subversion.

$ cd subversion-1.0.5
$ ./configure --prefix=/usr/local/subversion-1.0.5 \
              --without-neon \
              --without-apache \
              --with-berkeley-db=/usr/local/subversion-1.0.5 \
              --with-swig=/usr/local/subversion-1.0.5
$ make
$ make check
# make install
$ make swig-py
# make install-swig-py DESTDIR=''

4. Change required system settings.

* In /etc/profile:

Add '/usr/local/subversion-1.0.5/bin' to PATH

* In /etc/ld.so.conf:

Add '/usr/local/subversion-1.0.5/lib' to the top of the file.

(then run /sbin/ldconfig as root)

* When using the python bindings:

'/usr/local/subversion-1.0.5/lib/svn-python' needs to be added to
sys.path, whether explicitly or via the PYTHONPATH environment
variable. For example, if deploying ViewCVS, add the following line
to the start of viewcvs.cgi:

sys.path.insert(0, '/usr/local/subversion-1.0.5/lib/svn-python')

5. Add a user 'svn' and convert everything below the directory
/usr/local/subversion-1.0.5/ to svn.svn ownership. Switch to this
user and create a repository named 'svn':

svnadmin create /usr/local/subversion-1.0.5/svn

6. Configure the newly created repository.

* Modify /usr/local/subversion-1.0.5/svn/conf/svnserve.conf to the
following setup:

[general]
anon-access = read
auth-access = write
password-db = passwd
realm = svn

* Create /usr/local/subversion-1.0.5/svn/conf/passwd with the
following contents:

[users]
user1 = password1
user2 = password2

7. Set up the system to run svnserve.

* Add the following to /etc/services:

svn 3690/tcp # Subversion
svn 3690/udp # Subversion

* Create a file /etc/xinetd.d/svn with the following contents:

service svn
{
        socket_type = stream
        wait = no
        user = svn
        server = /usr/local/subversion-1.0.5/bin/svnserve
        server_args = -i -r /usr/local/subversion-1.0.5/svn
        umask = 002
        disable = no
}

Installation of ViewCVS
-----------------------

1. Run the installer, changing the installation directory to:
/usr/local/subversion-1.0.5/viewcvs-1.0-dev
(substituting the correct version of ViewCVS)

2. Edit /usr/local/subversion-1.0.5/viewcvs-1.0-dev/viewcvs.conf:

* Comment out the cvs_roots line.

* Set svn_roots = svn: /usr/local/subversion-1.0.5/svn
(substituting the name of your repository for svn)

* Set default_root = svn

* Set use_enscript = 1
(for syntax highlighting; ensure that enscript is installed)

3. Add the following line to the start of viewcvs.cgi:

sys.path.insert(0, '/usr/local/subversion-1.0.5/lib/svn-python')

4. Set up permissions to allow Apache to access the viewcvs script.

* Ensure that httpd runs as user 'apache', and add apache to group 'svn'.

* chown -R svn.svn /usr/local/subversion-1.0.5

* chmod -R g+rwX /usr/local/subversion-1.0.5 to grant full access rights to group svn.

5. Configure Apache to give viewcvs a nicer URL.

ScriptAlias /svn "/usr/local/subversion-1.0.5/viewcvs-1.0-dev/www/cgi/viewcvs.cgi"

The svn repository can now be accessed at http://server/svn.

6. Configure for multiple access methods: developers will be accessing
the repository via the svn schema, while ViewCVS uses the file schema.

* Add 'umask 002' to the apachectl script corresponding to the Apache server that invokes viewcvs..

* Set the sticky group bit on the directories in the repository:
chmod g+s /usr/local/subversion-1.0.5/svn/{conf,dav,db,hooks,locks}

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Wed Jul 21 02:07:17 2004

This is an archived mail posted to the Subversion Users mailing list.