Page History

Turn Off History

CVSTracNT

I've transitioned CVSTrac to Windows, added several tools, and built a Installer.

I named it CVSTracNT, and registered it in SourceForge:
http://sourceforge.net/projects/cvstracnt/

You can always download the latest version from here:
http://download.cnpack.org/CVSTracNT.exe

See also: CvstracNtIntroduction
by Jingyu Zhou(zjy@cnpack.org) from China.


Notes for running CVSTrac in HTTP mode: (from Ben Mehling -- Note: At this time (2004/02/06) I've transitioned our CVSTrac setup onto a unix box. There were a number of small bugs that I could never nail down and they began to get in the way of development.)
target platform: Win2k SP3 (tested on SP4 too)

cygwin install target: d:\services\cygwin

cvs repository: d:\cvs (mounted as /home/cvs inside the cygwin environment)

Cygwin install/configure

I setup cygwin to use the DOS mode (which I believe mounts the drives in textmode by default)

install cygwin packages:

add d:\services\cygwin\bin to all users path

I mounted my cvs dir under the cygwin root -- I believe it required a reboot to really take hold.

   mount -f -s -t  "d:/cvs" "/home/cvs"

An ls of /home does not show 'cvs', however you can cd into it and run commands through it.

CVSTrac install/configure

build sqlite and cvstrac (I actually used the cygwin gcc setup to do this. Required cygwin packages: binutils, make, gcc, etc.) I used the latest CVSTrac source (1.1.0 from CVS) and SQLite source (2.6.2 tar ball), compiled under the cygwin environment using gcc and other normal binutils. (you'll need libsqlite.la, libsqlite.a in /usr/local/lib and sqlite.h in /usr/local/include to compile cvstrac)

Richard mentioned that sqlite would not compile under cygwin properly, however I gave it a shot and it seems to run fine. I've tested nearly every function I can think of (that read/write from the .db files) and all appears fine.

There may be considerations of size limitations that I do not know about -- Richard could comment here if possible? (Richard says: I've received reports that file locking does not work under cygwin. Perhaps you have a newer version of cygwin that fixes the problem?)

(Ben says: I've been attempting to keep up w/ releases of cvstrac and sqlite as they become available. I've just updated to 1.1.2 from CVS. At the same time I attempted to compile the latest sqlite (2.7.6) to update from the currently working sqlite-2.7.1. I could not get either 2.7.6-release or 2.7.6-snap from CVS to compile under cygwin. At this point cvstrac-1.1.2 compiles and runs fine under sqlite-2.7.1. At some point I may fall behind though and not be able to update cvstrac... Since this is such a niche problem, I don't want to bother the sqlite community with it... if anyone wants to look at the errors for reference: CygwinCompileErrors)

NOTE: turned off I18N (Changed "define CVSTRAC_I18N" to "0" in config.h) defines because of this error: ../cvstrac-VERSION/config.h:40: langinfo.h: No such file or directory

Move the CVSTrac binary into directory from which it will run:

   cp cvstrac.exe from build dir to /usr/local/bin/cvstrac-VERSION.exe
   ln -s /usr/local/bin/cvstrac-VERSION.exe /usr/local/bin/cvstrac.exe

run the CVSTrac initialization command:

   /usr/local/bin/cvstrac init /home/cvs Project-name

NOTE: most of the problems I ran into getting it all working, were path issues. The server I'm using for this also runs ViewCVS and cvsntserver. I spent a good deal of time isolating the versions of the various cvs/rcs utils (rcsdiff, co, etc.). CVSTrac now uses the versions that come w/ the cygwin packages. ViewCVS is configured in it's conf to use the same path. CVSntserver uses its own root.

In the end, I wrote an sh script that sets the path then runs cvstrac:

exec_cvstrac.sh:

   #! /bin/sh

   PATH=/bin:/usr/bin:/usr/local/bin
   export PATH
   /usr/local/bin/cvstrac cgi /home/cvs Project-Name

Apache install/configure

I ended up installing the latest apache package from within cygwin's setup util. This installs into /var/www, /etc/apache and uses /usr as its prefix dir. (Module installed: web/apache)

  /usr/sbin/apachectl start

  ln -s /usr/local/bin/exec_cvstrac.sh /usr/www/htdocs/index.cgi

Create service to start apache on boot:

   cygrunsrv -I cyg_apache -d "CYGWIN httpd" -p /usr/sbin/start_apache.sh

start_apache.sh contents:

   #! /bin/sh

   PATH=/usr/bin:/bin:/usr/sbin:/usr/local/bin
   export PATH

   echo "Starting Apache:"
   /usr/sbin/apachectl start

Success:

Visited http://MyHostName:PortNum to login to my new CVSTrac server

Initially I attemted to get this running using the cygwin Inetd port and cvstrac in 'http' mode. I was able to get the server to limp along, however it behaved badly in the following ways:

  1. In MS IE 5.5sp2 & 6.0 the pages would continually reload themselves over and over again. You could click the stop button, then do a CVSTrac operation. I looked through the source and played w/ changing the linefeed/carriagereturn setup for the HTTP responses, however was unable to affect a real change in any way.

  2. In Moz 1.0 the pages would half load intermittently. Usually, I was able to reload the page a few times to get data. Because Moz re-submits (lame, lame, lame) the page request when you view source I couldn't tell if it was displaying improperly on the client side or not getting the full page from the server side.

  3. wget & lynx would get the pages once, just fine. However both complained of "disconnected" or "connection reset by peer".

If you really want to get this running using inetd, here's my additional notes on this:

Configure inetd: (used this as reference: http://www.adamswann.com/library/2001/Cygwin-Inetd.html)

from within cygwin shell (zsh) run:

   cygrunsrv -I inetd -d "CYGWIN inetd" -p /usr/sbin/inetd -a -d -e CYGWIN=ntsec

add line to c:\%WINDIR%\system32\drivers\etc\services:

   cvstrac	####/tcp		 # CVSTrac server

add line to d:\services\cygwin\etc\inetd.conf:

   cvstrac stream  tcp     nowait  root  /usr/sbin/cvstrac  cvstrac http /home/cvs Project-name

NOTE: if I used any other user (myself or cvs), it wouldn't work via inetd. I'd get "cvstrac: couldn't change directory to /home/cvs" errors

Question: does cvstrac work in CGI mode in IIS?

Attachments: