Apache Bloodhound †
trac kanon †
- 対応OS
- Ubuntu 10.10 Server
- Debian GNU/Linux, GNU/kFreeBSD 6.0
- RedHat Enterprise Linux 6.0
- Oracle Enterprise Linux 6.0
- CentOS 5.x (Experimental)
登録ユーザのみ使用可能にする †
vim /etc/httpd/conf.d/kanon.conf
----
#<LocationMatch "/[^/]+/login($|/)">
<LocationMatch "/">
----
service httpd graceful
インストール †
- http://kanon.ultimania.org/hg/KanonConductor/ からkanonダウンロード。右のメニューから「gz」のリンクをコピー
cd /tmp
wget http://kanon.ultimania.org/hg/KanonConductor/archive/tip.tar.gz
tar xvfz tip.tar.gz
cd KanonConductor-803f7b41dfdf/
./kanon-setup
- Maven, Jenkins をインストールするかどうか聞いてくるので用途に応じて「y」「n」で選択
- インストール後、ブラウザで http://www.example.com/trac/SampleProject/ を開いてみる
- adminユーザでログインし、管理メニューを見てみる
ユーザ名 | パスワード |
admin | admin |
leader | leade |
guest | guest |
定量的プロジェクト管理ツール †
mime-type †
- text/x-trac-wiki:svnのmime-typeに設定するとtracのリポジトリビューワ表示の際にwikiレンダリングされる
その他プラグイン †
- TicketExtPlugin チケットにテンプレートを追加など
- 要:CustomFieldAdminPlugin
CentOS5.8, Trac0.11jaでは以下のエラーで動作せず。プラグインの競合かもしれない
KeyError: 'customfieldadmin/locale'
- 要:json-py
- TicketExtPluginインストール(Trac0.11の場合) DecoratorPluginと競合するのでext_decoration=false
sudo su -
cd /usr/local/src/
svn export http://trac-hacks.org/svn/ticketextplugin/0.11 ticketextplugin
cd ticketextplugin
python setup.py bdist_egg
cp dist/*.egg /usr/share/trac/plugins/
vi /usr/share/trac/conf/trac.ini
----
[components]
ticketext.* = enabled
[decorator]
ext_decoration = false
[ticketext]
不具合.template = * OS: [[BR]] * ブラウザ: [[BR]] * 対象ソフト: [[BR]] * 質問/不具合の内容: [[BR]] * 問題の再現方法: [[BR]] 1. [[BR]] 1. [[BR]] 1. [[BR]] * 結果: [[BR]] * 期待した結果: [[BR]] * スクリーンショット: [[BR]]
不具合.enablefields =
----
service httpd graceful
コミットログからマイルストーンを完了にする †
あまりテストしていないので自己責任で。
コミットログに「milestone #1」と記入すると「チケット#1のマイルストーンを完了」に変更するパッチ。
コマンド名を変更したい場合は「'milestone': '_cmdMilestoneClose'」の「milestone」を任意の英数字に変更
trac-post-commit-hookのテスト †
ExcelやOpenOffice.org Calcから表をコピー †
- Trac 0.11.7.ja1 + TracWysiwyg 0.2で確認
- 編集モードにし、Wysiwygボタンをクリック
- ExcelやOpenOffice.org Calcから表を選択しコピー
- Trac側で貼り付け。※色やフォント等は失われる
クエリの結果をWikiに保存 †
テーブル情報 †
カスタムレポート等の作成時にテーブル内容を参照する必要がある
tracにスクリーンショットを添付できるFirefox/Chromeプラグイン「fulmo」 †
- http://ciklone.com/fulmo/
- fulmo(フルモ)とは、オープングルーヴが作った、高速・シンプルで使いやすい、オープンソースのバグ報告ツールです。fulmoは、品質管理チーム・テスター・開発者のためのツールであり、開発しているWebアプリケーションのバグをすばやく報告することが出来ます。fulmoは、Google Chrome や Firefox のブラウザ拡張ツールです。BSD ライセンスにもとづいて利用できるオープンソースです。
MediaWikiからTrac Wikiへの変換 †
mod_pythonの代わりにmod_wsgiを使う †
mod_pythonプロジェクトはclosedになったため、mod_wsgiを使ってインストールする場合。高速化も期待出来る。
trac 0.12以降で良い場合は kanon の方が良いだろう。
- Segmentation faultが出る場合は、mod_pythonをアンインストール
yum remove mod_python
- trac 0.11.7.jaのインストール
yum install python python-devel setuptools mod_wsgi python-sqlite2 httpd mod_ssl sqlite gcc --enablerepo=epel
cd /tmp
wget http://peak.telecommunity.com/dist/ez_setup.py
python ez_setup.py
easy_install http://svn.edgewall.org/repos/genshi/tags/0.6.0/
easy_install http://www.i-act.co.jp/project/products/downloads/Trac-0.11.7.ja1.zip
# TraM用のall, テスト用のSandBoxを作成
mkdir -p /var/www/svn
mkdir -p /var/www/trac
svnadmin create --fs-type=fsfs /var/www/svn/all
svnadmin create --fs-type=fsfs /var/www/svn/SandBox
chown -R apache. /var/www/svn/all
chown -R apache. /var/www/svn/SandBox
trac-admin /var/www/trac/all initenv "all" "sqlite:db/trac.db" "svn" "/var/www/trac/all" --inherit=/usr/share/trac/conf/trac.ini
trac-admin /var/www/trac/SandBox initenv "SandBox" "sqlite:db/trac.db" "svn" "/var/www/trac/SandBox" --inherit=/usr/share/trac/conf/trac.ini
chown -R apache. /var/www/trac/all
chown -R apache. /var/www/trac/SandBox
trac-admin /var/www/trac/all/ resync
trac-admin /var/www/trac/SandBox/ resync
# trac共通設定ファイル類を作成。trac.iniの共通化。JS,CSS,画像等は静的に置いて高速化。
trac-admin /var/www/trac/all/ deploy /usr/share/trac/htdocs
mkdir -p /usr/share/trac/{conf,plugins,templates}
touch /usr/share/trac/conf/trac.ini
# パスが取得できない部分があるので直接指定
vim /usr/share/trac/cgi-bin/trac.wsgi
----
#!/usr/bin/python
import os
import sys
reload(sys)
sys.setdefaultencoding("utf-8")
def application(environ, start_request):
if not 'trac.env_parent_dir' in environ:
environ.setdefault('trac.env_parent_dir', '/var/www/trac/all')
if 'PYTHON_EGG_CACHE' in environ:
os.environ['PYTHON_EGG_CACHE'] = environ['PYTHON_EGG_CACHE']
elif 'trac.env_path' in environ:
os.environ['PYTHON_EGG_CACHE'] = \
os.path.join(environ['trac.env_path'], '.egg-cache')
elif 'trac.env_parent_dir' in environ:
os.environ['PYTHON_EGG_CACHE'] = \
os.path.join(environ['trac.env_parent_dir'], '.egg-cache')
from trac.web.main import dispatch_request
return dispatch_request(environ, start_request)
----
# wsgiの設定
vim /etc/httpd/conf.d/wsgi.conf
----
LoadModule wsgi_module modules/mod_wsgi.so
WSGIPythonEggs /var/www/.python-eggs
WSGISocketPrefix /var/run/wsgi
----
# tracキャッシュの設定
mkdir /var/www/trac/.egg-cache
chown apache. /var/www/trac/.egg-cache
# pythonキャッシュの設定
mkdir /var/www/.python-eggs
chown apache. /var/www/.python-eggs
# Digest認証の設定
mkdir -p /etc/subversion
htdigest -c /etc/subversion/.htdigest password admin
chown apache. /etc/subversion/.htdigest
# DocumentRoot
mkdir -p /var/www/vhost/example.com/public_html
chown apache. /var/www/vhost/example.com
# Apache NameVirtualHostの設定
vim /etc/httpd/conf.d/vhost.conf
----
NameVirtualHost *:80
----
vim /etc/httpd/conf.d/example.com.conf
----
<VirtualHost *:80>
ServerAdmin webmaster@example.com
ServerName trac.example.com
ServerAlias 127.0.0.1
ErrorLog logs/trac.example.com-error_log
CustomLog logs/trac.example.com-access_log combined env=!no_log
DocumentRoot /var/www/vhost/trac.example.com
Alias /trac_common/ /usr/share/trac/htdocs/common/
WSGIDaemonProcess trac user=apache group=apache processes=2 threads=25 maximum-requests=10000
WSGIProcessGroup trac
# WSGIScriptAlias /projects /usr/share/trac/cgi-bin/trac.wsgi
WSGIScriptAlias /projects /usr/share/trac/cgi-bin/tram.wsgi
SetEnv trac.env_parent_dir /var/www/trac
<Location /projects>
WSGIApplicationGroup %{GLOBAL}
Order deny,allow
Allow from all
ExpiresActive On
ExpiresByType application/x-javascript A259200
ExpiresByType application/javascript A259200
ExpiresByType image/png A2592000
ExpiresByType image/jpeg A2592000
ExpiresByType image/gif A2592000
ExpiresByType text/css A2592000
</Location>
<LocationMatch "/projects/">
AuthType Digest
AuthName password
AuthUserFile /etc/subversion/.htdigest
Require valid-user
</LocationMatch>
</VirtualHost>
----
service httpd restart
- tram (trac 0.11対応版)のインストール
マイルストーンを色分け †

- trac.iniの編集
vi /usr/share/trac/conf/trac.ini
----
[milestone-groups]
closed = closed
closed.label = closed/完了
closed.order = 1
closed.overall_completion = true
closed.query_args = group=resolution
verify = verify
verify.css_class = yellow
verify.label = verify/検証中
verify.order = 2
accepted = accepted,in_work
accepted.css_class = red
accepted.label = accepted/作業中
accepted.order = 3
assigned = assigned,reopened
assigned.css_class = blue
assigned.label = assigned/割当済
assigned.order = 4
new = new
new.css_class = open
new.label = new/未着手
new.order = 5
----
service httpd graceful
Trac Lightningにインストールされているプラグイン一覧 †
○を付けたプラグインをCentOS5.5環境に導入した
日付フォーマットの変更 †
cat > /tmp/ticket.html.patch << 'EOS'
--- ticket/templates/ticket.html
+++ mod/ticket.html
@@ -146,8 +146,8 @@
<div id="ticket" py:if="ticket.exists or preview_mode"
class="${preview_mode and 'ticketdraft' or None}">
<div class="date">
- <p py:if="ticket.exists">登録: ${dateinfo(ticket.time_created)} 前</p> <!--! FIXME: message_contains_tag -->
- <p py:if="ticket.time_changed != ticket.time_created">最終更新: ${dateinfo(ticket.time_changed)} 前</p> <!--! FIXME: message_contains_tag -->
+ <p py:if="ticket.exists">登録: ${format_datetime(ticket.time_created)}(${dateinfo(ticket.time_created)}前)</p> <!--! FIXME: message_contains_tag -->
+ <p py:if="ticket.time_changed != ticket.time_created">最終更新: ${format_datetime(ticket.time_changed)} (${dateinfo(ticket.time_changed)}前)</p> <!--! FIXME: message_contains_tag -->
<p py:if="not ticket.exists"><i>${_('(ticket not yet created)')}</i></p>
</div>
<!--! use a placeholder if it's a new ticket -->
@@ -240,7 +240,7 @@
 
</span>
<!--! FIXME: message_contains_tag -->
- 更新者: ${authorinfo(change.author)} (${dateinfo(change.date)} 前)
+ 更新者: ${authorinfo(change.author)} ${format_datetime(change.date)} (${dateinfo(change.date)} 前)
</h3>
<div py:if="'cnum' in change and can_append" class="inlinebuttons">
<input type="hidden" name="replyto" value="${change.cnum}" />
EOS
cat > /tmp/query_results.html.patch << 'EOS'
--- ticket/templates/query_results.html 2009-03-10 04:26:18.000000000 +0900
+++ ticket/templates/query_results.html 2011-04-26 21:41:12.000000000 +0900
@@ -62,7 +62,7 @@
<td py:when="name == 'id'" class="id"><a href="$result.href" title="${_('View ticket')}" class="${classes(closed=result.status == 'closed')}">#$result.id</a></td>
<td py:otherwise="" class="$name" py:choose="">
<a py:when="name == 'summary'" href="$result.href" title="${_('View ticket')}">$value</a>
- <py:when test="isinstance(value, datetime)">${dateinfo(value)}</py:when>
+ <py:when test="isinstance(value, datetime)">${format_date(value)} (${dateinfo(value)})</py:when>
<py:when test="name == 'reporter'">${authorinfo(value)}</py:when>
<py:when test="name == 'cc'">${format_emails(ticket_context, value)}</py:when>
<py:when test="name == 'owner' and value">${authorinfo(value)}</py:when>
@@ -79,7 +79,7 @@
<td colspan="${len(headers)}">
<!--! FIXME: message_contains_tag -->
<p class="meta">${_('Reported by')} <strong>${authorinfo(result.reporter)}</strong>,
- ${dateinfo(result.time)}前.</p>
+ ${format_date(result.time)} (${dateinfo(result.time)}前.)</p>
</td>
</tr>
<py:choose>
EOS
cd /usr/lib/python2.4/site-packages/Trac-0.11.5.ja1-py2.4.egg/trac/ticket/templates/
patch -p2 < /tmp/ticket.html.patch
patch -p2 < /tmp/query_results.html.patch
TracReport †
wikiやマイルストーンにマクロの形で埋め込む事ができる
編集内容に、IPアドレス、メールアドレスの表示 †
TortoiseSVN等でのコミット時にメッセージ等を表示する †
ページ毎のアクセス制御 †
リビジョンツリー †
改ページを入れる †
Googleカレンダー表示プラグイン †
trac v0.11で、Googleカレンダーをwikiに表示させたい。
- 共通pluginディレクトリにいれても、.pyだけ動かないのでシンボリックリンクを張る。googleカレンダーのURLかをチェックしているが、違った場合何を返せばいいのかわからない。空文字を返すと、プラグインが無いという表示がでる。
GoogleCalendar.py
# mv GoogleCalendar.py /usr/share/trac/plugins/
# ln -s /usr/share/trac/plugins/GoogleCalendar.py /var/www/trac/SandBox/plugins/GoogleCalendar.py
- 使い方
[[GoogleCalendar(<iframe src="https://www.google.com/calendar/ ...></iframe>)]]
- 限定公開URLを利用する方法(特定ユーザのみと共有したい場合)
添付ファイルに直接リンク †
HTMLプレビューをせずに直接ファイルにリンクする
- trac 0.11で確認。0.9の頃には無かった気がする。
raw-attachment:ファイル名
trac0.11で通知メールのTicket URLが不完全 †
Database is Locked エラー †
- DBBにSQLiteを使っていて、トランザクションが重複したり、プールサイズを上回ったりすると起きる模様。
- 参考
- すぐ解消するにはapacheの再起動
# service httpd graceful
- pysqliteのバージョンをv2.0.5以上にすると良い。1ヶ月以上発生せず
trac-post-commit-hookから、ticket_customへのアクセス †
- チケットのデフォルト項目は「ticket['status'] = 'closed'」などで更新できるようですが、ticket_customの項目は変更できませんでした。
コミットログに作業時間を入力するとtracに反映 †
- 変更点
- 「re #1」の時にステータスがnewの場合は、assignedに変更し、担当者をコミットユーザに変更
- コマンド 「hour」を追加
- hour #チケット番号 今日の作業時間
- hours #チケット番号 今日の作業時間
- 例:hour #1 1
trac0.11のワークフローを視覚化 †
- Trac-0.11.5.ja1/sample-plugins/workflow/enterprise-review-workflow.ini

- trac0.11.5-jaで新規作成

- trac0.10.5-jaで新規作成

- utf対応パッチ
--- workflow_parser.py 2009-09-09 19:12:18.000000000 +0900
+++ workflow_parser.py 2009-09-09 19:13:15.000000000 +0900
@@ -9,6 +9,8 @@
from trac.config import Configuration
from trac.ticket.default_workflow import parse_workflow_config
+import locale, codecs
+
_debug = True
def debug(s):
if _debug:
@@ -75,6 +77,7 @@
digraph_lines = actions2graphviz(actions, show_ops, show_perms)
# And output
+ sys.stdout = codecs.getwriter(locale.getpreferredencoding())(sys.stdout);
sys.stdout.write(''.join(digraph_lines))
def usage(output):
- 使用してみる
$ cd /usr/local/src/Trac-0.11.5.ja1/contrib/workflow
$ ./workflow_parser.py /var/www/trac/sandbox/conf/trac.ini > trac.dot
$ dot -T png -Nfontname=kochi-gothic-subst -Efontname=kochi-gothic-subst < trac.dot > trac.png
もしくは
$ vi trac.dot
----
digraph G {
node [fontname="kochi-gothic-subst"]
edge [fontname="kochi-gothic-subst"]
...
}
----
高速化 †
- decoratorプラグインの高速化
- Trac月のプラグインを全部入れてみる(その1) - World Wide Wonderful
cp -r /var/www/trac/.egg-cache/TracDecoratorPlugin-0.3.1-py2.4.egg-tmp/decorator/htdocs /var/www/vhost/example.com/trac_common/decorator
cd /usr/lib/python2.4/site-packages/Trac-0.11.5.ja1-py2.4.egg/trac/web/
cp chrome.py chrome.py.default
--- chrome.py.default 2011-04-22 16:43:55.000000000 +0900
+++ chrome.py 2011-04-22 16:45:09.000000000 +0900
@@ -78,6 +78,8 @@
if filename.startswith('common/') and 'htdocs_location' in req.chrome:
href = Href(req.chrome['htdocs_location'])
filename = filename[7:]
+ elif filename.startswith('decorator/') and 'htdocs_location' in req.hdf:
+ href = Href(req.hdf['htdocs_location'])
else:
href = req.href
if not filename.startswith('/'):
@@ -98,6 +100,8 @@
if filename.startswith('common/') and 'htdocs_location' in req.chrome:
href = Href(req.chrome['htdocs_location'])
path = filename[7:]
+ elif filename.startswith('decorator/') and 'htdocs_location' in req.hdf:
+ href = Href(req.hdf['htdocs_location'])
else:
href = req.href
if not filename.startswith('/'):
CentOS5でFastCGIを使う †
一つのサーバで複数バージョンのTracを使用する方法 †
TraMプラグイン Trac0.11対応版 †
- 以下のパッチは、trac-0.11.5以降では不要
make_obcallback: could not import mod_python.apache. †
- CentOS5.3、trac-0.10.5-ja-1.zipで以下のエラー発生
- エラー
[Tue Sep 01 15:29:49 2009] [error] make_obcallback: could not import mod_python.apache.\n
[Tue Sep 01 15:29:49 2009] [error] python_handler: no interpreter callback found.
[Tue Sep 01 15:29:49 2009] [error] [client 192.168.1.11] python_handler: Can't get/create interpreter.
- mod_pythonを再インストールしたら直った
# yum remove mod_python
# yum install mod_python
# service httpd restart
TraM+TracWholeSearchでマルチプロジェクト横断検索 †
TraMプラグインを使用していますが、マルチプロジェクトの検索ができません。
Trac Whole Search がTrac0.11に対応しました。 - almost nearly deadプラグインはAJAXで複数プロジェクトの検索ができるようです。
そのままだと、tramのリンクも拾ってしまうので改造しました。
- 展開とインストール
# wget -O trunk.tar.gz "http://svn.sourceforge.jp/view/plugins/TracWholeSearch/trunk.tar.gz?root=shibuya-trac&view=tar"
# tar xvfz trunk.tar.gz
# mv trunk/search /var/www/html/
# chown -R 適当なユーザ /var/www/html/search
- 変更点
- 適用
$ cd search
$ patch < TracWholeSearch0.21.patch
- TraMのテンプレートの適当な位置に追加
# vi /usr/lib/python2.3/site-packages/TraM-0.1-py2.3.egg/tram/templates/project_list.cs
----
<p><a href="/search/" title="プロジェクト横断検索">プロジェクト横断検索</a></p>
----
プラグインのアンインストール †
アンインストーラが用意されてない場合のメモ。
wikiページのPDF化はまだ未定 †
現在 trac-hacks には2つプラグインが登録されているが、いずれも htmldoc を使用しており、これが日本語(UTF-8)に対応していない。現在は 1.8.27。1.9のロードマップではペンディングになっている
シンタックスハイライトの有効化 †
- phpの色づけにSilverCityが必要なので、インストール。
- 最新は、0.9.7だが問題があるようだ。 0.9.5推奨らしい。 http://d. --inherit=/usr/share/trac/conf/trac.ini
trac-admin /var/www/trac/SandBox initenv 登録: ${format_datetime(ticket.time_created)}(${dateinfo(ticket.time_created)}前)hatena.ne.jp/shzm/20060404
- インストールする
- ソースから
# wget http://nchc.dl.sourceforge.net/sourceforge/silvercity/SilverCity-0.9.5.tar.gz
# tar xvfz SilverCity-0.9.5.tar.gz
# cd SilverCity-0.9.5
# python setup.py build
# python setup.py install
- アンインストールする場合
rm -rf /usr/lib/python2.3/site-packages/SilverCity
rm /usr/bin/source2html.py
rm /usr/bin/cgi-styler.py
rm /usr/bin/cgi-styler-form.py
- 共通設定ファイルに追加
# vi /usr/share/trac/conf/trac.ini
----
[mimeviewer]
php_path = /usr/bin/php
enscript_path = /usr/bin/enscript
tab_width = 8
max_preview_size = 262144
enscript_modes = text/x-dylan:dylan:4,text/x-php:php:4
silvercity_modes =
mime_map = text/x-dylan:dylan,text/x-idl:ice,text/x-ada:ads:adb, text/x-php:php
----
# service httpd graceful
- 既存プロジェクトに[mimeviewer]の設定はあり、その値で上書されるため共通設定は反映されない項目もある。コメントアウトすればよい。
Trac 0.10.4 で 「NoSuchChangeset: No changeset ?? in the repository」 †
Trac 0.10.4でTraMプラグインを入れたところ、以下のようなエラーが出た。が、これはどうもTrac本体がよくないようだ。
Trac本家を検索すると、同じ症状のチケットがあったので、r5612を当てる。一応、エラーは出なくなった。修正内容はtrac 0.10.5に含まれる模様。
- エラー
Traceback (most recent call last):
File "/usr/lib/python2.3/site-packages/TraM-0.1-py2.3.egg/tram/main.py", line 252, in dispatch_request
dispatcher.dispatch(req)
File "/usr/lib/python2.3/site-packages/trac/web/main.py", line 191, in dispatch
chosen_handler = self._pre_process_request(req, chosen_handler)
File "/usr/lib/python2.3/site-packages/trac/web/main.py", line 263, in _pre_process_request
chosen_handler = f.pre_process_request(req, chosen_handler)
File "/usr/lib/python2.3/site-packages/trac/versioncontrol/api.py", line 73, in pre_process_request
self.get_repository(re
- q.authn width=ame).sync()
File "/usr/lib/python2.3/site-packages/trac/versioncontrol/cache.py", line 102, in sync
self.youngest = self.repos.normalize_rev(self.youngest)
File "/usr/lib/python2.3/site-packages/trac/versioncontrol/svn_fs.py", line 312, in normalize_rev
raise NoSuchChangeset(rev)
NoSuchChangeset: No changeset 38 in the repository
- http://trac.edgewall.org/ticket/5449
# cd /usr/local/src/trac-0.10.4-ja-1/trac/versioncontrol/
# wget -O cache.py.r5612 http://trac.edgewall.org/changeset/5612?format=diff&new=5612
# patch < cache.py.r5612
# python
----
>>> import cache
>>> [CTRL+D]で終了
----
# cp cache.py{,c} /usr/lib/python2.3/site-packages/trac/versioncontrol/
# service httpd graceful
ParentWiki.pyでページ名に全角文字が含まれるとエラー †
Trac 0.10.xからページ名に全角文字が含まれると、ParentWiki.pyがエラーを出すので、パッチを作成してみました。util.escape()でエスケープする必要があるようです。
TraMプラグインでパーミッションを持つプロジェクトのみを表示 †
Trac0.9用のTraMでは、ログインユーザによらず全てのプロジェクトが表示されていました。
これでは、プロジェクト名すら見せたくないものがあった場合に問題でした。
Trac0.10用のTraM中のソースを何気なく読んだところ、ユーザのパーミッションによって表示を制限できるようです。
- trac.iniで[tram]セクションにcheck_auth=trueを追加する。この状態だと、TRAC_ADMIN権限をもつプロジェクトのみ表示される模様
- さらに、permission=でパーミッションを指定すると、特定の権限を持つプロジェクトのみ表示される。
# svn co https://svn.rectang.com/tram/trunk
# cd trunk/
# python setup.py install
# vi /usr/share/trac/conf/trac.ini
----
[components]
tramplugin.* = enabled
[tram]
check_auth=true
permission=WIKI_VIEW
----
# vi /var/trac/all/conf/trac.ini
----
[components]
trac.ticket.report.* = disabled
trac.Search.* = disabled
trac.Timeline.* = disabled
trac.ticket.web_ui.NewticketModule = disabled
trac.Settings.SettingsModule = disabled
webadmin.* = disabled
acct_mgr.* = disabled
----
# vi /etc/httpd/conf.d/trac.conf
----
<Location /projects>
SetHandler mod_python
# PythonHandler trac.web.modpython_frontend
PythonHandler tram.modpython_frontend
PythonOption TracEnvParentDir /var/trac
PythonOption TracUriRoot /projects
SetEnv PYTHON_EGG_CACHE /var/www/.python-eggs
# Require SSL connection for password protection.
SSLRequireSSL
</Location>
#<LocationMatch "/projects/[^/]+/login">
<LocationMatch "/projects/">
AuthType Basic
AuthName "Trac"
AuthUserFile /var/svn/.htpasswd
Require valid-user
</LocationMatch>
----
# service httpd restart
プロジェクト一覧用テンプレート †
標準のプロジェクト一覧画面が味気ないので、それらしく見せるテンプレート。
※/projects/SandBox が必ずあると仮定してますので、それ以外の場合は書き換える必要あり。
TraMプラグインの方が多機能。
- Trac 0.10.3
- /usr/share/trac/templates/index.cs
index.cs
資料/リンク †