ページ更新: 2007-04-09 (月) (5074日前)
関連: ../Debian4.0, Linux/Debian (2005-11-06 新規作成) Trac を Debian GNU/Linux 3.1 (=Sarge) で稼働させたときのメモ。 適宜、testing, unstable, backportsのパッケージも併用した。 (Debian 4.0 Etch の場合は ../Debian4.0) 目次
はじめに #英語版のDebianパッケージは既に用意されており、簡単にインストールできる。 日本語版のDebianパッケージは公式には存在しない。 非公式のものは WEB+DB Press Vol.32 で紹介されている。 このパッケージは Sarge (=stable) + backport でインストールできる。(unstable, testingは必要ない)。 ただし、最新版が用意されているとは限らない。 最新版のtrac-jaをインストールする場合でも、trac-jaをパッケージ管理外にしてもよければ、次の手順を使うのが簡単だろう。
そこで、このページではこれ以外の手段、すなわちDebianのパッケージから日本語版パッケージを作成する手順 を解説する。 [編集]情報源 #情報源のいろいろなサイト Debian -- trac http://trac.edgewall.org/wiki/ Debian 新メンテナガイド - パッケージの更新 他に:
パッケージの更新情報、バグトラックの確認 (2006-02-19) #公式パッケージやそれをカスタマイズしたパッケージを使ってるなら querybts も確認する。 # apt-get install reportbug $ querybts trac Querying Debian BTS for reports on trac... 38 bug reports found: : debian-security-announce も見ておく。最近では:
trac-0.9.2-ja-1パッケージを作成 (2006-01-03) #[編集]tracに必要なパッケージをインストールする #trac-0.9.2-1は2006-01-03時点ではtestingなので、testing、testingのsourceを入手できるよう設定しておく。 いったん、trac-0.9.2-1パッケージ (trac/testing) を入れる。 apt-getで trac, JapaneseCodecs, docutils, ClearSilver, setuptools, enscript をインストールする: # apt-get -u install trac/testing python-japanese-codecs python-docutils \ > python2.3-clearsilver python2.3-setuptools enscript パッケージリストを読みこんでいます... 完了 依存関係ツリーを作成しています... 完了 trac にはバージョン 0.9.2-1 (Debian:testing) を選択しました 以下の特別パッケージがインストールされます: db4.2-util libapr0 libbz2-1.0 libexpat1 libldap2 libneon24 libpaper1 libreadline4 libsasl2 libsqlite0 libsvn0 libxml2 patch python python-clearsilver python-roman python-sqlite python2.3 python2.3-dev python2.3-docutils python2.3-japanese-codecs python2.3-sqlite python2.3-subversion subversion trac ucf 提案パッケージ: gv postscript-viewer lpr libbz2-dev bzip2 python-doc python-tk python-profiler python2.3-doc python2.3-profiler libc6-dev libc-dev subversion-tools libapache2-mod-python 推奨パッケージ: libpaper-utils libsasl2-modules xml-core python2.3-cjkcodecs python2.3-iconvcodec python-egenix-mxdatetime apache2 httpd debconf-utils 以下のパッケージが新たにインストールされます: db4.2-util enscript libapr0 libbz2-1.0 libexpat1 libldap2 libneon24 libpaper1 libreadline4 libsasl2 libsqlite0 libsvn0 libxml2 patch python python-clearsilver python-docutils python-japanese-codecs python-roman python-sqlite python2.3 python2.3-clearsilver python2.3-dev python2.3-docutils python2.3-japanese-codecs python2.3-setuptools python2.3-sqlite python2.3-subversion subversion trac ucf アップグレード: 0 個、新規インストール: 31 個、削除: 0 個、保留: 0 個。 10.7MB のアーカイブを取得する必要があります。 展開後に追加で 34.8MB のディスク容量が消費されます。 続行しますか? [Y/n] y : (tracをインストールしたことがなければ、この時点でいったんtracの動作確認を行っても良いかと。tracdを使うと容易) [編集]パッケージの構築に必要なパッケージをインストールする #パッケージ作成用のツール群 (build-essential, fakeroot, devscripts パッケージ) をインストールする: # apt-get -u install build-essential fakeroot devscripts パッケージリストを読みこんでいます... 完了 依存関係ツリーを作成しています... 完了 以下の特別パッケージがインストールされます: binutils dpkg-dev g++ g++-3.3 gcc gcc-3.3 libc6-dev libstdc++5-3.3-dev linux-kernel-headers make perl perl-modules 提案パッケージ: binutils-doc devscripts-el cvs-buildpackage cvs debian-keyring dupload dput gnupg gnuplot libtimedate-perl libwww-perl lintian linda patchutils strace wdiff www-browser gcc-3.3-doc manpages-dev autoconf automake1.9 libtool flex bison gdb gcc-doc automake glibc-doc libstdc++5-3.3-doc stl-manual libterm-readline-gnu-perl libterm-readline-perl-perl 推奨パッケージ: bzip2 perl-doc 以下のパッケージが新たにインストールされます: binutils build-essential devscripts dpkg-dev fakeroot g++ g++-3.3 gcc gcc-3.3 libc6-dev libstdc++5-3.3-dev linux-kernel-headers make perl perl-modules アップグレード: 0 個、新規インストール: 15 個、削除: 0 個、保留: 0 個。 16.5MB のアーカイブを取得する必要があります。 展開後に追加で 59.9MB のディスク容量が消費されます。 続行しますか? [Y/n] y : tracのコンパイルに必要なパッケージをインストールする: # apt-get -u build-dep trac パッケージリストを読みこんでいます... 完了 依存関係ツリーを作成しています... 完了 以下のパッケージが新たにインストールされます: cdbs debconf-utils debhelper file gettext html2text intltool-debian libmagic1 po-debconf アップグレード: 0 個、新規インストール: 9 個、削除: 0 個、保留: 0 個。 2635kB のアーカイブを取得する必要があります。 展開後に追加で 8815kB のディスク容量が消費されます。 続行しますか? [Y/n] y[編集] ファイルの入手 #作業ディレクトリを作成: $ mkdir package $ cd package trac-0.9.2-ja-1.zipをダウンロードする: $ wget http://www.i-act.co.jp/project/products/downloads/trac-0.9.2-ja-1.zip : $ ls trac-0.9.2-ja-1.zip Debianのソースパッケージ (trac-0.9.2-1/testing) をダウンロードする: $ apt-get source trac パッケージリストを読みこんでいます... 完了 依存関係ツリーを作成しています... 完了 357kB のソースアーカイブを取得する必要があります。 : $ ls trac-0.9.2/ trac_0.9.2-1.diff.gz trac_0.9.2.orig.tar.gz trac-0.9.2-ja-1.zip trac_0.9.2-1.dsc[編集] ファイルの相違を確認する #ファイルの相違を確認: $ unzip trac-0.9.2-ja-1.zip $ LANG=C diff -rq trac-0.9.2 trac-0.9.2-ja-1 | grep ^Only Only in trac-0.9.2-ja-1: COPYING.trac-ja Only in trac-0.9.2-ja-1: ChangeLog.trac-ja Only in trac-0.9.2-ja-1: README.trac-ja Only in trac-0.9.2: debian Only in trac-0.9.2-ja-1/wiki-default: TracJa Only in trac-0.9.2-ja-1/wiki-default: TracTermsJa 既存のtrac-0.9.2-1パッケージとつきあわせるため、ファイルの一覧を表示: $ dpkg -L trac : この時点では判らないが(パッケージを作成した後、dpkg -Lで調べれば判る)、 wiki-defaultのファイル (TracJa, TracTermsJa ) は、パッケージを修正しなくても、作成したtracパッケージに含まれる。 TODO: *.trac-ja をパッケージに含める Debian Policy Manual - Chapter 12 - Documentation に従う。 でも、まだ *.ja の格納の仕方(ファイル名の規則)を見つけていない。 既存のファイルから推測すると、こんな感じ?: README.trac-ja -> /usr/share/doc/trac/README.ja ChangeLog.trac.ja -> /usr/share/doc/trac/changelog.ja.gz COPYING.trac-ja -> /usr/share/doc/trac/copyright.ja[編集] パッケージを更新 #trac-0.9.2のパッケージを元に、trac-0.9.2-ja-1のパッケージを作成する。 参考: Debian辞典, 9.5 新しいバージョンでソースパッケージを更新したい, p.379〜 $ cd trac-0.9.2 uupdateコマンドでtrac-0.9.2のソースパッケージからtrac-0.9.2-ja-1のパッケージのソースコードを作成する。
$ DEBFULLNAME='maintainer name' DEBEMAIL='maintainer@example.jp' \ > uupdate ../trac-0.9.2-ja-1.zip 0.9.2-ja-1 New Release will be 0.9.2-ja-1-1. Symlinking to pristine source from trac_0.9.2-ja-1.orig.tar.gz... uupdate: can't preserve pristine sources from non .tar.gz upstream archive! Continuing anyway... -- Untarring the new sourcecode archive ../trac-0.9.2-ja-1.zip Archive: ../trac-0.9.2-ja-1.zip creating: trac-0.9.2-ja-1/ : : inflating: trac-0.9.2-ja-1/wiki-macros/TracGuideToc.py Success! The diffs from version 0.9.2-1 worked fine. Remember: Your current directory is the OLD sourcearchive! Do a "cd ../trac-0.9.2-ja-1" to see the new package 作成されたソースコードを確認 $ cd ../trac-0.9.2-ja-1 $ ls AUTHORS INSTALL RELEASE debian/ setup_wininst.bmp COPYING MANIFEST.in THANKS doc/ templates/ COPYING.trac-ja README UPGRADE htdocs/ trac/ ChangeLog README.trac-ja cgi-bin/ scripts/ wiki-default/ ChangeLog.trac-ja README.tracd contrib/ setup.py wiki-macros/ changelogを確認 $ head debian/changelog trac (0.9.2-ja-1-1) unstable; urgency=low * New upstream release -- Dokokano Dareka <username@example.jp> Mon, 2 Jan 2006 22:48:53 +0900[編集] パッケージを作成 #参考: Debian辞典, 9.2 ソースパッケージからバイナリパッケージを作りたい, p356〜 dpkg-buildpackageでパッケージを作成する……エラー発生。 $ dpkg-buildpackage -us -uc -b -rfakeroot dpkg-buildpackage: source package is trac dpkg-buildpackage: source version is 0.9.2-ja-1-1 dpkg-buildpackage: source maintainer is maintainer name <maintainer@example.jp> dpkg-buildpackage: host architecture is i386 fakeroot debian/rules clean test -x debian/rules test "`id -u`" = 0 if test -n "" && test "" != "."; then rmdir ""; fi if test "." != "."; then rmdir .; fi dh_clean dh_clean: Sorry, but 4 is the highest compatibility level of debhelper currently supported. make: *** [clean] エラー 1 debhelperコマンドが古いようだ。trac-0.9.2-1はtestingなので、debhelper/testingパッケージを入れてみる: # apt-get install debhelper/testing Reading Package Lists... Done Building Dependency Tree... Done Selected version 5.0.10 (Debian:testing) for debhelper : Setting up debhelper (5.0.10) ... 再度、dbpg-buildpackageを実行: $ dpkg-buildpackage -us -uc -b -rfakeroot dpkg-buildpackage: source package is trac dpkg-buildpackage: source version is 0.9.2-ja-1-1 dpkg-buildpackage: source maintainer is maintainer name <maintainer@example.jp> dpkg-buildpackage: host architecture is i386 : : dh_builddeb -ptrac dpkg-deb: ../trac_0.9.2-ja-1-1_all.deb にパッケージ `trac' を構築しています dpkg-genchanges -b dpkg-genchanges: binary-only upload - not including any source code dpkg-buildpackage: binary only upload (no source included) 作成されたパッケージを確認 $ cd .. $ ls trac-0.9.2/ trac_0.9.2-1.diff.gz trac_0.9.2-ja-1-1_all.deb trac-0.9.2-ja-1/ trac_0.9.2-1.dsc trac_0.9.2-ja-1-1_i386.changes trac-0.9.2-ja-1.orig/ trac_0.9.2-1_all.deb trac_0.9.2.orig.tar.gz trac-0.9.2-ja-1.zip trac_0.9.2-1_i386.changes ファイルの一覧を確認 $ dpkg -c trac_0.9.2-ja-1-1_all.deb :[編集] パッケージをインストール #インストール # dpkg -i trac_0.9.2-ja-1-1_all.deb Selecting previously deselected package trac. (Reading database ... 78250 files and directories currently installed.) Unpacking trac (from trac_0.9.2-ja-1-1_all.deb) ... Setting up trac (0.9.2-ja-1-1) ... インストールされたファイルを確認 # dpkg -L trac :[編集] 動作確認 #試しに、tracdを使って実行してみる Subversionのレポジトリを作成 $ svnadmin create ~/svn-sandbox tracのプロジェクトを作成 $ trac-admin ~/trac initenv : tracdを起動 $ tracd --port 8000 /home/username/trac : ブラウザでhttp://ホスト名:8000/にアクセスして、tracの画面が表示されればOK。 [編集]プラグインのインストール (2006-01-04) #Eggの作成手順のみ示す。 参考: setuptoolsをインストールする。2006-01-05 時点のDebianのパッケージはエラーが出た(古い)ので削除: $ wget http://peak.telecommunity.com/dist/ez_setup.py # apt-get --purge remove python2.3-setuptools # python ez_setup.py WebAdmin (リビジョン2440がtrac 0.9用:trunkだと動かなかったので) $ svn export -r 2440 http://svn.edgewall.com/repos/trac/sandbox/webadmin/ $ cd webadmin $ python setup.py bdist_egg $ ls dist TracWebAdmin-0.1dev-py2.3.egg $ svn export http://trac-hacks.org/svn/accountmanagerplugin $ cd accountmanagerplugin/0.9 $ python setup.py bdist_egg $ ls dist TracAccountManager-0.1.1-py2.3.egg $ svn export http://trac-hacks.org/svn/graphvizplugin/0.9/ $ cd 0.9 $ python setup.py bdist_egg $ ls dist graphviz-0.5.1-py2.3.egg # apt-get install graphviz # apt-get install librsvg2-2[編集] Apache 1.3.X で tracを動かす (2006-01-04) #Apache 2.0.X なら
ということであがいてみた。
パッケージのバージョン $ dpkg -s apache-common python | egrep -i '^(version|package)' Package: apache-common Version: 1.3.33-6sarge1 Package: python Version: 2.3.5-2[編集] Apache 1.3 + CGI #(検証は不十分) 1つだけ ScriptAlias /sandbox /usr/share/trac/cgi-bin/trac.cgi <Location /sandbox> SetEnv TRAC_ENV /var/trac/sandbox SetEnv LC_ALL C </Location> 複数のProjectを ScriptAlias /projects /usr/share/trac/cgi-bin/trac.cgi <Location /projects> SetEnv TRAC_ENV_PARENT_DIR /var/trac SetEnv LC_ALL C </Location>[編集] Apache 1.3 + fastcgi #(検証は不十分) パッケージのバージョン: $ dpkg -s libapache-mod-fastcgi | egrep -i '^(version|package)' Package: libapache-mod-fastcgi Version: 2.4.2-6 1つだけ (以下はGLOBAL設定) AddHandler fastcgi-script .fcgi FastCgiIpcDir /var/lib/apache/fastcgi FastCgiConfig -initial-env TRAC_ENV=/var/trac/sandbox (以下はVirtualHostでも可能) ScriptAlias /sandbox /usr/share/trac/cgi-bin/trac.fcgi 複数のProjectを (以下はGLOBAL設定) AddHandler fastcgi-script .fcgi FastCgiIpcDir /var/lib/apache/fastcgi FastCgiConfig -initial-env TRAC_ENV_PARENT_DIR=/var/trac (以下はVirtualHostでも可能) ScriptAlias /projects /usr/share/trac/cgi-bin/trac.fcgi[編集] Apache 1.3 + mod_python (挫折) #パッケージのバージョン: $ dpkg -s libapache-mod-python2.3 | egrep -i '^(version|package)' Package: libapache-mod-python2.3 Version: 2:2.7.10-4
1つだけ <Location /sandbox> SetHandler mod_python PythonDebug On PythonHandler trac.web.modpython_frontend PythonOption TracEnv /var/trac/sandbox PythonOption TracUriRoot /sandbox </Location> 複数のProjectを <Location /projects> SetHandler mod_python PythonDebug On PythonHandler trac.web.modpython_frontend PythonOption TracEnvParentDir /var/trac PythonOption TracUriRoot /projects </Location>[編集] パッチ (2006-10-15) #いまさらだが TracModPython2.7 - The Trac Project - Trac に気がついた。 このパッチでは mod_python-2.7.11/lib/python/mod_python/util.py を多数、trac-0.8.4/trac/ModPythonHandler.py を3行修正してる。 また、TracInstall#WebServer では Trac 0.8.4 (2005-06-19リリース) しか試してない、と書かれている。 [編集]Apache 1.3 + mod_proxy + tracd #1つだけ (未検証) $ htdigest -c /var/trac/sandbox/htdigest Sandbox username $ tracd --daemonize --port 8000 /var/trac/sandbox \ --auth sandbox,/var/trac/sandbox/htdigest,Sandbox <IfModule mod_proxy.c> ProxyPass /sandbox http://localhost:8000/sandbox </IfModule> 複数のプロジェクト $ htdigest -c /var/trac/sandbox/htdigest Sandbox username $ tracd --daemonize --port 8000 --env-parent-dir /var/trac \ --auth sandbox,/var/trac/sandbox/htdigest,Sandbox <IfModule mod_proxy.c> ProxyPass /projects http://localhost:8000/ </IfModule>[編集] Apache 1.3 + mod_rewrite + mod_proxy + tracd (未着手) #未着手。 こんな感じ? <IfModule mod_rewrite.c> RewriteEngine On RewriteRule /projects/(.*)$ http://localhost:8000/$1 [P] </IfModule>[編集] trac-0.9.3-ja-1のパッケージを作成 (2006-01-15) #注意:trac 0.9用のプラグインは 0.9.3では動作しないものがある。プラグインの対応情報を確認してから、tracをバージョンアップすること。 [編集]パッケージの作成とインストール #Debianのtrac-0.9.3-1パッケージを元にする場合、このパッケージは 2006-01-15 時点ではunstableに入っているので、 あらかじめapt-getでtesting,unstableを取得できるよう設定しておくこと。 (参考: Linux/Debian/testingのパッケージを使う) 作業ディレクトリを作成 $ mkdir package $ cd package インタアクト株式会社からtrac-0.9.3-ja-1.zipを取得 $ wget http://www.i-act.co.jp/project/products/downloads/trac-0.9.3-ja-1.zip Debianのtrac-0.9.3パッケージのソースを取得 $ apt-get source trac パッケージリストを読みこんでいます... 完了 依存関係ツリーを作成しています... 完了 362kB のソースアーカイブを取得する必要があります。 取得:1 ftp://ftp.jp.debian.org unstable/main trac 0.9.3-1 (dsc) [641B] 取得:2 ftp://ftp.jp.debian.org unstable/main trac 0.9.3-1 (tar) [356kB] 取得:3 ftp://ftp.jp.debian.org unstable/main trac 0.9.3-1 (diff) [5759B] 362kB を 0s で取得しました (487kB/s) dpkg-source: extracting trac in trac-0.9.3 trac-0.9.3-1パッケージからtrac-0.9.3-ja-1-1パッケージを作成する $ cd trac-0.9.3 $ DEBFULLNAME='maintener name' DEBEMAIL='maintener@example.jp' \ > uupdate ../trac-0.9.3-ja-1.zip 0.9.3-ja-1 $ cd ../trac-0.9.3-ja-1 $ dpkg-buildpackage -us -uc -rfakeroot 作成したパッケージをインストールする # dpkg -i trac_0.9.3-ja-1-1_all.deb[編集] 既存の環境の更新 #TODO: この節は「アップグレード手順」として別途まとめたい。 既存の環境 (trac-0.9.2-ja-1で作成したもの)があれば、更新する。 手順は UPGRADE (trac-0.9.3-ja-1.zipを展開すれば得られる)と TracUpgrade#Trac ドキュメントを更新する に従う。 今回はマイナーバージョンアップであり、RELEASE, README, INSTALL にも指示がないので、wikiのみ更新すればよいはず。 $ trac-admin sandbox Welcome to trac-admin 0.9.3 Interactive Trac adminstration console. Copyright (c) 2003-2006 Edgewall Software Type: '?' or 'help' for help on commands. Trac [/var/trac/sandbox]> wiki upgrade : Trac [/var/trac/sandbox]> exit[編集] プラグインの更新 #Trac 0.9.2 → 0.9.3の修正で従来のプラグインの一部が動かなくなった。
また、マクロは未確認。 $ svn export -r 2765 http://svn.edgewall.com/repos/trac/sandbox/webadmin/ : リビジョン 2765 をエクスポートしました。
$ svn export http://trac-hacks.org/svn/accountmanagerplugin : リビジョン 346 をエクスポートしました。
$ svn export http://trac-hacks.org/svn/graphvizplugin : リビジョン 346 をエクスポートしました。
trac-0.9.6-ja-1 のパッケージを作成 (2006-07-08) #Debian testing,unstableのtrac-0.9.5-2パッケージとインタアクト株式会社のtrac-0.9.6-ja-1.zipから、trac-0.9.6-ja-1-1パッケージを作成。 本来は trac-0.9.6パッケージが出てからの方が無難だろうけど、ファイル構成がたぶん変わってないだろうと踏んだので。 操作。説明は省略。trac-0.9.2-ja-1パッケージを作成, trac-0.9.3-ja-1パッケージを作成 を参照のこと。 $ mkdir package $ cd package $ wget http://www.i-act.co.jp/project/products/downloads/trac-0.9.6-ja-1.zip --12:22:36-- http://www.i-act.co.jp/project/products/downloads/trac-0.9.6-ja-1.zip => `trac-0.9.6-ja-1.zip' www.i-act.co.jp をDNSに問いあわせています... 221.186.147.250 www.i-act.co.jp[221.186.147.250]:80 に接続しています... 接続しました。 HTTP による接続要求を送信しました、応答を待っています... 200 OK 長さ: 503,233 [application/zip] 100%[====================================================>] 503,233 2.01M/s 12:22:37 (2.00 MB/s) - `trac-0.9.6-ja-1.zip' を保存しました [503233/503233] $ ls -F trac-0.9.6-ja-1.zip $ su Password: # apt-get update : : (略) : # exit $ apt-get source trac パッケージリストを読みこんでいます... 完了 依存関係ツリーを作成しています... 完了 364kB のソースアーカイブを取得する必要があります。 取得:1 ftp://ftp.jp.debian.org testing/main trac 0.9.5-2 (dsc) [681B] 取得:2 ftp://ftp.jp.debian.org testing/main trac 0.9.5-2 (tar) [358kB] 取得:3 ftp://ftp.jp.debian.org testing/main trac 0.9.5-2 (diff) [6050B] 364kB を 0s で取得しました (637kB/s) dpkg-source: extracting trac in trac-0.9.5 $ ls -F trac-0.9.5/ trac_0.9.5-2.diff.gz trac_0.9.5.orig.tar.gz trac-0.9.6-ja-1.zip trac_0.9.5-2.dsc $ cd trac-0.9.5 $ DEBFULLNAME='maintainer' DEBEMAIL='maintainer@example.jp' uupdate ../trac-0.9.6-ja-1.zip 0.9.6-ja-1 New Release will be 0.9.6-ja-1-1. Symlinking to pristine source from trac_0.9.6-ja-1.orig.tar.gz... uupdate: can't preserve pristine sources from non .tar.gz upstream archive! Continuing anyway... -- Untarring the new sourcecode archive ../trac-0.9.6-ja-1.zip Archive: ../trac-0.9.6-ja-1.zip creating: trac-0.9.6-ja-1/ : : (略) : inflating: trac-0.9.6-ja-1/COPYING.trac-ja Success! The diffs from version 0.9.5-2 worked fine. Remember: Your current directory is the OLD sourcearchive! Do a "cd ../trac-0.9.6-ja-1" to see the new package $ cd ../trac-0.9.6-ja-1 $ dpkg-buildpackage -us -uc -rfakeroot dpkg-buildpackage: source package is trac dpkg-buildpackage: source version is 0.9.6-ja-1-1 dpkg-buildpackage: source maintainer is maintainer <maintainer@example.jp> dpkg-buildpackage: host architecture is i386 : : (略) : dh_builddeb -ptrac dpkg-deb: ../trac_0.9.6-ja-1-1_all.deb にパッケージ `trac' を構築しています dpkg-genchanges dpkg-genchanges: including full source code in upload dpkg-buildpackage: full upload (original source is included) $ cd .. $ ls -F trac-0.9.5/ trac_0.9.5-2.dsc trac_0.9.6-ja-1-1_all.deb trac-0.9.6-ja-1/ trac_0.9.5.orig.tar.gz trac_0.9.6-ja-1-1_i386.changes trac-0.9.6-ja-1.zip trac_0.9.6-ja-1-1.diff.gz trac_0.9.6-ja-1.orig.tar.gz trac_0.9.5-2.diff.gz trac_0.9.6-ja-1-1.dsc $ su Password: # dpkg -i trac_0.9.6-ja-1-1_all.deb (Reading database ... 64711 files and directories currently installed.) Preparing to replace trac 0.9.5-ja-1-1 (using trac_0.9.6-ja-1-1_all.deb) ... Unpacking replacement trac ... Setting up trac (0.9.6-ja-1-1) ... # exit $ $ cd /path/to/trac-projects $ trac-admin sandbox upgrade Database is up to date, no upgrade necessary. $ trac-admin sandbox wiki upgrade : : (略) : $ 結果はこちら→ http://discypus.jp/wiki/sandbox/ [編集]trac-0.10-ja-1 のパッケージを作成 ... 未完 (2006-10-20) #Debianのtrac-0.10パッケージがまだunstableなので、testingに降りてくるまで作業を保留。 作業用ディレクトリを作成: $ mkdir package $ cd package インタアクトのtrac-0.10-ja-1.zipを入手: $ wget http://www.i-act.co.jp/project/products/downloads/trac-0.10-ja-1.zip --07:19:14-- http://www.i-act.co.jp/project/products/downloads/trac-0.10-ja-1.zip => `trac-0.10-ja-1.zip' www.i-act.co.jp をDNSに問いあわせています... 221.186.147.250 www.i-act.co.jp[221.186.147.250]:80 に接続しています... 接続しました。 HTTP による接続要求を送信しました、応答を待っています... 200 OK 長さ: 641,611 [application/zip] 100%[====================================================>] 641,611 1.26M/s 07:19:15 (1.26 MB/s) - `trac-0.10-ja-1.zip' を保存しました [641611/641611] $ ls -F trac-0.10-ja-1.zip debianのパッケージソースコードを取得、展開: $ su # apt-get update # exit $ apt-get source trac パッケージリストを読みこんでいます... 完了 依存関係ツリーを作成しています... 完了 450kB のソースアーカイブを取得する必要があります。 取得:1 ftp://ftp.jp.debian.org unstable/main trac 0.10-1 (dsc) [700B] 取得:2 ftp://ftp.jp.debian.org unstable/main trac 0.10-1 (tar) [442kB] 取得:3 ftp://ftp.jp.debian.org unstable/main trac 0.10-1 (diff) [6716B] 450kB を 0s で取得しました (580kB/s) dpkg-source: extracting trac in trac-0.10 $ ls -F trac-0.10/ trac-0.10-ja-1.zip trac_0.10-1.diff.gz trac_0.10-1.dsc trac_0.10.orig.tar.gz パッケージを更新(uupdate): $ cd trac-0.10 $ DEBFULLNAME='maintainer' DEBEMAIL='maintainer@example.jp' uupdate ../trac-0.10-ja-1.zip 0.10-ja-1 New Release will be 0.10-ja-1-1. Symlinking to pristine source from trac_0.10-ja-1.orig.tar.gz... uupdate: can't preserve pristine sources from non .tar.gz upstream archive! Continuing anyway... -- Untarring the new sourcecode archive ../trac-0.10-ja-1.zip Archive: ../trac-0.10-ja-1.zip creating: trac-0.10-ja-1/ creating: trac-0.10-ja-1/templates/ inflating: trac-0.10-ja-1/templates/roadmap.cs : inflating: trac-0.10-ja-1/trac/versioncontrol/web_ui/log.py inflating: trac-0.10-ja-1/README.trac-ja inflating: trac-0.10-ja-1/COPYING.trac-ja The text leading up to this was: -------------------------- |--- trac-0.10.orig/trac/siteconfig.py |+++ trac-0.10/trac/siteconfig.py -------------------------- File to patch: ★リターン Skip this patch? [y] y ★ y リターン 1 out of 1 hunk ignored uupdate: the diffs from version 0.10-1 did not apply cleanly! Remember: Your current directory is the OLD sourcearchive! Do a "cd ../trac-0.10-ja-1" to see the new package (Did you see the warnings above?) $ cd .. $ ls -F trac-0.10/ trac-0.10-ja-1.orig/ trac_0.10-1.diff.gz trac_0.10.orig.tar.gz trac-0.10-ja-1/ trac-0.10-ja-1.zip trac_0.10-1.dsc Debianのtrac-0.10 (jaではない) の差分を確認。siteconfig.py に対してパッチを当てている: $ zcat trac_0.10-1.diff.gz | grep -A 20 siteconfig.py --- trac-0.10.orig/trac/siteconfig.py +++ trac-0.10/trac/siteconfig.py @@ -1,6 +1,6 @@ # PLEASE DO NOT EDIT THIS FILE! -# This file was autogenerated when installing Trac 0.10rc1. +# This file was autogenerated when installing Trac 0.10. # __default_conf_dir__ = '/usr/share/trac/conf' __default_templates_dir__ = '/usr/share/trac/templates' --- trac-0.10.orig/trac/siteconfig.py.debdiff +++ trac-0.10/trac/siteconfig.py.debdiff @@ -0,0 +1,10 @@ + +# PLEASE DO NOT EDIT THIS FILE! +# This file was autogenerated when installing Trac 0.9.6. +# +__default_conf_dir__ = '/usr/share/trac/conf' +__default_templates_dir__ = '/usr/share/trac/templates' +__default_htdocs_dir__ = '/usr/share/trac/htdocs' +__default_wiki_dir__ = '/usr/share/trac/wiki-default' +__default_macros_dir__ = '/usr/share/trac/wiki-macros' + --- trac-0.10.orig/debian/copyright +++ trac-0.10/debian/copyright @@ -0,0 +1,32 @@ +Trac is Copyright (C) 2003-2005 Edgewall Software + +Trac can be downloaded from: +http://projects.edgewall.com/trac/wiki/TracDownload + +Tras is licensed under a modified BSD license, which follows: $ パッケージを生成してみる...: $ cd trac-0.10-ja-1 $ dpkg-buildpackage -us -uc -rfakeroot dpkg-buildpackage: source package is trac dpkg-buildpackage: source version is 0.10-ja-1-1 dpkg-buildpackage: source maintainer is maintainer <maintainer@example.jp> dpkg-buildpackage: host architecture is i386 dpkg-checkbuilddeps: Unmet build dependencies: cdbs (>= 0.4.43) python-all-dev python-support (>= 0.3) dpkg-buildpackage: Build dependencies/conflicts unsatisfied; aborting. dpkg-buildpackage: (Use -d flag to override.) $ cdbs # apt-get install cdbs/testing Reading Package Lists... Done Building Dependency Tree... Done Selected version 0.4.46 (Debian:testing) for cdbs Suggested packages: doc-base The following packages will be upgraded: cdbs 1 upgraded, 0 newly installed, 0 to remove and 2 not upgraded. Need to get 355kB of archives. After unpacking 352kB of additional disk space will be used. : : Fetched 355kB in 0s (586kB/s) changelog を読んでいます... (Reading database ... 65764 files and directories currently installed.) Preparing to replace cdbs 0.4.28-1 (using .../archives/cdbs_0.4.46_all.deb) ... Unpacking replacement cdbs ... Setting up cdbs (0.4.46) ... # python-all-dev ... python-all 2.4.3-11, python-dev 2.4.3-11 が必要: # apt-get install python-all-dev Reading Package Lists... Done Building Dependency Tree... Done Package python-all-dev is not available, but is referred to by another package. This may mean that the package is missing, has been obsoleted, or is only available from another source E: Package python-all-dev has no installation candidate # apt-get install python-all-dev/testing Reading Package Lists... Done Building Dependency Tree... Done Selected version 2.4.3-11 (Debian:testing) for python-all-dev Some packages could not be installed. This may mean that you have requested an impossible situation or if you are using the unstable distribution that some required packages have not yet been created or been moved out of Incoming. Since you only requested a single operation it is extremely likely that the package is simply not installable and a bug report against that package should be filed. The following information may help to resolve the situation: The following packages have unmet dependencies: python-all-dev: Depends: python-all (= 2.4.3-11) but it is not installable Depends: python-dev (= 2.4.3-11) but 2.3.5-2 is to be installed E: Broken packages python-support ... python 2.3.5-6 が必要: # apt-get install python-support Reading Package Lists... Done Building Dependency Tree... Done Package python-support is not available, but is referred to by another package. This may mean that the package is missing, has been obsoleted, or is only available from another source E: Package python-support has no installation candidate # apt-get install python-support/testing Reading Package Lists... Done Building Dependency Tree... Done Selected version 0.5.2 (Debian:testing) for python-support Some packages could not be installed. This may mean that you have requested an impossible situation or if you are using the unstable distribution that some required packages have not yet been created or been moved out of Incoming. Since you only requested a single operation it is extremely likely that the package is simply not installable and a bug report against that package should be filed. The following information may help to resolve the situation: The following packages have unmet dependencies: python-support: Depends: python (>= 2.3.5-6) but 2.3.5-2 is to be installed E: Broken packages # 2006-10-23 trac 0.10-2 では uupdate は成功する。 $ apt-get -u source trac パッケージリストを読みこんでいます... 完了 依存関係ツリーを作成しています... 完了 451kB のソースアーカイブを取得する必要があります。 取得:1 ftp://ftp.jp.debian.org unstable/main trac 0.10-2 (dsc) [700B] 取得:2 ftp://ftp.jp.debian.org unstable/main trac 0.10-2 (tar) [442kB] 取得:3 ftp://ftp.jp.debian.org unstable/main trac 0.10-2 (diff) [7483B] 451kB を 0s で取得しました (622kB/s) dpkg-source: extracting trac in trac-0.10 DEBFULLNAME='maintainer' DEBEMAIL='maintainer@example.jp' uupdate ../../trac-0.10-ja-1.zip 0.10-ja-1 New Release will be 0.10-ja-1-1. Symlinking to pristine source from trac_0.10-ja-1.orig.tar.gz... uupdate: can't preserve pristine sources from non .tar.gz upstream archive! Continuing anyway... -- Untarring the new sourcecode archive ../../trac-0.10-ja-1.zip Archive: ../../trac-0.10-ja-1.zip creating: trac-0.10-ja-1/ : inflating: trac-0.10-ja-1/COPYING.trac-ja Success! The diffs from version 0.10-2 worked fine. Remember: Your current directory is the OLD sourcearchive! Do a "cd ../trac-0.10-ja-1" to see the new package $ でも、dpkg-buildpackage は失敗する。 $ cd ../trac-0.10-ja-1 $ dpkg-buildpackage -us -uc -rfakeroot dpkg-buildpackage: source package is trac dpkg-buildpackage: source version is 0.10-ja-1-1 dpkg-buildpackage: source maintainer is maintainer <maintainer@example.jp> dpkg-buildpackage: host architecture is i386 dpkg-checkbuilddeps: Unmet build dependencies: python-all-dev python-support (>= 0.3) dpkg-buildpackage: Build dependencies/conflicts unsatisfied; aborting. dpkg-buildpackage: (Use -d flag to override.) $ よって、trac-0.10 パッケージがtestingになるまで、しばらく待つことにする。 2006-11-04 trac-0.10-3がtestingになってた: $ apt-show-versions -a -p trac trac purge ok not-installed trac 0.8.1-3sarge5 stable trac 0.10-3 testing trac 0.10-3 unstable trac not installed[編集] trac-0.10-ja-1 を /usr/local にインストール (2006-10-23) #Debianパッケージを作成するのはしばらく保留し、/usr/local/ にインストールすることにした。 trac-0.10-ja-1.zip を展開し、setup.py で /usr/local/ にインストールする。 $ unzip trac-0.10-ja-1.zip : $ cd trac-0.10-ja-1 # python setup.py install --prefix=/usr/local : Debianのtracパッケージを削除する。 # apt-get --purge remove trac : PATHに/usr/local/binを加え、hash -rでハッシュをクリアして完了。 適当なディレクトリにTracの環境を作成して、動作確認のためtracdを起動: $ trac-admin test initenv : $ tracd --port 8000 test : 他の端末でアクセスできればOK。 $ links http://localhost:8000/ :[編集] trac-0.10-ja-1 を tracd で稼働、Apache 1.3からProxyPassで (2006-10-23) #(作業完了、まとめ中、でも Subversionをhttpで公開するためにApache2.0+mod_pythonで稼働、 Apache 1.3からProxyPasssでアクセスするようにしたので、 今後はこの設定は使わない) 注意点:
/etc/apache/httpd.conf への追加部分: <VirtualHost discypus.jp> : <IfModule mod_proxy.c> ProxyPass /trac/sandbox http://localhost:8001/trac/sandbox ProxyPassReverse /trac/sandbox http://localhost:8001/trac/sandbox </IfModule> : </VirtualHost>
/etc/init.d/tracd-sandbox : /etc/init.d/skeleton を流用 #! /bin/sh # # tracd /trac/sandbox # set -e PATH=/bin:/usr/bin:/usr/local/bin DESC="tracd-sandbox" NAME=tracd DAEMON=/usr/local/bin/$NAME PIDFILE=/var/run/$NAME/sandbox.pid SCRIPTNAME=/etc/init.d/$NAME-sandbox PORT=8001 PROJ=sandbox HTDIGEST=/var/trac/sandbox/htdigest REALM=sandbox PROJENV=/var/trac/sandbox AUTH="$PROJ,$HTDIGEST,$REALM" OPTS="--daemonize --port=$PORT --base-path=trac --pidfile=$PIDFILE --auth=$AUTH $PROJENV" export PYTHON_EGG_CACHE=/var/cache/eggcache export LC_ALL=C USER=www-data # Gracefully exit if the package has been removed. test -x $DAEMON || exit 0 # Read config file if it is present. #if [ -r /etc/default/$NAME ] #then # . /etc/default/$NAME #fi # Make pidfile directory if [ ! -d /var/run/$NAME ] then mkdir /var/run/$NAME chown $USER:$USER /var/run/$NAME fi # Make python egg cache directory if [ ! -d $PYTHON_EGG_CACHE ] then mkdir $PYTHON_EGG_CACHE chown $USER:$USER $PYTHON_EGG_CACHE fi # # Function that starts the daemon/service. # d_start() { /sbin/start-stop-daemon --start --quiet --pidfile $PIDFILE --chuid $USER \ --exec $DAEMON -- $OPTS } # # Function that stops the daemon/service. # d_stop() { # /sbin/start-stop-daemon --stop --quiet --pidfile $PIDFILE --user $USER \ /sbin/start-stop-daemon --stop --pidfile $PIDFILE --user $USER && rm $PIDFILE } # # Function that sends a SIGHUP to the daemon/service. # d_reload() { /sbin/start-stop-daemon --stop --quiet --pidfile $PIDFILE --user $USER \ --name $NAME --signal 1 } case "$1" in start) echo -n "Starting $DESC: $NAME" d_start echo "." ;; stop) echo -n "Stopping $DESC: $NAME" d_stop echo "." ;; #reload) # # If the daemon can reload its configuration without # restarting (for example, when it is sent a SIGHUP), # then implement that here. # # If the daemon responds to changes in its config file # directly anyway, make this an "exit 0". # # echo -n "Reloading $DESC configuration..." # d_reload # echo "done." #;; restart|force-reload) # # If the "reload" option is implemented, move the "force-reload" # option to the "reload" entry above. If not, "force-reload" is # just the same as "restart". # echo -n "Restarting $DESC: $NAME" d_stop sleep 1 d_start echo "." ;; *) # echo "Usage: $SCRIPTNAME {start|stop|restart|reload|force-reload}" >&2 echo "Usage: $SCRIPTNAME {start|stop|restart|force-reload}" >&2 exit 1 ;; esac exit 0 スクリプトで使っているディレクトリ /var/run/tracd, /var/cache/eggcache はあらかじめ作成しておく。 ちゃんと動いたら、自動起動するようにしておく: # update-rc.d tracd-sandbox defaults Adding system startup for /etc/init.d/tracd-sandbox ... /etc/rc0.d/K20tracd-sandbox -> ../init.d/tracd-sandbox /etc/rc1.d/K20tracd-sandbox -> ../init.d/tracd-sandbox /etc/rc6.d/K20tracd-sandbox -> ../init.d/tracd-sandbox /etc/rc2.d/S20tracd-sandbox -> ../init.d/tracd-sandbox /etc/rc3.d/S20tracd-sandbox -> ../init.d/tracd-sandbox /etc/rc4.d/S20tracd-sandbox -> ../init.d/tracd-sandbox /etc/rc5.d/S20tracd-sandbox -> ../init.d/tracd-sandbox ちなみに自動起動の停止は: # update-rc.d -f tracd-sandbox remove : 店子用の設定。ホスト名は仮に tenant.discypus.jp とする。 全ての店子がホスト名/tracで自分のtrac環境を使えるようにするため、 店子ごとに1つtracdを起動している。 httpd.conf への追加: <VirtualHost tenant.discypus.jp> : <IfModule mod_proxy.c> ProxyPass /trac http://localhost:8002/trac ProxyPassReverse /trac http://localhost:8002/trac </IfModule> : </VirtualHost> /etc/init.d/tracd-tenant #! /bin/sh # # tracd (tenant.discypus.jp) # set -e PATH=/bin:/usr/bin:/usr/local/bin DESC="tracd-tenant" NAME=tracd DAEMON=/usr/local/bin/$NAME PIDFILE=/var/run/$NAME/tenant.pid SCRIPTNAME=/etc/init.d/$NAME-tenant PORT=8002 PROJ=tenant HTDIGEST=/var/trac/tenant/htdigest REALM=tenant PROJENV=/var/trac/tenant AUTH="$PROJ,$HTDIGEST,$REALM" OPTS="--daemonize --port=$PORT --base-path=trac --single-env --pidfile=$PIDFILE --auth=$AUTH $PROJENV" export PYTHON_EGG_CACHE=/var/cache/eggcache export LC_ALL=C USER=www-data : (以下、/etc/init.d/tracd-sandboxと同一なので略)[編集] trac-0.10-ja-1 を Apache 2.0 + mod_pythonで稼働、Apache 1.3からProxyPassで (2006-10-23) #こういう構成を取る理由は:
Apache 2.0の設定 #
/etc/apache2/ports.conf を編集し、ポート 8000 を使うようにする。 なお、ポート 8000 は他のホストからアクセスできないようにLinuxのパケットフィルタで遮断しておく。 /etc/apache2/ports.conf $ cat ports.conf Listen 8000 a2enmod , a2dismod コマンドを使って、必要なモジュールだけ有効にしておく。 # ls -F mods-enabled/ auth_digest.load@ dav_fs.conf@ dav_svn.conf@ mod_python.load@ dav.load@ dav_fs.load@ dav_svn.load@ /etc/defaults/apache2 を編集し、起動できるようにする (NO_START=1に書き換える)。 /etc/default/apache2 # 0 = start on boot; 1 = don't start on boot NO_START=0 起動してみる。 # apache2 -t Syntax OK # /etc/init.d/apache2 start /etc/apache2/sites-avairable/default (Apache 2.0) NameVirtualHost XXX.XXX.XXXX.XXX <VirtualHost *> DocumentRoot /var/www/apache2-default <Directory /> Options FollowSymLinks AllowOverride None Order deny,allow allow from 127.0.0.1 </Directory> <Directory /var/www/apache2-default> Options Indexes FollowSymLinks MultiViews AllowOverride None Order deny,allow allow from 127.0.0.1 </Directory> ErrorLog /var/log/apache2/error.log # Possible values include: debug, info, notice, warn, error, crit, # alert, emerg. LogLevel warn CustomLog /var/log/apache2/access.log combined </VirtualHost> # a2ensite default # apache2 -t Syntax OK # /etc/init.d/apache2 restart /etc/apache2/sites-avairable/trac (Apache 2.0) <VirtualHost discypus.jp> <Location /trac> SetHandler mod_python PythonHandler trac.web.modpython_frontend PythonOption TracEnvParentDir "/var/trac" PythonOption TracUriRoot /trac SetEnv PYTHON_EGG_CACHE "/var/cache/eggcache" SetEnv LC_TIME C </Location> <Location "/trac/sandbox/login"> AuthType Digest AuthName "sandbox" AuthDigestFile "/var/trac/sandbox.htdigest" Require valid-user </Location> <Location /svn> DAV svn SVNParentPath "/var/svn" Order deny,allow </Location> <Location /svn/sandbox> AuthType Digest AuthName "sandbox" AuthDigestFile "/var/trac/sandbox.htdigest" <LimitExcept GET PROPFIND OPTIONS REPORT> Require valid-user </LimitExcept> </Location> </VirtualHost> # a2ensite trac # apache2 -t Syntax OK # /etc/init.d/apache2 restart /etc/apache/httpd.conf (Apache 1.3) <VirtualHost discypus.jp> : <IfModule mod_proxy.c> ProxyPass /svn/ http://discypus.jp:8000/svn/ ProxyPassReverse /svn/ http://discypus.jp:8000/svn/ ProxyPass /trac/sandbox http://discypus.jp:8000/trac/sandbox ProxyPassReverse /trac/sandbox http://discypus.jp:8000/trac/sandbox </IfModule> : </VirtualHost> # apachectl configtest Syntax OK # /etc/init.d/apache restart /etc/apache2/sites-avairable/tenant (Apache 2.0) <VirtualHost tenant.discypus.jp> <Location /trac> SetHandler mod_python PythonHandler trac.web.modpython_frontend PythonOption TracEnv "/var/trac/tenant" PythonOption TracUriRoot /trac SetEnv PYTHON_EGG_CACHE "/var/cache/eggcache" SetEnv LC_TIME C </Location> <Location "/trac/login"> AuthType Digest AuthName "tenant" AuthDigestFile "/var/trac/tenant/htdigest" Require valid-user </Location> </VirtualHost> # a2ensite tenant # apache2 -t Syntax OK # /etc/init.d/apache2 restart /etc/apache/httpd.conf (Apache 1.3) <VirtualHost tenant.discypus.jp> : <IfModule mod_proxy.c> ProxyPass /trac http://tenant.discypus.jp:8000/trac ProxyPassReverse /trac http://tenant.discypus.jp:8000/trac </IfModule> : </VirtualHost> # apachectl configtest Syntax OK # /etc/init.d/apache restart[編集] Subversion 1.3.2 に更新 (2006-10-27) #Subversionのロック機能が欲しいので、Subversion 1.3.2に更新する。 Debianのパッケージは:
今回は一番安全そうな、sarge-backports を使うことにした。 # apt-get update : # apt-get -u install subversion/sarge-backports libapache2-svn/sarge-backports libsvn0/sarge-bac kports python2.3-subversion/sarge-backports Reading Package Lists... Done Building Dependency Tree... Done Selected version 1.3.2-5~bpo1 (Backports.org archive:sarge-backports) for subversion Selected version 1.3.2-5~bpo1 (Backports.org archive:sarge-backports) for libapache2-svn Selected version 1.3.2-5~bpo1 (Backports.org archive:sarge-backports) for libsvn0 Selected version 1.2.3dfsg1-2bpo1 (Backports.org archive:sarge-backports) for python2.3-subversion Suggested packages: db4.4-util db4.3-util subversion-tools The following packages will be upgraded: libapache2-svn libsvn0 python2.3-subversion subversion 4 upgraded, 0 newly installed, 0 to remove and 2 not upgraded. : Setting up libsvn0 (1.3.2-5~bpo1) ... Setting up libapache2-svn (1.3.2-5~bpo1) ... Setting up subversion (1.3.2-5~bpo1) ... Installing new version of config file /etc/bash_completion.d/subversion ... Installing new version of config file /etc/subversion/config ... Installing new version of config file /etc/emacs/site-start.d/50psvn.el ... Setting up python2.3-subversion (1.2.3dfsg1-2bpo1) ... # # apache2 -t Syntax OK # /etc/init.d/apache2 restart Forcing reload of web server: Apache2. なお、Subverison 1.1.4に戻すには次のようにする (/stable あるいは /sarge を指定。/etc/apt/sources-listの記述に依存): # apt-get -u install subversion/stable libapache2-svn/stable libsvn0/stable python2.3-subversion/stable[編集] trac-0.10-ja-2.zip に更新 (2006-11-11) #既存のTracを探す。(/usr/local/ 以下に野良インストールしたもの) : # find /usr/local -type d -name trac /usr/local/share/trac /usr/local/lib/python2.3/site-packages/trac # find /usr/local -type f -name 'trac*' /usr/local/share/trac/cgi-bin/trac.cgi /usr/local/share/trac/cgi-bin/trac.fcgi /usr/local/share/trac/htdocs/trac_banner.png /usr/local/share/trac/htdocs/trac_logo_mini.png /usr/local/share/trac/htdocs/trac.ico /usr/local/share/trac/htdocs/css/trac.css /usr/local/share/trac/htdocs/css/trac.css.org /usr/local/share/trac/htdocs/js/trac.js /usr/local/share/man/man1/tracd.1 /usr/local/share/man/man1/trac-admin.1 /usr/local/bin/trac-admin /usr/local/bin/tracd 上書きされないかも知れないので、念のためリネームしておく。: # mv /usr/local/share/trac /usr/local/share/trac-0.10 # mv /usr/local/lib/python2.3/site-packages/trac /usr/local/lib/python2.3/site-packages/trac-0.10 # mv /usr/local/bin/trac-admin /usr/local/bin/trac-admin-0.10 # mv /usr/local/bin/tracd /usr/local/bin/tracd-0.10 trac-0.10-ja-2.zip を展開後、/usr/local/ に インストールする: # python setup.py install --prefix=/usr/local[編集] Debian etch (testing) + trac 0.10-3, trac-0.10-ja-2.zip (2006-11-11) #現時点のDebian testing (etch) で Tracを試してみる。 Apache 2.0 が用意されていない (Apache 1.3, Apache 2.2 のみ) Trac を /usr/local にインストールしたとき、エラーが発生する。原因は突き止めていない。 パッケージを作ってやると、エラーは解消した。 Digest認証が失敗する。Apache 2.0 と 2.2 の相違点だと思うが、Apache 2.2 に興味がなかったので、調べていない。 [編集]trac 0.10-3 パッケージインストールして動作を確認 #パッケージのリスト。Apache 2.2.3, mod_python 3.2.10, Python 2.4.3, ClearSilver 0.10.3, Subversion 1.4.0 apache2-2.2.3-3 apache2-mpm-worker-2.2.3-3 apache2-utils-2.2.3-3 apache2.2-common-2.2.3-3 libapache2-mod-python-3.2.10-2 libapache2-svn-1.4.0-5 python-2.4.3-11 python-central-0.5.8 python-clearsilver-0.10.3-4 python-docutils-0.4-3 python-pysqlite2-2.3.2-1 python-setuptools-0.6c3-1 python-subversion-1.4.0-5 python-support-0.5.4 python2.4-2.4.3-8 python2.4-minimal-2.4.3-8 subversion-1.4.0-5 trac-0.10-3 でも、pythonのバージョンは 2.4.4c0 と表示される: $ /usr/bin/python -V Python 2.4.4c0 SubversionリポジトリとTracEnvを作成し、tracdで動作を確認: # mkdir /var/svn # chown www-data:www-data /var/svn # chmod g+s /var/svn # mkdir /var/trac # chown www-data:www-data /var/trac # su - www-data $ svnadmin create /var/svn/sandbox $ trac-admin /var/svn/sandbox initenv : $ tracd --port 8000 /var/svn/sandbox Digest認証用のファイルを作成: # su www-data $ htdigest -c /var/svn/sandbox/htdigest sandbox username : Apache2の設定。既存のものを含め、つぎのモジュールを有効に: # ls /etc/apache2/mods-enabled/ alias.load authz_host.load dav_fs.load mime.load auth_basic.load autoindex.load dav_svn.conf mod_python.load auth_digest.load cgid.conf dav_svn.load negotiation.load authn_file.load cgid.load dir.conf setenvif.load authz_default.load dav.load dir.load status.load authz_groupfile.load dav_fs.conf env.load /etc/apache2/sites-available/trac を作成。Apache 2.2 なので 'AuthUserFile' ディレクティブを使う: <Location /trac> SetHandler mod_python PythonHandler trac.web.modpython_frontend PythonOption TracEnvParentDir "/var/trac" PythonOption TracUriRoot /trac SetEnv PYTHON_EGG_CACHE "/var/cache/eggcache" SetEnv LC_TIME C </Location> <Location "/trac/sandbox/login"> AuthType Digest AuthName "sandbox" # AuthDigestFile "/var/trac/sandbox/htdigest" # AuthDigestDomain /trac/ AuthUserFile "/var/trac/sandbox/htdigest" Require valid-user </Location> <Location /svn> DAV svn SVNParentPath "/var/svn" Order deny,allow </Location> <Location /svn/sandbox> AuthType Digest AuthName "sandbox" # AuthDigestFile "/var/trac/sandbox/htdigest" # AuthDigestDomain /trac/ AuthUserFile "/var/trac/sandbox/htdigest" <LimitExcept GET PROPFIND OPTIONS REPORT> Require valid-user </LimitExcept> </Location> サイト'trac'を有効にする: # a2enmod trac Site trac installed; run /etc/init.d/apache2 reload to enable. # apache2 -t Syntax OK # /etc/init.d/apache2 restart : Firefox 1.5.0.8 からログインしてみるが、ログインできない。/var/log/apache2/error.logによると: [Sat Nov 11 23:41:42 2006] [error] [client 192.168.109.1] access to /trac/sandbox/login failed, reason: require directives present and no Authoritative handler., referer: htt p://192.168.109.130/trac/sandbox/report 認証の件は後で解決することにする。たぶん Apache 2.2でディレクティブが変わっているで、設定が不十分なのだろう。 [編集]trac を /usr/local/ にインストール……失敗 #trac-0.10-ja-2.zip に入れ替えてみる。 Apache 2.2を止めて: # /etc/init.d/apache2 stop Stopping web server (apache2).... Tracのパッケージを設定ファイルごと削除して: # apt-get --purge remove trac : trac-0.10-ja-2.zipを入手して展開し、/usr/local 以下にインストールする: # python setup.py install --prefix=/usr/local Apache 2.2を起動して: # /etc/init.d/apache2 start Starting web server (apache2).... アクセスすると、次のエラーが発生した: Internal Server Error The server encountered an internal error or misconfiguration and was unable to complete your request. Please contact the server administrator, webmaster@localhost and inform them of the time the error occurred, and anything you might have done that may have caused the error. More information about this error may be available in the server error log. Apache/2.2.3 (Debian) DAV/2 SVN/1.4.0 mod_python/3.2.10 Python/2.4.4c0 Server at 192.168.109.130 Port 80 /var/log/apache2/error.log を整形すると: Traceback (most recent call last): File "/usr/lib/python2.4/site-packages/mod_python/apache.py", line 299, in HandlerDispatch\n result = object(req) File "/usr/local/lib/python2.4/site-packages/trac/web/modpython_frontend.py", line 87, in handler\n gateway.run(dispatch_request) File "/usr/local/lib/python2.4/site-packages/trac/web/wsgi.py", line 87, in run\n response = application(self.environ, self._start_response) File "/usr/local/lib/python2.4/site-packages/trac/web/main.py", line 412, in dispatch_request\n req.send_error(sys.exc_info(), status=500) File "/usr/local/lib/python2.4/site-packages/trac/web/api.py", line 379, in send_error\n data = self.hdf.render(template) File "/usr/local/lib/python2.4/site-packages/trac/web/clearsilver.py", line 290, in render\n template.parseFile(filename) Error: Traceback (innermost last):\n File "csparse.c", line 294, in cs_parse_file()\n File "neo_hdf.c", line 1982, in hdf_search_path()\nNotFoundError: Path error.cs not found\n error.cs は次の場所に存在している: $ ls -l /usr/local/share/trac/templates/error.cs -rw-r--r-- 1 root staff 1069 2006-08-04 17:55 /usr/local/share/trac/templates/error.cs /usr/local 以下のtracを削除して: # find /usr/local -type d -name trac /usr/local/share/trac /usr/local/lib/python2.4/site-packages/trac # find /usr/local -type d -name trac | xargs rm -r # find /usr/local -type d -name trac # find /usr/local -type f -name trac* /usr/local/share/man/man1/trac-admin.1 /usr/local/share/man/man1/tracd.1 /usr/local/bin/trac-admin /usr/local/bin/tracd # find /usr/local -type f -name trac* | xargs rm # find /usr/local -type f -name trac* trac-0.10.zip (Edgewall) も試してみたが、同様にエラーが出る。 [編集]trac-0.10-ja-2.zipからDebianパッケージを作成してインストール……成功 #Debianパッケージの方はエラーが出ないので、trac-0.10-ja-2.zip からDebianパッケージを作ってみる。 必要なツールをインストールする: # apt-get install build-essential fakeroot devscripts # apt-get install cdbs python-all-dev debhelper パッケージを作る: $ mkdir package $ cd package $ apt-get source trac $ cd trac-0.10 $ DEBFULLNAME='maintainer name' DEBEMAIL='maintainer@example.jp' \ uupdate ../../trac-0.10-ja-2.zip 0.10-ja-2-1 : Success! The diffs from version 0.10-3 worked fine. Remember: Your current directory is the OLD sourcearchive! Do a "cd ../trac-0.10-ja-2-1" to see the new package $ cd ../trac-0.10-ja-2-1 $ dpkg-buildpackage -us -uc -b -rfakeroot : dpkg-deb: ../trac_0.10-ja-2-1-1_all.deb にパッケージ `trac' を構築しています。 tar: -: file name read contains nul character dpkg-genchanges -b dpkg-genchanges: binary-only upload - not including any source code dpkg-buildpackage: binary only upload (no source included) $ cd .. $ ls trac-0.10/ trac_0.10-3.diff.gz trac_0.10-ja-2-1-1_i386.changes trac-0.10-ja-2-1/ trac_0.10-3.dsc trac_0.10.orig.tar.gz trac-0.10-ja-2-1.orig/ trac_0.10-ja-2-1-1_all.deb パッケージをインストールする: # dpkg -i trac_0.10-ja-2-1-1_all.deb : Apache 2.2を再起動し、アクセスしてみたところ、ちゃんと起動した。 …… パッケージに何らかの違いがあるようだ。パッチ? [編集]Debian sarge (3.1r3) + Subversion-1.3.2 (backports) + trac-0.10-ja-2.zip (2006-11-12, 2006-12-03) #いまさらだが、 Debian 3.1r3 を1からインストールして、trac-0.10-ja-2.zip を動かすまでの手順のメモ。 (1つ上のエントリ Debian etch (testing) + trac 0.10-3, trac-0.10-ja-2.zip がいまいち不安定なため) Subversion と python 関連のパッケージは、debian backports に新しいものがあるので、それを使う。 なお、この作業は次の順で行った
Debian sarge 3.1r3 をインストールし、sshdを稼働させる #netinst CD image (100Mb) [i386] から debian-31r3-i386-netinst.iso を入手する。
CD-Rに焼いて、PCに入れて起動。 (VMwareを使ったときは、CD-Rに焼く代わりにisoをマウントしている) 選択肢は適当に答えて、taskselではパッケージは何も入れずに終了する。 /etc/apt/apt.conf, preferences, sources.list を書き換える (→Linux/Debian/メモ, Linux/apt.conf) /etc/apt/sources.list : sarge, sarge-security, sarge-backports を含める。ftpサーバはネットワーク的に近いところを選ぶこと。 # Sarge security deb http://security.debian.org/ sarge/updates main contrib non-free #deb-src http://security.debian.org/ sarge/updates main contrib non-free # sarge (stable) deb http://ftp.jp.debian.org/debian sarge main non-free contrib #deb-src http://ftp.jp.debian.org/debian sarge main non-free contrib # testing #deb http://ftp.jp.debian.org/debian testing main non-free contrib #deb-src http://ftp.jp.debian.org/debian testing main non-free contrib # unstable #deb http://ftp.jp.debian.org/debian unstable main non-free contrib #deb-src http://ftp.jp.debian.org/debian unstable main non-free contrib # backports deb http://backports.mithril-linux.org/ sarge-backports main #deb-src http://backports.mithril-linux.org/ sarge-backports main /etc/apt/apt.conf : パッケージのキャッシュ(今回は不要だが), デフォルトのリリース、 プロキシ設定(Debianのインストール時に設定すれば書き込まれているけど、念のため確認) APT::Cache-Limit "100000000"; APT::Default-Release "stable"; Acquire::http::Proxy "http://username:password@proxy.example.jp:8080/"; Acquire::ftp::Proxy "ftp://username:password@proxy.example.jp:8080/"; /etc/apt/preferences : stable (=sarge), sarge-backports を優先する。 (とはいえ、sarge-backportsはNotAutomaticフラグが付いているので自動的にはインストールされない、とのこと kinnekoの日記 - Sarge de trac_0.10.3-1~bpo.1 (2007-01-25)) Package: * Pin: release a=stable Pin-Priority: 100 Package: * Pin: release a=stable-proposed-updates Pin-Priority: -1 Package: * Pin: release a=sarge-backports Pin-Priority: 110 Package: * Pin: release a=testing Pin-Priority: -1 Package: * Pin: release a=testing-proposed-updates Pin-Priority: -1 Package: * Pin: release a=unstable Pin-Priority: -1 リモートから設定するためにsshをインストールする: # apt-get update # apt-get upgrade # apt-get install ssh (自分の好みで、/etc/ssh/sshd_config でパスワード認証を許可したが、略) 以後、リモートから作業する。 (.bashrc を自分の好みに書き換える。 (→Linux/bash) ) (locale に UTF-8を加えた方が便利かも知れない。手順は dpkg-reconfigure locales して、ja_JP.EUC-JP と ja_JP.UTF-8、ja_JP.UTF-8 をデフォルトに。) [編集]パッケージをインストールする #Trac, sqlite3, Subversion 1.3.2 (=sarge-backports), Apache 2.0, unzip などのパッケージをインストールする。 backportsからインストールするパッケージは「パッケージ名/sarge-backports」のように書く: # apt-get install \ subversion/sarge-backports \ libsvn0/sarge-backports \ libapache2-svn/sarge-backports \ apache2 \ libapache2-mod-python \ python2.3-japanese-codecs \ python2.3-pysqlite2/sarge-backports \ python-docutils/sarge-backports \ python-clearsilver \ python2.3-clearsilver \ python2.3-setuptools/sarge-backports \ subversion-tools/sarge-backports \ python-subversion/sarge-backports \ sqlite3 \ enscript \ unzip[編集] trac-0.10-ja-3.zip をインストールする #tracを/usr/localに入れるので、入れる前のディレクトリを確認しておく。 python2.3のディレクトリが既にある (たぶん、/usr/local/ に入れてもちゃんと連動するように設定されている): # ls -R /usr/local /usr/local: bin/ games/ include/ lib/ man@ sbin/ share/ src/ /usr/local/bin: /usr/local/games: /usr/local/include: /usr/local/lib: firmware/ python2.3/ /usr/local/lib/firmware: /usr/local/lib/python2.3: site-packages/ /usr/local/lib/python2.3/site-packages: /usr/local/sbin: /usr/local/share: man/ /usr/local/share/man: /usr/local/src: http://www.i-act.co.jp/project/products/products.html から trac-0.10-ja-2.zipを入手し、展開して、/usr/local にインストールする: $ wget http://www.i-act.co.jp/project/products/downloads/trac-0.10-ja-2.zip : $ cd trac-0.10-ja-2/ $ su : # python setup.py install --prefix=/usr/local : # exit $[編集] Subversion, Trac, Apache を設定する #SubversionとTrac用のディレクトリを用意しておく。 別にどこに作っても良いが、/var 以下に置くことにする: # mkdir /var/svn # chown www-data:www-data /var/svn # chmod g+s /var/svn # mkdir /var/trac # chown www-data:www-data /var/trac ついでに、www-dataユーザで作業するので、.bashrc, .bash_history なども用意しておく: # touch /var/www/.bashrc # chown www-data:www-data .bashrc # touch /var/www/.bash_history # chown www-data:www-data .bash_history 以後、www-dataユーザで作業する: # su www-data テスト用にSubversionリポジトリを作成する: $ svnadmin create /var/svn/sandbox $ svnadmin verify /var/svn/sandbox * Verified revision 0. テスト用にTrac environment (Trac project) を用意する: $ trac-admin /var/trac/sandbox initenv : tracdを使って、Tracを起動、ブラウザで動作を確認する。終了はctrl-C: $ tracd --port 8000 /var/trac/sandbox : ^C Apache 2.0を設定する。 Digest認証を使いたいので、digestモジュールを有効にする: # a2enmod auth_digest Trac用にEgg Cacheディレクトリを作成する。今回は /var/cache/eggcache を作った: # mkdir /var/cache/eggcache # chown www-data:www-data /var/cache/eggcache Digest認証用ファイルを作成し、ユーザを1つ作成する: # su www-data $ htdigest -c /var/trac/sandbox/htdigest sandbox username Adding password for username in realm sandbox. New password: Re-type new password: /etc/apache2/sites-available/trac を作成する: <Location /trac> SetHandler mod_python PythonHandler trac.web.modpython_frontend PythonOption TracEnvParentDir "/var/trac" PythonOption TracUriRoot /trac SetEnv PYTHON_EGG_CACHE "/var/cache/eggcache" SetEnv LC_TIME C </Location> <Location "/trac/sandbox/login"> AuthType Digest AuthName "sandbox" AuthDigestFile "/var/trac/sandbox/htdigest" Require valid-user </Location> <Location /svn> DAV svn SVNParentPath "/var/svn" Order deny,allow </Location> <Location /svn/sandbox> AuthType Digest AuthName "sandbox" AuthDigestFile "/var/trac/sandbox/htdigest" <LimitExcept GET PROPFIND OPTIONS REPORT> Require valid-user </LimitExcept> </Location> /etc/apache2/site-available/tracを有効にして、Apache 2.0を再起動する: # a2ensite trac # apache2 -t Syntax OK # /etc/init.d/apache2 restart : http://localhost/trac/sandbox にアクセスし、ログインしてみる。 問題がなければ作業完了。 2006/11/28 22:44 [編集]SilverCity-0.9.7をインストール (2006-11-29) #SilverCity-0.9.7 2006-11-23 がリリースされていたので、インストールした。 http://sourceforge.net/project/showfiles.php?group_id=45693 より、 SilverCity-0.9.7.tar.gz を入手。 念のため、Debian Sarge と sarge-backports のパッケージを検索。見つからない。 # apt-cache search silver | grep -i city # tar.gzを展開し、README.txt を読む。 $ tar zxvf SilverCity-0.9.7.tar.gz SilverCity-0.9.7/ SilverCity-0.9.7/CSS/ $ cd SilverCity-0.9.7 $ ls -F CSS/ LICENSE.txt* Lib/ PKG-INFO* PySilverCity/ README.txt* scintilla/ setup.py* Python モジュールのインストール http://www.python.jp/doc/2.4/inst/inst.html の手順に従って インストールする。 今回はビルド作業が発生するので、念のためにbuildとinstallを別々に実行する。 (なお、gcc, g++をインストールしていないときは、apt-get install gcc g++ しておくこと) build (=コンパイル) $ python setup.py build /usr/lib/python2.3/distut : : changing mode of build/scripts-2.3/source2html.py from 700 to 755 changing mode of build/scripts-2.3/cgi-styler.py from 700 to 755 changing mode of build/scripts-2.3/cgi-styler-form.py from 700 to 755 インストール $ su # python setup.py install --prefix=/usr/local : : byte-compiling /usr/local/lib/python2.3/site-packages/SilverCity/Verilog.py to Verilog.pyc byte-compiling /usr/local/lib/python2.3/site-packages/SilverCity/XML.py to XML.pyc byte-compiling /usr/local/lib/python2.3/site-packages/SilverCity/XSLT.py to XSLT.pyc byte-compiling /usr/local/lib/python2.3/site-packages/SilverCity/YAML.py to YAML.pyc running install_scripts copying build/scripts-2.3/source2html.py -> /usr/local/bin copying build/scripts-2.3/cgi-styler.py -> /usr/local/bin copying build/scripts-2.3/cgi-styler-form.py -> /usr/local/bin changing mode of /usr/local/bin/source2html.py to 755 changing mode of /usr/local/bin/cgi-styler.py to 755 changing mode of /usr/local/bin/cgi-styler-form.py to 755 running install_data copying CSS/default.css -> /usr/local/lib/python2.3/site-packages/SilverCity TracのSyntax Coloringの動作確認 → http://discypus.jp/trac/sandbox/wiki/SyntaxColoringSandbox [編集]Subversion 1.4.2 に更新して失敗。元に戻した (2007-02-20) #sarge-backports に subversion 1.4.2 が入っていることに気がついた。 影響範囲を調べるため、インストールせずに途中でキャンセルしてみる: # apt-get install \ > libsvn0/sarge-backports \ > subversion/sarge-backports \ > libapache2-svn/sarge-backports \ > python-subversion/sarge-backports \ > subversion-tools/sarge-backports Reading Package Lists... Done Building Dependency Tree... Done Selected version 1.4.2dfsg1-2~bpo.1 (Backports.org archive:sarge-backports) for libsvn0 Selected version 1.4.2dfsg1-2~bpo.1 (Backports.org archive:sarge-backports) for subversion Selected version 1.4.2dfsg1-2~bpo.1 (Backports.org archive:sarge-backports) for libapache2-svn Selected version 1.4.2dfsg1-2~bpo.1 (Backports.org archive:sarge-backports) for python-subversion Selected version 1.4.2dfsg1-2~bpo.1 (Backports.org archive:sarge-backports) for subversion-tools Suggested packages: db4.4-util libsvn-ruby1.8 Recommended packages: libsvn-perl libconfig-inifiles-perl exim4 mail-transport-agent xsltproc The following packages will be REMOVED: python2.3-subversion The following NEW packages will be installed: python-subversion subversion-tools The following packages will be upgraded: libapache2-svn libsvn0 subversion 3 upgraded, 2 newly installed, 1 to remove and 2 not upgraded. Need to get 2461kB of archives. After unpacking 1810kB of additional disk space will be used. Do you want to continue? [Y/n] y python2.3-subversion が python-subversion に置き換わり、subversion-tools が追加されるようだ。 どういうものか調べてみた: # apt-cache show python-subversion Package: python-subversion Priority: optional Section: python Installed-Size: 1988 Maintainer: Peter Samuelson <peter@p12n.org> Architecture: i386 Source: subversion Version: 1.4.2dfsg1-2 Replaces: libsvn0 (<< 1.2.3dfsg1-1), python2.3-subversion, python2.4-subversion Provides: python2.4-subversion Depends: subversion, libapr1, libc6 (>= 2.3.6-6), libsvn1 (>= 1.4), python (<< 2.5), python-support (>= 0.3.4), python ( >= 2.4) Conflicts: libsvn0 (<< 1.2.3dfsg1-1), python2.3-subversion, python2.4-subversion Filename: pool/main/s/subversion/python-subversion_1.4.2dfsg1-2_i386.deb Size: 511624 MD5sum: 346722327fad8122aba02aa6a405138a SHA1: f84956a42b6824fe363f6e3321ac868ae7f6eb28 SHA256: afbf8254e638639f700b0e6b272345ab93b6f4aa93a1380683f9b49aaff7c2f0 Description: Python bindings for Subversion This is a set of Python interfaces to libsvn, the Subversion libraries. It is useful if you want to, for example, write a Python script that manipulates a Subversion repository or working copy. See the 'subversion' package for more information. Tag: devel::{lang:python,library,rcs}, role::devel-lib Package: python-subversion Priority: optional Section: python Installed-Size: 2260 Maintainer: Peter Samuelson <peter@p12n.org> Architecture: i386 Source: subversion Version: 1.4.2dfsg1-2~bpo.1 ★これだ Replaces: libsvn0 (<< 1.2.3dfsg1-1), libsvn0-dev (<< 1.2.3dfsg1-1), python2.3-subversion, python2.4-subversion Provides: python2.3-subversion Depends: subversion, libapr0 (>= 2.0.54), libc6 (>= 2.3.2.ds1-21), libsvn0 (>= 1.4), python (>= 2.3), python (<< 2.4) Conflicts: libsvn0 (<< 1.2.3dfsg1-1), libsvn0-dev (<< 1.2.3dfsg1-1), python2.3-subversion, python2.4-subversion Filename: pool/main/s/subversion/python-subversion_1.4.2dfsg1-2~bpo.1_i386.deb Size: 548628 MD5sum: bc464dc392b0224a384897c79c4c6156 Description: Python bindings for Subversion This is a set of Python interfaces to libsvn, the Subversion libraries. It is useful if you want to, for example, write a Python script that manipulates a Subversion repository or working copy. See the 'subversion' package for more information. # apt-cache show subversion-tools Package: subversion-tools Priority: extra Section: admin Installed-Size: 536 Maintainer: Peter Samuelson <peter@p12n.org> Architecture: all Source: subversion Version: 1.4.2dfsg1-2 Depends: subversion (>= 1.4) Recommends: python-subversion (>= 1.4), libsvn-perl (>= 1.4), liburi-perl (>= 1.17-1), libconfig-inifiles-perl (>= 2.27- 1), exim4 | mail-transport-agent, xsltproc Suggests: libsvn-ruby1.8 Conflicts: kdesdk-scripts (<= 4:3.5.5-1) Filename: pool/main/s/subversion/subversion-tools_1.4.2dfsg1-2_all.deb Size: 166286 MD5sum: 7c1275f3cd756b56378afc23a31fbbaf SHA1: b0bf0afa9e36eadaf85aa864df3bb4fddda239b2 SHA256: b5309d3fc63e40a5c5799f5eee05f0b746acff1e344e90cf362fbee0b7757448 Description: Assorted tools related to Subversion This package includes miscellaneous tools for use with Subversion clients and servers: * svn-backup-dumps: incremental dumpfile-based backup script * svn-clean: Remove unversioned files from a working copy * svn-fast-backup: rsync-based backup script for FSFS repositories * svn-hot-backup: backup script, primarily for BDB repositories * svn_apply_autoprops: Apply property settings from .subversion/config file to an existing repository * svn2cl: Generate GNU-style changelog from repository history * svnmerge: Maintain merge history between two related branches * svnwrap: Set umask to 002 before calling svn or svnserve * several example hook scripts: commit-access-control, commit-email, log-police, mailer, svnperms, verify-po . NOTE that some of these scripts are unsupported by upstream, and may change radically or disappear in future releases. The Recommended packages are each required by at least one of these scripts. Tag: devel::rcs, implemented-in::perl, interface::commandline, protocol::http, protocol::webdav, role::program, scope::u tility, use::storing, use::synchronizing Package: subversion-tools Priority: extra Section: admin Installed-Size: 536 Maintainer: Peter Samuelson <peter@p12n.org> Architecture: all Source: subversion Version: 1.4.2dfsg1-2~bpo.1 Depends: subversion (>= 1.4) Recommends: python-subversion (>= 1.4), libsvn-perl (>= 1.4), liburi-perl (>= 1.17-1), libconfig-inifiles-perl (>= 2.27- 1), exim4 | mail-transport-agent, xsltproc Suggests: libsvn-ruby1.8 Conflicts: kdesdk-scripts (<= 4:3.5.5-1) Filename: pool/main/s/subversion/subversion-tools_1.4.2dfsg1-2~bpo.1_all.deb Size: 164556 MD5sum: c788c477ebc99049c74fe49356d7c765 Description: Assorted tools related to Subversion This package includes miscellaneous tools for use with Subversion clients and servers: * svn-backup-dumps: incremental dumpfile-based backup script * svn-clean: Remove unversioned files from a working copy * svn-fast-backup: rsync-based backup script for FSFS repositories * svn-hot-backup: backup script, primarily for BDB repositories * svn_apply_autoprops: Apply property settings from .subversion/config file to an existing repository * svn2cl: Generate GNU-style changelog from repository history * svnmerge: Maintain merge history between two related branches * svnwrap: Set umask to 002 before calling svn or svnserve * several example hook scripts: commit-access-control, commit-email, log-police, mailer, svnperms, verify-po . NOTE that some of these scripts are unsupported by upstream, and may change radically or disappear in future releases. The Recommended packages are each required by at least one of these scripts. Tag: devel::rcs, interface::commandline, made-of::lang:perl, protocol::http, protocol::webdav, role::sw:utility, use::st oring, use::synchronizing Package: subversion-tools Priority: extra Section: admin Installed-Size: 292 Maintainer: David Kimdon <dwhedon@debian.org> Architecture: all Source: subversion Version: 1.1.4-2 : (略) VMware上の環境で試してみた: # apt-get install \ libsvn0/sarge-backports \ subversion/sarge-backports \ libapache2-svn/sarge-backports \ python-subversion/sarge-backports \ subversion-tools/sarge-backports Reading Package Lists... Done : (略) # apache2 -t Syntax OK # /etc/init.d/apache2 restart Forcing reload of web server: Apache2. Tracプロジェクトを2つ試したが、1つだけ、以下のエラーが出る。Subversionリポジトリのフォーマットはどちらも3なのだが。 /var/log/apache2/error.log の該当部分: [error] [client 192.168.45.142] PythonHandler trac.web.modpython_frontend: Traceback (most recent call last):, referer: http://host/trac/ : (略、PythonのTracebackが延々と) [notice] child pid 3952 exit signal Segmentation fault (11) ★さらにSegmentation faultも発生。 Tracebackを整形すると: Traceback (most recent call last):, referer: http://host/trac/ File "/usr/lib/python2.3/site-packages/mod_python/apache.py", line 299, in HandlerDispatch result = object(req), referer: http://host/trac/ File "/usr/local/lib/python2.3/site-packages/trac/web/modpython_frontend.py", line 87, in handler gateway.run(dispatch_request), referer: http://host/trac/ File "/usr/local/lib/python2.3/site-packages/trac/web/wsgi.py", line 87, in run response = application(self.environ, self._start_response), referer: http://host/trac/ File "/usr/local/lib/python2.3/site-packages/trac/web/main.py", line 377, in dispatch_request env = _open_environment(env_path, run_once=run_once), referer: http://host/trac/ File "/usr/local/lib/python2.3/site-packages/trac/web/main.py", line 58, in _open_environment env_cache[env_path] = open_environment(env_path), referer: http://host/trac/ File "/usr/local/lib/python2.3/site-packages/trac/env.py", line 434, in open_environment env = Environment(env_path), referer: http://host/trac/ File "/usr/local/lib/python2.3/site-packages/trac/env.py", line 121, in __init__ load_components(self), referer: http://host/trac/ File "/usr/local/lib/python2.3/site-packages/trac/loader.py", line 140, in load_components __import__(module), referer: http://host/trac/ File "/usr/local/lib/python2.3/site-packages/trac/versioncontrol/svn_fs.py", line 56, in ? from svn import fs, repos, core, delta, referer: http://host/trac/ File "svn/fs.py", line 19, in ?, referer: http://host/trac/ File "libsvn/fs.py", line 29, in ?, referer: http://host/trac/ File "libsvn/core.py", line 3364, in ?, referer: http://host/trac/ File "libsvn/core.py", line 1137, in svn_pool_create, referer: http://host/trac/ TypeError: argument number 0: a 'apr_pool_t *' is expected, 'instance(<libsvn.core.GenericSWIGWrapper instance at 0x415f104c>)' is received, ★これが原因 referer: http://host/trac/ SWIGで作られたWrapperで、apr_pool_t *、APRのメモリ管理構造体へのポインタが不正? とりあえずパッケージを元に戻して、エラーが出なくなることを確認した。 古いパッケージをまとめてインストールする。python-subversion subversion-tools が存在するので、python2.3-subversion のインストールが失敗: # cd /var/cache/apt/archives ★パッケージのキャッシュに以前のパッケージが残っていたので # dpkg -i subversion_1.3.2-5~bpo1_i386.deb \ libsvn0_1.3.2-5~bpo1_i386.deb \ libapache2-svn_1.3.2-5~bpo1_i386.deb \ python2.3-subversion_1.2.3dfsg1-2bpo1_i386.deb : (略) python-subversion と subversion-tools を強制的に削除する: # apt-get -f --purge remove python-subversion subversion-tools 古いパッケージをまとめてインストールする。今度は成功: # dpkg -i subversion_1.3.2-5~bpo1_i386.deb \ libsvn0_1.3.2-5~bpo1_i386.deb \ libapache2-svn_1.3.2-5~bpo1_i386.deb \ python2.3-subversion_1.2.3dfsg1-2bpo1_i386.deb Apache2を再起動する: # apache2 -t OK # /etc/init.d/apache2 restart まとめ。 片方のSubversionリポジトリ、片方のTracプロジェクトだけで発生するので、いまいち原因がわからない。 とりあえずSarge-backportsの方のtrac-0.10.3-1~bpo.1を試すか、新しいDebianが出るまで待ってついでにPython2.4に移行するか、 あとで考えてみようと思う。 |