If you have a new question, enter it on this page and leave the Answer: section blank. Someone will eventually add text that provides an answer. At least, that's the theory...


Question: Should this be a FAQ?

I'm not sure whether I should create a FAQ or a new ticket with my issue. What are the guidelines?

Answer:

If you think CVSTrac is misbehaving, create a ticket. If you want new features or changes made to CVSTrac, create a ticket. Before creating a ticket, you might want to search the site for something similar.

If, on the other hand, you're uncertain about something like compiling, installing, or running CVSTrac, add a new question. Try to generalize platform-specific questions to something which might help other users, if possible.


Question: Ticket "Etiquette"

Is it okay to re-open a closed/fixed ticket? What severity/priority should I use? Who do I assign tickets to? Is it okay to create test tickets?

Answer:

CVSTrac is a low-ceremony bug tracker, and CVSTrac developers largely practice what we preach. Do whatever you think is okay and we'll fix it if we don't like it.

We do, however, highly appreciate it when people follow up on the tickets they create. Even a simple "works for me" does wonders.


Question: CVSTracNT

Should questions about CVSTracNT go here?

Answer:

This site supports CVSTrac. CVSTracNT is, basically, a fork of CVSTrac for Windows. It's not used nor supported by CVSTrac developers. You should probably talk to the CVSTracNT developers first and, if they identify it as a problem with CVSTrac itself, take it back here (as a new ticket, not a FAQ).


Question: Page Not Found: /index

I can't run a shell script on my host, but I can run a perl script, which looks like this:

     #!/usr/bin/perl -w
     use strict;
     my $cmd = "/home1/harleypig/bin/cvstrac cgi /home1/harleypig/cvstrac";
     exec( $cmd );

(essentially the same but I wanted to included it in case there was a difference)

I'm getting redirected to '/index'. If I add logging functionality to the script I can see that the cvstrac is the one doing the redirecting.

Is this expected? If so, how come I'm getting the page not found error? I can create a subdirectory, but then I just get an index listing of the directory.

I've asked my host for help, and the only thing they've suggested is to adapt cvstrac to use fcgi_stdio.h but I'm not sure how to go about doing that. I've been programming in perl for years, but only dabbled in C/C++ a little.

Any suggestions would be really great.

Answer:

Here's what I added to httpd.conf in my Apache 1.3.28 installation to make it work:

        LoadModule cgi_module         libexec/apache/mod_cgi.so

        <IfModule mod_dir.c>
            DirectoryIndex index.html index.cgi
        </IfModule>

        <VirtualHost cvstrac>
            DocumentRoot /usr/local/web/cvstrac
            AddHandler cgi-script .cgi
            Alias / "/usr/local/web/cvstrac/index/"
            <Directory "/usr/local/web/cvstrac/">
                Options Indexes FollowSymLinks MultiViews ExecCGI
            </Directory>
        </VirtualHost>

I then made an index.cgi file and placed it in /usr/local/web/cvstrac:

        #!/bin/sh
        /usr/local/bin/cvstrac cgi /usr/local/web/cvstrac myproject

This seems to work quite well.
mirian@cosmic.com
5th February 2004

Answer 2

I had the same problem - and what's missing here is that PATH_INFO is missing a /index at the end. For instance, if the request is being made to: http://myserver.com/cgi-bin/cvstrac.cgi/myproject - that will cause a redirect to /index, however if you change the original request to http://myserver.com/cgi-bin/ cvstrac.cgi/myproject/index - that will work properly.

I'm still trying to figure out why my apache was appending an index earlier, and then stopped working all of a sudden.

Answer 3

Should be fixed in #635.


Question: Can cvstrac use a pserver ? How do I get cvstrac (standalone version) to use a pserver on a different computer ? It works perfectly with a local cvs repository, but I've not been able to get it to access a cvs repository running on a different computer and accessed via pserver.

I have logged in as the cvstrac user ('cvs') and logged in to the remote repository so that the password will be stored in .cvspass in the home directory. Still no luck.

This is such a useful program. If only it would work with remote repositories...

A related Ticket: #216: Cannot access repository via :pserver:

23rd Sept 2003

