annotate examples/trac/UPGRADE @ 39:93b4dcbafd7b trunk

Copy Trac to main branch.
author cmlenz
date Mon, 03 Jul 2006 18:53:27 +0000
parents
children
rev   line source
39
93b4dcbafd7b Copy Trac to main branch.
cmlenz
parents:
diff changeset
1 Upgrade Instructions
93b4dcbafd7b Copy Trac to main branch.
cmlenz
parents:
diff changeset
2 ====================
93b4dcbafd7b Copy Trac to main branch.
cmlenz
parents:
diff changeset
3
93b4dcbafd7b Copy Trac to main branch.
cmlenz
parents:
diff changeset
4 A Trac environment sometimes needs to be upgraded before it can be used with
93b4dcbafd7b Copy Trac to main branch.
cmlenz
parents:
diff changeset
5 a new version of Trac. This document describes the steps necessary to upgrade
93b4dcbafd7b Copy Trac to main branch.
cmlenz
parents:
diff changeset
6 an environment.
93b4dcbafd7b Copy Trac to main branch.
cmlenz
parents:
diff changeset
7
93b4dcbafd7b Copy Trac to main branch.
cmlenz
parents:
diff changeset
8 Note that Environment upgrades are not necessary for minor version releases
93b4dcbafd7b Copy Trac to main branch.
cmlenz
parents:
diff changeset
9 unless otherwise noted. For example, there's no need to upgrade a Trac
93b4dcbafd7b Copy Trac to main branch.
cmlenz
parents:
diff changeset
10 environment created with (or upgraded) 0.8.0 when installing 0.8.4 (or any
93b4dcbafd7b Copy Trac to main branch.
cmlenz
parents:
diff changeset
11 other 0.8.x release).
93b4dcbafd7b Copy Trac to main branch.
cmlenz
parents:
diff changeset
12
93b4dcbafd7b Copy Trac to main branch.
cmlenz
parents:
diff changeset
13 General Instructions
93b4dcbafd7b Copy Trac to main branch.
cmlenz
parents:
diff changeset
14 --------------------
93b4dcbafd7b Copy Trac to main branch.
cmlenz
parents:
diff changeset
15 Typically, there are four steps involved in upgrading to a newer version of
93b4dcbafd7b Copy Trac to main branch.
cmlenz
parents:
diff changeset
16 Trac:
93b4dcbafd7b Copy Trac to main branch.
cmlenz
parents:
diff changeset
17
93b4dcbafd7b Copy Trac to main branch.
cmlenz
parents:
diff changeset
18 1. Update the Trac Code
93b4dcbafd7b Copy Trac to main branch.
cmlenz
parents:
diff changeset
19
93b4dcbafd7b Copy Trac to main branch.
cmlenz
parents:
diff changeset
20 Get the new version of Trac, either by downloading an offical release package
93b4dcbafd7b Copy Trac to main branch.
cmlenz
parents:
diff changeset
21 or by checking it out from the Subversion repository.
93b4dcbafd7b Copy Trac to main branch.
cmlenz
parents:
diff changeset
22
93b4dcbafd7b Copy Trac to main branch.
cmlenz
parents:
diff changeset
23 If you have a source distribution, you need to run
93b4dcbafd7b Copy Trac to main branch.
cmlenz
parents:
diff changeset
24
93b4dcbafd7b Copy Trac to main branch.
cmlenz
parents:
diff changeset
25 python setup.py install
93b4dcbafd7b Copy Trac to main branch.
cmlenz
parents:
diff changeset
26
93b4dcbafd7b Copy Trac to main branch.
cmlenz
parents:
diff changeset
27 to install the new version. If you've downloaded the Windows installer, you
93b4dcbafd7b Copy Trac to main branch.
cmlenz
parents:
diff changeset
28 execute it, and so on.
93b4dcbafd7b Copy Trac to main branch.
cmlenz
parents:
diff changeset
29
93b4dcbafd7b Copy Trac to main branch.
cmlenz
parents:
diff changeset
30 In any case, if you're doing a major version upgrade (such as from 0.8 to
93b4dcbafd7b Copy Trac to main branch.
cmlenz
parents:
diff changeset
31 0.9), it is highly recommended that you first remove the existing Trac code.
93b4dcbafd7b Copy Trac to main branch.
cmlenz
parents:
diff changeset
32 To do this, you need to delete the `trac` directory from the Python
93b4dcbafd7b Copy Trac to main branch.
cmlenz
parents:
diff changeset
33 `lib/site-packages` directory. You may also want to remove the Trac `cgi-bin`,
93b4dcbafd7b Copy Trac to main branch.
cmlenz
parents:
diff changeset
34 `htdocs` and `templates` directories that are commonly found in a directory
93b4dcbafd7b Copy Trac to main branch.
cmlenz
parents:
diff changeset
35 called `share/trac` (the exact location depends on your platform).
93b4dcbafd7b Copy Trac to main branch.
cmlenz
parents:
diff changeset
36
93b4dcbafd7b Copy Trac to main branch.
cmlenz
parents:
diff changeset
37 2. Upgrade the Trac Environment
93b4dcbafd7b Copy Trac to main branch.
cmlenz
parents:
diff changeset
38
93b4dcbafd7b Copy Trac to main branch.
cmlenz
parents:
diff changeset
39 Unless noted otherwise, upgrading between major versions (such as 0.8 and
93b4dcbafd7b Copy Trac to main branch.
cmlenz
parents:
diff changeset
40 0.9) involves changes to the database schema, and possibly the layout of the
93b4dcbafd7b Copy Trac to main branch.
cmlenz
parents:
diff changeset
41 environment. Fortunately, Trac provides automated upgrade scripts to ease the
93b4dcbafd7b Copy Trac to main branch.
cmlenz
parents:
diff changeset
42 pain. These scripts are run via `trac-admin`:
93b4dcbafd7b Copy Trac to main branch.
cmlenz
parents:
diff changeset
43
93b4dcbafd7b Copy Trac to main branch.
cmlenz
parents:
diff changeset
44 trac-admin /path/to/projenv upgrade
93b4dcbafd7b Copy Trac to main branch.
cmlenz
parents:
diff changeset
45
93b4dcbafd7b Copy Trac to main branch.
cmlenz
parents:
diff changeset
46 This command will do nothing if the environment is already up-to-date.
93b4dcbafd7b Copy Trac to main branch.
cmlenz
parents:
diff changeset
47
93b4dcbafd7b Copy Trac to main branch.
cmlenz
parents:
diff changeset
48 3. Update the Trac Documentation
93b4dcbafd7b Copy Trac to main branch.
cmlenz
parents:
diff changeset
49
93b4dcbafd7b Copy Trac to main branch.
cmlenz
parents:
diff changeset
50 Every Trac environment includes a copy of the Trac documentation for the
93b4dcbafd7b Copy Trac to main branch.
cmlenz
parents:
diff changeset
51 installed version. As you probably want to keep the included documentation in
93b4dcbafd7b Copy Trac to main branch.
cmlenz
parents:
diff changeset
52 sync with the installed version of Trac, `trac-admin` provides a command to
93b4dcbafd7b Copy Trac to main branch.
cmlenz
parents:
diff changeset
53 upgrade the documentation:
93b4dcbafd7b Copy Trac to main branch.
cmlenz
parents:
diff changeset
54
93b4dcbafd7b Copy Trac to main branch.
cmlenz
parents:
diff changeset
55 trac-admin /path/to/projenv wiki upgrade
93b4dcbafd7b Copy Trac to main branch.
cmlenz
parents:
diff changeset
56
93b4dcbafd7b Copy Trac to main branch.
cmlenz
parents:
diff changeset
57 Note that this procedure will of course leave your `WikiStart` page intact.
93b4dcbafd7b Copy Trac to main branch.
cmlenz
parents:
diff changeset
58
93b4dcbafd7b Copy Trac to main branch.
cmlenz
parents:
diff changeset
59 4. Restart the Web Server
93b4dcbafd7b Copy Trac to main branch.
cmlenz
parents:
diff changeset
60
93b4dcbafd7b Copy Trac to main branch.
cmlenz
parents:
diff changeset
61 In order to reload the new Trac code you will need to restart your web
93b4dcbafd7b Copy Trac to main branch.
cmlenz
parents:
diff changeset
62 server (note this is not necessary for CGI).
93b4dcbafd7b Copy Trac to main branch.
cmlenz
parents:
diff changeset
63
93b4dcbafd7b Copy Trac to main branch.
cmlenz
parents:
diff changeset
64
93b4dcbafd7b Copy Trac to main branch.
cmlenz
parents:
diff changeset
65 The following sections discuss any extra actions that may need to be taken
93b4dcbafd7b Copy Trac to main branch.
cmlenz
parents:
diff changeset
66 to upgrade to specific versions of Trac.
93b4dcbafd7b Copy Trac to main branch.
cmlenz
parents:
diff changeset
67
93b4dcbafd7b Copy Trac to main branch.
cmlenz
parents:
diff changeset
68
93b4dcbafd7b Copy Trac to main branch.
cmlenz
parents:
diff changeset
69 From 0.9-beta to 0.9
93b4dcbafd7b Copy Trac to main branch.
cmlenz
parents:
diff changeset
70 --------------------
93b4dcbafd7b Copy Trac to main branch.
cmlenz
parents:
diff changeset
71
93b4dcbafd7b Copy Trac to main branch.
cmlenz
parents:
diff changeset
72 If inclusion of the static resources (style sheets, javascript, images) is not
93b4dcbafd7b Copy Trac to main branch.
cmlenz
parents:
diff changeset
73 working, check the value of the `htdocs_location` in trac.ini. For mod_python,
93b4dcbafd7b Copy Trac to main branch.
cmlenz
parents:
diff changeset
74 Tracd and FastCGI, you can simply remove the option altogether. For CGI, you
93b4dcbafd7b Copy Trac to main branch.
cmlenz
parents:
diff changeset
75 should fix it to point to the URL you mapped the Trac `htdocs` directory to.
93b4dcbafd7b Copy Trac to main branch.
cmlenz
parents:
diff changeset
76
93b4dcbafd7b Copy Trac to main branch.
cmlenz
parents:
diff changeset
77 If you've been using plugins with a beta release of Trac 0.9, or have
93b4dcbafd7b Copy Trac to main branch.
cmlenz
parents:
diff changeset
78 disabled some of the built-in components, you might have to update the rules
93b4dcbafd7b Copy Trac to main branch.
cmlenz
parents:
diff changeset
79 for disabling/enabling components in trac.ini. In particular, globally
93b4dcbafd7b Copy Trac to main branch.
cmlenz
parents:
diff changeset
80 installed plugins now need to be enabled explicitly. See the TracPlugins and
93b4dcbafd7b Copy Trac to main branch.
cmlenz
parents:
diff changeset
81 TracIni wiki pages for more information.
93b4dcbafd7b Copy Trac to main branch.
cmlenz
parents:
diff changeset
82
93b4dcbafd7b Copy Trac to main branch.
cmlenz
parents:
diff changeset
83 If you want to enable the display of all ticket changes in the timeline (the
93b4dcbafd7b Copy Trac to main branch.
cmlenz
parents:
diff changeset
84 Ticket Details option), you now have to explicitly enable that in trac.ini,
93b4dcbafd7b Copy Trac to main branch.
cmlenz
parents:
diff changeset
85 too:
93b4dcbafd7b Copy Trac to main branch.
cmlenz
parents:
diff changeset
86
93b4dcbafd7b Copy Trac to main branch.
cmlenz
parents:
diff changeset
87 [timeline]
93b4dcbafd7b Copy Trac to main branch.
cmlenz
parents:
diff changeset
88 ticket_show_details = true
93b4dcbafd7b Copy Trac to main branch.
cmlenz
parents:
diff changeset
89
93b4dcbafd7b Copy Trac to main branch.
cmlenz
parents:
diff changeset
90
93b4dcbafd7b Copy Trac to main branch.
cmlenz
parents:
diff changeset
91 From 0.8.x to 0.9
93b4dcbafd7b Copy Trac to main branch.
cmlenz
parents:
diff changeset
92 -----------------
93b4dcbafd7b Copy Trac to main branch.
cmlenz
parents:
diff changeset
93
93b4dcbafd7b Copy Trac to main branch.
cmlenz
parents:
diff changeset
94 mod_python users will need to change the name of the mod_python handler in
93b4dcbafd7b Copy Trac to main branch.
cmlenz
parents:
diff changeset
95 the Apache HTTPD configuration:
93b4dcbafd7b Copy Trac to main branch.
cmlenz
parents:
diff changeset
96
93b4dcbafd7b Copy Trac to main branch.
cmlenz
parents:
diff changeset
97 from: PythonHandler trac.ModPythonHandler
93b4dcbafd7b Copy Trac to main branch.
cmlenz
parents:
diff changeset
98 to: PythonHandler trac.web.modpython_frontend
93b4dcbafd7b Copy Trac to main branch.
cmlenz
parents:
diff changeset
99
93b4dcbafd7b Copy Trac to main branch.
cmlenz
parents:
diff changeset
100 If you have PySQLite 2.x installed, Trac will now try to open your SQLite
93b4dcbafd7b Copy Trac to main branch.
cmlenz
parents:
diff changeset
101 database using the SQLite 3.x file format. The database formats used by
93b4dcbafd7b Copy Trac to main branch.
cmlenz
parents:
diff changeset
102 SQLite 2.8.x and SQLite 3.x are incompatible. If you get an error like "file
93b4dcbafd7b Copy Trac to main branch.
cmlenz
parents:
diff changeset
103 is encrypted or is not a database" after upgrading, then you must convert
93b4dcbafd7b Copy Trac to main branch.
cmlenz
parents:
diff changeset
104 your database file.
93b4dcbafd7b Copy Trac to main branch.
cmlenz
parents:
diff changeset
105
93b4dcbafd7b Copy Trac to main branch.
cmlenz
parents:
diff changeset
106 To do this, you need to have both SQLite 2.8.x and SQLite 3.x installed (they
93b4dcbafd7b Copy Trac to main branch.
cmlenz
parents:
diff changeset
107 have different filenames so can coexist on the same system). Then use the
93b4dcbafd7b Copy Trac to main branch.
cmlenz
parents:
diff changeset
108 following commands:
93b4dcbafd7b Copy Trac to main branch.
cmlenz
parents:
diff changeset
109
93b4dcbafd7b Copy Trac to main branch.
cmlenz
parents:
diff changeset
110 mv trac.db trac2.db
93b4dcbafd7b Copy Trac to main branch.
cmlenz
parents:
diff changeset
111 sqlite trac2.db .dump | sqlite3 trac.db
93b4dcbafd7b Copy Trac to main branch.
cmlenz
parents:
diff changeset
112
93b4dcbafd7b Copy Trac to main branch.
cmlenz
parents:
diff changeset
113 After testing that the conversion was successful, the `trac2.db` file can be
93b4dcbafd7b Copy Trac to main branch.
cmlenz
parents:
diff changeset
114 deleted. For more information on the SQLite upgrade see
93b4dcbafd7b Copy Trac to main branch.
cmlenz
parents:
diff changeset
115 http://www.sqlite.org/version3.html.
93b4dcbafd7b Copy Trac to main branch.
cmlenz
parents:
diff changeset
116
93b4dcbafd7b Copy Trac to main branch.
cmlenz
parents:
diff changeset
117
93b4dcbafd7b Copy Trac to main branch.
cmlenz
parents:
diff changeset
118 From 0.7.x to 0.8
93b4dcbafd7b Copy Trac to main branch.
cmlenz
parents:
diff changeset
119 -----------------
93b4dcbafd7b Copy Trac to main branch.
cmlenz
parents:
diff changeset
120
93b4dcbafd7b Copy Trac to main branch.
cmlenz
parents:
diff changeset
121 0.8 adds a new roadmap feature which requires additional permissions. While a
93b4dcbafd7b Copy Trac to main branch.
cmlenz
parents:
diff changeset
122 fresh installation will by default grant `ROADMAP_VIEW` and `MILESTONE_VIEW`
93b4dcbafd7b Copy Trac to main branch.
cmlenz
parents:
diff changeset
123 permissions to anonymous, these permissions have to be granted manually when
93b4dcbafd7b Copy Trac to main branch.
cmlenz
parents:
diff changeset
124 upgrading:
93b4dcbafd7b Copy Trac to main branch.
cmlenz
parents:
diff changeset
125
93b4dcbafd7b Copy Trac to main branch.
cmlenz
parents:
diff changeset
126 trac-admin /path/to/projectenv permission add anonymous MILESTONE_VIEW
93b4dcbafd7b Copy Trac to main branch.
cmlenz
parents:
diff changeset
127 trac-admin /path/to/projectenv permission add anonymous ROADMAP_VIEW
93b4dcbafd7b Copy Trac to main branch.
cmlenz
parents:
diff changeset
128
93b4dcbafd7b Copy Trac to main branch.
cmlenz
parents:
diff changeset
129
93b4dcbafd7b Copy Trac to main branch.
cmlenz
parents:
diff changeset
130 From 0.6.x to 0.7
93b4dcbafd7b Copy Trac to main branch.
cmlenz
parents:
diff changeset
131 -----------------
93b4dcbafd7b Copy Trac to main branch.
cmlenz
parents:
diff changeset
132 Trac 0.7 introduced a new database format, requiring manual upgrade.
93b4dcbafd7b Copy Trac to main branch.
cmlenz
parents:
diff changeset
133
93b4dcbafd7b Copy Trac to main branch.
cmlenz
parents:
diff changeset
134 Previous versions of Trac stored wiki pages, ticket, reports, settings,
93b4dcbafd7b Copy Trac to main branch.
cmlenz
parents:
diff changeset
135 etc. in a single SQLite database file. Trac 0.7 replaces this file
93b4dcbafd7b Copy Trac to main branch.
cmlenz
parents:
diff changeset
136 with a new backend storage format; the 'Trac Environment', which is a
93b4dcbafd7b Copy Trac to main branch.
cmlenz
parents:
diff changeset
137 directory containing an SQLite database, a human-readable configuration file,
93b4dcbafd7b Copy Trac to main branch.
cmlenz
parents:
diff changeset
138 log-files and attachments.
93b4dcbafd7b Copy Trac to main branch.
cmlenz
parents:
diff changeset
139
93b4dcbafd7b Copy Trac to main branch.
cmlenz
parents:
diff changeset
140 Fear not though, old-style Trac databases can easily be converted to
93b4dcbafd7b Copy Trac to main branch.
cmlenz
parents:
diff changeset
141 Environments using the included `tracdb2env` program as follows:
93b4dcbafd7b Copy Trac to main branch.
cmlenz
parents:
diff changeset
142
93b4dcbafd7b Copy Trac to main branch.
cmlenz
parents:
diff changeset
143 tracdb2env /path/to/old/project.db /path/to/new/projectenv
93b4dcbafd7b Copy Trac to main branch.
cmlenz
parents:
diff changeset
144
93b4dcbafd7b Copy Trac to main branch.
cmlenz
parents:
diff changeset
145 `tracdb2env` will create a new environment and copy the information from the
93b4dcbafd7b Copy Trac to main branch.
cmlenz
parents:
diff changeset
146 old database to the new environment. The existing database will not be
93b4dcbafd7b Copy Trac to main branch.
cmlenz
parents:
diff changeset
147 modified.
93b4dcbafd7b Copy Trac to main branch.
cmlenz
parents:
diff changeset
148
93b4dcbafd7b Copy Trac to main branch.
cmlenz
parents:
diff changeset
149 You also need to update your apache configuration:
93b4dcbafd7b Copy Trac to main branch.
cmlenz
parents:
diff changeset
150
93b4dcbafd7b Copy Trac to main branch.
cmlenz
parents:
diff changeset
151 Change the line:
93b4dcbafd7b Copy Trac to main branch.
cmlenz
parents:
diff changeset
152
93b4dcbafd7b Copy Trac to main branch.
cmlenz
parents:
diff changeset
153 SetEnv TRAC_DB "/path/to/old/project.db"
93b4dcbafd7b Copy Trac to main branch.
cmlenz
parents:
diff changeset
154
93b4dcbafd7b Copy Trac to main branch.
cmlenz
parents:
diff changeset
155 to:
93b4dcbafd7b Copy Trac to main branch.
cmlenz
parents:
diff changeset
156
93b4dcbafd7b Copy Trac to main branch.
cmlenz
parents:
diff changeset
157 SetEnv TRAC_ENV "/path/to/new/projectenv"
93b4dcbafd7b Copy Trac to main branch.
cmlenz
parents:
diff changeset
158
93b4dcbafd7b Copy Trac to main branch.
cmlenz
parents:
diff changeset
159
93b4dcbafd7b Copy Trac to main branch.
cmlenz
parents:
diff changeset
160 ----
93b4dcbafd7b Copy Trac to main branch.
cmlenz
parents:
diff changeset
161
93b4dcbafd7b Copy Trac to main branch.
cmlenz
parents:
diff changeset
162 If you have trouble upgrading Trac, please ask questions on the mailing list:
93b4dcbafd7b Copy Trac to main branch.
cmlenz
parents:
diff changeset
163
93b4dcbafd7b Copy Trac to main branch.
cmlenz
parents:
diff changeset
164 <http://projects.edgewall.com/trac/wiki/MailingList>
93b4dcbafd7b Copy Trac to main branch.
cmlenz
parents:
diff changeset
165
93b4dcbafd7b Copy Trac to main branch.
cmlenz
parents:
diff changeset
166 Or for other support options, see:
93b4dcbafd7b Copy Trac to main branch.
cmlenz
parents:
diff changeset
167
93b4dcbafd7b Copy Trac to main branch.
cmlenz
parents:
diff changeset
168 <http://projects.edgewall.com/trac/wiki/TracSupport>
Copyright (C) 2012-2017 Edgewall Software