ViewCvs Setup on Windows with CVSNT 2.0.x and IIS or Apache webservers

来源:百度文库 编辑:神马文学网 时间:2024/05/24 02:06:00
ViewCvs Setup on Windows with IIS 4-5-6 or Apache
Version 1.0_2005-05-18
Author: Bo Berglund
Date: 2005-05-23
Background
I have found that getting ViewCvs up and running on Windows can be quite a challenge. The reason for this is located in several different areas:
ViewCvs is primarily developed for Unix/Linux and Apache The RCS binaries available for Windows date back to August 1995 and have problems with newer CVS repository data. When used with CVSNT recent builds (from about 1.11.1.3 build 60) the RCS problems show up on repository files committed by this CVSNT version.
To still get ViewCvs to work took some messing with the Python script files to edit in fixes for the problems. These fixes are now in SourceForge CVS, which is what the version included in this setup is based on.
One notable item is that this version of ViewCvs will not use the Gnu RCS tools and so a big problem with comptibility is gone. It will use a direct call to cvs.exe instead.
However it is still not self-evident how to get everything working so therefore I have created a Windows setup project using InnoSetup (see link below). With this setup you have just to use the setup GUI and make some setting entries after which the installation is fully automatic. The setup installs ViewCvs plus the add-ons CvsGraph and Enscript.
Please note that I am not the author of the ViewCvs fixes or any other program, I am just creating this setup program that collects the working files into a usable setup. The actual sources for ViewCvs that this setup uses are available from Sourceforge via CVS. The files used in the setup can also be retrieved via CVS from my server (contact me for a login) until I have had time to find out how to put them on SourceForge.
 
Table of contents
What is needed to run ViewCvs
How to get ViewCvs and other software
Bugs and issues
Get the ViewCvs installer
How to install on NT4 with IIS 4
ViewCvs related links:
CVSGraph 1.5.2 to replace the version in the installer
ViewCvs main page
ViewCvs project page on SourceForge
ViewCvs sources via CVS
ViewCvs via ViewCvs...
ViewCvs for Windows
CvsGraph
Enscript
CVS links:
CVSNT homepage
CVSMailer for CVSNT
CVSNT 2.5.03 installation tips
CVSNT 2.5.03 Auditing Configuration Tutorial
The free part of Karl Fogel‘s CVS book in HTML format
TOOLS:
InnoSetup 4 Installer homepage(Now with Pascal scripting)
WEBSERVER alternative:
Apache webserver homepage
What is needed to run ViewCvs on Windows?
In order to run ViewCvs you must have a working CVSNT server on a PC on your network. It should be running on Windows 2000 (Server or Workstation) or higher. You also must have a webserver installed on this PC. I use XP-Pro and IIS 5.
It is also possible to use Apache for Windows, and this is now also covered by this setup.
If your environment does not fill these requirements then the setup will not start.
Summary of the requirements:
Windows 2000 or higher recommended, but it will also work on NT4 SP6 with IIS 4 CVSNT 2.0.5 or higher Python 2.2, 2.3 or 2.4 Python extensions for Win32 installed Microsoft Internet Information Services version 5 or higher
(If you have IIS 4 you can still use the installer but there might be additional tasks to be done after the setup to get it going, see at end of page). or Apache version 2 can also be used in place of Microsoft IIS.
 
Installer tasks
The ViewCvs installer performs these tasks to set up ViewCvs on your PC:
Checks that IIS or Apache is installed (no version checking) Checks if CVSNT version 2.0.5 or higher is installed Checks that Python 2.2 or higher is installed Checks that the Python extensions for Win32 are installed Copies the ViewCvs sources to a temp dir Runs the ViewCvs install script, then removes the temp files Copies the CvsGraph files to the GnuWin32 folder Copies the Enscript files to the GnuWin32 folder including the dependencies (sed, libiconv, libintl) Copies the ViewCvs images to wwwroot/icons or the Apache icons folder Copies the viewcvs.cgi script file to a folder (only for IIS) Sets this folder as a virtual directory for IIS (only for IIS) Adds a Web Service Extension for Python (only for IIS 6) Sets the viewcvs/www/cgi/viewcvs.cgi file as a ScriptAlias (for Apache) Retrieves the CVSNT settings from the registry Updates the viewcvs.conf, cvsgraph.conf and enscript.cnf files according to system settings Sets the system path to point to the Enscript binary folder Modifies the permissions on cmd.exe such that the Internet Guest Account gets read permissions (for IIS) Sets up shortcuts to ViewCvs and the ViewCvs help files Some other minor stuff not worth listing...
 
How to get ViewCvs and other software
You need the following software to successfully install ViewCvs:
CVS for NT, also known as CVSNT. This is the server that ViewCvs will complement. Python 2.2.2 or higher, the scripting engine that runs ViewCvs Python Win32 extensions ViewCvs itself, open source program available from SourceForge. This is included with the installer.
The external software components can be downloaded here:
CVSNT
Python
ActiveState distribution, includes the win32 extensions:
ActiveState Python description
ActiveState Python download page
ActiveState Python 2.3.2 build 232 setup file (msi)
ActiveState Python 2.4.1 build 245 setup file (msi)
or get it from Python.org, but then you need to download two setups to get the win32 extensions
Python 2.2.3 from Python.org
Python 2.3.2 from Python.org
Python 2.4.1 from Python.org
Win32 extensions for Python
 
