Changes between Version 7 and Version 8 of TracSlimTimerPlugin


Ignore:
Timestamp:
Apr 27, 2007 8:59:31 AM (7 years ago)
Author:
tst
Comment:

Further installation info

Legend:

Unmodified
Added
Removed
Modified
  • TracSlimTimerPlugin

    v7 v8  
    7272Not all users will require this function and it is possible to operate !TracSlimTimer without a database. 
    7373 
     74'''If you're looking for screenshots, see [#screenshots Examples] below.''' 
     75 
    7476== Supported Versions == 
    7577 
     
    7981 * Only !ClearSilver templates are provided so it will not work with Genshi. 
    8082 
    81 Some of the code has been written so that it might just work with 0.11 and Genshi if the templates were provided. For example, there is code in [source:tracslimtimerplugin/0.10/tracslimtimer/admin_ui.py admin_ui.py] to use the alternate IAdminPageProvider vs IAdminPageProvider templates but it is entirely untested. 
     83Some of the code has been written so that it might just work with 0.11 and Genshi if the templates were provided. For example, there is code in [source:tracslimtimerplugin/0.10/tracslimtimer/admin_ui.py admin_ui.py] to use the alternate IAdminPageProvider vs IAdminPageProvider templates but it is entirely untested. (This code is courtesy of http://svn.edgewall.com/repos/trac/sandbox/spam-filter/tracspamfilter/admin.py) 
    8284 
    8385== Installation == 
     
    9193}}} 
    9294 
    93 Otherwise you can can make the egg and use easy_install. e.g. 
     95Otherwise you can can make the egg and use `easy_install`. e.g. 
    9496 
    9597{{{ 
     
    99101Then run `/opt/trac/0.10.3/install/bin/easy_install <egg>` where `<egg>` is whatever got dumped in your `dist` directory. 
    100102 
    101 You might have some trouble with dependencies. If you do check below under dependencies. 
     103You might have some trouble with dependencies. If you do check below under [#dependencies Dependencies] below. 
    102104 
    103105 2. Enable the plugin in trac.ini. For example, in `/var/trac/0.10.3/var/trac/conf/trac.ini.` you should add `tracslimtimer.* = enabled` under `[components]`, e.g. 
     
    128130}}} 
    129131 
     132{{{ 
     133#!html 
     134<a name="dependencies"/> 
     135}}} 
     136== Dependencies == 
     137 
     138If you have trouble with installation it may well be because of the dependencies. There are two dependencies: !ElementTree and !MySQL-python aka MySQLdb. 
     139 
     140The main dependency of is !ElementTree. It is listed as a dependency in `setup.py` file so if you're  lucky simply installing the egg might result in the !ElementTree module being downloaded. Chances are though you will have trouble here. The best option is just to `easy_install` it.  
     141 
     142You can learn all about `easy_install` at: http://peak.telecommunity.com/DevCenter/EasyInstall 
     143 
     144Make sure you use trac's version of `easy_install`, e.g. 
     145 
     146{{{ 
     147e.g. /opt/trac/0.10.3/install/bin/easy_install 
     148}}} 
     149 
     150Running this version of `easy_install` will mean the packages are installed in the appropriate site-packages folder so trac's version of Python can find them. 
     151 
     152So just try something like: 
     153 
     154{{{ 
     155/opt/trac/0.10.3/install/bin/easy_install elementtree 
     156}}} 
     157 
     158After installing, you'll need to restart the trac server. This can be done like so: 
     159 
     160{{{ 
     161/opt/trac/0.10.3/install/etc/init.d/httpd restart 
     162}}} 
     163 
     164The other dependency is !MySQL-python. This module can also be installed using `easy_install` and implements the Python DB-API for MySQL. 
     165 
     166NOTE: The latest version of MySQL-python that is compatible with Python 2.3 does not support the authentication protocol used by some MySQL servers. You must use at least Python 2.4 so that you can use the most recent version of MySQL-python. 
     167 
     168== Troubleshooting == 
     169 
     170'''1. Just disable the plugin''' 
     171 
     172If you run in to trouble the easiest thing to do so you can keep working is just to disable the !TracSlimTimer plugin. Go to the admin page in trac, Plugins, !TracSlimTimer 0.1.0. Then untick the "Enable" box next to each component (although it is probably only the `TracSlimTimerTicketChangeListener` component that will get in your way). Select "Apply Changes" and restart trac. 
     173 
     174'''2. Inspect the logs''' 
     175 
     176If you actually want to fix the problem you should start with the logs: 
     177 
     178 * `/var/trac/0.10.3/log/httpd/trac.log` — This is usually the most helpful log. You can set the logging level to 'debug' under the Administration page (see 'General', 'Logging'). The !TracSlimTimer plugin writes quite a few things to this log so it's worth a look. 
     179 * `/var/trac/0.10.3/log/httpd/error.log` — Sometimes errors show up here. I think these are mostly errors encountered while loading plugins like syntax errors. 
     180 
     181'''3. But I've got nothing''' 
     182 
     183I came across one occasion where the whole web server would just crash with no log, nothing, just a seg fault. The problem seemed to be that Apache's version of expat (1.95.7) was conflicting with Python's (1.95.8). It would happen whenever a module was loaded that used expat (e.g. elementtree and I think genshi too). The solution was simply to upgrade the system (and also Apache's) expat to 1.95.8. See [http://www.dscpl.com.au/wiki/ModPython/Articles/ExpatCausingApacheCrash this article] for details. 
     184 
     185'''4. Restart''' 
     186 
     187So you've changed the code and yet you're still getting the problem? I don't know how Python/trac's caching works but often it doesn't reload the file properly. One way to ensure the file is reloaded is to restart trac: 
     188 
     189{{{ 
     190/opt/trac/0.10.3/install/etc/init.d/httpd restart 
     191}}} 
     192 
     193== Summary of important paths == 
     194 
     195On my setup here are the places to look: 
     196 
     197`/opt/trac/0.10.3/install/bin` — trac's version of Python, easy_install etc. 
     198 
     199`/var/trac/0.10.3/var/trac/plugins` — trac plugins (eggs) 
     200 
     201`/var/trac/0.10.3/var/trac/conf` — trac configuration (including trac.ini and !TracSlimTimer's users.xml) 
     202 
     203`/var/trac/0.10.3/log/httpd` — trac logs (and logs from the module) 
     204 
     205`/var/trac/0.10.3/log/time_report.log` — reporting module log 
     206 
     207`/opt/trac/0.10.3/install/etc/init.d/httpd restart` — The command to restart trac (including Apache) 
     208 
    130209== Developers Guide == 
    131210 
    132 == Troubleshooting == 
    133  
    134 == Dependencies == 
     211A brief overview of the code is available in the [TracSlimTimerPluginDevelopersGuide developers guide]. 
    135212 
    136213== Bugs/Feature Requests ==  
     
    150227You can check out TracSlimTimerPlugin from [http://trac-hacks.org/svn/tracslimtimerplugin here] using Subversion, or [source:tracslimtimerplugin browse the source] with Trac. 
    151228 
    152 == Example == 
    153  
    154 n/a 
     229{{{ 
     230#!html 
     231<a name="screenshots"/> 
     232}}} 
     233== Examples (screenshots) == 
     234 
     235{{{ 
     236#!html 
     237<center> 
     238}}} 
     239 
     240'''Basic settings''' 
     241 
     242[[Image(source:tracslimtimerplugin/docs/images/basic-full.png)]] 
     243 
     244'''Reporting options''' 
     245 
     246[[Image(source:tracslimtimerplugin/docs/images/reporting-full.png)]] 
     247 
     248'''User configuration''' 
     249 
     250[[Image(source:tracslimtimerplugin/docs/images/users-full.png)]] 
     251 
     252{{{ 
     253#!html 
     254</center> 
     255}}} 
    155256 
    156257== External Resources == 
     258 
     259General: 
    157260 
    158261 * [http://www.slimtimer.com SlimTimer]