Edgewall Software
Modify

Opened 16 years ago

Closed 14 years ago

#6827 closed task (fixed)

trac.cgi missing in 0.11 setup??

Reported by: edunne Owned by: Noah Kantrowitz
Priority: normal Milestone: 0.12
Component: web frontend Version: 0.11b1
Severity: blocker Keywords: documentation
Cc: dgynn@…, AndrejsC@… Branch:
Release Notes:
API Changes:
Internal Changes:

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 (2)

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

Download all attachments as: .zip

Change History (25)

comment:1 by edunne, 16 years ago

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.

comment:2 by edunne, 16 years ago

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

comment:3 by osimons, 16 years ago

Milestone: 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 - mentioning new settings for shared config, plugins and templates.

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

comment:4 by edunne, 16 years ago

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?

comment:5 by tim, 16 years ago

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??

by Dave Gynn <dgynn@…>, 16 years ago

Attachment: trac-setup-data-files.dif added

patch to provide data_files for install_data

comment:6 by Dave Gynn <dgynn@…>, 16 years ago

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.

by Dave Gynn <dgynn@…>, 16 years ago

Attachment: trac-setup-data-files.diff added

updated patch with correct htdocs subdirectories

comment:7 by osimons, 16 years ago

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.

comment:8 by Christian Boos, 16 years ago

Milestone: 0.11.20.11
Resolution: fixed
Status: newclosed

comment:9 by anonymous, 16 years ago

Resolution: fixed
Status: closedreopened

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

comment:10 by Piotr Kuczynski <piotr.kuczynski@…>, 16 years ago

Component: generalweb frontend
Keywords: documentation added
Milestone: 0.11.1
Type: defecttask

comment:11 by Noah Kantrowitz, 16 years ago

Owner: changed from Jonas Borgström to Noah Kantrowitz
Status: reopenednew

comment:12 by AndrejsC@…, 16 years ago

Cc: AndrejsC@… added

Has anybody solved this with issue with multiple environments?

comment:13 by anonymous, 16 years ago

Resolution: fixed
Status: newclosed

comment:14 by ebray, 16 years ago

Resolution: fixed
Status: closedreopened

Random ticket butchering.

comment:15 by anonymous, 16 years ago

Resolution: fixed
Status: reopenedclosed

comment:16 by anonymous, 16 years ago

Resolution: fixed
Status: closedreopened

comment:17 by anonymous, 16 years ago

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 comment:18 by anonymous, 16 years ago

doh.

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

comment:19 by Christian Boos, 16 years ago

Milestone: 0.11.20.11.3

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

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

comment:20 by Christian Boos, 15 years ago

Severity: blockernormal
Type: taskenhancement

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

comment:21 by carsten.scheele@…, 15 years ago

Severity: normalblocker
Type: enhancementtask

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.

comment:22 by Christian Boos, 14 years ago

Milestone: next-minor-0.12.x0.12

Seems everything is now documented for 0.12 in TracInstall#GeneratingtheTraccgi-bindirectory.

If there was anything else to do, please reopen.

comment:23 by Remy Blank, 14 years ago

Resolution: fixed
Status: reopenedclosed

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Noah Kantrowitz.
The resolution will be deleted. Next status will be 'reopened'.
to The owner will be changed from Noah Kantrowitz to the specified user.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.