Known bugs and issues
There are a few issues that are outstanding and not/partially solved. I list them here for your information:
From CVSNT version 2.0.44 it is possible to locate repositories in wildly separate parent folders. This differs from CVSNT pre 2.0.44 and the ViewCvs installer will now create a fake prefix from the parent folder of the first repository and use this in the same way as the prefix was used before. This may have some side effects that you have to fix manually if you use this repository structure, but if you use a common top folder for all of your repositories like before then there will be no change in behaviour from before. It is not possible to select the installation folder for the GnuWin32 tools. From rev f they are always installed to \..\Gnuwin32. This happens even if the default ViewCvs installation destination is changed. In some cases the enscript syntax highlighting does not work. It appears to be caused by the extra permission setting that Microsoft IIS Lockdown Tool puts in place.
What happens is that there are two groups created: "Web Anonymous Users" and "Web Applications" into which the IUSR_COMPUTER and IWAM_COMPUTER accounts are put respectively. Then these groups are explicitly denied access to cmd.exe among other places. But enscript *must* have access to cmd.exe, because it works through cmd.exe. So enscript highlighting stops working. :=(
Solution from installer revision f:
During installation the cmd.exe of the target system is copied over to the GnuWin32 dir. Thus it is locally available for use by enscript. The server has to be restarted after the installation, which is not good of course considering that a server should not be stopped. The reason is that the system PATH to the gnuwin32 tools has to be registered and active for ViewCvs to work. As yet noone has suggested how to make it work without a restart. If both Apache and IIS is installed on the server, IIS is selected as the webserver without any user choice. Could be changed in the future by adding a select dialogue when both are detected. From CVSNT 2.5.03.xxxx (exact build not known) there is a problem in CVSGraph to correctly compose the revision graph image. This is caused by some assumptions made by CVSGraph on the format of the RCS files and has been corrected in the new version 1.5.2 of CVSGraph.
This was not available at the time of building the installer back in May 2005, so I have provided a separate download for the new files to update existing installations.
Download the zipfile and extract into the GnuWin32/bin directory.
The installer now published contains this version already so this is only needed for installations done with an installer downloaded previously (before 2006-01-05).
CVSGraph 1.5.2 to replace the version in the installer
Revision history
p - Installer now contains the updated CVSGraph 1.5.2 needed for newer CVSNT installations (2.5.03)
o - Installer bug fixed that failed to properly deposit gzip.exe and cvs.exe
n - Installer now includes ViewCvs sources from CVS HEAD as of 2005-05-18
m - Installer now tries harder to find the win32 extensions to Python 2.4
- Now includes bugfix for broken CVSGraph links when not browsing default repository.
l Bugfix in installer, now detects Python 2.4 in addition to 2.1-2.3
k Latest sources from ViewCvs CVS HEAD as of 2004-12-03 used
New version 1.5.1 of CVSGraph included, displays merge arrows using CVSNT merge points
Now includes ViewCvs source files from Dec 03, 2004
Displays the version number 2004-12-03 on the webpages to indicate the age of ViewCvs
j CVSNT RepositoryPrefix changes from CVSNT 2.0.44 now handled.
New version of CVSGraph included to cope with recent CVSNT changes
Now includes ViewCvs source files from August 14, 2004 with SubVersion support
File needed for the Download Tarball function (gzip.exe) is now included
i New: includes enscript support for csharp and vba (thanks: John Cole)
Now also includes the ViewCvs CVS HEAD files from March 28, 2004
h Added extra path delimiter handling in paths (thanks: Glen Starrett)
Now also includes the ViewCvs CVS HEAD files from March 28, 2004
g Modified path delimiter handling for rcspath (thanks: Daniel Kirschsieper)
f Added handling of Microsoft "Web Server Lockdown" that made enscript stop working
Changed install directory for the GnuWin32 tools to be parallel to ViewCvs (\..\Gnuwin32)
e Added IIS 6 special "Web Service Extension" settings
d Added support for Apache webserver
Download the ViewCvs installer
This is the ViewCvs 1.0_2005-05-18B installer made with InnoSetup 4.2.7.
ViewCvs ver 1.0_2005-05-18B installer
ViewCvs Installer sourcefiles rev 2005-05-18
The sourcefiles archive contain everything needed including the viewcvs sources. Both the CvsGraph, Gnuwin32 and Enscript binaries are included.
Unique visit counter re-started 2004-05-22 after URL change:

Back to contents
How to adjust the installation on NT4 with IIS 4
The installer works seamlessly on IIS 5 including the creation of all the necessary virtual directory and application mappings needed. On IIS 4, however, it might not succeeded fully in the creation of the application mapping in script. If this happens to you there might a bit of afterwork required. I will decribe this below:
1. After the installer has finished
and the PC has rebooted (needed to register the paths when running the installer for the first time), you need to open the IIS manager. Normally this is found at:
Start/Programs/Windows NT4.0 Option Pack/Microsoft Personal Web Server/Internet Service Manager

2. Application properties
Now you must open the properties page of ViewCvs by rightclicking and selecting "Properties"


3. Application Configuration
When you click the "Configuration" button the Applications mappings tab opens. Select the CGI line in the list and click Edit.

4. Application Mapping
Now the mapping configuration is shown. Make sure that it looks like this. Note especially the quotes in the parameter ("%s"). Click OK to save this setting.

5. Finished!