Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 204956 - www-apps/trac-0.11_beta1: Static htdocs are served differently than in <0.11
Summary: www-apps/trac-0.11_beta1: Static htdocs are served differently than in <0.11
Status: RESOLVED INVALID
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Julien Allanos (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-01-08 21:47 UTC by Dennis Schridde
Modified: 2008-01-09 13:23 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Dennis Schridde 2008-01-08 21:47:03 UTC
For www-apps/trac-0.11_beta1 webapp-config cannot install the htdocs, because they are installed by the ebuild into  /usr/lib/python2.5/site-packages/trac/htdocs/ instead of /usr/lib/python2.5/site-packages/trac/htdocs/.

Reproducible: Always

Steps to Reproduce:
Comment 1 Dennis Schridde 2008-01-08 21:47:53 UTC
Obviously this was a copy and paste mistake.
They are installed into /usr/lib/python2.5/site-packages/trac/htdocs/ instead of /usr/share/webapps/trac/0.11_beta1/htdocs/.
Comment 2 Julien Allanos (RETIRED) gentoo-dev 2008-01-09 09:25:17 UTC
Apparently this is normal (see http://trac.edgewall.org/wiki/TracUpgrade, "You may also want to remove the Trac cgi-bin, htdocs, templates and wiki-default directories that are commonly found in a directory called share/trac (the exact location depends on your platform).")

Static htdocs are served through the trac python handler. webapp-config only installs trac.cgi and/or trac.fcgi, depending on the cgi and/or fastcgi USE flags. If you don't set any of these, you don't even need to use webapp-config (you can even avoid using webapp-config with (Fast)CGI).

I personally use Apache + mod_python, and all I need to set is something like :

SetHandler mod_python
PythonInterpreter main_interpreter
PythonHandler trac.web.modpython_frontend
PythonOption TracEnvParentDir /var/lib/trac/

It should work similarily with other web servers.

The main drawback with this scheme is that trac can't be slotted : python packages, htdocs, binaries, etc. overlap. You can only have one trac version installed at a time, thus all vhosts on the same machine make use of the same trac installation, if you upgrade trac with Portage all the vhosts immediately use the new version, etc...
Comment 3 Dennis Schridde 2008-01-09 10:27:58 UTC
The CGI script now serves static documents as well?? What kind of benefit shall that have? I guess I have to ask the Trac devs about that...
Comment 4 Dennis Schridde 2008-01-09 13:06:25 UTC
Information in case someone else has the same "problem" (should probably be added as einfo to the ebuild):
If you want to statically serve static documents, set htdocs_location in trac.ini to an URL of your choice (eg. "htdocs_location = /chrome/") and then tell your webserver to find /chrome/ in /usr/lib/python2.5/site-packages/trac/htdocs/ (eg.)

For lighty this would could look like this:
        # Setup an alias for the static resources
        alias.url = (
                "/chrome/common/" => "/usr/lib/python2.5/site-packages/trac/htdocs/",
                "/chrome/" => "/usr/lib/python2.5/site-packages/trac/htdocs/"
        )

I can reopen, if you like, to track the einfo addition.
Comment 5 Julien Allanos (RETIRED) gentoo-dev 2008-01-09 13:23:42 UTC
Actually this is already on the Trac wiki (http://trac.edgewall.org/wiki/TracCgi#MappingStaticResources and somewhere in http://trac.edgewall.org/wiki/TracFastCgi), where the user is redirected to from postinst instructions.