Ticket #6827 (closed task: fixed)
Opened 4 years ago
Last modified 17 months ago
trac.cgi missing in 0.11 setup??
| Reported by: | edunne | Owned by: | nkantrowitz |
|---|---|---|---|
| Priority: | normal | Milestone: | 0.12 |
| Component: | web frontend | Version: | 0.11b1 |
| Severity: | blocker | Keywords: | documentation |
| Cc: | dgynn@…, AndrejsC@… | ||
| Release Notes: | |||
| API 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
Change History
comment:1 Changed 4 years ago by edunne
comment:2 Changed 4 years ago by edunne
oh and sorry my initial description I kept typing trac-cgi instead of trac.cgi
comment:3 Changed 4 years 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 - mentioning new settings for shared config, plugins and templates.
In some form or another this should be clarified in soon-ish.
comment:4 Changed 4 years 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?
comment:5 Changed 4 years 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 4 years ago by Dave Gynn <dgynn@…>
- Attachment trac-setup-data-files.dif added
patch to provide data_files for install_data
comment:6 Changed 4 years 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 4 years ago by Dave Gynn <dgynn@…>
- Attachment trac-setup-data-files.diff added
updated patch with correct htdocs subdirectories
comment:7 Changed 4 years 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.
comment:8 Changed 4 years ago by cboos
- Milestone changed from 0.11.2 to 0.11
- Resolution set to fixed
- Status changed from new to closed
comment:9 Changed 4 years ago by anonymous
- Resolution fixed deleted
- Status changed from closed to reopened
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 Changed 4 years ago by Piotr Kuczynski <piotr.kuczynski@…>
- Component changed from general to web frontend
- Keywords documentation added
- Milestone set to 0.11.1
- Type changed from defect to task
comment:11 Changed 4 years ago by nkantrowitz
- Owner changed from jonas to nkantrowitz
- Status changed from reopened to new
comment:12 Changed 4 years ago by AndrejsC@…
- Cc AndrejsC@… added
Has anybody solved this with issue with multiple environments?
comment:13 Changed 3 years ago by anonymous
- Resolution set to fixed
- Status changed from new to closed
comment:14 Changed 3 years ago by ebray
- Resolution fixed deleted
- Status changed from closed to reopened
Random ticket butchering.
comment:15 Changed 3 years ago by anonymous
- Resolution set to fixed
- Status changed from reopened to closed
comment:16 Changed 3 years ago by anonymous
- Resolution fixed deleted
- Status changed from closed to reopened
comment:17 follow-up: ↓ 18 Changed 3 years 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".
comment:18 in reply to: ↑ 17 Changed 3 years 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
comment:19 Changed 3 years 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?)
comment:20 Changed 3 years ago by cboos
- Severity changed from blocker to normal
- Type changed from task to enhancement
A word about this in TracInstall seems useful though. Currently there's a warning pointing back to this ticket... not optimal.
comment:21 Changed 3 years ago by carsten.scheele@…
- Severity changed from normal to blocker
- Type changed from enhancement to task
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 Changed 17 months ago by cboos
- Milestone changed from next-minor-0.12.x to 0.12
Seems everything is now documented for 0.12 in TracInstall#GeneratingtheTraccgi-bindirectory.
If there was anything else to do, please reopen.
comment:23 Changed 17 months ago by rblank
- Resolution set to fixed
- Status changed from reopened to closed



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.