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
|
2006-04-09 20:02:01 +04:00
|
|
|
ENSCRIPT AND HIGHLIGHT 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/)
|
2006-11-09 23:47:45 +03:00
|
|
|
* Subversion, Version Control System, 1.3.1 or later
|
2005-09-23 17:48:36 +04:00
|
|
|
(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/)
|
2006-04-09 20:02:01 +04:00
|
|
|
* MySQL 3.22 and MySQLdb 0.9.0 or later to create a commit database
|
2005-09-23 17:48:36 +04:00
|
|
|
(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/)
|
2006-03-22 01:47:11 +03:00
|
|
|
* Highlight, code colorizer, 2.2.10 or later required, 2.4.5 or
|
|
|
|
later recommended for reliable line numbering
|
|
|
|
(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
|
2006-04-09 20:02:01 +04:00
|
|
|
ViewVC, type "bin/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
|
2006-07-20 20:46:52 +04:00
|
|
|
to tell viewvc the paths to your CVS and Subversion repositories.
|
|
|
|
Next, configure your web server (in the way appropriate to that browser)
|
|
|
|
to run <VIEWVC_INSTALLATION_DIRECTORY>/bin/cgi/viewvc.cgi. The section
|
|
|
|
`INSTALLING VIEWVC' 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-04-09 20:02:01 +04:00
|
|
|
NOTE: Windows users can refer to windows/README for Windows-specific
|
|
|
|
installation instructions.
|
1999-12-03 13:50:49 +03:00
|
|
|
|
2006-04-09 20:02:01 +04:00
|
|
|
1) To get viewvc.cgi to work, make sure that you have Python installed
|
|
|
|
and a webserver which is capable of executing CGI scripts (either
|
|
|
|
based on the .cgi extension, or by placing the script within a specific
|
|
|
|
directory).
|
1999-12-03 13:50:49 +03:00
|
|
|
|
2006-04-09 20:02:01 +04:00
|
|
|
Note that to browse CVS repositories, the viewvc.cgi script needs to
|
|
|
|
have READ-ONLY, physical access to the repository (or a copy of it).
|
|
|
|
Therefore, rsh/ssh or pserver access to the repository will not work.
|
|
|
|
And you need to have the RCS utilities installed, specifically "rlog",
|
|
|
|
"rcsdiff", and "co".
|
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-05-16 02:37:24 +04:00
|
|
|
4) The CGI programs are in <VIEWVC_INSTALLATION_DIRECTORY>/bin/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-05-16 02:37:24 +04:00
|
|
|
also copy the installed <VIEWVC_INSTALLATION_DIRECTORY>/bin/cgi/*.cgi
|
2006-03-18 03:33:54 +03:00
|
|
|
scripts after the install (unlike the other files in ViewVC, the scripts
|
2006-05-16 02:37:24 +04:00
|
|
|
under bin/ 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
|
|
|
|
--------------------
|
|
|
|
|
2006-04-09 20:02:01 +04:00
|
|
|
1) Find out where the web server configuration file is kept. Typical
|
|
|
|
locations are /etc/httpd/httpd.conf, /etc/httpd/conf/httpd.conf,
|
|
|
|
and /etc/apache/httpd.conf. Depending on how apache was installed,
|
|
|
|
you may also look under /usr/local/etc or /etc/local. Use the vendor
|
|
|
|
documentation or the find utility if in doubt.
|
2002-02-08 10:13:44 +03:00
|
|
|
|
|
|
|
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
|
2006-04-09 20:02:01 +04:00
|
|
|
|
2006-07-20 20:46:52 +04:00
|
|
|
ScriptAlias /viewvc <VIEWVC_INSTALLATION_DIRECTORY>/bin/cgi/viewvc.cgi
|
2006-04-09 20:02:01 +04:00
|
|
|
|
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-05-16 02:37:24 +04:00
|
|
|
ScriptAlias /viewvc /usr/local/viewvc-1.0/bin/cgi/viewvc.cgi
|
|
|
|
ScriptAlias /query /usr/local/viewvc-1.0/bin/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-05-16 02:37:24 +04:00
|
|
|
<VIEWVC_INSTALLATION_DIRECTORY>/bin/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-05-16 02:37:24 +04:00
|
|
|
<VIEWVC_INSTALLATION_DIRECTORY>/bin/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-07-20 20:46:52 +04:00
|
|
|
<VIEWVC_INSTALLATION_DIRECTORY>/bin/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).
|
|
|
|
|
2006-04-09 20:02:01 +04:00
|
|
|
3) Restart apache. The commands to do this vary. "httpd -k restart" and
|
|
|
|
"apache -k restart" are two common variants. On RedHat Linux it is
|
|
|
|
done using the command "/sbin/service httpd restart" and on SuSE Linux
|
|
|
|
it is done with "rcapache restart"
|
2002-02-08 10:13:44 +03:00
|
|
|
|
2006-04-09 20:02:01 +04:00
|
|
|
4) Optional: Add access control.
|
2002-02-08 10:13:44 +03:00
|
|
|
|
|
|
|
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>
|
|
|
|
|
2006-04-09 20:02:01 +04:00
|
|
|
WARNING: If you enable the "checkout_magic" or "allow_tar" options, you
|
|
|
|
will need to add additional location directives to prevent people
|
|
|
|
from sneaking in with URLs like:
|
2005-02-13 19:48:12 +03:00
|
|
|
|
2006-03-18 03:33:54 +03:00
|
|
|
http://<server_name>/viewvc/*checkout*/<module_name>
|
|
|
|
http://<server_name>/viewvc/~checkout~/<module_name>
|
2006-04-09 20:02:01 +04:00
|
|
|
http://<server_name>/viewvc/<module_name>.tar.gz?view=tar
|
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
|
|
|
-----------------
|
|
|
|
|
2006-04-09 20:02:01 +04:00
|
|
|
Please read the file upgrading.html in the viewvc.org/ 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.
|
|
|
|
|
2006-04-09 20:02:01 +04:00
|
|
|
1) You need MySQL and MySQLdb (a Python DBAPI 2.0 module) installed.
|
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-07-20 20:46:52 +04:00
|
|
|
3) Run the <VIEWVC_INSTALLATION_DIRECTORY>/bin/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-07-20 20:46:52 +04:00
|
|
|
ALL <VIEWVC_INSTALLATION_DIRECTORY>/bin/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-07-20 20:46:52 +04:00
|
|
|
ALL <VIEWVC_INSTALLATION_DIRECTORY>/bin/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-07-20 20:46:52 +04:00
|
|
|
<VIEWVC_INSTALLATION_DIRECTORY>/bin/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.
|
|
|
|
|
2006-04-09 20:02:01 +04:00
|
|
|
6) You should be ready to go. Click one of the "Query revision history"
|
|
|
|
links in ViewVC directory listings and give it a try.
|
2000-05-12 06:57:11 +04:00
|
|
|
|
|
|
|
|
2006-04-09 20:02:01 +04:00
|
|
|
ENSCRIPT AND HIGHLIGHT CONFIGURATION
|
|
|
|
------------------------------------
|
2000-05-12 06:57:11 +04:00
|
|
|
|
2006-04-09 20:02:01 +04:00
|
|
|
Enscript and Highlight are programs that can colorize source code for
|
|
|
|
a lot of languages. ViewVC can be configured to use either one.
|
2000-05-12 06:57:11 +04:00
|
|
|
|
2006-04-09 20:02:01 +04:00
|
|
|
1) Install Enscript or Highlight using your system's package manager
|
|
|
|
or downloading from the project home pages.
|
1999-12-03 13:50:49 +03:00
|
|
|
|
2006-04-09 20:02:01 +04:00
|
|
|
2) Set the 'use_enscript' or 'use_highlight' options in viewvc.conf to 1.
|
2001-10-24 13:44:59 +04:00
|
|
|
|
2006-04-09 20:02:01 +04:00
|
|
|
3) You may also need to set 'enscript_path' and 'highlight_path' options
|
|
|
|
if the executables are not located on the system PATH.
|
2001-10-24 13:44:59 +04:00
|
|
|
|
|
|
|
4) That's it!
|
|
|
|
|
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
|
2006-04-09 20:02:01 +04:00
|
|
|
or many branches or both) CvsGraph can generate very huge images.
|
2001-10-26 01:53:28 +04:00
|
|
|
Especially on thin clients these images may crash the Web-Browser.
|
2006-04-09 20:02:01 +04: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!
|
|
|
|
|
2006-04-09 20:02:01 +04:00
|
|
|
Nevertheless, CvsGraph can be quite helpful on repositories with
|
2001-10-26 01:53:28 +04:00
|
|
|
a reasonable number of revisions and branches.
|
|
|
|
|
2006-04-09 20:02:01 +04:00
|
|
|
1) Install CvsGraph using your system's package manager or downloading
|
|
|
|
from the project home page.
|
2001-09-22 09:38:32 +04:00
|
|
|
|
2006-04-09 20:02:01 +04:00
|
|
|
2) Set the 'use_cvsgraph' options in viewvc.conf to 1.
|
2001-09-22 09:38:32 +04:00
|
|
|
|
2006-04-09 20:02:01 +04:00
|
|
|
3) You may also need to set the 'cvsgraph_path' option if the
|
|
|
|
CvsGraph executable is not located on the system PATH.
|
2001-09-22 09:38:32 +04:00
|
|
|
|
2006-04-09 20:02:01 +04:00
|
|
|
4) 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
|
|
|
|
----------------------
|
|
|
|
|
2006-04-09 20:02:01 +04:00
|
|
|
ViewVC 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.
|