Update 3.2 to 3.3

Prepare

  • Make sure you've enabled Python 2.7 since Kolab seems not to be ready for Python 3 yet:
$ eselect python list
eselect python list
Available Python interpreters:
  [1]   python2.7 
  [2]   python3.2
$ eselect python set 1
  • Make sure you've set the PHP_TARGETS accordingly:
/etc/portage/make.conf
# ...
PHP_TARGETS="php5-4"
# ...

Unmasking

  • All Kolab packages are masked with ~amd64. Make sure you've unmasked the following required packages before you proceed:

Kolab Package & Dependencies

/etc/portage/package.keywords/kolab33
=app-admin/augeas-1.3.0 ~amd64
=dev-php/PEAR-Net_LDAP3-1.0.2 ~amd64
=dev-php/composer-1.0.0_alpha10 ~amd64
=dev-python/pykolab-0.7.1 ~amd64
~dev-util/kolab-utils-3.1 ~amd64
=net-libs/libcalendaring-4.9.1 ~amd64
=net-libs/libkolab-0.6.0 ~amd64
=net-libs/libkolabxml-1.1.0 ~amd64
=net-mail/cyrus-imapd-2.5 ~amd64
=net-mail/kolab-3.3.0 ~amd64
=net-nds/389-admin-1.1.31-r1 ~amd64
=net-nds/389-ds-base-1.3.0.2-r2 ~amd64
=net-nds/kolab-schema-3.1 ~amd64
=www-apps/kolab-chwala-0.2 ~amd64
~www-apps/kolab-freebusy-1.0.5 ~amd64
=www-apps/kolab-irony-0.2.8 ~amd64
~www-apps/kolab-roundcube-1.1.1 ~amd64
=www-apps/kolab-roundcube-compose-addressbook-8.0.4 ~amd64
=www-apps/kolab-roundcube-contextmenu-2.1 ~amd64
=www-apps/kolab-roundcube-converse-0.8.3.0 ~amd64
=www-apps/kolab-roundcube-getmail-1.0.0 ~amd64
=www-apps/kolab-roundcube-identity-smtp-20141221 ~amd64
=www-apps/kolab-roundcube-listcommands-2.3.5 ~amd64
=www-apps/kolab-roundcube-persistent-login-4.1 ~amd64
=www-apps/kolab-roundcube-recipient-to-contact-0.3 ~amd64
=www-apps/kolab-roundcube-threading-as-default-20110427 ~amd64
=www-apps/kolab-syncroton-2.3.0 ~amd64
=www-apps/kolab-webadmin-3.2.1 ~amd64

You can get the most recent atoms of all packages from the Kolab overlay using eix:

ACCEPT_KEYWORDS="~amd64" eix --in-overlay kolab -l --format "<bestversion:NAMEVERSION>"

Unstable Mainstream Packages

/etc/portage/package.keywords/kolab33-ms
=dev-python/python-augeas-0.4.1 ~amd64

389 Directory Server & Dependencies

/etc/portage/package.keywords/kolab33-389
=net-nds/389-admin-1.1.31-r1 ~amd64
=net-nds/389-ds-base-1.3.0.2-r2 ~amd64
=app-admin/389-ds-console-1.2.6-r1 ~amd64
=app-admin/389-admin-console-1.1.8-r1 ~amd64
=dev-libs/389-adminutil-1.1.15 ~amd64
=www-apache/mod_nss-1.0.8-r1 ~amd64
=dev-java/idm-console-framework-1.1.7 ~amd64
=dev-perl/perl-mozldap-1.5.2 ~amd6=net-nds/389-admin-1.1.31-r1 ~amd64
=net-nds/389-ds-base-1.3.0.2-r2 ~amd64
=app-admin/389-ds-console-1.2.6 ~amd64
=app-admin/389-admin-console-1.1.8 ~amd64
=dev-libs/389-adminutil-1.1.15 ~amd64
=www-apache/mod_nss-1.0.8-r1 ~amd64
=dev-java/idm-console-framework-1.1.7 ~amd64
=dev-perl/perl-mozldap-1.5.2 ~amd64

