Just recently I need some software to browse one of our svn repository as an interface so the manager could monitoring the progress from their dev team. I usualy not need this independently since I always maintain the development using trac that has a built in module for svn repository. This time the dev team not using trac and I have to find a way so the svn can be browse easily and must be a web based. I’m stuck on a small program named viewvc, ViewVC is a Subversion repository browser software having many useful features. Based on python and cgi to run it. If you are maintaining a Subversion server, you should install it to view repositories, files, branches, directories, versions or comparison between versions.
Here is the simple steps and config I use :
- Get the latest version of viewvc from here, when writing of this article the latest version was 1.2-dev. I’m using the development branch, you can use more stable. Untar it and start the installation:
# tar xzf viewvc-1.2-dev.tar.gz # cd viewvc-1.2-dev # ./viewvc-install
Here is the complete log :
[root@krsprogdomain viewvc-1.2-dev-20101229]# ./viewvc-install This is the ViewVC 1.2-dev installer. It will allow you to choose the install path for ViewVC. You will now be asked some installation questions. Defaults are given in square brackets. Just hit [Enter] if a default is okay. Installation path [/usr/local/viewvc-1.2-dev]: DESTDIR path (generally only used by package maintainers) []: Installing ViewVC to /usr/local/viewvc-1.2-dev: created /usr/local/viewvc-1.2-dev/bin/cgi/ installed /usr/local/viewvc-1.2-dev/bin/cgi/viewvc.cgi installed /usr/local/viewvc-1.2-dev/bin/cgi/query.cgi created /usr/local/viewvc-1.2-dev/bin/wsgi/ installed /usr/local/viewvc-1.2-dev/bin/wsgi/viewvc.wsgi installed /usr/local/viewvc-1.2-dev/bin/wsgi/viewvc.fcgi installed /usr/local/viewvc-1.2-dev/bin/wsgi/query.wsgi installed /usr/local/viewvc-1.2-dev/bin/wsgi/query.fcgi created /usr/local/viewvc-1.2-dev/bin/mod_python/ installed /usr/local/viewvc-1.2-dev/bin/mod_python/viewvc.py installed /usr/local/viewvc-1.2-dev/bin/mod_python/query.py installed /usr/local/viewvc-1.2-dev/bin/mod_python/handler.py installed /usr/local/viewvc-1.2-dev/bin/mod_python/.htaccess installed /usr/local/viewvc-1.2-dev/bin/standalone.py installed /usr/local/viewvc-1.2-dev/bin/loginfo-handler installed /usr/local/viewvc-1.2-dev/bin/cvsdbadmin installed /usr/local/viewvc-1.2-dev/bin/svndbadmin installed /usr/local/viewvc-1.2-dev/bin/make-database installed /usr/local/viewvc-1.2-dev/viewvc.conf.dist installed /usr/local/viewvc-1.2-dev/viewvc.conf installed /usr/local/viewvc-1.2-dev/cvsgraph.conf.dist installed /usr/local/viewvc-1.2-dev/cvsgraph.conf installed /usr/local/viewvc-1.2-dev/mimetypes.conf.dist installed /usr/local/viewvc-1.2-dev/mimetypes.conf created /usr/local/viewvc-1.2-dev/lib/ installed /usr/local/viewvc-1.2-dev/lib/accept.py installed /usr/local/viewvc-1.2-dev/lib/blame.py installed /usr/local/viewvc-1.2-dev/lib/compat_difflib.py installed /usr/local/viewvc-1.2-dev/lib/compat_ndiff.py installed /usr/local/viewvc-1.2-dev/lib/config.py installed /usr/local/viewvc-1.2-dev/lib/cvsdb.py installed /usr/local/viewvc-1.2-dev/lib/dbi.py installed /usr/local/viewvc-1.2-dev/lib/debug.py installed /usr/local/viewvc-1.2-dev/lib/ezt.py installed /usr/local/viewvc-1.2-dev/lib/idiff.py installed /usr/local/viewvc-1.2-dev/lib/popen.py installed /usr/local/viewvc-1.2-dev/lib/query.py installed /usr/local/viewvc-1.2-dev/lib/sapi.py created /usr/local/viewvc-1.2-dev/lib/vcauth/ installed /usr/local/viewvc-1.2-dev/lib/vcauth/__init__.py created /usr/local/viewvc-1.2-dev/lib/vcauth/forbidden/ installed /usr/local/viewvc-1.2-dev/lib/vcauth/forbidden/__init__.py created /usr/local/viewvc-1.2-dev/lib/vcauth/forbiddenre/ installed /usr/local/viewvc-1.2-dev/lib/vcauth/forbiddenre/__init__.py created /usr/local/viewvc-1.2-dev/lib/vcauth/svnauthz/ installed /usr/local/viewvc-1.2-dev/lib/vcauth/svnauthz/__init__.py created /usr/local/viewvc-1.2-dev/lib/vclib/ installed /usr/local/viewvc-1.2-dev/lib/vclib/__init__.py created /usr/local/viewvc-1.2-dev/lib/vclib/ccvs/ installed /usr/local/viewvc-1.2-dev/lib/vclib/ccvs/__init__.py installed /usr/local/viewvc-1.2-dev/lib/vclib/ccvs/bincvs.py installed /usr/local/viewvc-1.2-dev/lib/vclib/ccvs/blame.py installed /usr/local/viewvc-1.2-dev/lib/vclib/ccvs/ccvs.py created /usr/local/viewvc-1.2-dev/lib/vclib/ccvs/rcsparse/ installed /usr/local/viewvc-1.2-dev/lib/vclib/ccvs/rcsparse/__init__.py installed /usr/local/viewvc-1.2-dev/lib/vclib/ccvs/rcsparse/common.py installed /usr/local/viewvc-1.2-dev/lib/vclib/ccvs/rcsparse/debug.py installed /usr/local/viewvc-1.2-dev/lib/vclib/ccvs/rcsparse/default.py installed /usr/local/viewvc-1.2-dev/lib/vclib/ccvs/rcsparse/parse_rcs_file.py installed /usr/local/viewvc-1.2-dev/lib/vclib/ccvs/rcsparse/run-tests.py created /usr/local/viewvc-1.2-dev/lib/vclib/ccvs/rcsparse/test-data/ installed /usr/local/viewvc-1.2-dev/lib/vclib/ccvs/rcsparse/test-data/default,v installed /usr/local/viewvc-1.2-dev/lib/vclib/ccvs/rcsparse/test-data/default.out installed /usr/local/viewvc-1.2-dev/lib/vclib/ccvs/rcsparse/test-data/empty-file,v installed /usr/local/viewvc-1.2-dev/lib/vclib/ccvs/rcsparse/test-data/empty-file.out installed /usr/local/viewvc-1.2-dev/lib/vclib/ccvs/rcsparse/texttools.py created /usr/local/viewvc-1.2-dev/lib/vclib/svn/ installed /usr/local/viewvc-1.2-dev/lib/vclib/svn/__init__.py installed /usr/local/viewvc-1.2-dev/lib/vclib/svn/svn_ra.py installed /usr/local/viewvc-1.2-dev/lib/vclib/svn/svn_repos.py installed /usr/local/viewvc-1.2-dev/lib/viewvc.py installed /usr/local/viewvc-1.2-dev/lib/win32popen.py created /usr/local/viewvc-1.2-dev/templates/ installed /usr/local/viewvc-1.2-dev/templates/diff.ezt installed /usr/local/viewvc-1.2-dev/templates/dir_new.ezt installed /usr/local/viewvc-1.2-dev/templates/directory.ezt created /usr/local/viewvc-1.2-dev/templates/docroot/ installed /usr/local/viewvc-1.2-dev/templates/docroot/help.css installed /usr/local/viewvc-1.2-dev/templates/docroot/help_dirview.html installed /usr/local/viewvc-1.2-dev/templates/docroot/help_log.html installed /usr/local/viewvc-1.2-dev/templates/docroot/help_query.html installed /usr/local/viewvc-1.2-dev/templates/docroot/help_rootview.html created /usr/local/viewvc-1.2-dev/templates/docroot/images/ installed /usr/local/viewvc-1.2-dev/templates/docroot/images/annotate.png installed /usr/local/viewvc-1.2-dev/templates/docroot/images/back.png installed /usr/local/viewvc-1.2-dev/templates/docroot/images/back_small.png installed /usr/local/viewvc-1.2-dev/templates/docroot/images/broken.png installed /usr/local/viewvc-1.2-dev/templates/docroot/images/chalk.jpg installed /usr/local/viewvc-1.2-dev/templates/docroot/images/cvsgraph_16x16.png installed /usr/local/viewvc-1.2-dev/templates/docroot/images/cvsgraph_32x32.png installed /usr/local/viewvc-1.2-dev/templates/docroot/images/diff.png installed /usr/local/viewvc-1.2-dev/templates/docroot/images/dir.png installed /usr/local/viewvc-1.2-dev/templates/docroot/images/down.png installed /usr/local/viewvc-1.2-dev/templates/docroot/images/download.png installed /usr/local/viewvc-1.2-dev/templates/docroot/images/favicon.ico installed /usr/local/viewvc-1.2-dev/templates/docroot/images/feed-icon-16x16.jpg installed /usr/local/viewvc-1.2-dev/templates/docroot/images/forward.png installed /usr/local/viewvc-1.2-dev/templates/docroot/images/list.png installed /usr/local/viewvc-1.2-dev/templates/docroot/images/lock.png installed /usr/local/viewvc-1.2-dev/templates/docroot/images/log.png installed /usr/local/viewvc-1.2-dev/templates/docroot/images/text.png installed /usr/local/viewvc-1.2-dev/templates/docroot/images/up.png installed /usr/local/viewvc-1.2-dev/templates/docroot/images/view.png installed /usr/local/viewvc-1.2-dev/templates/docroot/images/viewvc-logo.png installed /usr/local/viewvc-1.2-dev/templates/docroot/styles.css installed /usr/local/viewvc-1.2-dev/templates/error.ezt installed /usr/local/viewvc-1.2-dev/templates/file.ezt installed /usr/local/viewvc-1.2-dev/templates/graph.ezt created /usr/local/viewvc-1.2-dev/templates/include/ installed /usr/local/viewvc-1.2-dev/templates/include/diff_form.ezt installed /usr/local/viewvc-1.2-dev/templates/include/dir_footer.ezt installed /usr/local/viewvc-1.2-dev/templates/include/dir_header.ezt installed /usr/local/viewvc-1.2-dev/templates/include/file_header.ezt installed /usr/local/viewvc-1.2-dev/templates/include/footer.ezt installed /usr/local/viewvc-1.2-dev/templates/include/header.ezt installed /usr/local/viewvc-1.2-dev/templates/include/log_footer.ezt installed /usr/local/viewvc-1.2-dev/templates/include/log_header.ezt installed /usr/local/viewvc-1.2-dev/templates/include/paging.ezt installed /usr/local/viewvc-1.2-dev/templates/include/pathrev_form.ezt installed /usr/local/viewvc-1.2-dev/templates/include/props.ezt installed /usr/local/viewvc-1.2-dev/templates/include/sort.ezt installed /usr/local/viewvc-1.2-dev/templates/log.ezt installed /usr/local/viewvc-1.2-dev/templates/log_table.ezt installed /usr/local/viewvc-1.2-dev/templates/query.ezt installed /usr/local/viewvc-1.2-dev/templates/query_form.ezt installed /usr/local/viewvc-1.2-dev/templates/query_results.ezt installed /usr/local/viewvc-1.2-dev/templates/revision.ezt installed /usr/local/viewvc-1.2-dev/templates/roots.ezt installed /usr/local/viewvc-1.2-dev/templates/rss.ezt created /usr/local/viewvc-1.2-dev/templates-contrib/ installed /usr/local/viewvc-1.2-dev/templates-contrib/README ViewVC file installation complete. Consult the INSTALL document for detailed information on completing the installation and configuration of ViewVC on your system. Here's a brief overview of the remaining steps: 1) Edit the /usr/local/viewvc-1.2-dev/viewvc.conf file. 2) Either configure an existing web server to run /usr/local/viewvc-1.2-dev/bin/cgi/viewvc.cgi. Or, copy /usr/local/viewvc-1.2-dev/bin/cgi/viewvc.cgi to an already-configured cgi-bin directory. Or, use the standalone server provided by this distribution at /usr/local/viewvc-1.2-dev/bin/standalone.py. [root@krsprogdomain viewvc-1.2-dev-20101229]#
Done installing.
- Now it;s time to adjust the config to satisfy our needs, edit the /usr/local/viewvc-1.2-dev/viewvc.conf :
svn_roots = webaxiooworld: /var/lib/svn/webaxiooworld, communication: /var/lib/svn/communication root_parents = /var/lib/svn : svn default_root = cgi root_as_url_component = 1
There are more some few steps to complete :
- Somehow I can’t find the viewvc.cgi within httpd klixs cgi folder, so copy /usr/local/viewvc-1.2-dev/bin/cgi/viewvc.cgi and queryvc.cgi to /var/www/cgi
- Restart httpd server.
- Open http:///cgi/viewvc.cgi within webbrowser