[[PageOutline]] = How to Upgrade Roundcube = Roundcube is being maintained via git on `stallman.mayfirst.org` in the /srv directory. 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). Both installations are maintained via git. In addition, there is a roundcube-code user that owns the code. == Basic Setup (only needed once) == * Create a roundcube directory on your local machine, initialize git and set your various remotes: {{{ git clone https://github.com/roundcube/roundcubemail roundcube cd roundcube git remote add gmo git://git.mayfirst.org/mfpl/roundcube git config remote.gmo.pushurl ssh://gitolite3@git.mayfirst.org/mfpl/roundcube git remote update }}} == Create a target branch for the upgrade The idea is to create a new branch for us - that is based on the target version of roundcube to which we are upgrading. In other words, if we want to upgrade to roundcube 1.4.13: {{{ 0 jamie@animal:roundcube$ git checkout -b mfpl-1.4.13 1.4.13 Branch mfpl set up to track remote branch mfpl from gmo. Switched to a new branch 'mfpl-1.4.13' 0 jamie@animal:roundcube$ }}} == Doing an upgrade == Note: Firt do everything in the dev directory as the roundcube-dev user. After testing, repeat for the live site. USER=roundube-dev DIR=/srv/roundcube-dev DATABASE=roundcube-dev # run the gc script, so there's no need to backup old session records su - $USER cd $DIR php ./bin/gc.sh # backup database cd /home/$USER pg_dump -v -b -C DATABASE | gzip -9 > roundcube.$(date +%F).sql.gz # fetch source (as user `roundcube-code') su - roundcube-code cd $DIR git fetch gmo git checkout TAG # composer updates composer update --no-dev # if you get a giant error... # rm vendor/composer/installed.json # See https://craftcms.stackexchange.com/questions/36551/unknown-package-has-no-name-defined-composer-error-on-upgrade composer install --no-dev # javascript dependencies php bin/install-jsdeps.sh lessc -x styles/styles.less > styles/styles.css lessc -x styles/print.less > styles/print.css lessc -x styles/embed.less > styles/embed.css su - $USER # database stuff (as user roundcube) php ./bin/update.sh php ./bin/indexcontacts.sh