UPGRADING.rst 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869
  1. Upgrading Pagure
  2. ================
  3. From 5.12 to 5.13
  4. -----------------
  5. The 5.13 release does not contain any database schema changes.
  6. From 5.12 to 5.12.1
  7. -------------------
  8. The 5.12.1 release contains a database schema updates, so:
  9. * Update the data schema using alembic: ``alembic upgrade head``
  10. (As usual, do your backups before).
  11. From 5.11 to 5.12
  12. -----------------
  13. The 5.12 release does not contain any database schema changes.
  14. New configuration key added (in 5.12):
  15. * NOGITHOOKS (must not be touched)
  16. * ALLOW_USER_REGISTRATION
  17. * GIT_DEFAULT_BRANCH
  18. From 5.10 to 5.11
  19. -----------------
  20. The 5.11 release contains a database schema updates, so:
  21. * Update the data schema using alembic: ``alembic upgrade head``
  22. (As usual, do your backups before).
  23. New configuration key added (in 5.11.2):
  24. * LOGGING_GIT_HOOKS
  25. .. warning:: When upgrading MySQL database you can encounter issue with
  26. incompatible columns. In this case try to check the collation of the
  27. mentioned column by ``show full columns from <table>;`` in ``mysql``.
  28. If the collation is something else then `utf8` you need to convert
  29. your database to `utf8` first. See
  30. `this guide <https://stackoverflow.com/questions/1294117/how-to-change-collation-of-database-table-column>`_
  31. for how to do it or if you have SQL script for db setup,
  32. you can change it directly in the script.
  33. From 5.9 to 5.10
  34. ----------------
  35. The 5.10 release does not contain any database schema changes.
  36. The 5.10 release does include a new API ACL, so you may still want to re-run the
  37. createdb script which populates the database with the ACL set in the
  38. configuration file.
  39. New environment variable and configuration key added:
  40. * PAGURE_PLUGIN_CONFIG
  41. Deprecated environment variable:
  42. * PAGURE_PLUGIN
  43. From 5.8 to 5.9
  44. ---------------
  45. The 5.9 release does not contain any database schema changes.
  46. New configuration key added:
  47. * SSH_ACCESS_GROUPS
  48. * ALLOW_API_UPDATE_GIT_TAGS
  49. From 5.7 to 5.8
  50. ---------------
  51. The 5.8 release does not contain any database schema changes nor changes in the
  52. configuration keys.
  53. From 5.6 to 5.7
  54. ---------------
  55. The 5.7 release does not contain any database schema changes nor changes in the
  56. configuration keys.
  57. From 5.5 to 5.6
  58. ---------------
  59. The 5.6 release contains a database schema updates, so:
  60. * Update the data schema using alembic: ``alembic upgrade head``
  61. (As usual, do your backups before).
  62. New configuration key added:
  63. * CSP_HEADERS
  64. From 5.4 to 5.5
  65. ---------------
  66. The 5.5 release contains a database schema updates, so:
  67. * Update the data schema using alembic: ``alembic upgrade head``
  68. New configuration key added:
  69. * GIT_HOOK_DB_RO
  70. From 5.3.x to 5.4
  71. -----------------
  72. The 5.4 release does not contain any database schema changes, nor any new
  73. configuration key.
  74. From 5.2 to 5.3
  75. ---------------
  76. The 5.3 release contains a database schema updates, so:
  77. * Update the data schema using alembic: ``alembic upgrade head``
  78. (As usual, do your backups before).
  79. While working on pagure 5.3, we found that the version of python werkzeug
  80. available in CentOS 7 is too old and makes some of pagure's tests fail. We
  81. recomment it to be upgrade to at least 0.9.6.
  82. New configuration keys have been added:
  83. * ENABLE_TICKETS_NAMESPACE
  84. * FEDORA_MESSAGING_NOTIFICATIONS
  85. * SYNTAX_ALIAS_OVERRIDES
  86. * ALWAYS_STOMP_ON_COMMITS
  87. * ALWAYS_MQTT_ON_COMMITS
  88. * MQTT_TOPIC_PREFIX
  89. From 5.1.x to 5.2
  90. -----------------
  91. The 5.2 release contains a database schema updates, so:
  92. * Update the data schema using alembic: ``alembic upgrade head``
  93. (As usual, do your backups before).
  94. If you run into issues with the ``hook_mirror``, see the upgrade notes for
  95. the release 5.1.4 below.
  96. Note that the minimal version of pygit2 has been bumped to: 0.26.0
  97. New configuration keys have been added:
  98. * MQTT_NOTIFICATIONS
  99. * MQTT_HOST
  100. * MQTT_PORT
  101. * MQTT_USERNAME
  102. * MQTT_PASSWORD
  103. * MQTT_CA_CERTS
  104. * MQTT_CERTFILE
  105. * MQTT_KEYFILE
  106. * MQTT_CERT_REQS
  107. * MQTT_TLS_VERSION
  108. * MQTT_CIPHERS
  109. * DISABLE_MIRROR_IN
  110. * SSH_ADMIN_TOKEN
  111. * GIT_GARBAGE_COLLECT
  112. * DISABLE_REMOTE_PR
  113. * ADMIN_EMAIL
  114. * LOG_ALL_COMMITS
  115. * ARCHIVE_FOLDER
  116. One configuration key changes its default structure:
  117. * TRIGGER_CI
  118. Changes in dependencies:
  119. * Mimimal version of pygit2 version bumped to: 0.26.0
  120. * Minimal version of openssh set to: 7.4
  121. From 5.1 to 5.1.4
  122. -----------------
  123. In the development of 5.1.4 it was found out that the alembic migration
  124. ``ba538b2648b7`` that creates the ``hook_mirror`` table was incomplete.
  125. If you created that table via alembic, you will likely want to re-run it. Beware
  126. that applying the following commands will destroy any data you have in this
  127. table.
  128. * Mark the database to this migration::
  129. alembic stamp ba538b2648b7
  130. * Remove the ``hook_mirror`` table so it can be re-generated::
  131. alembic downgrade -1
  132. * Re-run that single migration::
  133. alembic upgrade +1
  134. * Marking the database to the last current migration (as of 5.1.4)::
  135. alembic stamp f16ab75e4d32
  136. Again, any project that tried to setup the mirroring feature in pagure will need
  137. to be reconfigured.
  138. Another option (that will prevent loosing any data in this table) is to
  139. adjust the table manually using these SQL queries:
  140. ::
  141. ALTER TABLE hook_mirror ADD COLUMN 'public_key' TEXT;
  142. ALTER TABLE hook_mirror ADD COLUMN 'target' TEXT;
  143. ALTER TABLE hook_mirror ADD COLUMN 'last_log' TEXT;
  144. From 5.x to 5.1
  145. ---------------
  146. The 5.1 release contains a database schema updates, so:
  147. * Update the data schema using alembic: ``alembic upgrade head``
  148. (As usual, do your backups before).
  149. New configuration keys added:
  150. * ALLOW_ADMIN_IGNORE_EXISTING_REPOS
  151. * ALLOW_HTTP_PULL_PUSH
  152. * ALLOW_HTTP_PUSH
  153. * HTTP_REPO_ACCESS_GITOLITE
  154. From 5.0 to 5.0.1
  155. -----------------
  156. The 5.0 release was missing a database schema migration to add the
  157. ``hook_mirror`` table. This alembic migration has been added, so if you have
  158. note update to 5.0, you will want to update your database schema using:
  159. ``alembic upgrade head``. If you went around this issue by running the
  160. ``pagure_createdb.py`` script, you can mark you database schema up to date using
  161. ``alembic stamp ba538b2648b7``.
  162. From 4.x to 5.0
  163. ---------------
  164. The release 5.0 brings some changes to the database schema.
  165. * Update the data schema using alembic: ``alembic upgrade head``
  166. New configuration keys added:
  167. * PR_TARGET_MATCHING_BRANCH
  168. * EMAIL_ON_WATCHCOMMITS
  169. * THEME
  170. * GIT_AUTH_BACKEND (replacing GITOLITE_BACKEND, backward compatibility kept for
  171. now)
  172. * REPOSPANNER_PSEUDO_FOLDER
  173. * REPOSPANNER_NEW_REPO
  174. * REPOSPANNER_NEW_REPO_ADMIN_OVERRIDE
  175. * REPOSPANNER_NEW_FORK
  176. * REPOSPANNER_ADMIN_MIGRATION
  177. * REPOSPANNER_REGIONS
  178. * SSH_KEYS_USERNAME_LOOKUP
  179. * SSH_KEYS_USERNAME_EXPECT
  180. * SSH_KEYS_OPTIONS
  181. Configuration deprecated:
  182. * BOOTSTRAP_URLS_CSS
  183. * BOOTSTRAP_URLS_JS
  184. * FILE_SIZE_HIGHLIGHT
  185. * HTML_TITLE
  186. * GITOLITE_BACKEND
  187. Note: Some configuration keys changed their default value:
  188. * LOGGING
  189. * PRIVATE_PROJECTS
  190. * EMAIL_ERROR
  191. * FROM_EMAIL
  192. * DOMAIN_EMAIL_NOTIFICATIONS
  193. * APP_URL
  194. * DOC_APP_URL
  195. * GIT_URL_SSH
  196. * GIT_URL_GIT
  197. * FEDMSG_NOTIFICATIONS
  198. * PAGURE_AUTH
  199. New dependencies:
  200. * trololio (replaces trollius that is no longer a direct dependency)
  201. From 3.x to 4.0
  202. ---------------
  203. The release 4.0 brings some changes to the database schema.
  204. * Update the data schema using alembic: ``alembic upgrade head``
  205. New configuration keys added:
  206. * EMAIL_ON_WATCHCOMMITS
  207. * ALWAYS_FEDMSG_ON_COMMITS
  208. * SESSION_TYPE
  209. * PROJECT_TEMPLATE_PATH
  210. * FORK_TEMPLATE_PATH
  211. From 3.13 to 3.13.1
  212. -------------------
  213. The release 3.13.1 brings one change to the database schema to remove a database
  214. constraint (pull_requests_check in the pull_requests table) that is not only no
  215. longer needed but even blocking now.
  216. * Update the data schema using alembic: ``alembic upgrade head``
  217. From 3.12 to 3.13
  218. -----------------
  219. The release 3.13 brings some features and bug fixes but does not have any
  220. changes made to the database schema or new configuration keys. Update should be
  221. straight forward.
  222. From 3.11 to 3.12
  223. -----------------
  224. The release 3.12 brings some changes to the database schema.
  225. * Update the data schema using alembic: ``alembic upgrade head``
  226. Note that this release bring support for `OpenID
  227. Connect<https://en.wikipedia.org/wiki/OpenID_Connect>`_ authentication, meaning
  228. pagure can now be deployed with authentication coming from, for example, google.
  229. This brings a number of new configuration keys:
  230. * OIDC_CLIENT_SECRETS
  231. * OIDC_ID_TOKEN_COOKIE_SECURE
  232. * OIDC_SCOPES
  233. * OIDC_PAGURE_EMAIL
  234. * OIDC_PAGURE_FULLNAME
  235. * OIDC_PAGURE_USERNAME
  236. * OIDC_PAGURE_SSH_KEY
  237. * OIDC_PAGURE_GROUPS
  238. * OIDC_PAGURE_USERNAME_FALLBACK
  239. From 3.10 to 3.11
  240. -----------------
  241. The release 3.11 brings some changes to the database schema.
  242. * Update the data schema using alembic: ``alembic upgrade head``
  243. In addition, if you are deploying pagure with fedmsg support you had to set
  244. fedmsg to the
  245. `active <https://fedmsg.readthedocs.io/en/stable/publishing/#publishing-through-a-relay>`_
  246. mode for the workers to be able to send fedmsg messages. This is now the
  247. default and forced configuration.
  248. New API acls:
  249. * commit_flag
  250. * pull_request_subscribe
  251. From 3.9 to 3.10
  252. ----------------
  253. The release 3.10 brings some changes to the database schema.
  254. * Update the data schema using alembic: ``alembic upgrade head``
  255. From 3.8 to 3.9
  256. ---------------
  257. This release brings a number of bug fixes and features but does not require
  258. any special precaution when upgrading.
  259. From 3.7 to 3.8
  260. ---------------
  261. The release 3.8 brings some changes to the database schema.
  262. * Update the data schema using alembic: ``alembic upgrade head``
  263. New configuration keys added:
  264. * PROJECT_NAME_REGEX
  265. From 3.6 to 3.7
  266. ---------------
  267. The release 3.7 brings some changes to the database schema.
  268. * Update the data schema using alembic: ``alembic upgrade head``
  269. New configuration keys added:
  270. * ENABLE_DEL_FORKS
  271. * ENABLE_UI_NEW_PROJECTS
  272. From 3.5 to 3.6
  273. ---------------
  274. New configuration keys added:
  275. * GITOLITE_CELERY_QUEUE
  276. From 3.4 to 3.5
  277. ---------------
  278. New configuration keys added:
  279. * USER_ACLS
  280. * CASE_SENSITIVE
  281. * HTML_TITLE
  282. From 3.3 to 3.4
  283. ---------------
  284. New configuration keys added:
  285. * DEPLOY_KEY
  286. * LOCAL_SSH_KEY
  287. * ALLOW_DELETE_BRANCH
  288. From 3.2 to 3.3
  289. ---------------
  290. [SECURITY FIX]: The 3.3 release contains an important security fix.
  291. If you are using the private project feature of pagure, the gitolite
  292. configuration generated was still granting access to the private projects. This
  293. made the private projects visible and accessible.
  294. After updating to 3.3, ensure your gitolite configuration gets re-generated
  295. (pagure-admin refresh-gitolite can help you with this).
  296. The 3.3 release brings some adjustments to the database schema.
  297. * Update the database schema using alembic: ``alembic upgrade head``
  298. From 3.1 to 3.2
  299. ---------------
  300. While not being a bug fix, this release has no database schema changes.
  301. However, this release breaks the plugin interface for auth introduced in 3.1 and
  302. changed in 3.1. If you are using pagure-dist-git, make sure to upgrade to at
  303. least 0.4. This interface will be considered stable in 3.4 and announced as
  304. such.
  305. From 3.0 to 3.1
  306. ---------------
  307. While not being a bug fix, this release has no database schema changes.
  308. However, this release breaks the plugin interface for auth introduced in 3.0. If
  309. you are using pagure-dist-git, make sure to upgrade to at least 0.3.
  310. From 2.15 to 3.0
  311. ----------------
  312. The 3.0 version was released with some major re-architecturing. The interaction
  313. with the backend git repo (being the main source repo or the tickets or requests
  314. repos) are now done by a worker that is triggered via a message queue.
  315. This communication is done using `celery <http://www.celeryproject.org/>`_ and
  316. via one of the message queue celery supports (pagure currently defaulting to
  317. `redis <https://redis.io/>`_.
  318. So to get pagure 3.0 running, you will need to get your own message queue (such
  319. as redis) up running and configured in pagure's configuration.
  320. This major version bump has also been an opportunity to rename all the services
  321. to use the same naming schema of pagure-<service>.
  322. The rename is as such:
  323. +------------------+-----------------+
  324. | In 2.x | From 3.0 |
  325. +==================+=================+
  326. | pagure-ci | pagure-ci |
  327. +------------------+-----------------+
  328. | ev-server | pagure-ev |
  329. +------------------+-----------------+
  330. | pagure-loadjson | pagure-loadjson |
  331. +------------------+-----------------+
  332. | pagure-logcom | pagure-logcom |
  333. +------------------+-----------------+
  334. | milters | pagure-milters |
  335. +------------------+-----------------+
  336. | webhook-server | pagure-webhook |
  337. +------------------+-----------------+
  338. | | pagure-worker |
  339. +------------------+-----------------+
  340. .. note:: This last service is the service mentioned above and it is part of
  341. pagure core, not optional unlike the other services in this table.
  342. This release also introduces some new configuration keys:
  343. - ``CELERY_CONFIG`` defaults to ``{}``
  344. - ``ATTACHMENTS_FOLDER``, to be configured
  345. - ``GITOLITE_BACKEND`` defaults to ``gitolite3``, deprecates ``GITOLITE_VERSION``
  346. - ``EXTERNAL_COMMITTER`` defaults to ``{}``
  347. - ``REQUIRED_GROUPS`` defaults to ``{}``
  348. This version also introduces a few database changes, so you will need to update
  349. the database schema using alembic: ``alembic upgrade head``.
  350. From 2.14 to 2.15
  351. -----------------
  352. The 2.15 release brings some adjustments to the database scheme.
  353. * Update the database schame using alembic: ``alembic upgrade head``
  354. From 2.13 to 2.14
  355. -----------------
  356. The 2.14 release brings some adjustments to the database scheme.
  357. * Update the database schame using alembic: ``alembic upgrade head``
  358. From 2.12 to 2.13
  359. -----------------
  360. The 2.13 release brings some adjustments to the database scheme.
  361. * Update the database schame using alembic: ``alembic upgrade head``
  362. From 2.11 to 2.12
  363. -----------------
  364. From this release on, we will have alembic migration script for new table
  365. creation, so there will no longer be a need to use ``createdb.py``
  366. The 2.12 release brings some adjustments to the database scheme.
  367. * Update the database schame using alembic: ``alembic upgrade head``
  368. From 2.10 to 2.11
  369. -----------------
  370. The 2.10 releases brings some adjustments to the database scheme.
  371. * Create the new DB tables and the new status field using the ``createdb.py``
  372. script.
  373. * Update the database schame using alembic: ``alembic upgrade head``
  374. From 2.9 to 2.10
  375. ----------------
  376. The 2.10 releases brings some little changes to the database scheme.
  377. Therefore when upgrading to 2.10, you will have to:
  378. * Update the database schame using alembic: ``alembic upgrade head``
  379. From 2.8 to 2.9
  380. ---------------
  381. The 2.9 releases brings some adjustments to the database scheme.
  382. * Create the new DB tables and the new status field using the ``createdb.py``
  383. script.
  384. * Update the database schame using alembic: ``alembic upgrade head``
  385. If you are interested in loading your local data into the ``pagure_logs`` table
  386. that this new release adds (data which is then displayed in the calendar heatmap
  387. on the user's page), you can find two utility scripts in
  388. https://pagure.io/pagure-utility that will help you to do that. They are:
  389. * fill_logs_from_db - Based on the data present in the database, this script
  390. fills the ``pagure_logs`` table (this will add: new ticket, new comment, new
  391. PR, closing a PR or a ticket and so on).
  392. * fill_logs_from_gits - By going through all the git repo hosted in your pagure
  393. instance, it will log who did what when.
  394. From 2.7 to 2.8
  395. ---------------
  396. 2.8 brings a little change to the database scheme.
  397. Therefore when upgrading to from 2.7 to 2.8, you will have to:
  398. * Update the database schame using alembic: ``alembic upgrade head``
  399. From 2.6 to 2.7
  400. ---------------
  401. 2.7 adds new tables as well as changes some of the existing ones.
  402. Therefore when upgrading to 2.7, you will have to:
  403. * Create the new DB tables and the new status field using the ``createdb.py``
  404. script.
  405. * Update the database schame using alembic, one of the upgrade will require
  406. access to pagure's configuration file, which should thus be passed onto the
  407. command via an environment variable:
  408. ``PAGURE_CONFIG=/path/to/pagure.cf alembic upgrade head``
  409. This release also brings a new configuration key:
  410. * ``INSTANCE_NAME`` used in the welcome screen shown upon first login (only with
  411. FAS and OpenID auth) to describe the instance
  412. The API has also been upgraded to a version ``0.8`` due to the changes (backward
  413. compatible) made to support the introduction of `close_status` to issues.
  414. From 2.5 to 2.6
  415. ---------------
  416. 2.6 brings quite a few changes and some of them impacting the database scheme.
  417. Therefore when upgrading from 2.4 to 2.6, you will have to:
  418. * Update the database schame using alembic: ``alembic upgrade head``
  419. From 2.4 to 2.5
  420. ---------------
  421. 2.5 brings quite a few changes and some of them impacting the database scheme.
  422. Therefore when upgrading from 2.4 to 2.5, you will have to:
  423. * Update the database schame using alembic: ``alembic upgrade head``
  424. From 2.3 to 2.4
  425. ---------------
  426. 2.4 brings quite a few changes and some of them impacting the database scheme.
  427. Therefore when upgrading from 2.3.x to 2.4, you will have to:
  428. * Update the database schame using alembic: ``alembic upgrade head``
  429. This update also brings some new configuration keys:
  430. * ``VIRUS_SCAN_ATTACHMENTS`` allows turning on or off checking attachments for
  431. virus using clamav. This requires pyclamd but is entirely optional (and off by
  432. default)
  433. * ``PAGURE_CI_SERVICES`` allows specifying with which CI (Continuous
  434. Integration) services this pagure instance can integrate with. Currently, only
  435. `Jenkins` is supported, but this configuration key defaults to ``None``.
  436. From 2.2 to 2.3
  437. ---------------
  438. 2.3 brings a few changes impacting the database scheme, including a new
  439. `duplicate` status for tickets, a feature allowing one to `watch` or
  440. `unwatch` a project and notifications on tickets as exist on pull-requests.
  441. Therefore, when upgrading from 2.2.x to 2.3, you will have to :
  442. * Create the new DB tables and the new status field using the ``createdb.py`` script.
  443. * Update the database schame using alembic: ``alembic upgrade head``
  444. This update also brings a new configuration key:
  445. * ``PAGURE_ADMIN_USERS`` allows to mark some users as instance-wide admins, giving
  446. them full access to every projects, private or not. This feature can then be
  447. used as a way to clean spams.
  448. * ``SMTP_PORT`` allows to specify the port to use when contacting the SMTP
  449. server
  450. * ``SMTP_SSL`` allows to specify whether to use SSL when contacting the SMTP
  451. server
  452. * ``SMTP_USERNAME`` and ``SMTP_PASSWORD`` if provided together allow to contact
  453. an SMTP requiring authentication.
  454. In this update is also added the script ``api_key_expire_mail.py`` meant to be
  455. run by a daily cron job and warning users when their API token is nearing its
  456. expiration date.
  457. 2.2.2
  458. -----
  459. Release 2.2.2 contains an important security fix, blocking a source of XSS
  460. attack.
  461. From 2.1 to 2.2
  462. ---------------
  463. 2.2 brings a number of bug fixes and a few improvements.
  464. One of the major changes impacts the databases where we must change some of the
  465. table so that the foreign key cascade on delete (fixes deleting a project when a
  466. few plugins were activated).
  467. When upgrading for 2.1 to 2.2 all you will have to do is:
  468. * Update the database scheme using alembic: ``alembic upgrade head``
  469. .. note:: If you run another database system than PostgreSQL the alembic
  470. revision ``317a285e04a8_delete_hooks.py`` will require adjustment as the
  471. foreign key constraints are named and the names are driver dependant.
  472. From 2.0 to 2.1
  473. ---------------
  474. 2.1 brings its usual flow of improvements and bug fixes.
  475. When upgrading from 2.0.x to 2.1 all you will have to:
  476. * Update the database schame using alembic: ``alembic upgrade head``
  477. From 1.x to 2.0
  478. ---------------
  479. As the version change indicates, 2.0 brings quite a number of changes,
  480. including some that are not backward compatible.
  481. When upgrading to 2.0 you will have to:
  482. * Update the database schema using alembic: ``alembic upgrade head``
  483. * Create the new DB tables so that the new plugins work using the
  484. ``createdb.py`` script
  485. * Move the forks git repo
  486. Forked git repos are now located under the same folder as the regular git
  487. repos, just under a ``forks/`` subfolder.
  488. So the structure changes from: ::
  489. repos/
  490. ├── foo.git
  491. └── bar.git
  492. forks/
  493. ├── patrick/
  494. │  ├── test.git
  495. │  └── ipsilon.git
  496. └── pingou/
  497. ├── foo.git
  498. └── bar.git
  499. to: ::
  500. repos/
  501. ├── foo.git
  502. ├── bar.git
  503. └── forks/
  504. ├── patrick/
  505. │  ├── test.git
  506. │  └── ipsilon.git
  507. └── pingou/
  508. ├── foo.git
  509. └── bar.git
  510. So the entire ``forks`` folder is moved under the ``repos`` folder where
  511. the other repositories are, containing the sources of the projects.
  512. Git repos for ``tickets``, ``requests`` and ``docs`` will be trickier to
  513. move as the structure changes from: ::
  514. tickets/
  515. ├── foo.git
  516. ├── bar.git
  517. ├── patrick/
  518. │  ├── test.git
  519. │  └── ipsilon.git
  520. └── pingou/
  521. ├── foo.git
  522. └── bar.git
  523. to: ::
  524. tickets/
  525. ├── foo.git
  526. ├── bar.git
  527. └── forks/
  528. ├── patrick/
  529. │  ├── test.git
  530. │  └── ipsilon.git
  531. └── pingou/
  532. ├── foo.git
  533. └── bar.git
  534. Same for the ``requests`` and the ``docs`` git repos.
  535. As you can see in the ``tickets``, ``requests`` and ``docs`` folders there
  536. are two types of folders, git repos which are folder with a name ending
  537. with ``.git``, and folder corresponding to usernames. These last ones are
  538. the ones to be moved into a subfolder ``forks/``.
  539. This can be done using something like: ::
  540. mkdir forks
  541. for i in `ls -1 |grep -v '\.git'`; do mv $i forks/; done
  542. * Re-generate the gitolite configuration.
  543. This can be done via the ``Re-generate gitolite ACLs file`` button in the
  544. admin page.
  545. * Keep URLs backward compatible
  546. The support of pseudo-namespace in pagure 2.0 has required some changes
  547. to the URL schema:
  548. https://pagure.io/pagure/053d8cc95fcd50c23a8b0a7f70e55f8d1cc7aebb
  549. became:
  550. https://pagure.io/pagure/c/053d8cc95fcd50c23a8b0a7f70e55f8d1cc7aebb
  551. (Note the added /c/ in it)
  552. We introduced a backward compatibility fix for this.
  553. This fix is however *disabled* by default so if you wish to keep the URLs
  554. valid, you will need to adjust you configuration file to include: ::
  555. OLD_VIEW_COMMIT_ENABLED = True