Changes between Version 3 and Version 4 of TracUpgrade


Ignore:
Timestamp:
Dec 30, 2016, 2:54:47 AM (7 years ago)
Author:
trac
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • TracUpgrade

    v3 v4  
    1 = アップグレードの説明 = #UpgradeInstructions
     1= Upgrade Instructions
    22[[TracGuideToc]]
    33[[PageOutline(2-4,,inline,unnumbered)]]
    44
    5 == 一般的な手順 == #Instructions
    6 
    7 通常、 Trac を新しいバージョンにアップグレードするときに、 7 ステップを踏まなければなりません:
    8 
    9 === 1. サーバーをオフラインにする === #Bringyourserveroff-line
    10 
    11 サーバー起動中にアップデートを行うのはやめてください。パッケージの一部をメモリにキャッシュしているかもしれませんし、コードのアップデートによって内部エラーを引き起こす可能性があります。
    12 
    13 === 2. Trac のコードを更新する === #UpdatetheTracCode
    14 
    15 TracInstall または、あなたの OS に合った方法で新しいバージョンの Trac を取得してください。
    16 
    17 `easy_install` を使って、バージョン 0.11 の Trac をインストールした場合は、 Trac のアップグレードにも `easy_install` を使うのが最も簡単な方法でしょう:
    18 
    19 {{{
    20 # easy_install --upgrade Trac==0.12
    21 }}}
    22 
    23 手動で (OS 特有でない) アップグレードをするのであれば、インストールを実行する前に起動中の Trac サーバを停止してください。 "ホット" アップグレードは問題を生じることが多いです。特に Windows では出来ないと考えてください ([trac:#7265 本家チケット 7265])。
    24 
    25 すでに存在する Trac のコードを削除するには、 Python の `lib/site-packages` ディレクトリから `trac` ディレクトリか、 Trac の .egg の古いバージョンを削除します。
    26 site-packages ディレクトリの位置は OS のシステム、および Python のインストールパスにより異なりますが、一般的には以下の位置にあります:
    27  * Linux の場合: `/usr/lib/python2.X/site-packages`
    28  * Windows の場合: `C:\Python2.X\lib\site-packages`
    29  * MacOSX の場合: `/Library/Python/2.X/site-packages`
    30 
    31 また、 `share/trac` (正確な位置はプラットフォームに依存しますが一般的にはこの位置です。) ディレクトリ内の `cgi-bin`, `htdocs`, `templates`, `wiki-default` といったディレクトリを削除してもかまいません。 (訳注: 0.11 では、これらのディレクトリは `site-packages/trac` の配下に移動しています)
    32 
    33 このクリーンアップは必須ではありませんが、あとでトラブルシュートを行う場合の切り分けが容易になります。すでに使われていない前のリリースのコードやテンプレートを見るなどという時間の浪費をしたくないのであれば、削除しておく方が楽です。もちろん、ファイルを削除する前にバックアップを作成する方が良いでしょう。
    34 
    35 === 3. Trac Environment をアップグレードする === #UpgradetheTracEnvironment
    36 
    37 Environment のアップグレードは、マイナーバージョンアップに特別な注意書きがない限り、不要です。
    38 
    39 アップグレードした Trac がロードされると、アップグレードする必要があるインスタンスが表示されます。アップグレードはオートメーションされたスクリプトを手で実行します。これらのスクリプトでは [TracAdmin trac-admin] を使用します。
    40 {{{
     5== Instructions
     6
     7Typically, there are seven steps involved in upgrading to a newer version of Trac:
     8
     9=== 1. Bring your server off-line
     10
     11It is not a good idea to update a running server: the server processes may have parts of the current packages cached in memory, and updating the code will likely trigger [#ZipImportError internal errors].
     12
     13Although a database backup will be implicitly created by default when upgrading the environment, it is always a good idea to perform a full backup of the environment using the [TracBackup hotcopy] command before beginning.
     14
     15=== 2. Update the Trac Code #UpdatetheTracCode
     16
     17Get the new version as described in TracInstall, or through your operating system package manager.
     18
     19If you already an earlier version of Trac installed via `easy_install`, it might be easiest to also use `easy_install` to upgrade your Trac installation:
     20
     21{{{#!sh
     22easy_install --upgrade Trac==1.2
     23}}}
     24
     25You may also want to remove the pre-existing Trac code by deleting the `trac` directory from the Python `lib/site-packages` directory, or remove Trac `.egg` files from former versions.
     26The location of the site-packages directory depends on the operating system and the location in which Python was installed. However, the following locations are typical:
     27 * on Linux: `/usr/lib/python2.X/site-packages`
     28 * on Windows: `C:\Python2.X\lib\site-packages`
     29 * on MacOSX: `/Library/Python/2.X/site-packages`
     30
     31You may also want to remove the directory in which your static resources are [TracInstall#cgi-bin deployed]. The exact location depends on your platform. This cleanup is not mandatory, but makes it easier to troubleshoot issues later on, as your installation is uncluttered by code or templates from a previous release that is not used anymore. As usual, make a backup before actually removing things.
     32
     33=== 3. Upgrade the Trac Environment #UpgradetheTracEnvironment
     34
     35Environment upgrades are not necessary for minor version releases unless otherwise noted.
     36
     37After 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]:
     38{{{#!sh
    4139trac-admin /path/to/projenv upgrade
    4240}}}
    4341
    44 このコマンドはもし TracEnvironment がすでに最新の状態になっているときは、何もしません。
    45 
    46 Note: データベースのバックアップはアップグレード時に自動で行われます。
    47 この機能は最近の更新で、データベースバックエンドに PostgreSQL や MySQL を使用している場合にも対応しましたが、失敗してしまう場合は手動でバックアップしてください。その後、バックアップをスキップしてアップグレードを行うために、下記のコマンドを実行してください:
    48 {{{
     42This command will not have any effect if the environment is already up-to-date.
     43
     44Note that a backup of your database will be performed automatically prior to the upgrade.
     45This feature is relatively new for PostgreSQL or MySQL databases, so if it fails, you will have to backup the database manually. Then, to perform the actual upgrade:
     46{{{#!sh
    4947trac-admin /path/to/projenv upgrade --no-backup
    5048}}}
    5149
    52 === 4. Trac ドキュメントを更新する === #UpdatetheTracDocumentation
    53 
    54 すべての [TracEnvironment Trac Environment] で、インストールされたバージョンの Trac ドキュメントのコピーを含んでいます。新しくインストールした Trac のドキュメントと同期を取りたいでしょう。 [TracAdmin trac-admin] がドキュメントを更新するコマンドを提供しています:
    55 {{{
     50=== 4. Update the Trac Documentation === #UpdatetheTracDocumentation
     51
     52By default, every [TracEnvironment Trac environment] includes a copy of the Trac documentation for the installed version. However, to keep the included documentation in sync with the installed version of Trac, use the following [TracAdmin trac-admin] command to upgrade the documentation:
     53{{{#!sh
    5654trac-admin /path/to/projenv wiki upgrade
    5755}}}
    5856
    59 このプロシージャはあなたの `WikiStart` ページ (訳注: `InterMapText` も) をまったく変更せず、そのままに残しておきます。
    60 
    61 
    62 === 5. 静的リソースをリフレッシュする === #a5.Refreshstaticresources
    63 
    64 もし、静的リソースを直接配布できる ( URL `/chrome/` を使用してアクセス) ようにウェブサーバをセットアップしていたら、同じくコマンドを使用してそれらをリフレッシュする必要があります:
    65 {{{
     57Note that this procedure will leave your `WikiStart` page intact.
     58
     59=== 5. Refresh static resources
     60
     61If you have set up a web server to give out static resources directly (accessed using the `/chrome/` URL) then you will need to refresh them using the same command:
     62{{{#!sh
    6663trac-admin /path/to/env deploy /deploy/path
    6764}}}
    68 このコマンドは、新しい Trac のバージョンとそのプラグインから `/deploy/path` に静的リソースと CGI スクリプト (`trac.wsgi`, など) を抽出します。
    69 
    70 いくつかのウェブブラウザ (IE, Opera) は、 CSS や Javascript ファイルを強引にキャッシュしてしまうので、ユーザにはこれらのブラウザのキャッシュの中身を手動で削除するために強制的に更新すること (`<F5>`) を十分行うように指示したほうがいいかもしれません。
     65
     66This will extract static resources and CGI scripts (`trac.wsgi`, etc) from new Trac version and its plugins into `/deploy/path`.
     67
     68Some web browsers (IE, Opera) cache CSS and Javascript files aggressively, so you may need to instruct your users to manually erase the contents of their browser's cache, a forced refreshed (`<F5>`) should be enough.
    7169{{{#!comment
    7270Remove above note once #9936 is fixed.
    7371}}}
    7472
    75 === 6. 特定の Trac バージョンでの特記事項 === #a6.StepsspecifictoagivenTracversion
    76 ==== Trac 0.12 から Trac 1.0 にアップグレードする ==== #UpgradingfromTrac0.12toTrac1.0
    77 
    78 サブバージョンサポートの Trac コンポーネントはデフォルト状態では有効にならなくなりました。サブバージョンのサポートを有効にするためには、 `tracopt.versioncontrol.svn` コンポーネントを有効にしてください。例えば、 TracIni に以下のように記述してください:
    79 {{{
     73=== 6. Steps specific to a given Trac version
     74
     75==== Upgrading from Trac 1.0 to 1.2 #to1.2
     76
     77===== Python 2.5 no longer supported
     78
     79Upgrade Python to at least 2.6 or 2.7, but not 3.0 or greater.
     80
     81===== Obsolete Plugins
     82
     83Trac has added functionality equivalent to the following plugins:
     84* [https://trac-hacks.org/wiki/AdminEnumListPlugin AdminEnumListPlugin]
     85* [https://trac-hacks.org/wiki/DateFieldPlugin DateFieldPlugin]: see the **time** [TracTicketsCustomFields#AvailableFieldTypesandOptions custom field type]
     86* [https://trac-hacks.org/wiki/GroupBasedRedirectionPlugin GroupBasedRedirectionPlugin]: the default handler can set as a user preference.
     87* [https://trac-hacks.org/wiki/LinenoMacro LinenoMacro]: see WikiProcessors#AvailableProcessors
     88* [https://trac-hacks.org/wiki/NeverNotifyUpdaterPlugin NeverNotifyUpdaterPlugin]: see [TracNotification#notification-subscriber-section notification subscribers]
     89* [https://trac-hacks.org/wiki/QueryUiAssistPlugin QueryUiAssistPlugin]: see TracQuery#Filters.
     90* [https://trac-hacks.org/wiki/TicketCreationStatusPlugin TicketCreationStatusPlugin]: see [#NewWorkflowActions]
     91
     92The plugins should be removed when upgrading Trac to 1.2.
     93
     94===== New workflow actions #NewWorkflowActions
     95
     96The ticket creation step is controlled with a workflow action. The default workflow has `create` and `create_and_assign` actions. The `create` action will always be added when upgrading the database. The `create_and_assign` action will be added if the workflow has an //assigned// state. You may want to edit your workflow after upgrading the database to customize the actions available on the //New Ticket// page.
     97
     98===== New permissions policy for read-only wiki pages
     99
     100Since 1.1.2 the read-only attribute of wiki pages is enabled and enforced only when `ReadonlyWikiPolicy` is in the list of active permission policies. If `[trac] permission_policy` has the default value `DefaultPermissionPolicy, LegacyAttachmentPolicy`, then `ReadonlyWikiPolicy` should be automatically appended to the list when upgrading the environment:
     101{{{#!ini
     102[trac]
     103permission_policies = ReadonlyWikiPolicy,
     104 DefaultPermissionPolicy,
     105 LegacyAttachmentPolicy
     106}}}
     107
     108If other permission policies are enabled, `trac.ini` will need to have `ReadonlyWikiPolicy` appended to the list of active `permission_policies`. See TracFineGrainedPermissions#ReadonlyWikiPolicy for additional details on the proper ordering.
     109
     110==== Upgrading from Trac 0.12 to Trac 1.0 #to1.0
     111
     112===== Python 2.4 no longer supported
     113
     114Upgrade Python to at least 2.5, but not 3.0.
     115
     116===== Obsolete Plugins
     117
     118Trac has added functionality equivalent to the following plugins:
     119
     120* [https://trac-hacks.org/wiki/BatchModifyPlugin BatchModifyPlugin]
     121* ​[https://trac-hacks.org/wiki/GitPlugin GitPlugin]
     122* [https://trac-hacks.org/wiki/OverrideEditPlugin OverrideEditPlugin]
     123
     124The plugins should be removed when upgrading Trac to 1.0.
     125
     126===== Subversion components not enabled by default for new installations
     127
     128The Trac components for Subversion support are no longer enabled by default. To enable the svn support, you need to make sure the `tracopt.versioncontrol.svn` components are enabled, for example by setting the following in the TracIni:
     129{{{#!ini
    80130[components]
    81131tracopt.versioncontrol.svn.* = enabled
    82132}}}
    83 明示的にサブバージョンのコンポーネントを無効に設定していない場合は、この対応をとり、 TracIni を適切に変更してください。
    84 
    85 今回の自動アップグレードで添付ファイルが格納される場所が変わります。心配性な人は、アップグレードの前に `attachments` ディレクトリのバックアップを取りたいと思うかもしれません(本当に心配性な人は、すでに environment のフルコピーを取っているでしょうね)。 `attachments` ディレクトリに添付ファイル //以外// のファイルが格納されていると、新しいレイアウトへの移行の最後のステップで失敗してしまいます:何かファイルやフォルダが格納されていると、今バージョンから使用しない `attachments` ディレクトリを削除することができません。このエラーは無視してもかまいませんが、environment をクリーンアップするために、ファイル内容を確認し、別の場所へ移動させ、 `attachments` ディレクトリを手動で削除したほうがよいでしょう。添付ファイルは今バージョンから environment 配下の `files/attachments` ディレクトリ内に格納されます。
    86 
    87 
    88 ==== Trac 0.11 から Trac 0.12 にアップグレードする ==== #UpgradingfromTrac0.11toTrac0.12
    89 
    90 ===== Python 2.3 サポート ===== #Python2.3nolongersupported
    91 現在 Python 2.4 以降 をサポートします。
    92 
    93 ===== SQLite v3.x ===== #SQLitev3.xrequired
    94 SQLite v2.x のサポートは終了しました。もしいまだに Trac で SQLite v2.x のデータベースを使用しているようならば、まず最初に SQLite v3.x に変換する必要があります。詳細は [trac:PySqlite#UpgradingSQLitefrom2.xto3.x] を参照して下さい。
    95 
    96 ===== [trac:PySqlite PySqlite] 2 ===== #PySqlite2required
    97 [trac:PySqlite PySqlite] 1.1.x のサポートは終了しました。可能であれば、バージョン 2.5.5 以降のバージョンをインストールして下さい。 (下記 [#Tracdatabaseupgrade Trac データベースのアップグレード] を参照して下さい)
    98 
    99 ===== 複数のリポジトリのサポート===== #MultipleRepositorySupport
    100 最新のバージョンでは複数リポジトリの取り扱いをサポートしています。Trac に複数のリポジトリを追加する予定であるならば、今では複数のリポジトリを扱えるようになっています。詳細については、 [TracRepositoryAdmin#Migration 単一リポジトリからの移行手順] を参照して下さい。
    101 
    102 もし単一のリポジトリでの運用を行なっていたとしてもこの手順は興味深いものとなるかもしれません。なぜなら、この方法によってリクエスト毎に発生する潜在的に負荷の高い再同期のチェックを避けることができるからです。
    103 
    104 ===== Trac Environment とソースコードリポジトリの再同期 ===== #ResynchronizetheTracEnvironmentAgainsttheSourceCodeRepository
    105 
    106 Trac でソースコードをブラウズしているときに "[trac:#6120 リポジトリにチェンジセット ??? が存在しません]" のようなエラーが出る場合は、それぞれの [TracEnvironment Trac environment] のソースコードリポジトリと再同期をする必要があります:
    107 
    108 {{{
     133
     134The upgrade procedure should take care of this and change the TracIni appropriately, unless you already had the svn components explicitly disabled.
     135
     136===== Attachments migrated to new location
     137
     138Another step in the automatic upgrade will change the way the attachments are stored. Create a backup of the `attachments` directory before upgrading. In case the `attachments` directory contains some files which are //not// attachments, the last step of the migration to the new layout will fail: the deletion of the now unused `attachments` directory can't be done if there are still files and folders in it. You may ignore this error, but better to move them elsewhere and remove the `attachments` directory manually. The attachments themselves are now all located in your environment below the `files/attachments` directory.
     139
     140===== Behavior of `[ticket] default_owner` changed
     141
     142Prior to 1.0, the owner field of new tickets always defaulted to `[ticket] default_owner` when the value was not empty. If the value was empty, the owner field defaulted to to the Component's owner. In 1.0 and later, the `default_owner` must be set to `< default >` to make new tickets default to the Component's owner. This change allows the `default_owner` to be set to an empty value if no default owner is desired.
     143
     144==== Upgrading from Trac 0.11 to Trac 0.12
     145
     146===== Python 2.3 no longer supported
     147
     148The minimum supported version of Python is now 2.4.
     149
     150===== SQLite v3.x required
     151
     152SQLite v2.x is no longer supported. If you still use a Trac database of this format, you'll need to convert it to SQLite v3.x first. See [trac:PySqlite#UpgradingSQLitefrom2.xto3.x] for details.
     153
     154===== [trac:PySqlite] 2 required
     155
     156[trac:PySqlite] 1.1.x is no longer supported. Please install 2.5.5 or later if possible, see [#Tracdatabaseupgrade Trac database upgrade] below.
     157
     158===== Obsolete Plugins
     159
     160Trac has added functionality equivalent to the following plugins:
     161
     162* [https://trac-hacks.org/wiki/AutoQueryPlugin AutoQueryPlugin]
     163* ​[https://trac-hacks.org/wiki/AdminConsoleProviderPatch AdminConsoleProviderPatch]
     164* [https://trac-hacks.org/wiki/AnchorMacro AnchorMacro]: see WikiFormatting#SettingAnchors
     165* [https://trac-hacks.org/wiki/TicketChangePlugin TicketChangePlugin]: see [TracPermissions#TicketSystem TICKET_EDIT_COMMENT permission]
     166* [https://trac-hacks.org/wiki/TicketDeletePlugin TicketDeletePlugin]: see `tracopt.ticket.deleter`
     167* [https://trac-hacks.org/wiki/SubversionLocationPlugin SubversionLocationPlugin]: see TracRepositoryAdmin#Repositories
     168* [https://trac-hacks.org/wiki/WikiCreoleRendererPlugin WikiCreoleRendererPlugin]: see [trac:WikiCreole]
     169* [https://trac-hacks.org/wiki/RepoRevisionSyntaxPlugin RepoRevisionSyntaxPlugin] (added in 0.12.1)
     170
     171The plugins should be removed when upgrading Trac to 0.12.
     172
     173===== Multiple Repository Support
     174
     175The latest version includes support for multiple repositories. If you plan to add more repositories to your Trac instance, please refer to TracRepositoryAdmin#Migration.
     176
     177This may be of interest to users with only one repository, since there is now a way to avoid the potentially costly resync check at every request.
     178
     179===== Resynchronize the Trac Environment Against the Source Code Repository
     180
     181Each [TracEnvironment Trac environment] must be resynchronized against the source code repository in order to avoid errors such as "[trac:#6120 No changeset ??? in the repository]" while browsing the source through the Trac interface:
     182
     183{{{#!sh
    109184trac-admin /path/to/projenv repository resync '*'
    110185}}}
    111186
    112 ===== 向上したリポジトリの再同期 ===== #Improvedrepositorysynchronization
    113 複数のリポジトリをサポートするのに加えて、今では Trac と リポジトリの同期でより効果的な方法があります。
    114 
    115 バージョン 0.11 と同様に post-comit フックを使用した同期方法を続けることもできますが、[TracRepositoryAdmin#Synchronization リポジトリの同期方法] や [TracRepositoryAdmin#ExplicitSync 明示的な同期] に書かれている方法の方が、より効果的な同期を行なうことができ、多かれ少なかれ、複数のリポジトリを扱う際に必須となります。
    116 
    117 Note: もし、 `trac-post-commit-hook` を使用していたならば、上記を参照して、新しいフックに ''アップグレードすることを強くお勧めします'' 。なぜなら、古いフックはデフォルトのリポジトリ以外では動きません。そしてこの場合、適切な通知のトリガーとなりません。
    118 
    119 ===== Authz のパーミッションチェック ===== #Authzpermissionchecking
    120 authz のパーミッションチェックが粒度の細かいパーミッションポリシーとしてマイグレートされました。もし authz パーミッションを使用しているならば、 ( `[trac] authz_file` や `authz_module_name` を参照)、 `[trac] permission_policies` で定義するパーミッションポリシーの先頭に、 `AuthzSourcePolicy` を追加しなければなりません。また、グローバルのパーミッション設定から `BROWSER_VIEW`, `CHANGESET_VIEW`, `FILE_VIEW`, `LOG_VIEW` を削除しなければなりません (`trac-admin $ENV permission remove` コマンドまたは、管理パネルの "権限" から削除されます)。
    121 
    122 ==== マイクロ秒のタイムスタンプ ==== #Microsecondtimestamps
    123 データベースのテーブルにある全てのタイムスタンプ (セッションテーブルは除く) は "エポックからの秒数" から "エポックからのマイクロ秒数" へ値を変更しました。この変更はカスタムレポートを除いて、ほとんどのユーザは意識せずにすむはずです。レポートで計算に日付/時刻カラムを使用するような場合 (例えば、`datetime()`に渡す場合)、データベースから取り出した値を 1,000,000 で割る必要があります。同様に、もしレポートで日付/時刻と表示される計算された値 (カラム名が "time", "datetime", "changetime", "date", "created" や "modified") をマイクロ秒のタイムスタンプで用いる必要がある場合には、先の計算を1,000,000倍して下さい。
    124 
    125 ==== Trac 0.10 から Trac 0.11 へのアップグレード ==== #UpgradingfromTrac0.10toTrac0.11
    126 ===== テンプレート と スタイルシート ===== #SiteTemplatesandStyles
    127 テンプレートエンジンが Trac 0.11 から Genshi に変わりました。詳細については、 TracInterfaceCustomization を参照して下さい。
    128 
    129 もし、TracEnvironment の `templates` ディレクトリの中のカスタマイズされた CSS や 修正したテンプレートを使用しているならば、 Genshi のスタイルに変換する必要があります。カスタマイズしたスタイルシートを使い続けるためには、[TracInterfaceCustomization#SiteAppearance サイトの外観] の手順に従ってください。
    130 
    131 ===== Trac マクロプラグイン ===== #TracMacrosPlugins
    132 [trac:ClearSilver] と HDF が使用されなくなったことで、古いスタイルの Wiki マクロ は使用できなくなります。そのため Trac マクロを適応させる必要があるでしょう。新しいスタイルのマクロに変更する必要があれば WikiMacros を参照してください。新しいスタイルにコンバートした後、配置するディレクトリは wiki-macros ではなく、 plugins を使用してください。 wiki-macros ディレクトリからマクロやプラグインを探すことはもうありません。
    133 
    134 ===== FCGI/WSGI/CGI を使用する場合 ===== #ForFCGIWSGICGIusers
    135 CGI で Trac を起動している場合、以下のコマンドを実行して trac.*gi ファイルを取得してください:
    136 {{{
     187===== Improved repository synchronization
     188
     189In addition to supporting multiple repositories, there is now a more efficient method for synchronizing Trac and your repositories.
     190
     191While you can keep the same synchronization as in 0.11 adding the post-commit hook as outlined in TracRepositoryAdmin#Synchronization and TracRepositoryAdmin#ExplicitSync will allow more efficient synchronization and is more or less required for multiple repositories.
     192
     193Note that if you were using the `trac-post-commit-hook`, ''you're strongly advised to upgrade it'' to the new hook documented in the above references and [TracWorkflow#Howtocombinethetracopt.ticket.commit_updaterwiththetestingworkflow here], as the old hook will not work with anything else than the default repository and even for this case, it won't trigger the appropriate notifications.
     194
     195===== Authz permission checking
     196
     197The authz permission checking has been migrated to a fine-grained permission policy. If you use authz permissions (aka `[trac] authz_file` and `authz_module_name`), you must add `AuthzSourcePolicy` in front of your permission policies in `[trac] permission_policies`. You must also remove `BROWSER_VIEW`, `CHANGESET_VIEW`, `FILE_VIEW` and `LOG_VIEW` from your global permissions with `trac-admin $ENV permission remove` or the "Permissions" admin panel.
     198
     199===== Microsecond timestamps
     200
     201All timestamps in database tables, except the `session` table, have been changed from "seconds since epoch" to "microseconds since epoch" values. This change should be transparent to most users, except for custom reports. If any of your reports use date/time columns in calculations (e.g. to pass them to `datetime()`), you must divide the values retrieved from the database by 1'000'000. Similarly, if a report provides a calculated value to be displayed as a date/time (i.e. with a column named "time", "datetime", "changetime", "date", "created" or "modified"), you must provide a microsecond timestamp, that is, multiply your previous calculation with 1'000'000.
     202
     203==== Upgrading from Trac 0.10 to Trac 0.11
     204
     205===== Site Templates and Styles
     206
     207The templating engine has changed in 0.11 to Genshi, please look at TracInterfaceCustomization for more information.
     208
     209If you are using custom CSS 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.
     210
     211===== Trac Macros, Plugins
     212
     213The Trac macros will need to be adapted, as the old-style wiki-macros are not supported anymore due to the drop of [trac: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.
     214
     215===== For FCGI/WSGI/CGI users
     216
     217For those who run Trac under the CGI environment, run this command in order to obtain the trac.*gi file:
     218{{{#!sh
    137219trac-admin /path/to/env deploy /deploy/directory/path
    138220}}}
    139221
    140 このコマンドでは、デプロイ用ディレクトリを作成します。デプロイ用ディレクトリには `cgi-bin` と `htdocs` の二つのサブディレクトリが含まれています。 Apache の `httpd.conf` を新しい `trac.cgi` と `htdocs` の場所に更新してください。
    141 
    142 ===== Web アドミンプラグインのインテグレーション =====
    143 もし、 Web アドミンプラグインをインストールしていたら、 Trac 0.11 以降より、 Trac のコードベースの一部となっているのでアンインストールできます。
    144 
    145 === 7. Web サーバを再起動する === #RestarttheWebServer
    146 
    147 [wiki:TracCgi CGI] 以外で起動している場合は、 Web サーバを再起動して、新しい Trac コードをリロードしてください。
    148 
    149 == 既知の問題 == #KnownIssues
    150 
    151 アップグレードの際、以下のことに留意してください。
    152 
    153 === カスタマイズされたテンプレート === #CustomizedTemplates
    154 
    155 Trac は [TracEnvironment Environment] の `<env>/templates` フォルダ内、または [[TracIni#GlobalConfiguration| [inherit] templates_dir]] コンフィグに設定された共通のディレクトリ内にテンプレートのコピーを置くことによって、Genshi テンプレートのカスタマイズをサポートします。もしこの方法を採用している場合、テンプレートはおそらく今後も進化していくので、新しくリリースされた Trac (以前のバージョンでも) にアップグレードする際には、新しいテンプレートのコピーを手動で変更することが繰り返し必要になることに注意してください。diff は取っておいてください ;-)
    156 
    157 TracInterfaceCustomization を行うには、適切な `ITemplateStreamFilter` 変換を行うカスタムプラグインを書く方法が望ましいでしょう。この場合、通常 id の修正や CSS の `class` の変更を行わないため、変更が生じても影響をうけません。もし必要になるのであれば、[trac:TracDev/ApiChanges TracDev/ApiChanges] ページにドキュメントが記載されるでしょう。
    158 
    159 === !ZipImportError === #ZipImportError
    160 
    161 zip形式で圧縮されたパッケージの内部キャッシングにより、ディスク上でパッケージの内容が変わるたびに、メモリ内のzip インデックスは一致せず、回復不能な !ZipImportError が出ます。アップグレードをする前にメンテナンスのために予めサーバーを停止してください。
    162 詳細については、 [trac:#7014 本家チケット 7014] を参照して下さい。
    163 
    164 === Wiki のアップグレード === #WikiUpgrade
    165 `trac-admin` は新しいバージョンでは存在しない以前のバージョンの Wiki ページを削除や移動しません。
    166 
    167 === Trac データベースのアップグレード === #Tracdatabaseupgrade
    168 
    169 既知の問題として、!PySqlite のいくつかのバージョン (2.5.2-2.5.4) では、 trac-admin upgrade スクリプトを使用してデータベースを更新することができません。このエラーを避けるために、 sqlite の python バインディングのバージョンをより新しいものかより古いバージョンを使用することを推奨します。詳細については、 [trac:#9434 本家チケット 9434] を参照して下さい。
    170 
    171 === 複数プロジェクトのホストに関して === #parentdir
    172 複数のプロジェクトをホストした場合に、配下のプロジェクトのうち一つのプロジェクトで、プラグインの一つが動作していないとき、配下のすべてのプロジェクトではそのプラグインは動作していません。
    173 
    174 == 関連するトピック == #Relatedtopics
    175 
    176 === Python のアップグレード === #UpgradingPython
    177 
    178 Python を新しいバージョンにアップグレードすると Python パッケージの再インストールが必要となります: Trac も例外ではないですし、 [http://pypi.python.org/pypi/setuptools easy_install] も然りです (もし使用しているならばですが)。 Subversion を使用しているならば、 Subversion の Python のバインディングもアップグレードする必要があります。
    179 
    180 ==== Windows と Python 2.6 ==== #WindowsandPython2.6
    181 
    182 もしあなたが、 !CollabNet の Subversion のパッケージを使用しているならばアンインストールする必要があるかもしれません。というのも、 [http://alagazam.net/ Alagazam] に気軽に使える Python バインディングがあるからです。 ([trac:TracSubversion TracSubversion] 参照) いいニュースとして、調整なしに動作します。
    183 
    184 === データベースの変更=== #ChangingDatabaseBackend
    185 ==== SQLite から PostgresSQL へ ==== #SQLitetoPostgreSQL
    186 
    187 [http://trac-hacks.org trac-hacks.org] の [http://trac-hacks.org/wiki/SqliteToPgScript sqlite2pg] は SQLite のデータベースを PostgreSQL に移行するためのサポートをするスクリプトです。
    188 
    189 === より古いバージョンからのアップグレード === #OlderVersions
    190 
    191 さらに前のバージョンからのアップグレードについては [trac:wiki:0.10/TracUpgrade#SpecificVersions] を最初に参照してください。
     222This will create a deploy directory with the following two subdirectories: `cgi-bin` and `htdocs`. Then update your Apache configuration file `httpd.conf` with this new `trac.cgi` location and `htdocs` location.
     223
     224===== Web Admin plugin integrated
     225
     226If you had the [trac:WebAdmin] plugin installed, you can uninstall it as it is part of the Trac code base since 0.11.
     227
     228===== New Default Configurable Workflow
     229
     230When you run `trac-admin <env> upgrade`, your `trac.ini` will be modified to include a `[ticket-workflow]` section. The workflow configured in this case is the original workflow, so that ticket actions will behave like they did in 0.10:
     231
     232{{{#!Workflow width=500 height=240
     233leave = * -> *
     234leave.operations = leave_status
     235leave.default = 1
     236accept = new -> assigned
     237accept.permissions = TICKET_MODIFY
     238accept.operations = set_owner_to_self
     239resolve = new,assigned,reopened -> closed
     240resolve.permissions = TICKET_MODIFY
     241resolve.operations = set_resolution
     242reassign = new,assigned,reopened -> new
     243reassign.permissions = TICKET_MODIFY
     244reassign.operations = set_owner
     245reopen = closed -> reopened
     246reopen.permissions = TICKET_CREATE
     247reopen.operations = del_resolution
     248}}}
     249
     250There are some significant caveats in this, such as accepting a ticket sets it to 'assigned' state, and assigning a ticket sets it to 'new' state. So you will probably want to migrate to "basic" workflow; [trac:source:trunk/contrib/workflow/migrate_original_to_basic.py contrib/workflow/migrate_original_to_basic.py] may be helpful. See TracWorkflow for a detailed description of the new basic workflow.
     251
     252=== 7. Restart the Web Server #RestarttheWebServer
     253
     254If you are not running [wiki:TracCgi CGI], reload the new Trac code by restarting your web server.
     255
     256== Known Issues
     257
     258=== Customized Templates
     259
     260Trac supports customization of its Genshi templates by placing copies of the templates in the `<env>/templates` folder of your [TracEnvironment environment] or in a common location specified in the [[TracIni#GlobalConfiguration| [inherit] templates_dir]] configuration setting. If you choose to do so, be aware that you will need to repeat your changes manually on a copy of the new templates when you upgrade to a new release of Trac (even a minor one), as the templates will likely evolve. So keep a diff around.
     261
     262The preferred way to perform TracInterfaceCustomization is to write a custom plugin doing an appropriate `ITemplateStreamFilter` transformation, as this is more robust in case of changes: we usually won't modify element `id`s or change CSS `class`es, and if we have to do so, this will be documented in the [trac:TracDev/ApiChanges] pages.
     263
     264=== !ZipImportError
     265
     266Due to internal caching of zipped packages, whenever the content of the packages change on disk, the in-memory zip index will no longer match and you'll get irrecoverable !ZipImportError errors. Better anticipate and bring your server down for maintenance before upgrading.
     267See [trac:#7014] for details.
     268
     269=== Wiki Upgrade
     270
     271`trac-admin` will not delete or remove default wiki pages that were present in a previous version but are no longer in the new version.
     272
     273=== Trac database upgrade
     274
     275A known issue in some versions of [trac:PySqlite] (2.5.2-2.5.4) prevents the trac-admin upgrade script from successfully upgrading the database format. It is advised to use either a newer or older version of the sqlite python bindings to avoid this error. For more details see ticket [trac:#9434].
     276
     277=== Parent dir
     278
     279If you use a Trac parent env configuration and one of the plugins in one child does not work, none of the children will work.
     280
     281== Related topics
     282
     283=== Upgrading Python
     284
     285Upgrading Python to a newer version will require reinstallation of Python packages: Trac itself of course, but also [http://pypi.python.org/pypi/setuptools easy_install], if you've been using that. If you are using Subversion, you'll also need to upgrade the Python bindings for svn.
     286
     287==== Windows and Python 2.6
     288
     289If you've been using !CollabNet's Subversion package, you may need to uninstall that in favor of [http://alagazam.net/ Alagazam], which has the Python bindings readily available, see [trac:TracSubversion]. That package works without tweaking.
     290
     291=== Changing Database Backend
     292
     293The [https://trac-hacks.org/wiki/TracMigratePlugin TracMigratePlugin] on [https://trac-hacks.org trac-hacks.org] has been written to assist in migrating between SQLite, MySQL and PostgreSQL databases.
     294
     295=== Upgrading from older versions of Trac #OlderVersions
     296
     297For upgrades from versions older than Trac 0.10, refer first to [trac:wiki:0.10/TracUpgrade#SpecificVersions].
    192298
    193299-----