UPGRADING.rst 5.0 KB

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