annotate examples/trac/UPGRADE @ 47:04bb078c6234

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