Trac
Summary
Trac 0.10.3 is running at http://trac.osgeo.org/ (the primary Peer1 host).
- Trac Guide
- All data and configurations live under /var/www/trac
- virtual server configurations are under /etc/httpd/conf.d/trac
- Existing Instances
- Actual python is installed in /usr/lib/python2.3/site-packages/trac
- Frank Warmerdam and Howard Butler have configuration experience, and can help maintain instances.
- available plugins:
- TOC - multi page tables of contents.
- MediaWikiMacro - provides media wiki like format support (link? details?)
- TracDoxygen - mix doxygen docs into trac interface (needs extra admin support)
Procedures
Planned Upgrade
On Saturday June 20th, at 9:00pm EST it is planned that Howard Butler, Frank Warmerdam and possibly others will take down trac services for an upgrade from sqlite2 to sqlite3 for the backend database in an effort to reduce the persistent Trac problems with database locking, and slow response. Changes under consideration:
- Upgrade to use postgres
- Upgrade subversion to 1.5.6
- Upgrade to the most recent version of Trac (possibly)
Coordination will take place in #telascience. Though only primary admins will have access to osgeo1 for the upgrade work, other assistance to test results could be helpful.
Service unavailability may last as long as 4 hours.
Status:
- Subversion software upgrade complete with no apparent problems.
- The following items were upgraded from source:
- APR (Apache Portable Runtime) from 0.9.4 to 0.9.18 - APR-util from 0.9.4 to 0.9.17 - Subversion 1.4.3 to 1.5.6 - Subversion Python bindings from 1.4.3 to 1.5.6 - SWIG 1.3.31 from 1.3.21
- GeoTools subversion respository upgraded to 1.5.6 format. We will upgrade the other repositories (to support merge tracking and other 1.5+ features once we get confirmation on http://trac.osgeo.org/osgeo/ticket/368
- proj, gdal, and grass trac instances upgraded to use postgres, seemingly working.
DB upgrade procedure (as root):
- createdb -U postgres trac_gdal
- /root/sqlite2pg/sqlite2pg -e /var/www/trac/gdal -p 'postgres://postgres@/trac_gdal'
- vi /var/www/trac/gdal/conf/trac.ini - modify database setting to "postgres://postgres@/trac_gdal".
- /usr/sbin/apachectl graceful
Local Customizations
The file /usr/lib/python2.3/site-packages/trac/notification.py was substantially modified to support looking up email addresses in LDAP, and will need to be re-adjusted if we upgrade to a new version of Trac.
Creating a trac instance
DB upgrade procedure (as root):
$ sudo createdb -U postgres proj_name $ sudo trac-admin /var/www/trac/<proj_name> initenv $ sudo trac-admin /var/www/trac/<proj_name> permission add <osgeo_userid> TRAC_ADMIN $ sudo chown -R apache:apache /var/www/trac/<proj_name>
- Make sure to set the db connection to postgres://postgres@/trac_proj
- Update /var/www/trac//<proj_name>/conf/trac.ini to enable email notification.
- Add virtual host file /etc/httpd/conf.d/trac/<proj_name>.conf enabling LDAP based authentication.
- Logo can be referenced in /var/www/trac/<proj_name>/conf/trac.ini and placed in /var/www/trac/<proj_name>/htdocs
- modify webadmin.* setting in trac.ini to enabled for web based administration.
- Add to /var/www/trac/index.html
- Add the following to /var/www/trac/robots.txt to avoid walking through ticket attachments or svn.
Disallow: /<proj_name>/browser Disallow: /<proj_name>/log Disallow: /<proj_name>/report Disallow: /<proj_name>/changeset Disallow: /<proj_name>/attachment
Recommended Trac permissions:
anonymous BROWSER_VIEW anonymous CHANGESET_VIEW anonymous FILE_VIEW anonymous LOG_VIEW anonymous MILESTONE_VIEW anonymous REPORT_SQL_VIEW anonymous REPORT_VIEW anonymous ROADMAP_VIEW anonymous SEARCH_VIEW anonymous TICKET_VIEW anonymous TIMELINE_VIEW anonymous WIKI_VIEW authenticated TICKET_CHGPROP authenticated TICKET_CREATE authenticated TICKET_MODIFY authenticated WIKI_CREATE authenticated WIKI_MODIFY developers DOXYGEN_VIEW developers MILESTONE_ADMIN developers REPORT_ADMIN developers REPORT_CREATE developers WIKI_ADMIN warmerdam developers warmerdam TRAC_ADMIN ...
Plugins
Installed plugins (do in every trac instance, installation guide):
Custom fields
See http://trac.edgewall.org/wiki/TracTicketsCustomFields
for example, in trac.ini:
[ticket-custom] platform = select platform.label = Platform platform.options = Unspecified|MSWindows 2K|MSWindows XP|MSWindows Vista|MSWindows CygWin|MacOSX|Linux|Other Unix|All platform.value = Unspecified
cpu = select cpu.label = CPU cpu.options = Unspecified|x86-32|x86-64|OSX/PPC|OSX/Intel|Other|All cpu.value = Unspecified
Timeline with filename indication
[timeline] changeset_long_messages = false changeset_show_files = 1 changeset_files_count = 3 default_daysback = 30 ticket_show_details = false
(see for example here)
Hotcopy a trac instance
$ sudo trac-admin /var/www/html/trac/<proj_name> hotcopy /path/to/copy/trac/to
Trac Spam
We have had problems with trac spam when ticket create and ticket modify permissions were set to anonymous (the default). To get around this most (all?) instances have been changed to require authenticated users to do these actions.
But some projects strongly desire to support anonymous ticket creation and modification and at some point this might be viable using image captcha technology to keep out the spammers. A Trac plugin for this is apparently under development, and described at:
http://trac.edgewall.org/browser/sandbox/spam-filter-captcha
Trac notification forward to project mailing list
To fwd notifications from trac to e.g. a project developers mailing list, you need to
- set in trac the mailing list address as default (trac Admin section)
- add the trac@osgeo.org address (or trac_osgeo@.., or ...) in Mailman to
- "Privacy options"
- "Subscription rules"
- "[Sender filters]"
- "Non-member filters"
- "List of non-member addresses whose postings should be automatically accepted."
- "Non-member filters"
- "Privacy options"
- As the mail may be addressed to "undisclosed recipients" instead of directly to the list, the messages may be held for moderator approval. To avoid this add "undisclosed recipients" to the list of acceptable aliases at
- "Privacy options"
- "[Recipient filters]"
- acceptable_aliases
- "[Recipient filters]"
- "Privacy options"