Edgewall Software

Ticket #6827 (reopened task)

Opened 17 months ago

Last modified 4 months ago

trac.cgi missing in 0.11 setup??

Reported by: edunne Owned by: nkantrowitz
Priority: normal Milestone: 0.12.1
Component: web frontend Version: 0.11b1
Severity: blocker Keywords: documentation
Cc: dgynn@…, AndrejsC@…

Description

I've got Genshi, the latest version of setup tools etc.

trac-admin works fine and I can run TRAC standalone using tracd.

However, I'm trying to get it to run through Apache using simple cgi as the initial way to do deployment. With 0.10.x you just specified in the apache conf file that apache should use trac-cgi to handle requests.

However, I've searched my entire hard-drive and there is no trac-cgi that can be found.

It used to be dumpe in the python24/share/trac/cgi-bin directory but with python25 there is no share folder.

any idea where trac-cgi has disapeared to? Is it even necessary anymore (that docs aren't that specific for windows deployment of 0.11)?

Attachments

trac-setup-data-files.dif Download (1.4 KB) - added by Dave Gynn <dgynn@…> 16 months ago.
patch to provide data_files for install_data
trac-setup-data-files.diff Download (1.6 KB) - added by Dave Gynn <dgynn@…> 16 months ago.
updated patch with correct htdocs subdirectories

Change History

  Changed 17 months ago by edunne

anyway, I copied the old 0.10.x trac.cgi file and modified it so that it used python25 etc.

Seems to work, just not sure why it was missing from the 0.11 setup.

  Changed 17 months ago by edunne

oh and sorry my initial description I kept typing trac-cgi instead of trac.cgi

  Changed 17 months ago by osimons

  • milestone set to 0.11.1

The scripts are available as part of the source (/trunk/cgi-bin), but you are right: This no longer gets installed anywhere, and will only be available if you download or checkout the full source. A typical easy_install will not make the files available.

Following the migration to Setuptools, Trac no longer leaves copies of any resources outside the installed .egg - and only read-only runtime files are deployed there. cgi-bin, sample-plugins and contrib directories all behave this way. Unlike the old 'share' strategy, the .egg is a moving target and not suitable for keeping auxillary files used by other processes.

I agree that this can be a bit confusing, but not quite sure what to do about it. Improving documentation may help, as currently this switch is only documented in TracDev/ReleaseNotes/0.11#General - mentioning new settings for shared config, plugins and templates.

In some form or another this should be clarified in soon-ish.

  Changed 17 months ago by edunne

yeah, well it was certainly a bit confusing.

It might be helpful to put a note on the

http://trac.edgewall.org/wiki/TracInstall the 0.11.x install guide where it talks about trac.cgi and Fast cgi to explain that trac.cgi is no longer included. And suggested steps to actually get TRAC running?

  Changed 16 months ago by tim

yes, i'm trying to setup trac 0.11 on IIS here, and it says map the vdir to cgi-bin ?! what do i do??

Changed 16 months ago by Dave Gynn <dgynn@…>

patch to provide data_files for install_data

  Changed 16 months ago by Dave Gynn <dgynn@…>

  • cc dgynn@… added

I've attached a patch that identifies the data_files to be installed with python setup.py install_data. This creates the folder structure under /usr/share/trac that was created with the 0.10.x installer. The data files still don't appear to be installed by easy_install or setup.py install.

I included the layout.html template file in the patch. But now that I think about it theme.html might be better.

Changed 16 months ago by Dave Gynn <dgynn@…>

updated patch with correct htdocs subdirectories

  Changed 12 months ago by osimons

This was fixed by [6894] before 0.11 release, and should be closed against that milestone (I don't have necessary permissions to select a closed milestone).

The short answer is to now run the command:

trac-admin /path/to/project deploy /my/output-dir

The default frontend files can then be found in output-dir/cgi-bin.

  Changed 12 months ago by cboos

  • status changed from new to closed
  • resolution set to fixed
  • milestone changed from 0.11.2 to 0.11

  Changed 12 months ago by anonymous

  • status changed from closed to reopened
  • resolution fixed deleted

Documentation needs to be updated to reflect this; without it, upgrading from .10 to .11 is a nightmare. Also, how do you deploy with multiple trac environments under a single directory?

$ trac-admin initenv /usr/local/trac/project1
$ trac-admin initenv /usr/local/trac/project2
$ trac-admin /usr/local/trac/project1 deploy /usr/share/trac
$ trac-admin /usr/local/trac/project2 deploy /usr/share/trac
Command Failed: Destination already exists. Remote and retry.

Lastly, using trac-admin deploy does not solve the problem because the cgi scripts it deploys are not executable.

[Wed Jul  2 17:50:35 2008] [error] [client 192.168.0.130] FastCGI: invalid (dynamic) server "/usr/share/trac/cgi-bin/trac.fcgi": access for server (uid 99, gid 99) not allowed: execute not allowed

  Changed 12 months ago by Piotr Kuczynski <piotr.kuczynski@…>

  • keywords documentation added
  • type changed from defect to task
  • component changed from general to web frontend
  • milestone set to 0.11.1

  Changed 12 months ago by nkantrowitz

  • owner changed from jonas to nkantrowitz
  • status changed from reopened to new

  Changed 11 months ago by AndrejsC@…

  • cc AndrejsC@… added

Has anybody solved this with issue with multiple environments?

  Changed 11 months ago by anonymous

  • status changed from new to closed
  • resolution set to fixed

  Changed 11 months ago by ebray

  • status changed from closed to reopened
  • resolution fixed deleted

Random ticket butchering.

  Changed 10 months ago by anonymous

  • status changed from reopened to closed
  • resolution set to fixed

  Changed 10 months ago by anonymous

  • status changed from closed to reopened
  • resolution fixed deleted

follow-up: ↓ 18   Changed 9 months ago by anonymous

For multi-environment on apache & *nix:

You could try doing a 'deploy' once, for one environment, and then editing the resulting cgi-bin/trac.fcgi to remove the bits specific to that environment.

 # trac-admin /path/to/tracs/foo deploy /tmp/foo
 # vi /tmp/foo/cgi-bin/trac.fcgi

Note that this step can fail horribly due to old versions of the XmlRpcPlugin or CtxtNavAdd plugins. See ticket:4280.

Then copy the files generated by the 'deploy' command to the place that you already had specified in your apache config, e.g.

 # cp -r /tmp/foo/ /usr/share/
 # chown -R webserver:webgroup /usr/share/trac/{cgi-bin,htdocs}

It appears that in 0.11, for multi-environment the intention is that you put these generated files into /path/to/tracs/foo/cgi-bin and /path/to/tracs/foo/htdocs.

Perhaps this is going to produce more problems in upgrading to later releases? At the least, one will have to be religious about doing the 'deploy' on all tracs at upgrade time, so there is no "version skew".

in reply to: ↑ 17   Changed 9 months ago by anonymous

doh.

>  # cp -r /tmp/foo/ /usr/share/
>  # chown -R webserver:webgroup /usr/share/trac/{cgi-bin,htdocs}
# cp -r /tmp/foo/* /usr/share/trac

  Changed 9 months ago by cboos

  • milestone changed from 0.11.2 to 0.11.3

Looks like it's (minimally) documented in TracCgi and TracModWSGI.

Is there anything more to add in the docs? (perhaps comment:17?)

  Changed 4 months ago by cboos

  • type changed from task to enhancement
  • severity changed from blocker to normal

A word about this in TracInstall seems useful though. Currently there's a warning pointing back to this ticket... not optimal.

  Changed 4 months ago by carsten.scheele@…

  • type changed from enhancement to task
  • severity changed from normal to blocker

This problem totally killed me when I upgraded from Debian Etch to Lenny. Finding this bug report wasn't really easy: the hint in TracInstall is minimalistic.

Add/Change #6827 (trac.cgi missing in 0.11 setup??)

Author


E-mail address and user name can be saved in the Preferences.


Change Properties
<Author field>
Action
as reopened
as The resolution will be set. Next status will be 'closed'
to The owner will change from nkantrowitz. Next status will be 'new'
 
Note: See TracTickets for help on using tickets.