Blame UPGRADING.rst

Pierre-Yves Chibon 24cf2b
Upgrading Pagure
Pierre-Yves Chibon 24cf2b
================
Pierre-Yves Chibon 24cf2b
Pierre-Yves Chibon 24cf2b
From 1.x to 2.0
Pierre-Yves Chibon 24cf2b
---------------
Pierre-Yves Chibon 24cf2b
Pierre-Yves Chibon 24cf2b
As the version change indicates, 2.0 brings quite a number of changes,
Pierre-Yves Chibon 24cf2b
including some that are not backward compatible.
Pierre-Yves Chibon 24cf2b
Pierre-Yves Chibon 24cf2b
When upgrading to 2.0 you will have to:
Pierre-Yves Chibon 24cf2b
Pierre-Yves Chibon 24cf2b
* Update the database schema using alembic: ``alembic upgrade head``
Pierre-Yves Chibon 24cf2b
Pierre-Yves Chibon b01b78
* Create the new DB tables so that the new plugins work using the
Pierre-Yves Chibon b01b78
  ``createdb.py`` script
Pierre-Yves Chibon b01b78
Pierre-Yves Chibon 24cf2b
* Move the forks git repo
Pierre-Yves Chibon 24cf2b
Pierre-Yves Chibon 24cf2b
Forked git repos are now located under the same folder as the regular git
Pierre-Yves Chibon 24cf2b
repos, just under a ``forks/`` subfolder.
Pierre-Yves Chibon 24cf2b
So the structure changes from: ::
Pierre-Yves Chibon 24cf2b
Pierre-Yves Chibon 24cf2b
    repos/
Pierre-Yves Chibon 24cf2b
    ├── foo.git
Pierre-Yves Chibon 24cf2b
    └── bar.git
Pierre-Yves Chibon 24cf2b
Pierre-Yves Chibon 24cf2b
    forks/
Pierre-Yves Chibon a591b5
    ├── patrick/
Pierre-Yves Chibon a591b5
    │   ├── test.git
Pierre-Yves Chibon a591b5
    │   └── ipsilon.git
Pierre-Yves Chibon a591b5
    └── pingou/
Pierre-Yves Chibon af2450
        ├── foo.git
Pierre-Yves Chibon af2450
        └── bar.git
Pierre-Yves Chibon 24cf2b
Pierre-Yves Chibon 24cf2b
to: ::
Pierre-Yves Chibon 24cf2b
Pierre-Yves Chibon 24cf2b
    repos/
Pierre-Yves Chibon 24cf2b
    ├── foo.git
Pierre-Yves Chibon af2450
    ├── bar.git
Pierre-Yves Chibon a591b5
    └── forks/
Pierre-Yves Chibon a591b5
        ├── patrick/
Pierre-Yves Chibon a591b5
        │   ├── test.git
Pierre-Yves Chibon a591b5
        │   └── ipsilon.git
Pierre-Yves Chibon a591b5
        └── pingou/
Pierre-Yves Chibon af2450
            ├── foo.git
Pierre-Yves Chibon af2450
            └── bar.git
Pierre-Yves Chibon 24cf2b
Pierre-Yves Chibon af2450
So the entire ``forks`` folder is moved under the ``repos`` folder where
Pierre-Yves Chibon af2450
the other repositories are, containing the sources of the projects.
Pierre-Yves Chibon 24cf2b
Pierre-Yves Chibon 24cf2b
Pierre-Yves Chibon 6e788b
Git repos for ``tickets``, ``requests`` and ``docs`` will be trickier to
Pierre-Yves Chibon 6e788b
move as the structure changes from: ::
Pierre-Yves Chibon 24cf2b
Pierre-Yves Chibon 24cf2b
    tickets/
Pierre-Yves Chibon 24cf2b
    ├── foo.git
Pierre-Yves Chibon af2450
    ├── bar.git
