Changes between Version 15 and Version 16 of how-to/roundcube-upgrade


Ignore:
Timestamp:
Oct 19, 2022, 6:25:51 PM (3 years ago)
Author:
Jamie McClelland
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • how-to/roundcube-upgrade

    v15 v16  
    66We have both a dev/testing site (`/srv/roundcube-dev`, accessible via https://roundcube.dev.mayfirst.org) and the live site (`/srv/roundcube`, accessible via https://roundcube.mayfirst.org).
    77
    8 Both installations are maintained via git. In addition, there is a roundcube-code user that owns the code. Be sure to add your OpenPGP user id to `/home/roundcube-code/.monkeysphere/authorized_user_ids` and run (as root): `monkeysphere-authentication update-users roundcube-code` then login as the `roundcube-code@stallman.mayfirst.org` when making all changes.
     8Both installations are maintained via git. In addition, there is a roundcube-code user that owns the code.
    99
    1010== Basic Setup (only needed once) ==
     
    1818git remote update
    1919}}}
    20  * Now, checkout (and create a branch) for the mfpl branch of the gmo remote.
    21    {{{
    22 0 jamie@animal:roundcube$ git checkout -b mfpl-0.9 gmo/mfpl-0.9
     20
     21== Create a target branch for the upgrade
     22
     23The idea is to create a new branch for us - that is based on the target version of roundcube to which we are upgrading.
     24
     25In other words, if we want to upgrade to roundcube 1.4.13:
     26
     27{{{
     280 jamie@animal:roundcube$ git checkout -b mfpl-1.4.13 1.4.13
    2329Branch mfpl set up to track remote branch mfpl from gmo.
    24 Switched to a new branch 'mfpl-0.9'
     30Switched to a new branch 'mfpl-1.4.13'
    25310 jamie@animal:roundcube$
    2632}}}
     
    2935== Doing an upgrade ==
    3036
    31 We're leaning toward rebasing as a matter of common practice, and leaving a trail of signed tags:
     37Note: Firt do everything in the dev directory as the roundcube-dev user. After testing, repeat for the live site.
    3238
    33  * start by rebasing, inspecting, verifying, signing a tag, and then pushing to `git.mayfirst.org`:
    34    {{{
    35 git rebase 0.9.5
    36 # examine the changelog and the git history; make sure things look sane.
    37 git tag -s -m 'Tagging roundcube with MF/PL changes version 0.9.5' roundcube-0.9.5-mfpl1
    38 git push gmo --tags
    39 git push -f gmo
    40 }}}
    41  * Now, as `roundcube-code@stallman.mayfirst.org`, verify the tag and check it out if it looks reasonable:
    42    {{{
    43 cd /srv/roundcube-dev
    44 git remote update
    45 git tag -v roundcube-0.9.5-mfpl1
    46 git checkout roundcube-0.9.5-mfpl1
    47 }}}
    48  * Test via: https://roundcube.dev.mayfirst.org/
    49  * If all works fine, pull into the live server via `roundcube-code@stallman.mayfirst.org`:
    50    {{{
    51 cd /srv/roundcube
    52 git remote update
    53 git tag -v roundcube-0.9.5-mfpl1
    54 git checkout roundcube-0.9.5-mfpl1
    55 }}}
    56  * and test it one last time at https://roundcube.mayfirst.org/
     39USER=roundube-dev
     40DIR=/srv/roundcube-dev
     41DATABASE=roundcube-dev
     42
     43# run the gc script, so there's no need to backup old session records
     44su - $USER
     45cd $DIR
     46php ./bin/gc.sh
     47
     48# backup database
     49cd /home/$USER
     50pg_dump -v -b -C DATABASE | gzip -9 > roundcube.$(date +%F).sql.gz
     51
     52# fetch source (as user `roundcube-code')
     53su - roundcube-code
     54cd $DIR
     55git fetch gmo
     56git checkout TAG
     57# composer updates
     58composer update --no-dev
     59# if you get a giant error...
     60# rm vendor/composer/installed.json
     61# See https://craftcms.stackexchange.com/questions/36551/unknown-package-has-no-name-defined-composer-error-on-upgrade
     62composer install --no-dev
     63# javascript dependencies
     64php bin/install-jsdeps.sh
     65lessc -x styles/styles.less > styles/styles.css
     66lessc -x styles/print.less > styles/print.css
     67lessc -x styles/embed.less > styles/embed.css
     68su - $USER
     69# database stuff (as user roundcube)
     70php ./bin/update.sh
     71php ./bin/indexcontacts.sh
     72