Need help upgrading from Indico 0.98

TL;DR: Working commands are down there at “So, let’s try installing it from Git”.

Looks like easy_install broke when PyPI switched to SSL-only (it’s a legacy tool that usually nobody should be using anymore).

I just played around a bit in a CentOS6 docker container and the Python packaging infrastructure seems to be utterly broken on 2.6 - but this makes sense, since Python 2.6 has reached EOL quite some time ago, the core utilities (like setuptools and pip) are dropping support for it, and the only thing that keeps it from being completely dead is some enterprise distributions still supporting it - and usually when you use 2.6 or older there, you don’t use the Python package infrastructure but just install packages using your OS’ package manager.

My recommendation would be to use a less ancient system (e.g. CentOS 7). Even if it’s just a temporary test machine to do the migration, you will save yourself lots of headaches that way.

My approach (inside a centos 7 docker container) was this, and it initially looked good

yum install -y python-virtualenv
virtualenv /tmp/indico-env
source /tmp/indico-env/bin/activate
pip install -U setuptools pip distribute
pip install indico==1.2.2

Unfortunately one of our legacy dependencies is broken beyond repair: cssmin-0.1.4 pulls in an ancient version of distribute that hardcodes a http:// URL for PyPI - but PyPI switched to SSL-only some time ago, so it simply doesn’t work anymore. So, back to installing the archive manually:

yum install -y python-virtualenv wget gcc libxml2-devel libxslt-devel
virtualenv /tmp/indico-env
source /tmp/indico-env/bin/activate
pip install -U setuptools pip distribute
wget https://pypi.python.org/packages/ef/07/b8307e72a251e6080fdadf9aa8fea91d11f4a7d426aac40531337386dcf6/indico-1.2.2.tar.gz
tar xvzf indico-1.2.2.tar.gz
cd indico-1.2.2
sed -i -E "s/cssmin==.*/cssmin/" requirements.txt
pip install .

By patching requirements.txt we install the latest cssmin version which does not install the broken distribute version - and since Indico 1.2 is only needed to migrate the 0.98 database to 1.2, it doesn’t really matter which version it is since you will (hopefully) never run that old Indico version but just take its migrated database and go straight to 2.0.

But… while all the commands succeed, indico_initial_setup will fail because pip does not install some of the example files since they are outside the package, and nowadays Python packages should not install non-package files (I think there were already some issues with installing legacy indico using pip in the past).

So, let’s try installing it from Git:

yum install -y python-virtualenv git gcc libxml2-devel libxslt-devel
virtualenv /tmp/indico-env
source /tmp/indico-env/bin/activate
pip install -U setuptools pip distribute
git clone https://github.com/indico/indico/
cd indico
git checkout v1.2.2
sed -i -E "s/cssmin==.*/cssmin/" requirements.txt
pip install -r requirements.txt
python setup.py develop_config

When asked where to install it, provide e.g. /opt/indico. After that you can edit/create/copy the config files in ./etc/, then start ZODB with zdaemon -C ./etc/zdctl.conf start and then hopefully run the migration with python ./bin/migration/migrate.py --prev-version 0.98

1 Like