USE-Flags

There are a couple of USE-flags to be set. You can run emerge and set the USE-flags on demand or just copy & paste the following:

/etc/portage/package.use/kolab33-389
www-servers/apache suexec threads
dev-libs/nss utils
/etc/portage/package.use/kolab33-cyrus
net-mail/cyrus-imapd ldap nntp perl replication sieve
dev-libs/cyrus-sasl openldap
dev-libs/openssl -bindist
net-misc/openssh -bindist
/etc/portage/package.use/kolab33-libkolab
dev-qt/qtcore qt3support
dev-qt/qtsql qt3support mysql
dev-qt/qtgui qt3support
media-video/vlc dbus ogg vorbis
sys-libs/zlib minizip
sys-apps/dbus X
sys-auth/consolekit policykit
dev-qt/qtdeclarative qt3support
app-text/ghostscript-gpl cups
dev-qt/qtopengl qt3support
x11-libs/cairo X
sys-fs/udev gudev
/etc/portage/package.use/kolab33-php
dev-lang/php fpm mysqli ldap gd pdo sockets curl mysql exif imap intl spell sqlite xmlwriter zip
app-eselect/eselect-php fpm
dev-php/PEAR-Net_SMTP sasl
/etc/portage/package.use/kolab33-postfix
mail-mta/postfix sasl
/etc/portage/package.use/kolab33-python
dev-lang/python sqlite

Emerge

  • Some packages are using PHP composer to download vendor files from Github. This might result in exhausting the public Github API limit for your host. To avoid this, you must set the GITHUB_API_TOKEN variable with the API token from your personal Github account. You can fetch your Github API token using curl:
$ curl -u "yourgithubname" https://api.github.com/authorizations | grep token
    "hashed_token": "YOUR TOKEN",
    "hashed_token": "ANOTHER TOKEN",
  • Further export the Github token:
$ export GITHUB_API_TOKEN <YOUR TOKEN>
  • Install the update:
$ emerge -av --deep --update "=net-mail/kolab-3.3.0"

Do not update configuration files yet. Keep on reading and proceed the following sections first.

Migrating Roundcube

  • Note that the package name for the main program has changes from core to roundcube. So you must update the MySQL table roundcube.system as follows:
    $ mysql -h <yourhost> -u <user> -p
    $ UPDATE `roundcube`.`system` SET `name` = 'roundcube-version' WHERE `system`.`name` = 'core-version';
  • Run the migration scripts:
    $ emerge --config kolab-roundcube

Update Configuration

Basically, the configuration is almost fully located inside the Roundcube's config dir i.e. /etc/kolab-roundcube. You could use dispatch-conf or etc-update to update the configuration. But since your existing configuration has been customized during your initial setup using setup-kolab, this might be more than just a simple merge.

Because of this, we prepared a couple of patches and update scripts for the Kolab config files according to the official upgrade guides. You can run these migration steps by using emerge:

$ emerge --config kolab
Configuring pkg...
 
 * Do you want to upgrade an existing installation? [Y|n] Y
 
 * Applying "kolab_auth.inc.php.diff" in "/etc/kolab-roundcube" ...
 * Applying "managesieve.inc.php.diff" in "/etc/kolab-roundcube" ...
 * Applying "password.inc.php.diff" in "/etc/kolab-roundcube" ...
 * Applying "owncloud.inc.php.diff" in "/etc/kolab-roundcube" ...
 * ... already applied, skip.
 * Applying "kolab_folders.inc.php.diff" in "/etc/kolab-roundcube" ...
 * Applying "kolab_files.inc.php.diff" in "/etc/kolab-roundcube" ...
 
 * Setup done. Rumble young man, rumble!