[[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: First do everything in the dev directory as the roundcube-dev user. After testing, repeat for the live site using the roundcube user. === As roundcube (or roundcube-dev) {{{ # su - roundcube-dev su - roundcube # run the gc script, so there's no need to backup old session records # cd /srv/roundcube-dev cd /srv/roundcube-dev php ./bin/gc.sh # backup database into home directory cd ~/ # pg_dump -v -b -C roundcube-dev | gzip -9 > roundcube.$(date +%F).sql.gz pg_dump -v -b -C roundcube | gzip -9 > roundcube.$(date +%F).sql.gz }}} === As roundcube-code {{{ su - roundcube-code # cd /srv/roundcube-dev cd /srv/roundcube git fetch gmo git checkout # composer updates cp composer.json-dist composer.json 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 cd skins/elastic lessc -x styles/styles.less > styles/styles.css lessc -x styles/print.less > styles/print.css lessc -x styles/embed.less > styles/embed.css }}} === As roundcube-dev or roundcube user {{{ # su - roundcube-dev su - roundcube #cd /srv/roundcube-dev cd /srv/roundcube # database stuff php ./bin/update.sh php ./bin/indexcontacts.sh }}}