Python issue tracker Trac

Trac https://trac.edgewall.org/ ** Trac ** is an open source issue tracker by Edgewall Software written in Python. Modified BSD license. There are current 1.2 series (2016/11 ~), LTS 1.0 series (2012/9 ~ 2015/7), next version 1.3 series (2016/11 ~), etc., and the latest stable version is June 2017. It will be 1.2.2 released on the 21st. Others include Redmine and Mantis Bug Tracker.

history

https://trac.edgewall.org/wiki/TracHistory https://trac.edgewall.org/wiki/TracChangeLog?version=95 https://en.wikipedia.org/wiki/Trac It started to be written as svntrac using SQLite and Subversion with reference to CVSTrac in August 2003, and was renamed to Trac in December 2003. In February 2004, the version of Trac was first changed from 0.0.1 to 0.1, then from 0.1 to 0.5 all at once. After that, it was upgraded to 0.6 and 0.7 in March 2004, and 0.8 in November 2004.

System requirements

https://trac.edgewall.org/wiki/TracInstall

Installation

Configuration example

Trac

yum -y install gcc python-devel python-setuptools enscript
easy_install Babel
easy_install Trac

If Babel is installed before Trac, it will be automatically translated into Japanese.

Apache

yum -y install httpd mod_wsgi
mkdir /var/www/trac
chown apache. /var/www/trac
cat << "_EOF_" > /var/www/trac/trac.wsgi && chmod 755 /var/www/trac/trac.wsgi
import os
os.environ['TRAC_ENV_PARENT_DIR'] = '/var/www/trac'
os.environ['PYTHON_EGG_CACHE'] = '/var/www/trac/eggs'
import trac.web.main
application = trac.web.main.dispatch_request
_EOF_
cat << "_EOF_" > /etc/httpd/conf.d/trac.conf
WSGIScriptAlias /trac /var/www/trac/trac.wsgi
<Directory /var/www/trac>
    WSGIApplicationGroup %{GLOBAL}
    Require all granted
</Directory>
<LocationMatch "/trac/.*/login">
   AuthType Basic
   AuthName "trac"
   AuthUserFile "/var/www/trac/.htpasswd"
   Require valid-user
</LocationMatch>
_EOF_
firewall-cmd --permanent --add-service=http && firewall-cmd --reload
httpd -t
systemctl start httpd && systemctl enable $_
setenforce 0 #TODO

Subversion

yum install subversion subversion-python mod_dav_svn
mkdir /var/www/svn
cat << "_EOF_" > /etc/httpd/conf.d/subversion.conf
<Location /svn>
    DAV svn
    SVNParentPath /var/www/svn
    <LimitExcept GET PROPFIND OPTIONS REPORT>
        AuthType Basic
        AuthName "Subversion - Authorization Realm"
        AuthUserFile /var/www/trac/.htpasswd
        Require valid-user
    </LimitExcept>
</Location>
_EOF_
httpd -t
systemctl restart httpd

BASIC authentication

htpasswd -c /var/www/trac/.htpasswd admin
htpasswd /var/www/trac/.htpasswd example_user

Plugin

Trac Portal Plugin https://pypi.python.org/pypi/TracPortalPlugin Since Trac does not have a function to manage multiple projects, it is necessary to use Trac Portal Plugin etc.

trac-admin /var/www/trac/portal initenv
trac-admin /var/www/trac/portal permission add admin TRAC_ADMIN
easy_install -Z -U https://trac-hacks.org/svn/xmlrpcplugin/trunk
trac-admin /var/www/trac/portal config set components tracrpc.* enabled
trac-admin /var/www/trac/portal permission add authenticated XML_RPC 
easy_install TracPortalPlugin
trac-admin /var/www/trac/portal config set components tracportal.* enabled
trac-admin /var/www/trac/portal config set components tracportalopt.* enabled
trac-admin /var/www/trac/portal config set trac mainnav "wiki, dashboard, cross_search, public_projects, available_projects, new_project"
trac-admin /var/www/trac/portal config set tracportal ignore_projects portal
trac-admin /var/www/trac/portal config set tracportal trac_env_parent_dir /var/www/trac
trac-admin /var/www/trac/portal upgrade
chown -R apache. /var/www/trac/portal

AccountManagerPlugin https://trac-hacks.org/wiki/AccountManagerPlugin https://ameblo.jp/itboy/entry-10182930033.html

easy_install http://trac-hacks.org/svn/accountmanagerplugin/trunk
trac-admin /var/www/trac/portal config set components acct_mgr.* enabled
chown -R apache. /var/www/trac/portal

IniAdminPlugin https://trac-hacks.org/wiki/IniAdminPlugin

TracIniAdminPanelPlugin https://trac-hacks.org/wiki/TracIniAdminPanelPlugin

Reference information

What to do if the Trac plugin does not enter due to an error | Ichiyonkodo Shibuya.trac Track Hacks

Issue management tool

Recommended Posts

Python issue tracker Trac
Register redmine issue from Python
Python
Resolve Vim's Python interface path issue