@@ -18,9 +18,9 @@ Get the new version as described in TracInstall, or through your operating syste
If 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:
{{{#!sh
```
easy_install --upgrade Trac==1.2
}}}
```
You 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.
The 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:
...
...
@@ -35,40 +35,40 @@ You may also want to remove the directory in which your static resources are [Tr
Environment upgrades are not necessary for minor version releases unless otherwise noted.
After 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]:
{{{#!sh
```
trac-admin /path/to/projenv upgrade
}}}
```
This command will not have any effect if the environment is already up-to-date.
Note that a backup of your database will be performed automatically prior to the upgrade.
This 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:
{{{#!sh
```
trac-admin /path/to/projenv upgrade --no-backup
}}}
```
=== 4. Update the Trac Documentation === #UpdatetheTracDocumentation
By 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:
{{{#!sh
```
trac-admin /path/to/projenv wiki upgrade
}}}
```
Note that this procedure will leave your `WikiStart` page intact.
=== 5. Refresh static resources
If 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:
{{{#!sh
```
trac-admin /path/to/env deploy /deploy/path
}}}
```
This will extract static resources and CGI scripts (`trac.wsgi`, etc) from new Trac version and its plugins into `/deploy/path`.
Some 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.
{{{#!comment
```
Remove above note once #9936 is fixed.
}}}
```
=== 6. Steps specific to a given Trac version
...
...
@@ -81,13 +81,13 @@ Upgrade Python to at least 2.6 or 2.7, but not 3.0 or greater.
===== Obsolete Plugins
Trac has added functionality equivalent to the following plugins:
* [https://trac-hacks.org/wiki/DateFieldPlugin DateFieldPlugin]: see the **time** [TracTicketsCustomFields#AvailableFieldTypesandOptions custom field type]
* [https://trac-hacks.org/wiki/GroupBasedRedirectionPlugin GroupBasedRedirectionPlugin]: the default handler can set as a user preference.
* [https://trac-hacks.org/wiki/LinenoMacro LinenoMacro]: see WikiProcessors#AvailableProcessors
* [https://trac-hacks.org/wiki/NeverNotifyUpdaterPlugin NeverNotifyUpdaterPlugin]: see [TracNotification#notification-subscriber-section notification subscribers]
* [https://trac-hacks.org/wiki/QueryUiAssistPlugin QueryUiAssistPlugin]: see TracQuery#Filters.
* [https://trac-hacks.org/wiki/TicketCreationStatusPlugin TicketCreationStatusPlugin]: see [#NewWorkflowActions]
*[DateFieldPlugin](https://trac-hacks.org/wiki/DateFieldPlugin): see the **time** [TracTicketsCustomFields#AvailableFieldTypesandOptions custom field type]
*[GroupBasedRedirectionPlugin](https://trac-hacks.org/wiki/GroupBasedRedirectionPlugin): the default handler can set as a user preference.
*[LinenoMacro](https://trac-hacks.org/wiki/LinenoMacro): see WikiProcessors#AvailableProcessors
*[NeverNotifyUpdaterPlugin](https://trac-hacks.org/wiki/NeverNotifyUpdaterPlugin): see [TracNotification#notification-subscriber-section notification subscribers]
*[QueryUiAssistPlugin](https://trac-hacks.org/wiki/QueryUiAssistPlugin): see TracQuery#Filters.
*[TicketCreationStatusPlugin](https://trac-hacks.org/wiki/TicketCreationStatusPlugin): see [#NewWorkflowActions]
The plugins should be removed when upgrading Trac to 1.2.
...
...
@@ -98,12 +98,12 @@ The ticket creation step is controlled with a workflow action. The default workf
===== New permissions policy for read-only wiki pages
Since 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:
{{{#!ini
```
[trac]
permission_policies = ReadonlyWikiPolicy,
DefaultPermissionPolicy,
LegacyAttachmentPolicy
}}}
```
If 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.
...
...
@@ -117,19 +117,19 @@ Upgrade Python to at least 2.5, but not 3.0.
Trac has added functionality equivalent to the following plugins:
The plugins should be removed when upgrading Trac to 1.0.
===== Subversion components not enabled by default for new installations
The 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:
{{{#!ini
```
[components]
tracopt.versioncontrol.svn.* = enabled
}}}
```
The upgrade procedure should take care of this and change the TracIni appropriately, unless you already had the svn components explicitly disabled.
...
...
@@ -159,14 +159,14 @@ SQLite v2.x is no longer supported. If you still use a Trac database of this for
Trac has added functionality equivalent to the following plugins:
*[AnchorMacro](https://trac-hacks.org/wiki/AnchorMacro): see WikiFormatting#SettingAnchors
*[TicketChangePlugin](https://trac-hacks.org/wiki/TicketChangePlugin): see [TracPermissions#TicketSystem TICKET_EDIT_COMMENT permission]
*[TicketDeletePlugin](https://trac-hacks.org/wiki/TicketDeletePlugin): see `tracopt.ticket.deleter`
*[SubversionLocationPlugin](https://trac-hacks.org/wiki/SubversionLocationPlugin): see TracRepositoryAdmin#Repositories
*[WikiCreoleRendererPlugin](https://trac-hacks.org/wiki/WikiCreoleRendererPlugin): see [trac:WikiCreole]
*[RepoRevisionSyntaxPlugin](https://trac-hacks.org/wiki/RepoRevisionSyntaxPlugin)(added in 0.12.1)
The plugins should be removed when upgrading Trac to 0.12.
...
...
@@ -180,9 +180,9 @@ This may be of interest to users with only one repository, since there is now a
Each [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:
{{{#!sh
```
trac-admin /path/to/projenv repository resync '*'
}}}
```
===== Improved repository synchronization
...
...
@@ -190,7 +190,7 @@ In addition to supporting multiple repositories, there is now a more efficient m
While 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.
Note 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.
Note 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.
===== Authz permission checking
...
...
@@ -215,9 +215,9 @@ The Trac macros will need to be adapted, as the old-style wiki-macros are not su
===== For FCGI/WSGI/CGI users
For those who run Trac under the CGI environment, run this command in order to obtain the trac.*gi file:
This 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.
...
...
@@ -229,7 +229,7 @@ If you had the [trac:WebAdmin] plugin installed, you can uninstall it as it is p
When 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:
There 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.
There 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:[contrib/workflow/migrate_original_to_basic.py](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.
=== 7. Restart the Web Server #RestarttheWebServer
If you are not running [wiki:TracCgi CGI], reload the new Trac code by restarting your web server.
If you are not running [CGI](./TracCgi), reload the new Trac code by restarting your web server.
== Known Issues
...
...
@@ -261,9 +261,9 @@ Trac supports customization of its Genshi templates by placing copies of the tem
The 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.
=== !ZipImportError
=== ZipImportError
Due 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.
Due 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.
See [trac:#7014] for details.
=== Wiki Upgrade
...
...
@@ -282,15 +282,15 @@ If you use a Trac parent env configuration and one of the plugins in one child d
=== Upgrading Python
Upgrading 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.
Upgrading Python to a newer version will require reinstallation of Python packages: Trac itself of course, but also [easy_install](http://pypi.python.org/pypi/setuptools), if you've been using that. If you are using Subversion, you'll also need to upgrade the Python bindings for svn.
==== Windows and Python 2.6
If 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.
If you've been using CollabNet's Subversion package, you may need to uninstall that in favor of [Alagazam](http://alagazam.net/), which has the Python bindings readily available, see [trac:TracSubversion]. That package works without tweaking.
=== Changing Database Backend
The [https://trac-hacks.org/wiki/TracMigratePlugin TracMigratePlugin] on [https://trac-hacks.orgtrac-hacks.org] has been written to assist in migrating between SQLite, MySQL and PostgreSQL databases.
The [TracMigratePlugin](https://trac-hacks.org/wiki/TracMigratePlugin) on [trac-hacks.org](https://trac-hacks.org) has been written to assist in migrating between SQLite, MySQL and PostgreSQL databases.
=== Upgrading from older versions of Trac #OlderVersions