Answer: Not really. CVSTrac needs to read files (like 'history') which are not easily accessible through a pserver connection. A possible solution for you might be to mirror the repository locally (through rsync or cvsup), and set up your local CVSTrac to talk to the local repository.

Another solution: CVSTRAC doesn't work over non-mounted filesystems. But you can mount remote filesystems over ssh/ ftp in linux using lufs. Look on sourceforge. Only problem I has was that I had to give a --libdir=/lib parameter to ./configure to make it fit redhat's library path.

./configure --libdir=/lib && make && make install worked most perfectly.

Yet another solution: See my hack at http://burstproject.org/cvstrac_hack/ which is a start at supporting remote repositories.

Keep in mind that CVSTrac checks the history file virtually each page access, so if you actually got something using pserver, things may slow down tremendously.


Question: I've compiled and installed cvstrac 1.1.2 on RedHat 7.3 as a cgi install with Apache, and am getting to the point where I enter in my 'setup' username and password at:

http://www.mydomain.com/cgi-bin/cvstrac/myproject/

when I do this, I get this:

  Query failed
  Database query failed:

  BEGIN;DELETE FROM cookie WHERE expires<=%d;INSERT INTO cookie
  (cookie,user,expires,ipaddr,agent) VALUES('%q','%q',%d,'%q','%q');COMMIT;
  Reason: attempt to write a readonly database

when I update the file permissions on the db file (in my case located at /home/cvsroot/ myproject.db) so that they are world-readable/writable, the last line of the error changes to:

  Reason: unable to open database file

Any suggestions? Seems like a problem with permissions between the webserver and sqlite? Any pointers on how to proceed would be appreciated.

Answer: Apache usually runs your CGI scripts as an unprivileged user. ("www" or "apache" or "nobody"). You have to make sure that both the database file itself and the directory that contains the database file are writable by whatever user the CGI script runs as.


Question: I compiled and installed CVStrac 1.1.2 on FreeBSD4.3. I initialized cvs with: cvstrac init /home/cvs demo and started cvstrac as its own webserver: cvstrac server 8008 /home/cvs When I activate CVStrac from the browser with URL: http://ptscvs.proeftuin.pts.nl:8008/demo I get the CVStrac login page on which I only see the "user id" and "pwd" select boxes and "login" button. Furthermore there is a "CVSTrac version 1.1.2" hyperlink which prompts with the "about" page. Although this seems all okay, I have the idea that I'm missing hyperlinks

in the page header. Furthermore I have no idea how to configure CVStrac with CVS users and where CVStrac finds the CVS repository. Does it use environment variable $CVSROOT or expects it having directory CVSROOT located somewhere in /home/cvs?

Answer: Read and follow the CvstracInstallation instructions.


Question: cvstrac is well installed and running on my Debian GNU/Linux Sparc. Cvstrac is running as a standalone server. When I log with setup/setup all seems correct but I come back to the login screen ? with a wrong password there is an error. On the client side, cookies are enabled by default. How can I debug this type of issue ? Is there a verbose mode from 'cvstrac server' ?

Answer: See ticket #166 and #205


Question: I HTTP-proxy access to cvstrac that runs as a standalone server. The stylesheet links in cvstrac HTML reference the proxy host, but the local (cvstrac) port number.

For example, I run cvstrac on 'cvstrac.example.org', port 15080. If I access it through a proxy on 'cvstrac-proxy.example.org', port 80, then the CSS URLs start with 'http://cvstrac-proxy.example.org:15080/...', and the stylesheets do not get loaded.

