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:
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/.
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...
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...
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.
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.