UPGRADING.rst 6.1 KB

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