comparison doc/upgrading.txt @ 7801:af898d1d66dc

doc: run sphinx-lint over docs. Pointed out mutiple use of `x` where it should be ``x``. Also trailing whitespace and lines that are too long. Replaced all tabs by spaces. Also fixed spelling error while I was there. Fixed broken internal link.
author John Rouillard <rouilj@ieee.org>
date Wed, 13 Mar 2024 00:51:09 -0400
parents 8bdf0484215c
children 0fe2b9f6e19f
comparison
equal deleted inserted replaced
7800:2d4684e4702d 7801:af898d1d66dc
1 .. meta:: 1 .. meta::
2 :description: 2 :description:
3 Critical documentation for upgrading the Roundup Issue 3 Critical documentation for upgrading the Roundup Issue
4 Tracker. Actions that must be taken when upgrading from 4 Tracker. Actions that must be taken when upgrading from
5 one version to another are documented here. 5 one version to another are documented here.
6 6
7 .. index:: Upgrading 7 .. index:: Upgrading
8 8
9 ====================================== 9 ======================================
10 Upgrading to newer versions of Roundup 10 Upgrading to newer versions of Roundup
177 (user, name, password ...) that are in the tracker's 177 (user, name, password ...) that are in the tracker's
178 ``config.ini`` will override the service settings. So you 178 ``config.ini`` will override the service settings. So you
179 want to leave the ``config.ini`` settings blank. E.G.:: 179 want to leave the ``config.ini`` settings blank. E.G.::
180 180
181 [rdbms] 181 [rdbms]
182 name = 182 name =
183 host = 183 host =
184 port = 184 port =
185 user = 185 user =
186 password = 186 password =
187 service = roundup_roundup 187 service = roundup_roundup
188 188
189 Setting ``service`` to ``roundup_roundup`` with 189 Setting ``service`` to ``roundup_roundup`` with
190 the following in the service file:: 190 the following in the service file::
191 191
192 [roundup_roundup] 192 [roundup_roundup]
416 PostgreSQL database use a numeric type that 416 PostgreSQL database use a numeric type that
417 truncates/rounds expiration timestamps. This results in 417 truncates/rounds expiration timestamps. This results in
418 entries being purged early or late (depending on whether 418 entries being purged early or late (depending on whether
419 it rounds up or down). The discrepancy is a couple of 419 it rounds up or down). The discrepancy is a couple of
420 days for Mysql or a couple of minutes for PostgreSQL. 420 days for Mysql or a couple of minutes for PostgreSQL.
421 421
422 Session keys stay for a week or more and CSRF keys are 422 Session keys stay for a week or more and CSRF keys are
423 two weeks by default. As a result, this isn't usually a 423 two weeks by default. As a result, this isn't usually a
424 visible issue. This migration updates the numeric types 424 visible issue. This migration updates the numeric types
425 to ones that supports more significant figures. 425 to ones that supports more significant figures.
426 426
473 473
474 Update ``config.ini``'s ``password_pbkdf2_default_rounds`` (required) 474 Update ``config.ini``'s ``password_pbkdf2_default_rounds`` (required)
475 --------------------------------------------------------------------- 475 ---------------------------------------------------------------------
476 476
477 Roundup hashes passwords using PBKDF2 with SHA1. In this release, you 477 Roundup hashes passwords using PBKDF2 with SHA1. In this release, you
478 can `upgrade to PBKDF2-SHA512 from current PBKDF2-SHA1`. If you 478 can `upgrade to PBKDF2-SHA512 from current PBKDF2-SHA1 (recommended)`_. If you
479 upgrade, you want to set the default rounds according to the 479 upgrade, you want to set the default rounds according to the
480 PBKDF2-SHA512 upgrading directions. Note that this algorithm is 480 PBKDF2-SHA512 upgrading directions. Note that this algorithm is
481 expected to be the default in a future version of Roundup. 481 expected to be the default in a future version of Roundup.
482 482
483 If you don't want to upgrade, we recommend that you increase the 483 If you don't want to upgrade, we recommend that you increase the
590 590
591 You can verify that PBKDF2S5 is used by default by running:: 591 You can verify that PBKDF2S5 is used by default by running::
592 592
593 roundup-admin -i <tracker_home> perftest password rounds=250,000 593 roundup-admin -i <tracker_home> perftest password rounds=250,000
594 594
595 and verify that the scheme is PBKDF2S5. 595 and verify that the scheme is PBKDF2S5.
596 596
597 .. _the interfaces.py file: 597 .. _the interfaces.py file:
598 reference.html#interfaces-py-hooking-into-the-core-of-roundup 598 reference.html#interfaces-py-hooking-into-the-core-of-roundup
599 599
600 .. |the interfaces.py file| replace:: the ``interfaces.py`` file 600 .. |the interfaces.py file| replace:: the ``interfaces.py`` file
651 sqlite3 <tracker_home>/db/db "pragma journal_mode;" 651 sqlite3 <tracker_home>/db/db "pragma journal_mode;"
652 652
653 2. If it returns ``delete``, change it to WAL mode using:: 653 2. If it returns ``delete``, change it to WAL mode using::
654 654
655 sqlite3 <tracker_home>/db/db "pragma journal_mode=WAL;" 655 sqlite3 <tracker_home>/db/db "pragma journal_mode=WAL;"
656 656
657 3. verify by running the command in step 1 again and you 657 3. verify by running the command in step 1 again and you
658 should get ``wal``. 658 should get ``wal``.
659 659
660 If you are using SQLite for session and otk databases, 660 If you are using SQLite for session and otk databases,
661 perform the same steps replacing ``db`` with ``db-session`` 661 perform the same steps replacing ``db`` with ``db-session``
674 674
675 Change in processing allowed_api_origins setting (info) 675 Change in processing allowed_api_origins setting (info)
676 ------------------------------------------------------- 676 -------------------------------------------------------
677 677
678 In this release you can use both ``*`` (as the first origin) and 678 In this release you can use both ``*`` (as the first origin) and
679 explicit origins in the `allowed_api_origins`` setting in 679 explicit origins in the ``allowed_api_origins`` setting in
680 ``config.ini``. (Before it was only one or the other.) 680 ``config.ini``. (Before it was only one or the other.)
681 681
682 You do not need to use ``*``. If you do, it allows any client 682 You do not need to use ``*``. If you do, it allows any client
683 anonymous (unauthenticated) access to the Roundup tracker. This 683 anonymous (unauthenticated) access to the Roundup tracker. This
684 is the same as browsing the tracker without logging in. If they 684 is the same as browsing the tracker without logging in. If they
846 https://www.postgresql.org/docs/14/textsearch-controls.html#TEXTSEARCH-PARSING-QUERIES 846 https://www.postgresql.org/docs/14/textsearch-controls.html#TEXTSEARCH-PARSING-QUERIES
847 can be used. The default is websearch. Prefixing the search with 847 can be used. The default is websearch. Prefixing the search with
848 ``ts:`` enables tsquery mode. 848 ``ts:`` enables tsquery mode.
849 849
850 A list of words behaves almost the same as the default text search 850 A list of words behaves almost the same as the default text search
851 (`native`). So the search string `fts search` will find all issues 851 (``native``). So the search string ``fts search`` will find all issues
852 that have both of those words (an AND search) in a text-field (like 852 that have both of those words (an AND search) in a text-field (like
853 title) or in a message (or file) attached to the issue. 853 title) or in a message (or file) attached to the issue.
854 854
855 One thing to note is that native-fts searches do not ignore words 855 One thing to note is that native-fts searches do not ignore words
856 longer than 50 characters or less than 2 characters. Also SQLite does 856 longer than 50 characters or less than 2 characters. Also SQLite does
1137 + from html import escape 1137 + from html import escape
1138 +except ImportError: 1138 +except ImportError:
1139 + from cgi import escape 1139 + from cgi import escape
1140 1140
1141 try: 1141 try:
1142 import pytz 1142 import pytz
1143 @@ -25,7 +28,7 @@ 1143 @@ -25,7 +28,7 @@
1144 s = ' ' 1144 s = ' '
1145 if zone == value: 1145 if zone == value:
1146 s = 'selected=selected ' 1146 s = 'selected=selected '
1147 - z = cgi.escape(zone) 1147 - z = cgi.escape(zone)
1148 + z = escape(zone) 1148 + z = escape(zone)
1149 1149
1150 See https://issues.roundup-tracker.org/issue2551136 for more details. 1150 See https://issues.roundup-tracker.org/issue2551136 for more details.
1151 1151
1582 this section. 1582 this section.
1583 1583
1584 Make sure that user can view labelprop on classes (required) 1584 Make sure that user can view labelprop on classes (required)
1585 ------------------------------------------------------------ 1585 ------------------------------------------------------------
1586 1586
1587 If you have View permissions that use ```properties=...```, make sure 1587 If you have View permissions that use ``properties=...``, make sure
1588 that the `labelprop <reference.html#setlabelprop-property>`_ for the 1588 that the `labelprop <reference.html#setlabelprop-property>`_ for the
1589 class is listed in the properties list. 1589 class is listed in the properties list.
1590 1590
1591 The first one of these that exists must must be in the list: 1591 The first one of these that exists must must be in the list:
1592 1592
1869 # who updated the issue, but it could be useful in some 1869 # who updated the issue, but it could be useful in some
1870 # unusual circumstances. 1870 # unusual circumstances.
1871 # If set to some other value, the value is used as the reply-to 1871 # If set to some other value, the value is used as the reply-to
1872 # address. It must be a valid RFC2822 address or people will not be 1872 # address. It must be a valid RFC2822 address or people will not be
1873 # able to reply. 1873 # able to reply.
1874 # Default: 1874 # Default:
1875 replyto_address = 1875 replyto_address =
1876 1876
1877 Login from a search or after logout works better (required) 1877 Login from a search or after logout works better (required)
1878 ----------------------------------------------------------- 1878 -----------------------------------------------------------
1879 1879
1880 The login form has been improved to work with some back end code 1880 The login form has been improved to work with some back end code
1881 changes. Now when a user logs in they stay on the same page where they 1881 changes. Now when a user logs in they stay on the same page where they
1882 started the login. To make this work, you must change the tal that is 1882 started the login. To make this work, you must change the tal that is
1883 used to set the ``__came_from`` form variable. Note that the url 1883 used to set the ``__came_from`` form variable. Note that the url
1884 assigned to __came_from must be url encoded/quoted and be under the 1884 assigned to __came_from must be url encoded/quoted and be under the
1885 tracker's base url. If the base_url uses http, you can set the url to 1885 tracker's base url. If the base_url uses http, you can set the url to
1886 https. 1886 https.
1887 1887
1888 Replace the existing code in the tracker's html/page.html page that 1888 Replace the existing code in the tracker's html/page.html page that
1889 looks similar to (look for name="__came_from"): 1889 looks similar to (look for name="__came_from"):
1890 1890
2042 :class: big-code 2042 :class: big-code
2043 2043
2044 <tal:block tal:repeat="qs request/user/queries"> 2044 <tal:block tal:repeat="qs request/user/queries">
2045 - <a href="#" tal:attributes="href string:${qs/klass}?${qs/url}&@dispname=${qs/name}" 2045 - <a href="#" tal:attributes="href string:${qs/klass}?${qs/url}&@dispname=${qs/name}"
2046 + <a href="#" tal:attributes="href string:${qs/klass}?${qs/url}&@dispname=${qs/name/url_quote}" 2046 + <a href="#" tal:attributes="href string:${qs/klass}?${qs/url}&@dispname=${qs/name/url_quote}"
2047 tal:content="qs/name">link</a><br> 2047 tal:content="qs/name">link</a><br>
2048 </tal:block> 2048 </tal:block>
2049 2049
2050 Find the tal:repeat line that loops over all queries. Then 2050 Find the tal:repeat line that loops over all queries. Then
2051 change the value assigned to @dispname in the href attribute from 2051 change the value assigned to @dispname in the href attribute from
2052 ${qs/name} to ${qs/name/url_quote}. Note that you should *not* change 2052 ${qs/name} to ${qs/name/url_quote}. Note that you should *not* change
2192 2192
2193 This should make defining complex permissions much easier. Consider:: 2193 This should make defining complex permissions much easier. Consider::
2194 2194
2195 def issue_private_access(db, userid, itemid, **ctx): 2195 def issue_private_access(db, userid, itemid, **ctx):
2196 if not db.issue.get(itemid, 'private'): 2196 if not db.issue.get(itemid, 'private'):
2197 # allow access to everything if not private 2197 # allow access to everything if not private
2198 return True 2198 return True
2199 2199
2200 # It is a private issue hide nosy list 2200 # It is a private issue hide nosy list
2201 # Note that the nosy property *must* be listed 2201 # Note that the nosy property *must* be listed
2202 # in permissions argument to the addPermission 2202 # in permissions argument to the addPermission
2203 # definition otherwise this check command 2203 # definition otherwise this check command
2204 # is not run. 2204 # is not run.
2205 if ctx['property'] == 'nosy': 2205 if ctx['property'] == 'nosy':
2206 return False # deny access to this property 2206 return False # deny access to this property
2207 2207
2208 # allow access for editing, viewing etc. of the class 2208 # allow access for editing, viewing etc. of the class
2209 return True 2209 return True
2210 2210
2211 2211
2212 e = db.security.addPermission(name='Edit', klass='issue', 2212 e = db.security.addPermission(name='Edit', klass='issue',
2213 check=issue_private_access, 2213 check=issue_private_access,
2214 properties=['nosy'], 2214 properties=['nosy'],
2215 description="Edit issue checks") 2215 description="Edit issue checks")
2216 2216
2217 It is suggested that you change your checks to use the ``**ctx`` 2217 It is suggested that you change your checks to use the ``**ctx``
2218 parameter. This is expected to be the preferred form in the future. 2218 parameter. This is expected to be the preferred form in the future.
2219 You do not need to use the ``ctx`` parameter in the function if you do 2219 You do not need to use the ``ctx`` parameter in the function if you do

Roundup Issue Tracker: http://roundup-tracker.org/