UPGRADING.rst 7.1 KB

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