Mercurial > p > roundup > code
comparison doc/upgrading.txt @ 1089:43ab730ee194
instance -> tracker, node -> item
| author | Richard Jones <richard@users.sourceforge.net> |
|---|---|
| date | Tue, 10 Sep 2002 00:15:59 +0000 |
| parents | a0c7df67dd9c |
| children | d870139aeb5c |
comparison
equal
deleted
inserted
replaced
| 1088:32e41ddf2edb | 1089:43ab730ee194 |
|---|---|
| 1 ====================================== | 1 ====================================== |
| 2 Upgrading to newer versions of Roundup | 2 Upgrading to newer versions of Roundup |
| 3 ====================================== | 3 ====================================== |
| 4 | 4 |
| 5 Please read each section carefully and edit your instance home files | 5 Please read each section carefully and edit your tracker home files |
| 6 accordingly. | 6 accordingly. |
| 7 | 7 |
| 8 .. contents:: | 8 .. contents:: |
| 9 | 9 |
| 10 Migrating from 0.4.x to 0.5.0 | 10 Migrating from 0.4.x to 0.5.0 |
| 22 3. A brand new, highly flexible and much more robust security system including | 22 3. A brand new, highly flexible and much more robust security system including |
| 23 a system of Permissions, Roles and Role assignments to users. You may now | 23 a system of Permissions, Roles and Role assignments to users. You may now |
| 24 define your own Permissions that may be checked in CGI transactions. | 24 define your own Permissions that may be checked in CGI transactions. |
| 25 4. Journalling has been made less storage-hungry, so has been turned on | 25 4. Journalling has been made less storage-hungry, so has been turned on |
| 26 by default *except* for author, recipient and nosy link/unlink events. You | 26 by default *except* for author, recipient and nosy link/unlink events. You |
| 27 are advised to turn it off in your instances too. | 27 are advised to turn it off in your trackers too. |
| 28 5. Because of the above changes, the instance configuration has seen some | 28 5. We've changed the terminology from "instance" to "tracker", to ease the |
| 29 learning curve/impact for new users. | |
| 30 6. Because of the above changes, the tracker configuration has seen some | |
| 29 major changes. See below for the details. | 31 major changes. See below for the details. |
| 30 | 32 |
| 31 Please, *back up your database* before you start the migration process. This | 33 Please, *back up your database* before you start the migration process. This |
| 32 is as simple as copying the "db" directory and all its contents from your | 34 is as simple as copying the "db" directory and all its contents from your |
| 33 instance to somewhere safe. | 35 tracker to somewhere safe. |
| 34 | 36 |
| 35 | 37 |
| 36 0.5.0 Configuration | 38 0.5.0 Configuration |
| 37 ------------------- | 39 ------------------- |
| 40 | |
| 41 First up, rename your ``instance_config.py`` file to just ``config.py``. | |
| 42 | |
| 43 Then edit your tracker's ``__init__.py`` module. It'll currently look | |
| 44 like this:: | |
| 45 | |
| 46 from instance_config import * | |
| 47 try: | |
| 48 from dbinit import * | |
| 49 except ImportError: | |
| 50 pass # in installdir (probably :) | |
| 51 from interfaces import * | |
| 52 | |
| 53 and it needs to be:: | |
| 54 | |
| 55 import config | |
| 56 from dbinit import open, init | |
| 57 from interfaces import Client, MailGW | |
| 38 | 58 |
| 39 Due to the new templating having a top-level ``page`` that defines links for | 59 Due to the new templating having a top-level ``page`` that defines links for |
| 40 searching, indexes, adding items etc, the following variables are no longer | 60 searching, indexes, adding items etc, the following variables are no longer |
| 41 used: | 61 used: |
| 42 | 62 |
| 48 - UNASSIGNED_INDEX | 68 - UNASSIGNED_INDEX |
| 49 - USER_INDEX | 69 - USER_INDEX |
| 50 - ISSUE_FILTER | 70 - ISSUE_FILTER |
| 51 | 71 |
| 52 The new security implementation will require additions to the dbinit module, | 72 The new security implementation will require additions to the dbinit module, |
| 53 but also removes the need for the following instance config variables: | 73 but also removes the need for the following tracker config variables: |
| 54 | 74 |
| 55 - ANONYMOUS_ACCESS | 75 - ANONYMOUS_ACCESS |
| 56 - ANONYMOUS_REGISTER | 76 - ANONYMOUS_REGISTER |
| 57 | 77 |
| 58 but requires two new variables which define the Roles assigned to users who | 78 but requires two new variables which define the Roles assigned to users who |
| 73 -------------------------- | 93 -------------------------- |
| 74 | 94 |
| 75 0.5.0 Database backend changes | 95 0.5.0 Database backend changes |
| 76 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | 96 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 77 | 97 |
| 78 Your select_db module in your instance has changed a fair bit. Where it used | 98 Your select_db module in your tracker has changed a fair bit. Where it used |
| 79 to contain:: | 99 to contain:: |
| 80 | 100 |
| 81 # WARNING: DO NOT EDIT THIS FILE!!! | 101 # WARNING: DO NOT EDIT THIS FILE!!! |
| 82 from roundup.backends.back_anydbm import Database | 102 from roundup.backends.back_anydbm import Database |
| 83 | 103 |
| 87 from roundup.backends.back_anydbm import Database, Class, FileClass, IssueClass | 107 from roundup.backends.back_anydbm import Database, Class, FileClass, IssueClass |
| 88 | 108 |
| 89 Yes, I realise the irony of the "DO NOT EDIT THIS FILE" statement :) | 109 Yes, I realise the irony of the "DO NOT EDIT THIS FILE" statement :) |
| 90 Note the addition of the Class, FileClass, IssueClass imports. These are very | 110 Note the addition of the Class, FileClass, IssueClass imports. These are very |
| 91 important, as they're going to make the next change work too. You now need to | 111 important, as they're going to make the next change work too. You now need to |
| 92 modify the top of the dbinit module in your instance from:: | 112 modify the top of the dbinit module in your tracker from:: |
| 93 | 113 |
| 94 import instance_config | 114 import instance_config |
| 95 from roundup import roundupdb | 115 from roundup import roundupdb |
| 96 from select_db import Database | 116 from select_db import Database |
| 97 | 117 |
| 107 class IssueClass(roundupdb.IssueClass): | 127 class IssueClass(roundupdb.IssueClass): |
| 108 ''' issues need the email information | 128 ''' issues need the email information |
| 109 ''' | 129 ''' |
| 110 pass | 130 pass |
| 111 | 131 |
| 112 | 132 to:: |
| 113 | 133 |
| 114 to just:: | 134 import config |
| 115 | |
| 116 import instance_config | |
| 117 from select_db import Database, Class, FileClass, IssueClass | 135 from select_db import Database, Class, FileClass, IssueClass |
| 118 | 136 |
| 119 Yes, remove the Database and IssueClass definitions and those other imports. | 137 Yes, remove the Database and IssueClass definitions and those other imports. |
| 120 They're not needed any more! | 138 They're not needed any more! |
| 139 | |
| 140 Look for places in dbinit.py where ``instance_config`` is used too, and | |
| 141 rename them ``config``. | |
| 121 | 142 |
| 122 | 143 |
| 123 0.5.0 Journalling changes | 144 0.5.0 Journalling changes |
| 124 ~~~~~~~~~~~~~~~~~~~~~~~~~ | 145 ~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 125 | 146 |
| 211 2. Roles are defined that have one or more Permissions, | 232 2. Roles are defined that have one or more Permissions, |
| 212 3. Users are assigned Roles in their "roles" property, and finally | 233 3. Users are assigned Roles in their "roles" property, and finally |
| 213 4. Roundup checks that users have appropriate Permissions at appropriate times | 234 4. Roundup checks that users have appropriate Permissions at appropriate times |
| 214 (like editing issues). | 235 (like editing issues). |
| 215 | 236 |
| 216 Your instance dbinit module's *open* function now has to define any | 237 Your tracker dbinit module's *open* function now has to define any |
| 217 Permissions that are specific to your instance, and also the assignment | 238 Permissions that are specific to your tracker, and also the assignment |
| 218 of Permissions to Roles. At the moment, your open function | 239 of Permissions to Roles. At the moment, your open function |
| 219 ends with:: | 240 ends with:: |
| 220 | 241 |
| 221 import detectors | 242 import detectors |
| 222 detectors.init(db) | 243 detectors.init(db) |
| 318 you'll need to set the roles property on all users to a reasonable default. | 339 you'll need to set the roles property on all users to a reasonable default. |
| 319 The admin user should get "Admin", the anonymous user "Anonymous" | 340 The admin user should get "Admin", the anonymous user "Anonymous" |
| 320 and all other users "User". The ``fixroles.py`` script in the tools directory | 341 and all other users "User". The ``fixroles.py`` script in the tools directory |
| 321 will do this. Run it like so (where python is your python 2+ binary):: | 342 will do this. Run it like so (where python is your python 2+ binary):: |
| 322 | 343 |
| 323 python tools/fixroles.py -i <instance home> | 344 python tools/fixroles.py -i <tracker home> |
| 324 | 345 |
| 325 | 346 |
| 326 | 347 |
| 327 0.5.0 CGI interface changes | 348 0.5.0 CGI interface changes |
| 328 --------------------------- | 349 --------------------------- |
| 329 | 350 |
| 330 The CGI interface code was completely reorganised and largely rewritten. The | 351 The CGI interface code was completely reorganised and largely rewritten. The |
| 331 end result is that this section of your instance interfaces module will need | 352 end result is that this section of your tracker interfaces module will need |
| 332 changing from:: | 353 changing from:: |
| 333 | 354 |
| 334 from roundup import mailgw | 355 from roundup import mailgw |
| 335 from roundup.cgi import client | 356 from roundup.cgi import client |
| 336 | 357 |
| 356 | 377 |
| 357 | 378 |
| 358 0.5.0 HTML templating | 379 0.5.0 HTML templating |
| 359 --------------------- | 380 --------------------- |
| 360 | 381 |
| 361 You'll want to make a backup of your current instance html directory. You | 382 You'll want to make a backup of your current tracker html directory. You |
| 362 should then copy the html directory from the Roundup source template that you | 383 should then copy the html directory from the Roundup source template that you |
| 363 used to create your instance, and modify it according to your local schema | 384 used to create your tracker, and modify it according to your local schema |
| 364 changes. | 385 changes. |
| 365 | 386 |
| 366 If you need help with the new templating system, please ask questions on the | 387 If you need help with the new templating system, please ask questions on the |
| 367 roundup-users mailing list (available through the roundup project page on | 388 roundup-users mailing list (available through the roundup project page on |
| 368 sourceforge, http://roundup.sf.net/) | 389 sourceforge, http://roundup.sf.net/) |
| 369 | 390 |
| 370 | 391 |
| 371 0.5.0 Detectors | 392 0.5.0 Detectors |
| 372 --------------- | 393 --------------- |
| 373 | 394 |
| 374 The nosy reactor has been updated to handle the instance not having an | 395 The nosy reactor has been updated to handle the tracker not having an |
| 375 "assignedto" property on issues. You may want to copy it into your instance's | 396 "assignedto" property on issues. You may want to copy it into your tracker's |
| 376 detectors directory. Chances are you've already fixed it though :) | 397 detectors directory. Chances are you've already fixed it though :) |
| 377 | 398 |
| 378 | 399 |
| 379 Migrating from 0.4.1 to 0.4.2 | 400 Migrating from 0.4.1 to 0.4.2 |
| 380 ============================= | 401 ============================= |
| 426 There's also a bug or two fixed in the nosyreactor code. | 447 There's also a bug or two fixed in the nosyreactor code. |
| 427 | 448 |
| 428 0.4.2 HTML templating changes | 449 0.4.2 HTML templating changes |
| 429 ----------------------------- | 450 ----------------------------- |
| 430 The link() htmltemplate function now has a "showid" option for links and | 451 The link() htmltemplate function now has a "showid" option for links and |
| 431 multilinks. When true, it only displays the linked node id as the anchor | 452 multilinks. When true, it only displays the linked item id as the anchor |
| 432 text. The link value is displayed as a tooltip using the title anchor | 453 text. The link value is displayed as a tooltip using the title anchor |
| 433 attribute. To use in eg. the superseder field, have something like this:: | 454 attribute. To use in eg. the superseder field, have something like this:: |
| 434 | 455 |
| 435 <td> | 456 <td> |
| 436 <display call="field('superseder', showid=1)"> | 457 <display call="field('superseder', showid=1)"> |
