From 24cf2b4e030422ee41840aba0ef3cd23c03e6194 Mon Sep 17 00:00:00 2001 From: Pierre-Yves Chibon Date: Apr 22 2016 13:42:03 +0000 Subject: [PATCH 1/6] Start a documentation file about upgrading pagure --- diff --git a/UPGRADING.rst b/UPGRADING.rst new file mode 100644 index 0000000..c312258 --- /dev/null +++ b/UPGRADING.rst @@ -0,0 +1,66 @@ +Upgrading Pagure +================ + +From 1.x to 2.0 +--------------- + +As the version change indicates, 2.0 brings quite a number of changes, +including some that are not backward compatible. + +When upgrading to 2.0 you will have to: + +* Update the database schema using alembic: ``alembic upgrade head`` + +* Move the forks git repo + +Forked git repos are now located under the same folder as the regular git +repos, just under a ``forks/`` subfolder. +So the structure changes from: :: + + repos/ + ├── foo.git + └── bar.git + + forks/ + ├── user/foo.git + └── user/bar.git + +to: :: + + repos/ + ├── foo.git + ├── forks/user/foo.git + ├── forks/user/bar.git + └── bar.git + +So the entire ``forks`` folder is moved under the ``repos`` folder where are +the other repositories containing the sources of the projects. + + +Git repos for ``tickets`` and ``requests`` will be trickier to move as the +structure changes from: :: + + tickets/ + ├── foo.git + ├── user/foo.git + ├── user/bar.git + └── bar.git + +to: :: + + tickets/ + ├── foo.git + ├── forks/user/foo.git + ├── forks/user/bar.git + └── bar.git + +Same for the ``requests`` git repos. + +For these, the folders are moved into a subfolder ``forks/`` while the folder +containing the git repositories (ie: folders ending with ``.git``) remains +un-touched. + +* Re-generate the gitolite configuration. + +This can be done via the ``Re-generate gitolite ACLs file`` button in the +admin page. From bc40d938a9d2723bc08f24db4cf8266649a3a09b Mon Sep 17 00:00:00 2001 From: Pierre-Yves Chibon Date: Apr 22 2016 13:42:03 +0000 Subject: [PATCH 2/6] Include the UPGRADING.rst file in the release tarball --- diff --git a/MANIFEST.in b/MANIFEST.in index d7202fa..f687a3c 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -1,4 +1,4 @@ -include LICENSE README.rst requirements.txt +include LICENSE README.rst requirements.txt UPGRADING.rst include createdb.py recursive-include pagure * recursive-include files * From 84a12a113ba4cfcb087cfe638b62113c7d3667b2 Mon Sep 17 00:00:00 2001 From: Pierre-Yves Chibon Date: Apr 22 2016 13:42:03 +0000 Subject: [PATCH 3/6] Install UPGRADING.rst as a documentation file in the spec file --- diff --git a/files/pagure.spec b/files/pagure.spec index 805b18a..58d57c6 100644 --- a/files/pagure.spec +++ b/files/pagure.spec @@ -218,7 +218,7 @@ install -m 644 webhook-server/pagure_webhook.service \ %files -%doc README.rst +%doc README.rst UPGRADING.rst %license LICENSE %config(noreplace) %{_sysconfdir}/httpd/conf.d/pagure.conf %config(noreplace) %{_sysconfdir}/pagure/pagure.cfg From b01b7806606e931b1a41f76fb39ddc2acadddfb8 Mon Sep 17 00:00:00 2001 From: Pierre-Yves Chibon Date: Apr 22 2016 13:42:03 +0000 Subject: [PATCH 4/6] Mention that there are new tables to be added to the DB in 2.0 --- diff --git a/UPGRADING.rst b/UPGRADING.rst index c312258..8e62e2a 100644 --- a/UPGRADING.rst +++ b/UPGRADING.rst @@ -11,6 +11,9 @@ When upgrading to 2.0 you will have to: * Update the database schema using alembic: ``alembic upgrade head`` +* Create the new DB tables so that the new plugins work using the + ``createdb.py`` script + * Move the forks git repo Forked git repos are now located under the same folder as the regular git From af2450d2eaef4e1b6d1ee226d03d232472603657 Mon Sep 17 00:00:00 2001 From: Pierre-Yves Chibon Date: Apr 22 2016 13:42:03 +0000 Subject: [PATCH 5/6] Adjust wording and the folder trees in the upgrading doc --- diff --git a/UPGRADING.rst b/UPGRADING.rst index 8e62e2a..1124f73 100644 --- a/UPGRADING.rst +++ b/UPGRADING.rst @@ -25,19 +25,22 @@ So the structure changes from: :: └── bar.git forks/ - ├── user/foo.git - └── user/bar.git + └── user/ + ├── foo.git + └── bar.git to: :: repos/ ├── foo.git - ├── forks/user/foo.git - ├── forks/user/bar.git - └── bar.git + ├── bar.git + └── forks + └── user + ├── foo.git + └── bar.git -So the entire ``forks`` folder is moved under the ``repos`` folder where are -the other repositories containing the sources of the projects. +So the entire ``forks`` folder is moved under the ``repos`` folder where +the other repositories are, containing the sources of the projects. Git repos for ``tickets`` and ``requests`` will be trickier to move as the @@ -45,23 +48,27 @@ structure changes from: :: tickets/ ├── foo.git - ├── user/foo.git - ├── user/bar.git - └── bar.git + ├── bar.git + └── user + ├── foo.git + └── bar.git to: :: tickets/ ├── foo.git - ├── forks/user/foo.git - ├── forks/user/bar.git - └── bar.git + ├── bar.git + └── forks + └── user + ├── foo.git + └── bar.git Same for the ``requests`` git repos. -For these, the folders are moved into a subfolder ``forks/`` while the folder -containing the git repositories (ie: folders ending with ``.git``) remains -un-touched. +As you can see in the ``tickets`` and the ``requests`` folders there are two +types of folders, git repos which are folder with a name ending with ``.git``, +and folder corresponding to usernames. These last ones are the ones to be +moved into a subfolder ``forks/``. * Re-generate the gitolite configuration. From a591b57cf3c680bf888a7cdb139d19433b3abba1 Mon Sep 17 00:00:00 2001 From: Pierre-Yves Chibon Date: Apr 22 2016 14:32:40 +0000 Subject: [PATCH 6/6] Update the tree image as per @puiterwijk's suggestions in the upgrading doc --- diff --git a/UPGRADING.rst b/UPGRADING.rst index 1124f73..143fc06 100644 --- a/UPGRADING.rst +++ b/UPGRADING.rst @@ -25,7 +25,10 @@ So the structure changes from: :: └── bar.git forks/ - └── user/ + ├── patrick/ + │  ├── test.git + │  └── ipsilon.git + └── pingou/ ├── foo.git └── bar.git @@ -34,8 +37,11 @@ to: :: repos/ ├── foo.git ├── bar.git - └── forks - └── user + └── forks/ + ├── patrick/ + │  ├── test.git + │  └── ipsilon.git + └── pingou/ ├── foo.git └── bar.git @@ -49,7 +55,10 @@ structure changes from: :: tickets/ ├── foo.git ├── bar.git - └── user + ├── patrick/ + │  ├── test.git + │  └── ipsilon.git + └── pingou/ ├── foo.git └── bar.git @@ -58,8 +67,11 @@ to: :: tickets/ ├── foo.git ├── bar.git - └── forks - └── user + └── forks/ + ├── patrick/ + │  ├── test.git + │  └── ipsilon.git + └── pingou/ ├── foo.git └── bar.git