Is there a way to tell cvstrac to generate references using the proxy port number (in the example above, 'http://cvstrac-proxy.example.org/...'? Is there perhaps an HTTP header that I can send to cvstrac to make it use the correct port number?

Answer:

This sort of thing might better be placed in a ticket.

It sounds like the HTTP Host header is being rewritten by the proxy. That's the header which is used to calculate the base URL for the stylesheet (among other things). Since most HTTP clients generate the Host header these days and HTTP proxies aren't normally supposed to mess with it, I'm not sure what the problem is. The only thing I can think of which would suggest a CVSTrac bug is that CVSTrac responds as an HTTP 1.0 server and Host was optional until HTTP 1.1. So a "smart" proxy might be trying to save a few bytes in the request. Since this completely break virtual hosting, I rather doubt it.


Question: Is there a way to display last updated date on any wiki page? I'm trying to use this within my organisation, and although the concept is being welcomed, yet its pretty tedious to go thru all the wiki pages and manually check for any modifications on that page. Any pointers will be appreciated.

Answer: You can generate a report that shows the time of last modification for all wiki pages. See the example at http://cvs.cvstrac.org/rptview?rn=17.

You can also get a summary of all wiki pages changes by selecting appropriate configuration on the timeline. Or you can see a history of changes for a particular wiki pages by clicking on the "[History]" hyperlink in the upper right-hand corner when viewing that page.

CustomMarkupCookbook describes program markups which can pull this information from the SQLite database.


Question: Can CVSTrac be run in a chroot jail?

Answer: See ChrootJailForCvstrac.


Question: I don't want CVSTrac to change my CVSROOT/passwd file. How do I keep it from changing that file when I add new users to CVSTrac?

Answer: CVSTrac will not change the CVSROOT/passwd file if you turn off write permission on that file. You can also configure CVSTrac not to write to CVSROOT/passwd in one of the setup screens.


Question: I have multiple projects in the same CVS repository. How can I set of separate CVSTrac instances for each project?

Answer: You can configure CVSTrac so that it only sees CVS files that have a particular prefix. If each project has a unique prefix, you can set up multiple CVSTrac servers, one for each project.


Question: I want my tickets to start at #0. How can I achieve it?

Answer: You can't. Tickets start with #1. There is no way to change this.

However, you can start with a higher number. Using the SQLite command line client or similar tool, add a dummy ticket with the tn column set to one less than the number you want to start from. Ticket numbers are always assigned max() + 1 from the database.


Question: How and when should the database update be done? Automatically after every checkin or with a cron job (at what interval?) ?

Answer: The database is updated automatically from the CVSROOT/history file whenever anyone accesses the timeline page. The last known size of CVSROOT/history is saved (in the CONFIG table of the database) and if the current size is larger, the excess is scanned and entered as new records in the change log. All of this should occur automatically and without any intervention on the part of either the user or the administrator.

It's possible to use the (undocumented) update option on the command-line, but this may break up checkins. i.e.:

  cvstrac update /path/to/cvsroot project


Question: How does CVSTrac work from the cvs checkin perspective? Are users required to add certain text to checkin comments in order for tickets to be related to checkins?

Answer: If the user includes a ticket number preceeded by a "#" somewhere in the check-in comment, then CVSTrac will automatically associate that ticket with the check-in. But this association can be broken, or new asssocations added, by editing the ticket and changing the list of check-in numbers in the "Associated Check-ins:" entry box.


Question: How do I use Milestones? So far I have defined a milestone, and I have associated tickets with it by entering the milestone's checkin number in the "associated checkins" field of the ticket. But ... how is this useful? Maybe somebody could enlighten me on how Milestones are supposed to be used?

Answer: If you change the type of the Milestone from "Event" to "Release", then a pink box appears on the timeline at the point of that milestone. This is useful for delimiting significant events in the history of a project (such as releases). Note that you have to check the "Divide Timeline by Milestones" box at the bottom of the timeline page for this to happen.

Event milestones are automatically created for each tag that you insert using the normal CVS tag commands. This is just to give visibility to tags. Note that only the CVS 'rtag' command generates milestones!


Question: We have added an estimated effort field. Neat. We have created a report that shows 'total estimated effort', 'completed effort' and 'pending effort'. Also neat.

We'd like to be able to keep track of the evolution of these values. Any ideas to help us to track them are welcomed. (Not CVSTrac related, but would also like to hear some ideas about how to plot the evolution of the estimated effort).

Answer: #205 seems related. This issue is quite strange and variable following browser. Some specific version of mozilla can't handle that.


Question: Has anyone thought about porting CVSTrac to use Subversion (http://subversion.tigris.org/) as the back-end? (SvnTrac?)

Answer: Have a look at http://edgewall.com/trac/, maybe this is what you are looking for?

Support for Subversion was introduced with CVSTrac 1.2.0. See SvnTrac for more details.


Question: Whatever I try (on a cgi install) of cvstrac, I am unable to "browse" the repository. I have no special xinetd or inetd settings.. am I in some sort of chroot jail? All other functions seem to work.. just not "browse the code". I have tried setting the directory to many different things (in setup). I can't for the life of me figure out what I'm missing.

Answer: CVSTrac only sees files that have been "commit"-ed at least once. CVSTrac only knows about files that appear in the CVSROOT/history log. The "cvs import" command does not make entries in this log. Only the "cvs commit" command does.

Hence you can only see files that have been processed by "cvs commit", not just "cvs import". Did you fill your repository with "import" and thus avoid doing any commits?

Another possibility is that the user that CGI scripts run as does not have read permission for the CVS files.


Question: So how can I make those files be browseable? I don't want to have to edit them just so they'll appear in Browse.

Answer: If you don't mind adding a change log entry for every file, one solution is to run the following command at the top-level directory of your source tree:

    cvs commit -f -R -m "imported into cvstrac"

This will recursively force an empty commit for every CVS-controlled file in the project.
mirian@cosmic.com


Question: I've setup cvstrac on my system. Everything seems to work fine except the browse function. Everytime I have cvstrac read the history file I get errors that look like this:

Unable to locate the file module/filename in the CVS repository

I've commited the files, the program is running as root so there isn't any file perm problems. I haven't changed the CVSROOT files in any way.

Answer: You should only get this if the CVSROOT/history file references files which are no longer in the physical repository.


Question: I receive lots of "The file x could not be found" errors when I run reconstruct from the CVS history file. What could be wrong?

Answer: If you have done any manual surgery on your CVS repository, such as moving ,v files in the repository, this change will not be reflected in the CVS history file. So check the filenames carefully, as these errors will likely refer to files which no longer exist in that exact location. It is likely that your import was still successful.


Question: I use cvstrac as stand-alone server where I have no root access. Is there an easy way to run cvstrac over SSL/HTTPS?

Answer: You can use stunnel (http://www.stunnel.org) for this.


Question: If I run cvstrac using stunnel via port 443, can I also run a second instance against the same database file without stunnel via port 80? In other words, can a database file be shared

safely amongst several instances of cvstrac?

Answer: Yes. Multiple copies of cvstrac can be active at once.


Question: How do I get cvstrac to display time/date information in my own timezone instead of in GMT?

Answer: This is probably an indication that you have not set up your chroot jail correctly. See ChrootJailForCvstrac and LocalizationOfCvstrac for information on how to set up your chroot jail with /etc/localtime.


Question: I have just installed CVSTrac on OSX and started it up as its own web server. The login page comes up but when i enter "setup" and "setup" for the username and password i am just presented with the login page again. With different values for username and password I do get the red "You entered an incorrect username and/or password" error. Have i missed something in my setup?

Answer: Check if cookies are enabled. You must allow your web browser to use cookies.


Question: The ChrootJailForCvstrac Wiki provides instructions for Linux. I followed these for FreeBSD 4.x but they didn't work. What do I need to do confine CVSTrac to a FreeBSD jail?

Answer: You need to include the following directories and files in your chroot jail.

    bin
    bin/sh
    dev
    dev/null
    etc
    etc/passwd
    etc/localtime
    tmp
    usr
    usr/bin
    usr/bin/co
    usr/bin/diff
    usr/bin/rcsdiff
    usr/bin/rlog
    usr/lib
    usr/lib/libc.so.4
    usr/lib/libgnuregex.so.2
    usr/lib/libm.so.2
    usr/libexec
    usr/libexec/ld-elf.so.1

On FreeBSD 4.x, the /dev/null device is defined as a character device with a major number of 2 and a minor number of 2 in the /dev/MAKEDEV file. So to create the /dev/null device in your chroot jail, use the following commands:

    mknod c 2 2 dev/null
    chmod 666 dev/null


Question: I have setup a chroot jail for CVSTrac, but I receive an error (e.g. Abort trap) whenever CVSTrac attempts to access a given revision of a CVS file. How can I troubleshoot the problem?

Answer: This is most likely due to a missing library. The best way to diagnose this problem is to confine an interactive session to the CVSTrac chroot jail and see if the dependent commands work. For example, if you confine CVSTrac to a chroot jail at /usr/CVSTracJail as user id cvs, you would do the following under an interactive session:

    su
    chroot /usr/CVSTracJail /bin/sh
    su -l cvs

Now your interactive process is confined to the CVSTrac jail running as user cvs. Executing the commands (e.g. co, diff, rcsdiff and rlog) that CVSTrac requires will provide insight into what might be wrong such as a missing library.


Question: I've managed to set up the cvstrac cgi on Mac OS X running Apache 1.3.27. In the setup page I pointed it to my existing CVS by entering the path of the CVS. I clicked Reconstruct, and none of my projects appeared. I tried again, clicking Rescan this time.

cvstrac managed to find one project, plus one other one that I deleted manually(and I also removed it's entry in the modules file)a long time ago. I do have other entries in the modules file, but those projects don't appear. Any ideas?

Michael

Answer


Question: Could someone show a valid command to use in the "Configure Ticket Change Notification" that doesn't compromise the security of the box in any way ? I would assume one would use sendmail or mail, but I've used neither.

James

Answer: I use: echo '%d %r'|mail -s '[cvstrac] %p/%s/%t' '%A'

There is also a simple perl script at http://the.taoofmac.com/space/HOWTO/Send%20CVSTrac%20Ticket%20Updates and a PythonEmailScript that accesses the SQLite database directly using Python-SQLLite (http://pysqlite.sourceforge.net/).

You can also download CVSTrac Notify from (http://www.lazarusid.com/download/). It is very similar to the PythonEmailScript, but written in C. [Added Oct 8, 2006 by Clay Dowling]


Question: Why is there a limit of 100K on attached files? Can I upgrade that to 100MB and recompile (I know where the constant is, I'm just curious why you picked such a small number; it seems like it could be important)?

Answer: Most things which would need to be uploaded to a CVSTrac install are things like code fragments (snippets and patches) and screengrabs. These sorts of things aren't normally very large.


Question: I have a local machine I want to run cvstrac on. The cvs server is ssh accessable on another machine on which I cannot install cvstrac. I have my ssh-agent keys (.ssh/id_rsa,.ssh/authorized_keys) arranged so I can type ssh -l username cvsserver and no password is required for access. However the browse functionality of cvstrac does not work using the exact same CVSROOT. Any ideas what I'm missing here?

Answer: CVSTRAC doesn't work over non-mounted filesystems. But you can mount remote filesystems over ssh/ ftp in linux using lufs. Look on sourceforge. Only problem I has was that I had to give a --libdir=/lib parameter to ./configure to make it fit redhat's library path.

./configure --libdir=/lib && make && make install worked most perfectly.


Question: How does cvstrac handle multiple branches in the cvs repository? Can tickets be associated with a single branch? Can they be associated with multiple branches?

AJ

Answer:

Tickets can be associated with checkin numbers (usually by referencing the ticket in the commit message). What branch that checkin is on isn't really known to the ticket.


Question: Is it possible to configure CVSTrac to exclude files that have been removed from CVS from the browse view?

Answer:

No.


Question: Can I somehow use WikiWords within a Wiki page? I'd like to keep multiple tips&tricks notes (each of them being very short) on one page while still being able to see/link them from other pages. I don't want to have lots of pages with only 2 or 3 sentences per page ;-)

Answer: You could just insert HTML rather than using Wiki.

CustomWikiMarkup describes {anchor: <name>} and {wiki: <name>#<anchor>} markups which are basically shortcuts for writing raw HTML.


Question: On the timeline page, you can click "Show the SQL used to generate the timeline." What can you do with this SQL? Is there any way to execute arbitrary SQL commands against the CVSTrac database? I would like command-line access to the timeline to build changelogs and whatnot into my program.

Answer: You can access it via SQLite mechanisms, for example the sqlite command-line client. Also, you can enter arbitrary SQL statements into the report editor; I've used this to make reports based on the timeline by copying that SQL into the timeline and modifying it to use the range or whatever that I want. The output isn't formatted as nicely as the timeline, but it works.


Question: On the the sqlite cvstrac page (http://www.sqlite.org/cvstrac/tktedit?tn=508,2), it says you can have html text in the wiki. On other wiki description pages, including for this site, using < html>< /html> seems to have no effect. Is there a special flag/version you need to use this functionality? Both seem to be running 1.1.2.

Answer: Using HTML is possible since 2003-Nov-02 [292], ie. using the CVS version. The "documentation" is in a comment in that patch:

  Text between <h tml>...</htm l> is interpreted as HTML.  A restricted
  subset of tags are supported - things like forms and javascript are
  intentionally excluded.  The initial <ht ml> must occur at the
  beginning of a paragraph.

(spaces added to avoid interpretation of the html tag in this case)


Question: Since the leap day of Sunday the 29th of February, 2004 all of my CVS commits are shown as having occured on the wrong date by CVSTrac. If I were to make a commit at 14:00 on the 30th of March CVSTrac thinks that the commit occured at 14:00 on the 29th of March. It appears as though the date in table chng (time in seconds since 1970) has had 24 hours subtracted off. The date in my CVS Log Files are correct.

I have had a look at the source and I think that the fault is in the function "static time_t mkgmtime(struct tm *p){" which is in the "history.c" file. I am not very good at programing though so I can't fix it.

Has anybody else noticed this? Is there a fix on the way?

Answer: See #290


Question: I have installed CVStrac on redhat 9.0 but I could not see any projects using browse and I did have commited my project, and the history file has my commit info. but I just could not see any thing with browser.

Has anybody else noticed this?

Answer: Had the same problem. Turned out to be permission problems. Was running cvstrac (suid to root) as a cgi, but didn't have suEXEC configured on apache, so cvstrac ran as apache. Finally ended up running cvstrac in server mode as my cvs user. Much easier and faster.


Question: We are using Chora right now, but the integrated ticket management and Wiki stuff in cvstrac is great (plus it's easier to set up). What I love about Chora, though, is the ability to have it visually markup source code when browsing, and it produces nice colored diffs if you like it to do so. Did anybody come up with a solution for this already?

Answer: On the setup screen one can enter commands for source and diff display. One just needs to add commands that generate HTML from the source.

An example for PHP would be

  co -q -p%V '%F' | php4 -s

for the 'single version diff' command. If one writes a wrapper script that extracts the filename ending, it should be possible to use a general purpose tool like highlight. We need to pass the file name ending like so

  highlight -l -I -S php

to tell the type (stdin has no filename...). This gives us line number and nice highlighting of over 65 languages.

But it still deals with what should be diff output (chngview). Clicking on a version number still gives plain text (getfile). So if we could pass getfile output through a filter, that would be great (see ticket #170)!

Ticket #170 adds filtering support. cpb


Question: I installed cvstrac on HP-UX using the webserver mode. I thought this would be the best method, since the cvs users have very little permissions on the server. We are running Windows boxes and connecting to the server via Putty. The command below sets up the webpage:

cvstrac server 15001 /app/cvs/sandbox sandbox

The problem is, when I close my putty session, we lose the site. What is the best way to have cvstrac remain active? Does it need to go in a startup script (/sbin/init.d on HP-UX)?

Answer: Use the "nohup" command. Do "man nohup" for additional information. Or just launch CVSTrac directly from inetd. See CvstracInstallation.


Question: How to get setup rights back? (or How to unlock the database?) After installation I created a new user with all rights (including setup) and deleted the setup-user. At the next login the new user has "setup" on its menu but this doesn't include the setup commands for the CVS -- how to get these rights back?

I tried to get the rights by changing the database, but was not able to open it cause it is locked. (copied the db-file and open the copy with these tools: dgSQLite, sqlitebrowser, sqlite, ...) How can I unlock the database file?

Answer: Get a copy of the sqlite command-line client program and manually edit the database file to restore your access rights.


Question: Thats for the answer to #555. Though now I wonder can a sqlite query support month by month reports? Like all open bugs for the month of December 2005?

Answer:

Use the parsedate() function in the query conditions:

  SELECT * FROM ticket WHERE status IN ('new','active')
                       AND origtime>=parsedate('2005-12-01 00:00')
                       AND origtime<=parsedate('2006-01-01 00:00');

You will have to to whether you want to search on origtime (the ticket creation date) or changetime (last change), but otherwise...

Using standard SQLite functions, you could also do:

  SELECT * FROM ticket WHERE status IN ('new','active')
                       AND origtime>=strftime('%s', '2005-12-01 00:00')
                       AND origtime<=strftime('%s', '2006-01-01 00:00');
----

Question: I want to generate static reports month by month for management. It has to be certain tickets, so I can't give them direct access to cvstrac. Initially I was just querying from bash, like so:

   sqlite trac.db "select * from ticket;"

Though from the command line it doesn't seem to understand "sdate" and "now" for some reason. And the HTML that the cvstrac reports generate is ideally what I want. Do you have any suggestions how I use your filter for the raw data or somehow export the reports automatically?

Answer:

The sdate and now functions are CVSTrac-specific, unfortunately. If you understand how to use Unix epoch timestamps, you don't really need those functions. You can use them directly in a SQLite query, if you can calculate them. I just do silly things like:

  #!/bin/sh
  FIRST=`perl -e 'use Date::Parse; print scalar(str2time("2005-12-01 00:00"))'`
  LAST=`perl -e 'use Date::Parse; print scalar(str2time("2006-01-01 00:00"))'`
  sqlite trac.db "SELECT * FROM ticket WHERE status IN ('new','active') AND
origtime>=$FIRST AND origtime<=$LAST;"

Or course, I'd write the entire thing in perl using the DBI module and get total control over the output formatting.

I ended up writing the report with a {link:http://webpy.org/ python web library}. {link:http://trac.natalian.org/browser/projects/reports/ Source is here.}

With SQLite 3, this could be done directly with:

  sqlite3 trac.db "SELECT * FROM ticket WHERE status IN ('new','active')
         AND origtime>=strftime('%s','2005-12-01 00:00')
         AND origtime<=strftime('%s','2006-01-01 00:00');"


Question: I want to send notifications to a PHP script, and have that generate an email for me

Answer:

Requires (PHP4)

PHP5 has the SQLite extension compiled in by default

make a file wrapper.cgi, make it executable (chmod +x)

   sample (logging is optional)
   #!/bin/sh -
   export SCRIPT_FILENAME=/path/to/phpfile.php
   export PATH_TRANSLATED=/path/to/phpfile.php
   /usr/bin/php -f $SCRIPT_FILENAME &>/path/to/logfile

make your php file, make it executable

    sample
    #!/usr/bin/php
    <?php
    preg_match("/tn=([0-9]{1,9})/",$_SERVER[HTTP_REFERER],$matches);
    $tn = $matches[1];
dl('sqlite3.so');
$db = "/path/to/sqlite.db";
if ($tables = sqlite3_open($db))
{
$query = "SELECT user.name,user.email,enums.name as status FROM ticket,user,enums WHERE (ticket.assignedto=user.id AND ticket.status=enums.name AND tn=\"$tn\")";
if ($qr = sqlite3_query($tables, $query)) { $ticket = sqlite3_fetch_array($qr); sqlite3_query_close($qr); //GENERATE EMAIL HERE } } else { $error = sqliteError("Unable to open $db"); } function sqliteError($msg) { global $tables; $error = sqlite3_error($albums); echo "$msg: $error\n"; } ?>

your mileage may vary


Question: What is the list of files that cvstrac will modify in a cvs repository, if any? If some are modified, for what purpose are they modified?

Answer:

CVSROOT/passwd, CVSROOT/readers and CVSROOT/writers will be modified if CVSTrac is configured to do so (which it is, by default). See the "User Database" item on the "Setup" page.


Question: Is it possible to use a CVS repository that uses client certificates instead of a User/Password combination?

Answer:

Not sure the question makes sense. CVSTrac itself requires direct access to the CVS repository, so user/password versus certs isn't meaningful there. How you provide users with CVS access is also mostly unrelated (unless you want CVSTrac to manage the accounts/certs, in which case the answer is "no").

If you want to run a CVSTrac site which uses some other way to allow logins beyond the existing user/password, see #300, which includes a patch enabling the user of Apache's REMOTE_USER option for authentication. --cpb

Note: I think that the question should be : can CVS Trac use ssh-keys based authentication when accessing the CVS repository, just as you would do when i.e. use Eclipse? see http://www.fontysvenlo.org/index.php

CVSTrac requires direct local access to the repository files. So the answer would be the same as the pserver question further up, which is "no", unless you make a whole lot of changes and don't mind a huge performance hit. --cpb