UPGRADING.rst 9.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332
  1. Upgrading Pagure
  2. ================
  3. From 2.14 to 2.15
  4. -----------------
  5. The 2.15 release brings some adjustments to the database scheme.
  6. * Update the database schame using alembic: ``alembic upgrade head``
  7. From 2.13 to 2.14
  8. -----------------
  9. The 2.14 release brings some adjustments to the database scheme.
  10. * Update the database schame using alembic: ``alembic upgrade head``
  11. From 2.12 to 2.13
  12. -----------------
  13. The 2.13 release brings some adjustments to the database scheme.
  14. * Update the database schame using alembic: ``alembic upgrade head``
  15. From 2.11 to 2.12
  16. -----------------
  17. From this release on, we will have alembic migration script for new table
  18. creation, so there will no longer be a need to use ``createdb.py``
  19. The 2.12 release brings some adjustments to the database scheme.
  20. * Update the database schame using alembic: ``alembic upgrade head``
  21. From 2.10 to 2.11
  22. -----------------
  23. The 2.10 releases brings some adjustments to the database scheme.
  24. * Create the new DB tables and the new status field using the ``createdb.py``
  25. script.
  26. * Update the database schame using alembic: ``alembic upgrade head``
  27. From 2.9 to 2.10
  28. ----------------
  29. The 2.10 releases brings some little changes to the database scheme.
  30. Therefore when upgrading to 2.10, you will have to:
  31. * Update the database schame using alembic: ``alembic upgrade head``
  32. From 2.8 to 2.9
  33. ---------------
  34. The 2.9 releases brings some adjustments to the database scheme.
  35. * Create the new DB tables and the new status field using the ``createdb.py``
  36. script.
  37. * Update the database schame using alembic: ``alembic upgrade head``
  38. If you are interested in loading your local data into the ``pagure_logs`` table
  39. that this new release adds (data which is then displayed in the calendar heatmap
  40. on the user's page), you can find two utility scripts in
  41. https://pagure.io/pagure-utility that will help you to do that. They are:
  42. * fill_logs_from_db - Based on the data present in the database, this script
  43. fills the ``pagure_logs`` table (this will add: new ticket, new comment, new
  44. PR, closing a PR or a ticket and so on).
  45. * fill_logs_from_gits - By going through all the git repo hosted in your pagure
  46. instance, it will log who did what when.
  47. From 2.7 to 2.8
  48. ---------------
  49. 2.8 brings a little change to the database scheme.
  50. Therefore when upgrading to from 2.7 to 2.8, you will have to:
  51. * Update the database schame using alembic: ``alembic upgrade head``
  52. From 2.6 to 2.7
  53. ---------------
  54. 2.7 adds new tables as well as changes some of the existing ones.
  55. Therefore when upgrading to 2.7, you will have to:
  56. * Create the new DB tables and the new status field using the ``createdb.py``
  57. script.
  58. * Update the database schame using alembic, one of the upgrade will require
  59. access to pagure's configuration file, which should thus be passed onto the
  60. command via an environment variable:
  61. ``PAGURE_CONFIG=/path/to/pagure.cf alembic upgrade head``
  62. This release also brings a new configuration key:
  63. * ``INSTANCE_NAME`` used in the welcome screen shown upon first login (only with
  64. FAS and OpenID auth) to describe the instance
  65. The API has also been upgraded to a version ``0.8`` due to the changes (backward
  66. compatible) made to support the introduction of `close_status` to issues.
  67. From 2.5 to 2.6
  68. ---------------
  69. 2.6 brings quite a few changes and some of them impacting the database scheme.
  70. Therefore when upgrading from 2.4 to 2.6, you will have to:
  71. * Update the database schame using alembic: ``alembic upgrade head``
  72. From 2.4 to 2.5
  73. ---------------
  74. 2.5 brings quite a few changes and some of them impacting the database scheme.
  75. Therefore when upgrading from 2.4 to 2.5, you will have to:
  76. * Update the database schame using alembic: ``alembic upgrade head``
  77. From 2.3 to 2.4
  78. ---------------
  79. 2.4 brings quite a few changes and some of them impacting the database scheme.
  80. Therefore when upgrading from 2.3.x to 2.4, you will have to:
  81. * Update the database schame using alembic: ``alembic upgrade head``
  82. This update also brings some new configuration keys:
  83. * ``VIRUS_SCAN_ATTACHMENTS`` allows turning on or off checking attachments for
  84. virus using clamav. This requires pyclamd but is entirely optional (and off by
  85. default)
  86. * ``PAGURE_CI_SERVICES`` allows specifying with which CI (Continuous
  87. Integration) services this pagure instance can integrate with. Currently, only
  88. `Jenkins` is supported, but this configuration key defaults to ``None``.
  89. From 2.2 to 2.3
  90. ---------------
  91. 2.3 brings a few changes impacting the database scheme, including a new
  92. `duplicate` status for tickets, a feature allowing one to `watch` or
  93. `unwatch` a project and notifications on tickets as exist on pull-requests.
  94. Therefore, when upgrading from 2.2.x to 2.3, you will have to :
  95. * Create the new DB tables and the new status field using the ``createdb.py`` script.
  96. * Update the database schame using alembic: ``alembic upgrade head``
  97. This update also brings a new configuration key:
  98. * ``PAGURE_ADMIN_USERS`` allows to mark some users as instance-wide admins, giving
  99. them full access to every projects, private or not. This feature can then be
  100. used as a way to clean spams.
  101. * ``SMTP_PORT`` allows to specify the port to use when contacting the SMTP
  102. server
  103. * ``SMTP_SSL`` allows to specify whether to use SSL when contacting the SMTP
  104. server
  105. * ``SMTP_USERNAME`` and ``SMTP_PASSWORD`` if provided together allow to contact
  106. an SMTP requiring authentication.
  107. In this update is also added the script ``api_key_expire_mail.py`` meant to be
  108. run by a daily cron job and warning users when their API token is nearing its
  109. expiration date.
  110. 2.2.2
  111. -----
  112. Release 2.2.2 contains an important security fix, blocking a source of XSS
  113. attack.
  114. From 2.1 to 2.2
  115. ---------------
  116. 2.2 brings a number of bug fixes and a few improvements.
  117. One of the major changes impacts the databases where we must change some of the
  118. table so that the foreign key cascade on delete (fixes deleting a project when a
  119. few plugins were activated).
  120. When upgrading for 2.1 to 2.2 all you will have to do is:
  121. * Update the database scheme using alembic: ``alembic upgrade head``
  122. .. note:: If you run another database system than PostgreSQL the alembic
  123. revision ``317a285e04a8_delete_hooks.py`` will require adjustment as the
  124. foreign key constraints are named and the names are driver dependant.
  125. From 2.0 to 2.1
  126. ---------------
  127. 2.1 brings its usual flow of improvements and bug fixes.
  128. When upgrading from 2.0.x to 2.1 all you will have to:
  129. * Update the database schame using alembic: ``alembic upgrade head``
  130. From 1.x to 2.0
  131. ---------------
  132. As the version change indicates, 2.0 brings quite a number of changes,
  133. including some that are not backward compatible.
  134. When upgrading to 2.0 you will have to:
  135. * Update the database schema using alembic: ``alembic upgrade head``
  136. * Create the new DB tables so that the new plugins work using the
  137. ``createdb.py`` script
  138. * Move the forks git repo
  139. Forked git repos are now located under the same folder as the regular git
  140. repos, just under a ``forks/`` subfolder.
  141. So the structure changes from: ::
  142. repos/
  143. ├── foo.git
  144. └── bar.git
  145. forks/
  146. ├── patrick/
  147. │  ├── test.git
  148. │  └── ipsilon.git
  149. └── pingou/
  150. ├── foo.git
  151. └── bar.git
  152. to: ::
  153. repos/
  154. ├── foo.git
  155. ├── bar.git
  156. └── forks/
  157. ├── patrick/
  158. │  ├── test.git
  159. │  └── ipsilon.git
  160. └── pingou/
  161. ├── foo.git
  162. └── bar.git
  163. So the entire ``forks`` folder is moved under the ``repos`` folder where
  164. the other repositories are, containing the sources of the projects.
  165. Git repos for ``tickets``, ``requests`` and ``docs`` will be trickier to
  166. move as the structure changes from: ::
  167. tickets/
  168. ├── foo.git
  169. ├── bar.git
  170. ├── patrick/
  171. │  ├── test.git
  172. │  └── ipsilon.git
  173. └── pingou/
  174. ├── foo.git
  175. └── bar.git
  176. to: ::
  177. tickets/
  178. ├── foo.git
  179. ├── bar.git
  180. └── forks/
  181. ├── patrick/
  182. │  ├── test.git
  183. │  └── ipsilon.git
  184. └── pingou/
  185. ├── foo.git
  186. └── bar.git
  187. Same for the ``requests`` and the ``docs`` git repos.
  188. As you can see in the ``tickets``, ``requests`` and ``docs`` folders there
  189. are two types of folders, git repos which are folder with a name ending
  190. with ``.git``, and folder corresponding to usernames. These last ones are
  191. the ones to be moved into a subfolder ``forks/``.
  192. This can be done using something like: ::
  193. mkdir forks
  194. for i in `ls -1 |grep -v '\.git'`; do mv $i forks/; done
  195. * Re-generate the gitolite configuration.
  196. This can be done via the ``Re-generate gitolite ACLs file`` button in the
  197. admin page.
  198. * Keep URLs backward compatible
  199. The support of pseudo-namespace in pagure 2.0 has required some changes
  200. to the URL schema:
  201. https://pagure.io/pagure/053d8cc95fcd50c23a8b0a7f70e55f8d1cc7aebb
  202. became:
  203. https://pagure.io/pagure/c/053d8cc95fcd50c23a8b0a7f70e55f8d1cc7aebb
  204. (Note the added /c/ in it)
  205. We introduced a backward compatibility fix for this.
  206. This fix is however *disabled* by default so if you wish to keep the URLs
  207. valid, you will need to adjust you configuration file to include: ::
  208. OLD_VIEW_COMMIT_ENABLED = True