Right now viewcvs is the old version which is available under Debian. I recomend to install the latest viewvc from official website until package gets updated.
For more about it’s history, look up in http://www.viewvc.org/who.html
Instalation is really simple, it’s only complexity resides in the apache 2 configuration. Which is not really well documented and can cause some headache.
I will install everything under /opt because it’s my favourite place (and because it’s standar (LSB rules I think) to put extrange things there).
user@machine:~$ cd /opt
user@machine:~$ wget http://viewvc.tigris.org/files/documents/3330/34803/viewvc-1.0.3.tar.gz
user@machine:~$ tar -xvzf viewvc-1.0.3.tar.gz
user@machine:~$ cd viewvc-1.0.3
[will be prompted some easy questions] Answer first /opt and then leave it as it is.
Take a look at INSTALL and README. It’s always good to read this stuff, and doesn’t hurt.
user@machine:~$ emacs /opt/viewvc/viewvc.conf
[main changes I made]
user@machine:~$ diff viewvc.conf ../viewvc-1.0.3/viewvc.conf.dist
< #cvs_roots = cvs: /home/cvsroot --- > cvs_roots = cvs: /home/cvsroot
< svn_roots = svn: /var/lib/svn/repository --- > #svn_roots = svn: /home/svnrepos
< default_root = svn --- > default_root = cvs
< mime_types_file = /etc/mime.types --- > #mime_types_file = /usr/local/apache/conf/mime.types
< address = < a href="mailto:svn-admin@XXX.XXX">Administrador del repositorio Subversion< / a>
> address = < a href="mailto:email@example.com">No admin address has been configured< / a>
< languages = es-es, en-us --- > languages = en-us
< docroot = /viewvc-doc --- (LOOK APACHE 2 CONFIG TO EXPLAIN THIS CHANGE) > #docroot = /docroot
< use_enscript = 1 --- > use_enscript = 0
< use_highlight = 1 --- > use_highlight = 0
< use_php = 1 --- > use_php = 0
< allow_tar = 1 --- > allow_tar = 0
For coloured syntax I installed next packages. But I am not really sure they are needed.
user@machine:~$ apt-get install highlight enscript
Apache 2 configuration
Here I put my apache 2 configuration for viewvc. I’ve two versions, both of them work. Again I recomend take a take a look at INSTALL and README for answers. One is the version for cgi and the other for mod_python. I’m using mod_python because it’s known to be faster.
< IfModule !mod_python.c>
< IfModule cgi.c>
# para la instalacion local
ScriptAlias /viewvc /opt/viewvc/bin/cgi/viewvc.cgi
# para el paquete debian
# ScriptAlias /viewsvn /usr/lib/cgi-bin/viewcvs.cgi
< IfModule mod_python.c>
Alias /viewvc-doc “/opt/viewvc/templates/docroot”
ScriptAlias /viewvc /opt/viewvc/bin/mod_python/viewvc.py
< Location /viewvc>
AddHandler python-program .py
# This appends “our path” to python path
PythonPath “[‘/opt/viewvc/bin/mod_python’] + sys.path”
Look the result at
Resources and comments
- viewvc official homepage
- Any comments will be welcome.