Pierre-Yves Chibon a591b5
    ├── patrick/
Pierre-Yves Chibon a591b5
    │   ├── test.git
Pierre-Yves Chibon a591b5
    │   └── ipsilon.git
Pierre-Yves Chibon a591b5
    └── pingou/
Pierre-Yves Chibon af2450
        ├── foo.git
Pierre-Yves Chibon af2450
        └── bar.git
Pierre-Yves Chibon 24cf2b
Pierre-Yves Chibon 24cf2b
to: ::
Pierre-Yves Chibon 24cf2b
Pierre-Yves Chibon 24cf2b
    tickets/
Pierre-Yves Chibon 24cf2b
    ├── foo.git
Pierre-Yves Chibon af2450
    ├── bar.git
Pierre-Yves Chibon a591b5
    └── forks/
Pierre-Yves Chibon a591b5
        ├── patrick/
Pierre-Yves Chibon a591b5
        │   ├── test.git
Pierre-Yves Chibon a591b5
        │   └── ipsilon.git
Pierre-Yves Chibon a591b5
        └── pingou/
Pierre-Yves Chibon af2450
            ├── foo.git
Pierre-Yves Chibon af2450
            └── bar.git
Pierre-Yves Chibon 24cf2b
Pierre-Yves Chibon 6e788b
Same for the ``requests`` and the ``docs`` git repos.
Pierre-Yves Chibon 24cf2b
Pierre-Yves Chibon 6e788b
As you can see in the ``tickets``, ``requests`` and ``docs`` folders there
Pierre-Yves Chibon 6e788b
are two types of folders, git repos which are folder with a name ending
Pierre-Yves Chibon 6e788b
with ``.git``, and folder corresponding to usernames. These last ones are
Pierre-Yves Chibon 6e788b
the ones to be moved into a subfolder ``forks/``.
Pierre-Yves Chibon 6e788b
Pierre-Yves Chibon 6e788b
This can be done using something like: ::
Pierre-Yves Chibon 6e788b
Pierre-Yves Chibon 6e788b
    mkdir forks
Pierre-Yves Chibon 6e788b
    for i in `ls -1 |grep -v '\.git'`; do mv $i forks/; done
Pierre-Yves Chibon 24cf2b
Pierre-Yves Chibon 24cf2b
* Re-generate the gitolite configuration.
Pierre-Yves Chibon 24cf2b
Pierre-Yves Chibon 24cf2b
This can be done via the ``Re-generate gitolite ACLs file`` button in the
Pierre-Yves Chibon 24cf2b
admin page.
Pierre-Yves Chibon 226c9a
Pierre-Yves Chibon 226c9a
* Keep URLs backward compatible
Pierre-Yves Chibon 226c9a
Pierre-Yves Chibon 6e59c1
The support of pseudo-namespace in pagure 2.0 has required some changes
Pierre-Yves Chibon 226c9a
to the URL schema:
Pierre-Yves Chibon 226c9a
https://pagure.io/pagure/053d8cc95fcd50c23a8b0a7f70e55f8d1cc7aebb
Pierre-Yves Chibon 226c9a
became:
Pierre-Yves Chibon 226c9a
https://pagure.io/pagure/c/053d8cc95fcd50c23a8b0a7f70e55f8d1cc7aebb
Pierre-Yves Chibon 226c9a
(Note the added /c/ in it)
Pierre-Yves Chibon 226c9a
Pierre-Yves Chibon 226c9a
We introduced a backward compatibility fix for this.
Pierre-Yves Chibon 226c9a
Pierre-Yves Chibon 226c9a
This fix is however *disabled* by default so if you wish to keep the URLs
Pierre-Yves Chibon 226c9a
valid, you will need to adjust you configuration file to include: ::
Pierre-Yves Chibon 226c9a
Pierre-Yves Chibon 226c9a
    OLD_VIEW_COMMIT_ENABLED = True