Edgewall Software

Version 8 (modified by cilkay, 19 years ago) ( diff )

Added comments regarding running 10.1 at msec 5

Installing and Running Trac on Mandrakelinux Cooker

Trac is included in Mandrakelinux contributions repository, version 0.7.1 for 10.1, latest version in cooker.

It should be avaliable through urpmi or rpmdrake, if you have the proper source in you configuration file.

# urpmi trac

Once Trac is installed, you can use trac-admin to add a repository, and use the example config file provided to start using Trac.

See also:

If you want to install it on a older release, please be sure to rebuild it ( use rpm —rebuild trac….src.rpm ), do not install binary cooker package on any stable distribution, as it will break your installation ( http://projects.edgewall.com/trac/ticket/279 ).

If the release tag seems weird, please look at this page http://qa.mandrakesoft.com/twiki/bin/view/Main/DistroSpecificReleaseTag

For 10.2, a wizard was added, just install drakwizard-trac, run drakwizard, and follows the instructions.

Problems getting Trac working with Mandrake 10.1 running at msec 5:

If Mandrake is running at msec 5, Trac will raise errors like the one below when you attempt to access it from your browser.

Oops...

Trac detected an internal error:

malformed database schema - unable to open a temporary database file for storing temporary tables
Traceback (most recent call last):
  File "/home/misc/rpm/tmp/trac-0.7.1-1mdk-buildroot//usr/lib/python2.3/site-packages/trac/core.py", line 475, in cgi_start
  File "/home/misc/rpm/tmp/trac-0.7.1-1mdk-buildroot//usr/lib/python2.3/site-packages/trac/core.py", line 453, in real_cgi_start
  File "/home/misc/rpm/tmp/trac-0.7.1-1mdk-buildroot//usr/lib/python2.3/site-packages/trac/core.py", line 169, in open_environment
  File "/home/misc/rpm/tmp/trac-0.7.1-1mdk-buildroot//usr/lib/python2.3/site-packages/trac/Environment.py", line 160, in get_version
  File "/home/misc/rpm/tmp/trac-0.7.1-1mdk-buildroot//usr/lib/python2.3/site-packages/trac/Environment.py", line 88, in get_db_cnx
  File "/home/misc/rpm/tmp/python-sqlite-0.5.1-1mdk-buildroot//usr/lib/python2.3/site-packages/sqlite/__init__.py", line 61, in connect
  File "/home/misc/rpm/tmp/python-sqlite-0.5.1-1mdk-buildroot//usr/lib/python2.3/site-packages/sqlite/main.py", line 445, in __init__
DatabaseError: malformed database schema - unable to open a temporary database file for storing temporary tables

If you reduce msec to 3, Trac will work as it should. The problem is, sqlite cannot create temp files in /tmp at msec 5 because /tmp is set to 1733. I tried to work around this by giving apache rwx privileges on /tmp by using acl like so:

setfacl -m u:apache:rwx /tmp

That worked until the next time msec swept through the filesystems and reset the permissions back to what they were defined to be in /usr/share/msec/perm.5 .

That would change the acl mask, which would, once again, result in Trac raising errors like the one above. The solution, as imperfect as it is, is to create a file /etc/security/msec/perm.local into which the following should be entered.

/tmp/   root.root       1777

This specifies an exception to the default permissions defined in /usr/share/msec/perm.5, which prevents msec from changing the permissions on /tmp as it periodically sweeps through the filesystem.

Note: See TracWiki for help on using the wiki.