2001-09-22 09:38:32 +04:00
|
|
|
CONTENTS
|
|
|
|
--------
|
2001-10-23 01:17:59 +04:00
|
|
|
TO THE IMPATIENT
|
2006-03-18 03:33:54 +03:00
|
|
|
INSTALLING VIEWVC
|
2002-02-08 10:39:10 +03:00
|
|
|
APACHE CONFIGURATION
|
2006-03-18 03:33:54 +03:00
|
|
|
UPGRADING VIEWVC
|
2001-09-22 09:38:32 +04:00
|
|
|
SQL CHECKIN DATABASE
|
2001-10-24 13:44:59 +04:00
|
|
|
ENSCRIPT CONFIGURATION
|
2001-09-22 09:38:32 +04:00
|
|
|
CVSGRAPH CONFIGURATION
|
|
|
|
IF YOU HAVE PROBLEMS...
|
|
|
|
|
|
|
|
|
2001-10-23 01:17:59 +04:00
|
|
|
TO THE IMPATIENT
|
|
|
|
----------------
|
|
|
|
Congratulations on getting this far. :-)
|
|
|
|
|
2005-12-17 20:19:28 +03:00
|
|
|
Required Software And Configuration Needed To Run ViewVC:
|
2005-09-23 17:48:36 +04:00
|
|
|
|
|
|
|
For CVS Support:
|
|
|
|
|
|
|
|
* Python 1.5.2 or later
|
|
|
|
(http://www.python.org/)
|
|
|
|
* RCS, Revision Control System
|
|
|
|
(http://www.cs.purdue.edu/homes/trinkle/RCS/)
|
|
|
|
* GNU-diff to replace diff implementations without the -u option
|
|
|
|
(http://www.gnu.org/software/diffutils/diffutils.html)
|
|
|
|
* read-only, physical access to a CVS repository
|
|
|
|
(See http://www.cvshome.org/ for more information)
|
|
|
|
|
|
|
|
For Subversion Support:
|
|
|
|
|
|
|
|
* Python 2.0 or later
|
|
|
|
(http://www.python.org/)
|
|
|
|
* Subversion, Version Control System, 1.2.0 or later
|
|
|
|
(binary installation and Python bindings)
|
|
|
|
(http://subversion.tigris.org/)
|
|
|
|
|
|
|
|
Optional:
|
2005-10-10 17:38:58 +04:00
|
|
|
|
2005-09-23 17:48:36 +04:00
|
|
|
* a web server capable of running CGI programs
|
|
|
|
(for example, Apache at http://httpd.apache.org/)
|
|
|
|
* MySQL to create and query a commit database
|
|
|
|
(http://www.mysql.com/)
|
|
|
|
(http://sourceforge.net/projects/mysql-python)
|
|
|
|
* Enscript, code colorizer
|
2006-01-04 23:25:38 +03:00
|
|
|
(http://www.codento.com/people/mtr/genscript/)
|
2005-12-20 21:42:32 +03:00
|
|
|
* Highlight, code colorizer, 2.4.2 or later
|
2005-12-22 17:47:13 +03:00
|
|
|
http://www.andre-simon.de/
|
2005-12-20 00:15:56 +03:00
|
|
|
* CvsGraph 1.5.0 or later, graphical CVS revision tree generator
|
2005-09-23 17:48:36 +04:00
|
|
|
(http://www.akhphd.au.dk/~bertho/cvsgraph/)
|
2001-11-14 18:06:31 +03:00
|
|
|
|
2001-11-19 04:10:08 +03:00
|
|
|
GUI Operation:
|
2001-11-18 23:27:26 +03:00
|
|
|
|
2001-11-19 04:10:08 +03:00
|
|
|
If you just want to see what your CVS repository looks like with
|
2005-12-17 20:19:28 +03:00
|
|
|
ViewVC, type "./standalone.py -g -r /PATH/TO/CVS/ROOT". This
|
2001-11-19 04:10:08 +03:00
|
|
|
will start a tiny webserver serving at http://localhost:7467/.
|
2002-02-08 10:39:10 +03:00
|
|
|
PLEASE NOTE: This requires Python with thread support enabled and
|
|
|
|
the Tkinter GUI. If you don't have one of these, omit the '-g' option.
|
|
|
|
|
2001-11-19 04:10:08 +03:00
|
|
|
|
|
|
|
Standard operation:
|
|
|
|
|
2006-03-18 03:33:54 +03:00
|
|
|
To start installing right away (on UNIX): type "./viewvc-install"
|
2001-11-19 04:10:08 +03:00
|
|
|
in the current directory and answer the prompts. When it
|
2006-03-18 03:33:54 +03:00
|
|
|
finishes, edit the file viewvc.conf in the installation directory
|
|
|
|
to tell viewvc the paths to your CVS and Subversion repositories. Next,
|
|
|
|
configure your web server to run <INSTALL>/cgi/viewvc.cgi, as
|
|
|
|
appropriate for your web server. The section `INSTALLING VIEWVC'
|
2001-11-19 04:10:08 +03:00
|
|
|
below is still recommended reading.
|
2001-10-23 01:17:59 +04:00
|
|
|
|
|
|
|
|
2006-03-18 03:33:54 +03:00
|
|
|
INSTALLING VIEWVC
|
1999-12-03 13:50:49 +03:00
|
|
|
------------------
|
|
|
|
|
2006-03-18 03:33:54 +03:00
|
|
|
1) To get viewvc.cgi to work, make sure that you have Python 1.5 or
|
2001-11-14 18:06:31 +03:00
|
|
|
greater installed and a webserver which is capable of executing
|
2001-11-19 04:10:08 +03:00
|
|
|
CGI scripts (either based on the .cgi extension, or by placing the
|
2001-11-14 18:06:31 +03:00
|
|
|
script within a specific directory).
|
1999-12-03 13:50:49 +03:00
|
|
|
|
|
|
|
You need to have RCS installed. Specifically, "rlog", "rcsdiff",
|
|
|
|
and "co". This script was tested against RedHat's rcs-5.7-10.rpm
|
2002-02-08 10:13:44 +03:00
|
|
|
Someone running HP-UX reported problems, that rcs doesn'nt honour
|
|
|
|
the setting of $PATH to find the diff utility. Please test, if
|
|
|
|
"rcsdiff -u" works. If not you might have to recompile RCS.
|
1999-12-03 13:50:49 +03:00
|
|
|
|
2006-03-18 03:33:54 +03:00
|
|
|
Note, that the viewvc.cgi script needs to have READ-ONLY, physical
|
2000-05-12 14:20:56 +04:00
|
|
|
access to the CVS repository (or a copy of it). Therefore, rsh/ssh or
|
2001-11-19 04:10:08 +03:00
|
|
|
pserver access to the repository will not work.
|
1999-12-03 13:50:49 +03:00
|
|
|
|
2001-10-23 01:17:59 +04:00
|
|
|
For the more human readable diff formats you need a modern diff utility.
|
|
|
|
If you are using Linux, this is no problem. But on commercial unices
|
|
|
|
you might want to install GNU-diff to be able to use unified or
|
|
|
|
side-by-side diffs.
|
|
|
|
|
|
|
|
If you want to use cvsgraph, you have to obtain and install this
|
2005-02-06 22:53:17 +03:00
|
|
|
separately. See below. This was tested with cvsgraph-1.5.1.
|
2001-10-23 01:17:59 +04:00
|
|
|
|
2000-05-12 06:57:11 +04:00
|
|
|
For the checkin database to work, you will need MySQL >= 3.22,
|
2000-05-12 14:20:56 +04:00
|
|
|
and the Python DBAPI 2.0 module, MySQLdb. This was tested with
|
2001-11-19 04:10:08 +03:00
|
|
|
MySQLdb 0.9.1.
|
2000-03-24 14:08:25 +03:00
|
|
|
|
2006-03-18 03:33:54 +03:00
|
|
|
2) Installation is handled by the ./viewvc-install script. Run this
|
2000-05-12 06:57:11 +04:00
|
|
|
script and you will be prompted for a installation root path.
|
2005-12-17 20:19:28 +03:00
|
|
|
The default is /usr/local/viewvc-VERSION, where VERSION is
|
|
|
|
the version of this ViewVC release. The installer sets the install
|
|
|
|
path in some of the files, and ViewVC cannot be moved to a
|
2000-05-12 06:57:11 +04:00
|
|
|
different path after the install.
|
2000-03-24 14:08:25 +03:00
|
|
|
|
2005-12-17 20:19:28 +03:00
|
|
|
Note: while 'root' is usually required to create /usr/local/viewvc,
|
|
|
|
ViewVC does not have to be installed as root, nor does it run as root.
|
|
|
|
It is just as valid to place ViewVC in a home directory, too.
|
2000-05-12 14:20:56 +04:00
|
|
|
|
2006-03-18 03:33:54 +03:00
|
|
|
Note: viewvc-install will create directories if needed. It will
|
2000-05-12 14:20:56 +04:00
|
|
|
prompt before overwriting files that may have been modified (such
|
2006-03-18 03:33:54 +03:00
|
|
|
as viewvc.conf), thus making it safe to install over the top of
|
2000-05-12 14:20:56 +04:00
|
|
|
a previous installation. It will always overwrite program files,
|
|
|
|
however.
|
|
|
|
|
2006-03-18 03:33:54 +03:00
|
|
|
3) Edit <VIEWVC_INSTALLATION_DIRECTORY>/viewvc.conf for your specific
|
2001-10-24 16:56:10 +04:00
|
|
|
configuration. In particular, examine the following configuration options:
|
1999-12-03 13:50:49 +03:00
|
|
|
|
|
|
|
cvs_roots
|
2000-02-11 16:03:41 +03:00
|
|
|
default_root
|
1999-12-03 13:50:49 +03:00
|
|
|
rcs_path
|
|
|
|
mime_types_file
|
|
|
|
|
2000-03-24 14:08:25 +03:00
|
|
|
There are some other options that are usually nice to change. See
|
2006-03-18 03:33:54 +03:00
|
|
|
viewvc.conf for more information. ViewVC provides a working,
|
2005-12-17 20:19:28 +03:00
|
|
|
default look. However, if you want to customize the look of ViewVC
|
2006-03-18 03:33:54 +03:00
|
|
|
then edit the files in <VIEWVC_INSTALLATION_DIRECTORY>/templates.
|
2001-11-19 04:10:08 +03:00
|
|
|
You need knowledge about HTML to edit the templates.
|
1999-12-03 13:50:49 +03:00
|
|
|
|
2006-03-18 03:33:54 +03:00
|
|
|
4) The CGI programs are in <VIEWVC_INSTALLATION_DIRECTORY>/www/cgi/. You can
|
2001-10-24 16:56:10 +04:00
|
|
|
symlink to this directory from somewhere in your published HTTP server
|
|
|
|
path if your webserver is configured to follow symbolic links. You can
|
2006-03-18 03:33:54 +03:00
|
|
|
also copy the installed <VIEWVC_INSTALLATION_DIRECTORY>/www/cgi/*.cgi
|
|
|
|
scripts after the install (unlike the other files in ViewVC, the scripts
|
|
|
|
under www/ can be moved).
|
2000-05-12 14:20:56 +04:00
|
|
|
|
2002-02-08 10:13:44 +03:00
|
|
|
If you are using Apache, then see below at the section
|
|
|
|
titled APACHE CONFIGURATION.
|
2001-11-19 04:10:08 +03:00
|
|
|
|
2005-12-17 20:19:28 +03:00
|
|
|
NOTE: for security reasons, it is not advisable to install ViewVC
|
2000-05-12 14:20:56 +04:00
|
|
|
directly into your published HTTP directory tree (due to the MySQL
|
2006-03-18 03:33:54 +03:00
|
|
|
passwords in viewvc.conf).
|
2000-05-12 06:57:11 +04:00
|
|
|
|
|
|
|
5) That's it for repository browsing. Instructions for getting the
|
|
|
|
SQL checkin database working are below.
|
1999-12-03 13:50:49 +03:00
|
|
|
|
2000-05-12 14:20:56 +04:00
|
|
|
|
2002-02-08 10:13:44 +03:00
|
|
|
APACHE CONFIGURATION
|
|
|
|
--------------------
|
|
|
|
|
2004-10-08 21:57:14 +04:00
|
|
|
1) Find out where the web server configuration file is kept. On
|
2002-02-08 10:13:44 +03:00
|
|
|
SuSE Linux it is /etc/httpd/httpd.conf, On RedHat Linux 7.3 it
|
|
|
|
is /etc/httpd/conf/httpd.conf. On other unices you may look
|
|
|
|
at /usr/local/etc or /etc/local. Use the vendor documentation
|
|
|
|
or the find utility, if in doubt.
|
|
|
|
|
|
|
|
Either METHOD A:
|
|
|
|
2) The ScriptAlias directive is very useful for pointing
|
2006-03-18 03:33:54 +03:00
|
|
|
directly to the viewvc.cgi script. Simply insert a line containing
|
|
|
|
ScriptAlias /viewvc <VIEWVC_INSTALLATION_DIRECTORY>/www/cgi/viewvc.cgi
|
2004-10-08 21:57:14 +04:00
|
|
|
into your httpd.conf file. Choose the location in httpd.conf where
|
2002-02-08 10:13:44 +03:00
|
|
|
also the other ScriptAlias lines reside. Some examples:
|
|
|
|
|
2006-03-18 03:33:54 +03:00
|
|
|
ScriptAlias /viewvc /usr/local/viewvc-1.0/www/cgi/viewvc.cgi
|
|
|
|
ScriptAlias /query /usr/local/viewvc-1.0/www/cgi/query.cgi
|
2002-02-08 10:13:44 +03:00
|
|
|
|
|
|
|
continue with step 3).
|
|
|
|
|
|
|
|
or alternatively METHOD B:
|
* www/cgi/viewcvs.cgi, www/cgi/query.cgi, www/viewcvs-strace.sh,
cgi/viewcvs.cgi, cgi/query.cgi, cgi/viewcvs-strace.sh
- moved stub scripts from cgi/ to www/cgi/
* cgi/granny.cgi
- deleted since annotate functionality is already intergrated into
viewcvs
* cvsgraph.conf.dist, viewcvs.conf.dist,
cgi/cvsgraph.conf.dist, cgi/viewcvs.conf.dist
- moved configuration files from cgi/ to project root
* www/mod_python/.htaccess, www/mod_python/query.py, www/mod_python/viewcvs.py,
windows/htaccess.mod_python, windows/query.py windows/viewcvs.py
- moved mod_python files from windows/ to www/mod_python/
* www/asp/query.asp, www/asp/viewcvs.asp,
windows/query.asp, windows/viewcvs.asp
- moved asp files from windows/ to www/asp/
* viewcvs-install
- updated installer to deal with all the moved files
* INSTALL windows/README website/upgrading.html
- updated documentation with new file locations and mod_python information
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@657 8cb11bc2-c004-0410-86c3-e597b4017df7
2003-06-03 10:24:59 +04:00
|
|
|
2) Copy the CGI scripts from
|
2006-03-18 03:33:54 +03:00
|
|
|
<VIEWVC_INSTALLATION_DIRECTORY>/www/cgi/*.cgi
|
* www/cgi/viewcvs.cgi, www/cgi/query.cgi, www/viewcvs-strace.sh,
cgi/viewcvs.cgi, cgi/query.cgi, cgi/viewcvs-strace.sh
- moved stub scripts from cgi/ to www/cgi/
* cgi/granny.cgi
- deleted since annotate functionality is already intergrated into
viewcvs
* cvsgraph.conf.dist, viewcvs.conf.dist,
cgi/cvsgraph.conf.dist, cgi/viewcvs.conf.dist
- moved configuration files from cgi/ to project root
* www/mod_python/.htaccess, www/mod_python/query.py, www/mod_python/viewcvs.py,
windows/htaccess.mod_python, windows/query.py windows/viewcvs.py
- moved mod_python files from windows/ to www/mod_python/
* www/asp/query.asp, www/asp/viewcvs.asp,
windows/query.asp, windows/viewcvs.asp
- moved asp files from windows/ to www/asp/
* viewcvs-install
- updated installer to deal with all the moved files
* INSTALL windows/README website/upgrading.html
- updated documentation with new file locations and mod_python information
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@657 8cb11bc2-c004-0410-86c3-e597b4017df7
2003-06-03 10:24:59 +04:00
|
|
|
to the /cgi-bin/ directory configured in your httpd.conf file.
|
|
|
|
|
|
|
|
continue with step 3).
|
|
|
|
|
|
|
|
and then there's METHOD C:
|
2002-02-08 10:13:44 +03:00
|
|
|
2) Copy the CGI scripts from
|
2006-03-18 03:33:54 +03:00
|
|
|
<VIEWVC_INSTALLATION_DIRECTORY>/www/cgi/*.cgi
|
* www/cgi/viewcvs.cgi, www/cgi/query.cgi, www/viewcvs-strace.sh,
cgi/viewcvs.cgi, cgi/query.cgi, cgi/viewcvs-strace.sh
- moved stub scripts from cgi/ to www/cgi/
* cgi/granny.cgi
- deleted since annotate functionality is already intergrated into
viewcvs
* cvsgraph.conf.dist, viewcvs.conf.dist,
cgi/cvsgraph.conf.dist, cgi/viewcvs.conf.dist
- moved configuration files from cgi/ to project root
* www/mod_python/.htaccess, www/mod_python/query.py, www/mod_python/viewcvs.py,
windows/htaccess.mod_python, windows/query.py windows/viewcvs.py
- moved mod_python files from windows/ to www/mod_python/
* www/asp/query.asp, www/asp/viewcvs.asp,
windows/query.asp, windows/viewcvs.asp
- moved asp files from windows/ to www/asp/
* viewcvs-install
- updated installer to deal with all the moved files
* INSTALL windows/README website/upgrading.html
- updated documentation with new file locations and mod_python information
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@657 8cb11bc2-c004-0410-86c3-e597b4017df7
2003-06-03 10:24:59 +04:00
|
|
|
to the directory of your choosing in the Document Root adding the following
|
|
|
|
apache directives for the directory in httpd.conf or an .htaccess file:
|
|
|
|
|
|
|
|
Options +ExecCGI
|
|
|
|
AddHandler cgi-script .cgi
|
|
|
|
|
|
|
|
(Note: For this to work mod_cgi has to be loaded. And for the .htaccess file
|
|
|
|
to be effective, "AllowOverride All" or "AllowOverride Options FileInfo"
|
|
|
|
need to have been specified for the directory.)
|
|
|
|
|
|
|
|
continue with step 3).
|
2002-02-08 10:13:44 +03:00
|
|
|
|
* www/cgi/viewcvs.cgi, www/cgi/query.cgi, www/viewcvs-strace.sh,
cgi/viewcvs.cgi, cgi/query.cgi, cgi/viewcvs-strace.sh
- moved stub scripts from cgi/ to www/cgi/
* cgi/granny.cgi
- deleted since annotate functionality is already intergrated into
viewcvs
* cvsgraph.conf.dist, viewcvs.conf.dist,
cgi/cvsgraph.conf.dist, cgi/viewcvs.conf.dist
- moved configuration files from cgi/ to project root
* www/mod_python/.htaccess, www/mod_python/query.py, www/mod_python/viewcvs.py,
windows/htaccess.mod_python, windows/query.py windows/viewcvs.py
- moved mod_python files from windows/ to www/mod_python/
* www/asp/query.asp, www/asp/viewcvs.asp,
windows/query.asp, windows/viewcvs.asp
- moved asp files from windows/ to www/asp/
* viewcvs-install
- updated installer to deal with all the moved files
* INSTALL windows/README website/upgrading.html
- updated documentation with new file locations and mod_python information
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@657 8cb11bc2-c004-0410-86c3-e597b4017df7
2003-06-03 10:24:59 +04:00
|
|
|
or if you've got Mod_Python installed you can use METHOD D:
|
|
|
|
2) Copy the Python scripts and .htaccess file from
|
2006-03-18 03:33:54 +03:00
|
|
|
<VIEWVC_INSTALLATION_DIRECTORY>/www/mod_python/
|
* www/cgi/viewcvs.cgi, www/cgi/query.cgi, www/viewcvs-strace.sh,
cgi/viewcvs.cgi, cgi/query.cgi, cgi/viewcvs-strace.sh
- moved stub scripts from cgi/ to www/cgi/
* cgi/granny.cgi
- deleted since annotate functionality is already intergrated into
viewcvs
* cvsgraph.conf.dist, viewcvs.conf.dist,
cgi/cvsgraph.conf.dist, cgi/viewcvs.conf.dist
- moved configuration files from cgi/ to project root
* www/mod_python/.htaccess, www/mod_python/query.py, www/mod_python/viewcvs.py,
windows/htaccess.mod_python, windows/query.py windows/viewcvs.py
- moved mod_python files from windows/ to www/mod_python/
* www/asp/query.asp, www/asp/viewcvs.asp,
windows/query.asp, windows/viewcvs.asp
- moved asp files from windows/ to www/asp/
* viewcvs-install
- updated installer to deal with all the moved files
* INSTALL windows/README website/upgrading.html
- updated documentation with new file locations and mod_python information
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@657 8cb11bc2-c004-0410-86c3-e597b4017df7
2003-06-03 10:24:59 +04:00
|
|
|
to a directory being served by apache.
|
|
|
|
|
|
|
|
In httpd.conf, make sure that "AllowOverride All" or at least
|
|
|
|
"AllowOverride FileInfo Options" are enabled for the directory
|
|
|
|
you copied the files to.
|
|
|
|
|
|
|
|
Note: If you are using Mod_Python under Apache 1.3 the tarball generation
|
|
|
|
and enscript colorizing features may not work because they use
|
|
|
|
multithreading. They do work fine with Apache 2.
|
|
|
|
|
2002-02-08 10:13:44 +03:00
|
|
|
continue with step 3).
|
|
|
|
|
|
|
|
3) Restart apache. On SuSE Linux this is done using the command
|
|
|
|
rcapache restart and on RedHat Linux this is done using the command
|
|
|
|
/sbin/service httpd restart
|
|
|
|
|
|
|
|
4) Optional: adding access control:
|
|
|
|
|
|
|
|
In your httpd.conf you can control access to certain modules by adding
|
|
|
|
directives like this:
|
|
|
|
|
2006-03-18 03:33:54 +03:00
|
|
|
<Location "<url to viewvc.cgi>/<modname_you_wish_to_access_ctl>">
|
2002-02-08 10:13:44 +03:00
|
|
|
AllowOverride None
|
|
|
|
AuthUserFile /path/to/passwd/file
|
|
|
|
AuthName "Client Access"
|
|
|
|
AuthType Basic
|
|
|
|
require valid-user
|
|
|
|
</Location>
|
|
|
|
|
|
|
|
This idea is courtesy to Nick Bauman from http://www.cortexity.com/
|
2005-02-13 19:48:12 +03:00
|
|
|
|
|
|
|
If you use access control, it is recommended that you disable the
|
|
|
|
checkout_magic option so people can't "sneak in" with URLs like
|
|
|
|
|
2006-03-18 03:33:54 +03:00
|
|
|
http://<server_name>/viewvc/*checkout*/<module_name>
|
|
|
|
http://<server_name>/viewvc/~checkout~/<module_name>
|
2005-02-13 19:48:12 +03:00
|
|
|
|
|
|
|
and get access to seeing the file contents.
|
2002-02-08 10:13:44 +03:00
|
|
|
|
|
|
|
|
2006-03-18 03:33:54 +03:00
|
|
|
UPGRADING VIEWVC
|
2001-10-16 19:52:23 +04:00
|
|
|
-----------------
|
|
|
|
|
2001-10-23 01:17:59 +04:00
|
|
|
Please read the file upgrading.html in the website subdirectory or
|
2005-12-17 20:19:28 +03:00
|
|
|
at <http://viewvc.org/upgrading.html>.
|
1999-12-03 13:50:49 +03:00
|
|
|
|
2001-11-19 04:10:08 +03:00
|
|
|
|
2001-09-22 09:38:32 +04:00
|
|
|
SQL CHECKIN DATABASE
|
2000-05-12 06:57:11 +04:00
|
|
|
--------------------
|
|
|
|
|
|
|
|
This feature is a clone of the Mozilla Project's Bonsai database. It
|
2004-07-16 20:39:46 +04:00
|
|
|
catalogs every commit in the CVS or Subversion repository into a SQL
|
|
|
|
database. In fact, the databases are 100% compatible.
|
2000-05-12 06:57:11 +04:00
|
|
|
|
2005-12-17 20:19:28 +03:00
|
|
|
Various queries can be performed on the database. After installing ViewVC,
|
2000-05-12 06:57:11 +04:00
|
|
|
there are some additional steps required to get the database working.
|
|
|
|
|
2001-10-26 00:02:22 +04:00
|
|
|
1) You need MySQL >= 3.22, and the Python module MySQLdb 0.9.0 installed.
|
2000-06-02 03:04:48 +04:00
|
|
|
Python 1.5.2 is REQUIRED by MySQLdb, therefore to use this part of
|
2005-12-17 20:19:28 +03:00
|
|
|
ViewVC you must be using Python 1.5.2.
|
2000-05-12 06:57:11 +04:00
|
|
|
|
|
|
|
2) You need to create a MySQL user who has permission to create databases.
|
|
|
|
Optionally, you can create a second user with read-only access to the
|
|
|
|
database.
|
|
|
|
|
2006-03-18 03:33:54 +03:00
|
|
|
3) Run the <VIEWVC_INSTALLATION_DIRECTORY>/make-database script. It will
|
2001-10-24 16:56:10 +04:00
|
|
|
prompt you for your MySQL user, password, and the name of database you
|
2006-03-18 03:33:54 +03:00
|
|
|
want to create. The database name defaults to "ViewVC". This script
|
2001-10-24 16:56:10 +04:00
|
|
|
creates the database and sets up the empty tables. If you run this on a
|
2005-12-17 20:19:28 +03:00
|
|
|
existing ViewVC database, you will lose all your data!
|
2000-05-12 06:57:11 +04:00
|
|
|
|
2006-03-18 03:33:54 +03:00
|
|
|
4) Edit your <VIEWVC_INSTALLATION_DIRECTORY>/viewvc.conf file.
|
2001-10-24 16:56:10 +04:00
|
|
|
There is a [cvsdb] section. You will need to set:
|
2000-05-12 06:57:11 +04:00
|
|
|
|
2006-03-18 03:33:54 +03:00
|
|
|
enabled = 1 # Whether to enable query support in viewvc.cgi
|
2000-05-12 06:57:11 +04:00
|
|
|
host = # MySQL database server host
|
2005-12-22 06:07:31 +03:00
|
|
|
port = # MySQL database server port (default is 3306)
|
2000-05-12 06:57:11 +04:00
|
|
|
database_name = # the name of the database you created with
|
|
|
|
# make-database
|
|
|
|
user = # the read/write database user
|
|
|
|
passwd = # password for read/write database user
|
|
|
|
readonly_user = # the readonly database user -- it's pretty
|
2000-05-12 14:20:56 +04:00
|
|
|
# safe to use the read/write user here
|
2000-05-12 06:57:11 +04:00
|
|
|
readonly_passwd = # password for the readonly user
|
|
|
|
|
2004-07-16 20:39:46 +04:00
|
|
|
5) Two programs are provided for updating the checkin database from a
|
|
|
|
CVS repository, cvsdbadmin and loginfo-handler. They serve two
|
|
|
|
different purposes. The cvsdbadmin program walks through your CVS
|
|
|
|
repository and adds every commit in every file. This is commonly
|
|
|
|
used for initializing the database from a repository which has been
|
|
|
|
in use. The loginfo-handler script is executed by the CVS server's
|
|
|
|
CVSROOT/loginfo system upon each commit. It makes real-time
|
|
|
|
updates to the checkin database as commits are made to the
|
|
|
|
repository.
|
2000-05-12 06:57:11 +04:00
|
|
|
|
|
|
|
To build a database of all the commits in the CVS repository /home/cvs,
|
|
|
|
invoke: "./cvsdbadmin rebuild /home/cvs". If you want to update
|
|
|
|
the checkin database, invoke: "./cvsdbadmin update /home/cvs". The
|
|
|
|
update mode checks to see if a commit is already in the database,
|
2001-11-14 18:06:31 +03:00
|
|
|
and only adds it if it is absent.
|
2000-05-12 06:57:11 +04:00
|
|
|
|
|
|
|
To get real-time updates, you'll want to checkout the CVSROOT module
|
|
|
|
from your CVS repository and edit CVSROOT/loginfo. Add the line:
|
|
|
|
|
2006-03-18 03:33:54 +03:00
|
|
|
ALL <VIEWVC_INSTALLATION_DIRECTORY>/loginfo-handler %{sVv}
|
2000-05-12 06:57:11 +04:00
|
|
|
|
|
|
|
If you have other scripts invoked by CVSROOT/loginfo, you will want
|
|
|
|
to make sure to change any running under the "DEFAULT" keyword to
|
|
|
|
"ALL" like the loginfo handler, and probably carefully read the
|
|
|
|
execution rules for CVSROOT/loginfo from the CVS manual.
|
|
|
|
|
2003-02-18 14:53:44 +03:00
|
|
|
If you are running the Unix port of CVS-NT, you'll need to use a
|
|
|
|
slightly different command line:
|
|
|
|
|
2006-03-18 03:33:54 +03:00
|
|
|
ALL <VIEWVC_INSTALLATION_DIRECTORY>/loginfo-handler %{sVv} cvsnt
|
2003-02-18 14:53:44 +03:00
|
|
|
|
|
|
|
The extra 'cvsnt' parameter tells the handler script to parse the
|
|
|
|
commit information in a different way.
|
2004-07-16 20:39:46 +04:00
|
|
|
|
|
|
|
For Subversion repositories, there is a single script called
|
|
|
|
svndbadmin that performs both of the above tasks.
|
|
|
|
|
|
|
|
To build a database of all the commits in the Subversion repository
|
|
|
|
/home/svn, invoke: "./svndbadmin rebuild /home/svn". If you want
|
|
|
|
to update the checkin database, invoke: "./svndbadmin update
|
|
|
|
/home/svn".
|
|
|
|
|
|
|
|
To get real time updates, you will need to add a post-commit hook
|
|
|
|
(for the repository example above, the script should go in
|
|
|
|
/home/svn/hooks/post-commit). The script should look something
|
|
|
|
like this:
|
|
|
|
|
|
|
|
#!/bin/sh
|
|
|
|
REPOS="$1"
|
|
|
|
REV="$2"
|
2006-03-18 03:33:54 +03:00
|
|
|
<VIEWVC_INSTALLATION_DIRECTORY>/svndbadmin rebuild "$REPOS" "$REV"
|
2004-07-16 20:39:46 +04:00
|
|
|
|
|
|
|
If you allow revision property changes in your repository, create a
|
|
|
|
post-revprop-change hook script containing the same commands as the
|
|
|
|
post-commit one. This will make sure that the checkin database
|
|
|
|
stays consistent when you change the svn:log, svn:author or
|
|
|
|
svn:date revision properties.
|
|
|
|
|
2001-10-26 00:02:22 +04:00
|
|
|
6) You may want to modify the HTML template file:
|
2000-05-12 06:57:11 +04:00
|
|
|
|
2006-03-18 03:33:54 +03:00
|
|
|
<VIEWVC_INSTALLATION_DIRECTORY>/templates/query.ezt
|
2000-05-12 06:57:11 +04:00
|
|
|
|
2001-10-26 00:02:22 +04:00
|
|
|
This is used by the query.cgi script to generate part of its HTML output.
|
|
|
|
At some point the currently hardcoded table output will also vanish.
|
2000-05-12 06:57:11 +04:00
|
|
|
|
2001-10-26 00:02:22 +04:00
|
|
|
7) You should be ready to go. Load up the query.cgi script and give
|
2000-05-12 07:23:33 +04:00
|
|
|
it a try.
|
2000-05-12 06:57:11 +04:00
|
|
|
|
1999-12-03 13:50:49 +03:00
|
|
|
|
2001-10-24 13:44:59 +04:00
|
|
|
ENSCRIPT CONFIGURATION
|
|
|
|
----------------------
|
|
|
|
|
|
|
|
Enscript is program that can colorize sourcecode of a lot of languages.
|
|
|
|
Linux distributions like for example SuSE Linux from at least 7.0
|
2001-11-14 18:06:31 +03:00
|
|
|
up to the recently released 7.3 already contain a precompiled and
|
2001-10-24 13:44:59 +04:00
|
|
|
configured enscript 1.6.2 package.
|
|
|
|
|
2006-01-04 23:25:38 +03:00
|
|
|
1) Download genscript from http://www.codento.com/people/mtr/genscript/
|
2001-10-24 13:44:59 +04:00
|
|
|
|
|
|
|
2) Configure and compile per instructions with enscript.
|
|
|
|
(I 've not done this, since I'm using the precompiled package
|
|
|
|
delivered with SuSE Linux)
|
|
|
|
|
2006-03-18 03:33:54 +03:00
|
|
|
3) Set the 'use_enscript' option in viewvc.conf to 1.
|
2001-10-24 13:44:59 +04:00
|
|
|
|
|
|
|
4) That's it!
|
|
|
|
|
2001-10-24 16:56:10 +04:00
|
|
|
5) If you want to colorize exotic languages, you might have to
|
2006-03-18 03:33:54 +03:00
|
|
|
patch 'lib/viewvc.py' and add a new highlighting file to enscript.
|
2006-01-04 23:25:38 +03:00
|
|
|
For example, if you are interested in a patch for Modula-2 support,
|
|
|
|
send mail to pefu@sourceforge.net.
|
2001-10-24 16:56:10 +04:00
|
|
|
|
2001-11-19 04:10:08 +03:00
|
|
|
|
2001-09-22 09:38:32 +04:00
|
|
|
CVSGRAPH CONFIGURATION
|
|
|
|
----------------------
|
|
|
|
|
2001-10-24 13:44:59 +04:00
|
|
|
CvsGraph is a program that can display a clickable, graphical tree
|
2001-10-12 09:17:00 +04:00
|
|
|
of files in a CVS repository.
|
2001-09-22 09:38:32 +04:00
|
|
|
|
2001-10-26 01:53:28 +04:00
|
|
|
WARNING: Under certain circumstances (many revisions of a file
|
|
|
|
or many branches or both) cvsgraph can generate very huge images.
|
|
|
|
Especially on thin clients these images may crash the Web-Browser.
|
2001-11-14 18:06:31 +03:00
|
|
|
Currently there is no known way to avoid this behavior of cvsgraph.
|
2001-10-26 01:53:28 +04:00
|
|
|
So you have been warned!
|
|
|
|
|
|
|
|
Nevertheless cvsgraph can be quite helpful on repositories with
|
|
|
|
a reasonable number of revisions and branches.
|
|
|
|
|
2006-03-18 03:33:54 +03:00
|
|
|
1) Install viewvc according to instructions in 'INSTALLING
|
|
|
|
VIEWVC' section above. The installation directory is where
|
|
|
|
the 'viewvc-install' script copied and configured the viewvc
|
2001-10-12 09:17:00 +04:00
|
|
|
programs.
|
2001-09-22 09:38:32 +04:00
|
|
|
|
|
|
|
2) Download CvsGraph from http://www.akhphd.au.dk/~bertho/cvsgraph/
|
|
|
|
|
|
|
|
3) Configure and compile per instructions with CvsGraph. I had
|
|
|
|
problems with 'configure' finding the gd library. Had to create
|
2001-10-24 13:44:59 +04:00
|
|
|
a link from libgd.so to libgd.do.4.0.0. On Solaris you might
|
|
|
|
want to edit the link command line and add the option -R if
|
|
|
|
you have you libraries at non-standard location.
|
2001-09-22 09:38:32 +04:00
|
|
|
|
2001-10-24 13:44:59 +04:00
|
|
|
4) Place the 'cvsgraph' executable into a directory readable by the
|
|
|
|
userid running the web server. (default is '/usr/local/bin' if
|
|
|
|
you simply type 'make install' in the cvsgraph directory).
|
2001-09-22 09:38:32 +04:00
|
|
|
|
2006-03-18 03:33:54 +03:00
|
|
|
5) Check the setting of the 'cvsgraph_path' option in viewvc.conf:
|
2001-10-24 13:44:59 +04:00
|
|
|
/usr/local/bin/ is most often NOT contained in $PATH of the
|
|
|
|
webserver process (e.g. Apache), so you will have to edit this.
|
2006-03-18 03:33:54 +03:00
|
|
|
Set the 'use_cvsgraph' option in viewvc.conf to 1.
|
2001-09-22 09:38:32 +04:00
|
|
|
|
2001-10-24 13:44:59 +04:00
|
|
|
6) That's it!
|
2001-09-22 09:38:32 +04:00
|
|
|
|
2006-03-18 03:33:54 +03:00
|
|
|
7) There is a file <VIEWVC_INSTALLATION_DIRECTORY>/cvsgraph.conf that
|
2001-10-24 13:44:59 +04:00
|
|
|
you may want to edit if desired to set color and font characteristics.
|
2001-09-22 09:38:32 +04:00
|
|
|
See the cvsgraph.conf documentation. No edits are required in
|
2006-03-18 03:33:54 +03:00
|
|
|
cvsgraph.conf for operation with viewvc.
|
2001-09-22 09:38:32 +04:00
|
|
|
|
|
|
|
|
2003-03-20 19:29:38 +03:00
|
|
|
SUBVERSION INTEGRATION
|
|
|
|
----------------------
|
|
|
|
|
2005-12-17 20:19:28 +03:00
|
|
|
ViewVC now supports browsing of Subversion repositories. To use
|
|
|
|
ViewVC with Subversion, make sure you have both Subversion itself and
|
2003-03-20 19:29:38 +03:00
|
|
|
the Subversion Python bindings installed. See Subversion's
|
|
|
|
installation notes for more details on how to build and install these
|
|
|
|
items.
|
|
|
|
|
|
|
|
Generally speaking, you'll know when your installation of Subversion's
|
|
|
|
bindings has been successful if you can import the 'svn.repos' module
|
|
|
|
from within your Python interpreter:
|
|
|
|
|
|
|
|
% python
|
|
|
|
Python 2.2.2 (#1, Oct 29 2002, 02:47:30)
|
|
|
|
[GCC 2.96 20000731 (Red Hat Linux 7.2 2.96-108.7.2)] on linux2
|
|
|
|
Type "help", "copyright", "credits" or "license" for more information.
|
2003-06-16 22:19:04 +04:00
|
|
|
>>> import svn.repos
|
2003-03-20 19:29:38 +03:00
|
|
|
>>>
|
|
|
|
|
2005-01-14 07:54:50 +03:00
|
|
|
Note that by default, Subversion installs its bindings in a location
|
|
|
|
that is not in Python's default module search path (for example, on
|
|
|
|
Linux systems the default is usually /usr/local/lib/svn-python). You
|
|
|
|
need to remedy this, either by adding this path to Python's module
|
|
|
|
search path, or by relocation the bindings to some place in that
|
|
|
|
search path.
|
|
|
|
|
2003-03-20 19:29:38 +03:00
|
|
|
Configuration of the Subversion repositories happens in much the same
|
|
|
|
way as with CVS repositories, only with the 'svn_roots' configuration
|
2004-10-08 21:57:14 +04:00
|
|
|
variable instead of the 'cvs_roots' one.
|
2003-03-20 19:29:38 +03:00
|
|
|
|
|
|
|
|
1999-12-03 13:50:49 +03:00
|
|
|
IF YOU HAVE PROBLEMS ...
|
|
|
|
------------------------
|
|
|
|
|
2006-03-18 03:33:54 +03:00
|
|
|
If you've trouble to make viewvc.cgi work:
|
1999-12-03 13:50:49 +03:00
|
|
|
|
|
|
|
=== If nothing seems to work:
|
|
|
|
|
2000-01-11 12:21:48 +03:00
|
|
|
o check if you can execute CGI-scripts (Apache needs to have an
|
1999-12-03 13:50:49 +03:00
|
|
|
ScriptAlias /cgi-bin or cgi-script Handler defined). Try to
|
|
|
|
execute a simple CGI-script that often comes with the distribution
|
|
|
|
of the webserver; locate the logfiles and try to find hints
|
|
|
|
which explain the malfunction
|
|
|
|
|
2000-01-11 12:21:48 +03:00
|
|
|
o view the entries in the webserver's error.log
|
|
|
|
|
2005-12-17 20:19:28 +03:00
|
|
|
=== If viewvc seems to work but doesn't show the expected result
|
1999-12-03 13:50:49 +03:00
|
|
|
(Typical error: you can't see any files)
|
|
|
|
|
2000-01-11 12:21:48 +03:00
|
|
|
o check whether the CGI-script has read-permissions to your
|
1999-12-03 13:50:49 +03:00
|
|
|
CVS-Repository. The CGI-script often runs as the user 'nobody'
|
|
|
|
or 'httpd' ..
|
|
|
|
|
2005-12-17 20:19:28 +03:00
|
|
|
o does viewvc find your RCS utilities? (edit rcs_path)
|
2000-03-24 14:08:25 +03:00
|
|
|
|
|
|
|
=== If something else happens or you can't get it to work:
|
|
|
|
|
2005-12-17 20:19:28 +03:00
|
|
|
o check the ViewVC home page:
|
2000-03-24 14:08:25 +03:00
|
|
|
|
2005-12-17 20:19:28 +03:00
|
|
|
http://viewvc.org/
|
2000-03-24 14:08:25 +03:00
|
|
|
|
2005-12-17 20:19:28 +03:00
|
|
|
o review the ViewVC mailing list archive to see if somebody else had
|
2000-03-24 14:08:25 +03:00
|
|
|
the same problem, and it was solved:
|
|
|
|
|
2005-12-17 20:19:28 +03:00
|
|
|
http://viewvc.tigris.org/servlets/SummarizeList?listName=users
|
2000-03-24 14:08:25 +03:00
|
|
|
|
2005-12-17 20:19:28 +03:00
|
|
|
o send mail to the ViewVC mailing list: users@viewvc.tigris.org
|
2000-03-24 14:08:25 +03:00
|
|
|
|
|
|
|
NOTE: make sure you provide an accurate description of the problem
|
|
|
|
and any relevant tracebacks or error logs.
|