Changes between Version 5 and Version 6 of TracUpgrade


Ignore:
Timestamp:
Jan 28, 2010, 4:25:37 AM (14 years ago)
Author:
trac
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • TracUpgrade

    v5 v6  
    1 = アップグレードの説明 =
     1= Upgrade Instructions =
    22[[TracGuideToc]]
    33
    4 Trac を新しいバージョンで使用する前に TracEnvironment をアップグレードしなければならない場合があります。このドキュメントでは TracEnvironment をアップグレードするのに必要な手順を説明します。
     4A [TracEnvironment Trac environment] needs to be upgraded before it can be used with Trac 0.11. This document describes the steps necessary to upgrade an environment.
    55
    6  '''Note''': ''特に指示がない限り、マイナーバージョンのリリース時には TracEnvironment のアップグレードは必要ありません。例えば、 0.8.0 で作成した (もしくはそれ以前のバージョンからアップグレードした) TracEnvironment を 0.8.4 (もしくは0.8.x) インストール時にアップグレードする必要はありません。''
     6Environment upgrades are not necessary for minor version releases unless otherwise noted.
    77
    8 == 一般的な手順 ==
     8== Instructions ==
    99
    10 通常、 Trac を新しいバージョンにアップグレードするときに、 4 ステップを踏まなければなりません:
     10Typically, there are four steps involved in upgrading to a newer version of Trac:
    1111
    12 === Trac のコードを更新する ===
     12=== Update the Trac Code ===
    1313
    14 Trac の新しいバージョンを入手してください。オフィシャルリリースのパッケージをダウンロードするかもしくは [http://trac.edgewall.org/wiki/SubversionRepository Subversionリポジトリ] からチェックアウトして下さい。
     14Get the new version as described in TracInstall, or your operating system specific procedure.
    1515
    16 もし、メジャーバージョンのアップグレード (例えば 0.8 から 0.9) を行ったら、最初に現在インストールしている Trac のコードを削除することを ''特に'' 勧めます。 `trac` ディレクトリを Python の `lib/site-packages` ディレクトリから削除して下さい。 Trac の `cgi-bin`, `htdocs`, `templates` そして、 `wiki-default` ディレクトリも削除したいときは、通常 `share/trac` ディレクトリ以下に存在するでしょう。(正確なロケーションはプラットフォームに依存します)
     16If you do a manual (not operating system specific) upgrade, you may also later on want to remove the existing Trac code by deleting the `trac` directory from the Python `lib/site-packages` directory.
    1717
    18 ソースコードを入手したら、以下のコマンドを実行して下さい。
    19 {{{
    20 python setup.py install
    21 }}}
     18The location of the site-packages directory depends on the operating system, and the location in which Python was installed. However, the following locations are common:
     19 * If you’re using Linux: /usr/lib/python2.X/site-packages
     20 * If you’re using Windows: C:\Python2.X\lib\site-packages
     21 * If you’re using MacOSX: /Library/Python2.X/site-packages
    2222
    23 新しいバージョンをインストールするコマンドです。もし、 Windows インストーラバージョンをダウンロードしたならば、インストーラを実行するなどして下さい。
     23You may also want to remove the Trac `cgi-bin`, `htdocs`, `templates` and `wiki-default` directories that are commonly found in a directory called `share/trac` (the exact location depends on your platform).
    2424
    25 === TracEnvironment をアップグレードする ===
     25If you had the webadmin plugin installed, you can now uninstall it as it is now part of the Trac code base.
    2626
    27 指示がない限り、メジャーバージョンをアップグレードする (例えば 0.8 から 0.9) ときは、データベーススキーマの変更と、おそらく [wiki:TracEnvironment TracEnvironment のディレクトリ] 構成の変更が生じます。幸運なことに Trac は自動アップデートのスクリプトを提供しているので、負担が軽減されるでしょう。これらのスクリプトは [wiki:TracAdmin trac-admin] を通して起動されます:
     27=== Upgrade the Trac Environment ===
     28
     29After restarting, Trac should show the instances which need a manual upgrade via the automated upgrade scripts to ease the pain. These scripts are run via [TracAdmin trac-admin]:
    2830{{{
    2931trac-admin /path/to/projenv upgrade
    3032}}}
    3133
    32 このコマンドはもし TracEnvironment がすでに最新の状態になっているときは、何もしません。
     34This command will do nothing if the environment is already up-to-date.
    3335
    34 Note: PostgreSQL データベースを使用している場合、このコマンドは「 Environment のバックアップは SQLite を使っているときしか出来ない」というメッセージを出力して失敗します。リポジトリとデータベースのバックアップは手動で行う必要があります。その後、アップグレードを行うために次のコマンドを実行してください:
     36Note that if you are using a PostgreSQL database, this command will fail with the message that the environment can only be backed up when you use an SQLite database. This means that you will have to backup the repository and the database manually. Then, to perform the actual upgrade, run:
    3537{{{
    3638trac-admin /path/to/projenv upgrade --no-backup
    3739}}}
    3840
    39 === Trac ドキュメントを更新する ===
     41If you are using custom CSS styles or modified templates in the templates directory of the TracEnvironment, you will need to convert them to the Genshi way of doing things. To continue to use your style sheet, follow the instructions at TracInterfaceCustomization#SiteAppearance.
    4042
    41 すべての [wiki:TracEnvironment Tracenvironment] インストールされたバージョンの Trac ドキュメントのコピーを含んでいます。新しくインストールした Trac のドキュメントと同期を取りたいでしょう。 [wiki:TracAdmin trac-admin] がドキュメントを更新するコマンドを提供しています:
     43=== Update the Trac Documentation ===
     44
     45Every [TracEnvironment Trac environment] includes a copy of the Trac documentation for the installed version. As you probably want to keep the included documentation in sync with the installed version of Trac, [TracAdmin trac-admin] provides a command to upgrade the documentation:
    4246{{{
    4347trac-admin /path/to/projenv wiki upgrade
    4448}}}
    4549
    46 当然このプロシージャはあなたの `WikiStart` ページをまったく変更せず、そのままに残しておきます。
     50Note that this procedure will of course leave your `WikiStart` page intact.
    4751
    48 === Web サーバを再起動する ===
     52=== Trac Macros, Plugins ===
     53The Trac macros will need to be adapted, as the old-style wiki-macros are not supported anymore (due to the drop of ClearSilver and the HDF); they need to be converted to the new-style macros, see WikiMacros. When they are converted to the new style, they need to be placed into the plugins directory instead and not wiki-macros, which is no longer scanned for macros or plugins.
    4954
    50 新しい Trac コードをリロードするために、 Web サーバを再起動する必要があります。 (古い [wiki:TracCgi CGI] プログラムを使用しているときは必要ありません。)
     55=== Restart the Web Server ===
     56If you are not running [wiki:TracCgi CGI], reload the new Trac code by restarting your web server.
    5157
    52 == 特定のバージョン間のアップグレードについての付記 ==
     58== Known Issues ==
     59=== parent dir ===
     60If you use a trac parent env configuration and one of the plugins in one child does not work, none of the children work.
     61=== some core modules won't load ===
     62This can happen in particular with Python 2.3 on Windows when upgrading without uninstalling first.
     63Some modules were previously capitalized and were changed to lower case, e.g. trac/About.py became trac/about.py. You may find such messages in the Trac log:
     64{{{
     65ERROR: Skipping "trac.about = trac.about": (can't import "No module named about")
     66}}}
     67Remove the `Lib/site-packages/trac` folder and reinstall.
     68=== Wiki Upgrade ===
     69`trac-admin` will not delete or remove pages that were in version 0.10 but now are not in version 0.11, such as WikiMacros.
    5370
    54 以下のセクションでは Trac の特定のバージョンにアップグレードするときにやらなければならないことについて記述します。
     71== Changing Database Backend ==
     72== SQLite to PostgreSQL ==
    5573
    56 == 0.9 から 0.10 へのアップグレード ==
     74The [http://trac-hacks.org/wiki/SqliteToPgScript sqlite2pg] script on [http://trac-hacks.org trac-hacks.org] has been written to assist in migrating a SQLite database to a PostgreSQL database
    5775
    58 Wiki シンタックスでいくつかの変更があったため、いくつかのページでは期待通りに動かないことに気づくでしょう:
    59  * バージョン 0.9 以前、画像ファイルへのリンクはページの中に組み込まれていました。 0.10 以降では、画像ファイルへのリンクは単なる画像ファイルへのリンクとなります。もし、そのページに画像ファイルを組み込みたいならば、 `[[Image]]` マクロを使用して下さい。
    60  * wiki のリンクでスペース文字をエンコードするのに、 `%20` を使用しなくてもよくなりました。その代わり、スペースを含んでいる名前を括って下さい。 (例えば、`wiki:My%20page` の代わりに `wiki:"My page"` を使用することができます。)
     76== Older Versions ==
    6177
    62 いくつかの拡張機能がバージョンコントロールサブシステムに追加されました。特にスコープつきのリポジトリの対応が向上しました。
    63 これらの機能をうまく利用するために、 '''`resync`''' 操作を [TracAdmin#対話モード trac-admin] で実行することを推奨します。
    64 
    65 [TracAdmin trac-admin] の '''`initenv`''' コマンドの引数リストが変更になったことに注意して下さい: バージョンコントロールシステムの種類を設定するための新しい引数が追加されました。古い使用方法は以下の通りです:
    66 {{{
    67    initenv <projectname> <db> <repospath> <templatepath>
    68 }}}
    69 新しい使用方法ではこうなります:
    70 {{{
    71    initenv <projectname> <db> <repostype> <repospath> <templatepath>
    72 }}}
    73 TracEnvironment を自動で生成するスクリプトを使用している場合は、アップデートする必要があります。もし、 Subversion を使用しているならば、 `<repostype>` 引数に `svn` を指定して下さい。
    74 
    75 == 0.9.3 から 0.9.4 へのアップグレード ==
    76 
    77 レポートのクエリで `LIKE` 節での "%" や日付のフォーマットを使用すると落ちるというバグが Pysqlite 1.x に存在します。パーセント文字を使用するときは、もう一つパーセント文字を付けてエスケープする必要があります: "%%"
    78 
    79 == 0.9.x から 0.9.3 以降へのアップグレード ==
    80 
    81 もし、プラグインを使用しているならば、それらをアップグレードする必要があるでしょう。詳細は http://trac.edgewall.org/milestone/0.9.3 を参照して下さい。
    82 
    83 == 0.9-beta から 0.9 へのアップグレード ==
    84 
    85 静的リソース (CSS, javascript, 画像ファイル) のインクルードは機能しません。 trac.ini の `htdocs_location` を確認してください。 [wiki:TracModPython mod_python], [wiki:TracStandalone Tracd], [wiki:TracFastCgi FastCGI] を使用している場合、単にオプションを削除してください。 [wiki:TracCgi CGI] を使用している場合、 Trac の `htdocs` ディレクトリへの URL マップを修正しなければいけません (以前の記述を削除し、 [wiki:TracCgi#静的なリソースをマッピングする 静的なリソースをマッピングする])。オプションを削除した後でも問題が残っている場合、ファイル `trac/siteconfig.py` のパスを確認し、誤っていれば修正してください。
    86 
    87 Trac 0.9 のベータリリースでプラグインを使用しているか、組み込みコンポーネントの無効化を行っていたら、 [wiki:TracIni trac.ini] でコンポーネントの無効化 / 有効化のルールを更新しなければならないかもしれません。特にグローバルにインストールされたプラグインは、現在では明示的に有効化する必要があります。詳しくは TracPlugins と TracIni を参照して下さい。
    88 
    89 タイムラインでチケットの全ての更新を表示させたい ("チケットの詳細" オプション) 場合も、 [wiki:TracIni trac.ini] での明示的な有効化が必要です:
    90 
    91 {{{
    92 [timeline]
    93 ticket_show_details = true
    94 }}}
    95 
    96 == 0.8.x から 0.9 へのアップグレード ==
    97 
    98 [wiki:TracModPython mod_python] を使用している場合は Apache HTTPD の設定で mod_python ハンドラの名前を変更する必要があります:
    99 {{{
    100    from: PythonHandler trac.ModPythonHandler
    101    to:   PythonHandler trac.web.modpython_frontend
    102 }}}
    103 
    104 [http://initd.org/tracker/pysqlite PySQLite] の 2.x がインストールされているなら、注意してください。今や Trac は SQLite 3.x のファイルフォーマットで 2.x のデータベースを開こうとします。 SQLite 2.8.x と 3.x のデータベースのフォーマットに互換性がありません。もしアップデート後に ''"file is encrypted or is not a database"'' といったエラーが出力されたら、データベースファイルを 3.x 形式に変換しなければなりません。
    105 
    106 もし変換を行うならば、 SQLite の 2.8.x と 3.x の両方をインストールする必要があります (バージョンごとにファイル名が異なるので、同じシステム内に共存できます)。以下に示すコマンドを使用して下さい:
    107 {{{
    108  $ mv trac.db trac2.db
    109  $ sqlite trac2.db .dump | sqlite3 trac.db
    110 }}}
    111 
    112 Linux で複数のデータベースファイルを一度にアップグレードするために、以下のコマンドが使用できるでしょう。( {{{/var/trac}}} は実際に Trac をインストールしたパスに置き換えて下さい ):
    113 {{{
    114  $ find /var/trac/ -iname "trac.db" | xargs -i bash -c "mv {} {}.2; sqlite {}.2 .dump | sqlite3 {};"
    115 }}}
    116 
    117 web サーバに trac.db への書き込み権限を忘れずに付けてください。
    118 
    119 変換が成功した後、 `trac2.db` ファイルは削除することができます。 SQLite のアップグレードに関するより詳しい情報は [http://www.sqlite.org/version3.html] を参照して下さい。
    120 
    121 == 0.7 から 0.8 へのアップグレード ==
    122 
    123 0.8 では追加のパーミッションを必要とする新しい機能が加わりました。
    124 新規にインストールを行なった場合は、 anonymous に ROADMAP_VIEW と MILESTONE_VIEW パーミッションがデフォルトで与えられますが、
    125 既存の trac をアップグレードしたときは、
    126 これらのパーミッションを手動で与えなければなりません。:
    127 {{{
    128  $ trac-admin /path/to/projectenv permission add anonymous MILESTONE_VIEW
    129  $ trac-admin /path/to/projectenv permission add anonymous ROADMAP_VIEW
    130 }}}
     78For upgrades from former versions refer to wiki:0.10/TracUpgrade.
    13179
    13280-----