おのたく日記 YouTubeも始めました→
2009-06-19(Fri) viewvcを使う [長年日記]
■ [Debian]viewvcを使う
昔はviewcvsで、おうちサーバのCVSリポジトリを見ていたが、いつのまにか
The ViewCVS software was recently renamed to ViewVC. This package is intented for easy translation to the new ViewVC packages, and can be removed with no ill effect after its installation.
[dummy package to migrate to ViewVCより引用]
ってことで、CVSだけではなくてsubversionにも対応したパッケージ: viewvcを使うことになったらしいので、早速viewvcをインストール。
/usr/share/doc/viewvc/README.debianにはapacheの設定には手を出していないのでdocrootを何とかせよと書いてあるので
--- viewvc.conf.org 2009-06-20 19:25:48.000000000 +0900
+++ viewvc.conf 2009-06-20 19:46:43.000000000 +0900
@@ -402,6 +402,8 @@
# files will get served from this location, otherwise static files will
# be served by the ViewCVS script which is less efficient
#docroot = /doc
+#add tkyn
+docroot = /viewvc
# Show last changelog message for sub directories
# The current implementation makes many assumptions and may show the
と
Alias /viewvc /usr/share/viewvc
[/etc//etc/apache2/conf.d/viewvcより引用]
と設定して、viewvcのCSSなどを置いてあるドキュメントルートを準備した。
早速、アクセスしてみると
An Exception Has Occurred
Python Traceback
Traceback (most recent call last):
File "/usr/lib/viewvc/viewvc.py", line 3766, in main
request.run_viewvc()
File "/usr/lib/viewvc/viewvc.py", line 394, in run_viewvc
self.view_func(self)
File "/usr/lib/viewvc/viewvc.py", line 1777, in view_directory
generate_page(request, "directory", data)
File "/usr/lib/viewvc/viewvc.py", line 845, in generate_page
template = get_view_template(request.cfg, view_name, request.language)
File "/usr/lib/viewvc/viewvc.py", line 839, in get_view_template
template = ezt.Template(tname)
File "/usr/lib/viewvc/ezt.py", line 293, in __init__
self.parse_file(fname, base_format)
File "/usr/lib/viewvc/ezt.py", line 298, in parse_file
self.parse(_FileReader(fname), base_format)
File "/usr/lib/viewvc/ezt.py", line 686, in __init__
self.text = open(fname, "rb").read()
IOError: [Errno 2] No such file or directory: "/usr/lib/templates/directory.ezt"
[http://localhost/viewvc.cgiより引用]
とエラーになる。
/etc/viewvc/viewvc.confで何とか出来るかと思ったのだけど、やり方が分からず、とりあえず
# cd /usr/lib
# ln -s /etc/viewvc/templates .
したら使えるようになった。(ちょっと格好悪いね)
|