[[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: {{{ git remote update origin git checkout -b mfpl-1.4.13 1.4.13 git push gmo mfpl-1.4.13 }}} == 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 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 # e.g. mfpl-1.5.5 # 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 # managesieve cp plugins/managesieve/config.inc.php.dist plugins/managesieve/config.inc.php # Ensure the following values are set: # $config['managesieve_port'] = 4190; # $config['managesieve_host'] = 'mail.mayfirst.org'; # $config['managesieve_usetls'] = true; # 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 }}}