Changes between Version 15 and Version 16 of how-to/roundcube-upgrade
- Timestamp:
- Oct 19, 2022, 6:25:51 PM (3 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
how-to/roundcube-upgrade
v15 v16 6 6 We 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). 7 7 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.8 Both installations are maintained via git. In addition, there is a roundcube-code user that owns the code. 9 9 10 10 == Basic Setup (only needed once) == … … 18 18 git remote update 19 19 }}} 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 23 The idea is to create a new branch for us - that is based on the target version of roundcube to which we are upgrading. 24 25 In other words, if we want to upgrade to roundcube 1.4.13: 26 27 {{{ 28 0 jamie@animal:roundcube$ git checkout -b mfpl-1.4.13 1.4.13 23 29 Branch mfpl set up to track remote branch mfpl from gmo. 24 Switched to a new branch 'mfpl- 0.9'30 Switched to a new branch 'mfpl-1.4.13' 25 31 0 jamie@animal:roundcube$ 26 32 }}} … … 29 35 == Doing an upgrade == 30 36 31 We're leaning toward rebasing as a matter of common practice, and leaving a trail of signed tags: 37 Note: Firt do everything in the dev directory as the roundcube-dev user. After testing, repeat for the live site. 32 38 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/ 39 USER=roundube-dev 40 DIR=/srv/roundcube-dev 41 DATABASE=roundcube-dev 42 43 # run the gc script, so there's no need to backup old session records 44 su - $USER 45 cd $DIR 46 php ./bin/gc.sh 47 48 # backup database 49 cd /home/$USER 50 pg_dump -v -b -C DATABASE | gzip -9 > roundcube.$(date +%F).sql.gz 51 52 # fetch source (as user `roundcube-code') 53 su - roundcube-code 54 cd $DIR 55 git fetch gmo 56 git checkout TAG 57 # composer updates 58 composer 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 62 composer install --no-dev 63 # javascript dependencies 64 php bin/install-jsdeps.sh 65 lessc -x styles/styles.less > styles/styles.css 66 lessc -x styles/print.less > styles/print.css 67 lessc -x styles/embed.less > styles/embed.css 68 su - $USER 69 # database stuff (as user roundcube) 70 php ./bin/update.sh 71 php ./bin/indexcontacts.sh 72