UPGRADING.rst 4.9 KB

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