From d5050c7e7894a23c43b17c2d6adf0628d8afc4cb Mon Sep 17 00:00:00 2001 From: J-E Castagnede Date: Mon, 30 Apr 2018 13:54:34 +0200 Subject: [PATCH] update for bionic compatibility --- Makefile | 2 +- conf/buildout.cfg | 2 +- install.sh | 27 +++++++++++++++------------ 3 files changed, 17 insertions(+), 14 deletions(-) diff --git a/Makefile b/Makefile index 2ad0ca4f65..0dd81513d2 100644 --- a/Makefile +++ b/Makefile @@ -22,7 +22,7 @@ etc/settings.ini: chmod -f 600 etc/settings.ini bin/python: - virtualenv -p /usr/bin/python2 . + virtualenv . bin/pip install -U setuptools==38.7.0 zc.buildout==2.11.1 mkdir -p lib/src mkdir -p lib/eggs diff --git a/conf/buildout.cfg b/conf/buildout.cfg index bb1cde5095..561e7903e6 100644 --- a/conf/buildout.cfg +++ b/conf/buildout.cfg @@ -116,7 +116,7 @@ django-compressor = 2.2 django-filter = 1.1.0 easy-thumbnails = 2.5.0 django-tinymce = 2.5.0 -psycopg2 = 2.6.2 +psycopg2 = 2.7.4 docutils = 0.14 Pillow = 3.0.0 simplekml = 1.3.0 diff --git a/install.sh b/install.sh index e9a39a273a..6dd8cb345e 100755 --- a/install.sh +++ b/install.sh @@ -206,22 +206,15 @@ function check_postgres_connection { function minimum_system_dependencies { sudo apt-get update -qq echo_progress - sudo apt-get install -y -qq python unzip wget python-software-properties + sudo apt-get install -y -qq python unzip wget software-properties-common echo_progress - sudo apt-get install -y -qq git gettext python-virtualenv build-essential python-dev + sudo apt-get install -y -qq git gettext build-essential python-dev echo_progress } function geotrek_system_dependencies { - sudo apt-get install -y -q --no-upgrade libjson0 gdal-bin libgdal-dev libssl-dev binutils libproj-dev - - if [ $xenial -eq 1 ]; then - sudo apt-get install libgeos-c1v5 libproj9 - else - sudo apt-get install libgeos-c1 libproj0 - fi - + sudo apt-get install -y -q --no-upgrade gdal-bin libgdal-dev libssl-dev binutils libproj-dev echo_progress # PostgreSQL client and headers sudo apt-get install -y -q --no-upgrade postgresql-client-$psql_version postgresql-server-dev-$psql_version @@ -229,7 +222,7 @@ function geotrek_system_dependencies { sudo apt-get install -y -qq libxml2-dev libxslt-dev # pygal lxml echo_progress # Necessary for MapEntity Weasyprint - sudo apt-get install -y -qq python-dev python-lxml libcairo2 libpango1.0-0 libgdk-pixbuf2.0-dev libffi-dev shared-mime-info libfreetype6-dev + sudo apt-get install -y -qq python-lxml libcairo2 libpango1.0-0 libgdk-pixbuf2.0-dev libffi-dev shared-mime-info libfreetype6-dev echo_progress # Redis for async imports and tasks management sudo apt-get install -y -qq redis-server @@ -465,6 +458,12 @@ function geotrek_setup { check_postgres_connection echo_step "Install Geotrek python dependencies..." + + wget https://bootstrap.pypa.io/get-pip.py + sudo python ./get-pip.py + sudo pip install virtualenv -U + rm get-pip.py + if $dev ; then make env_dev elif $tests ; then @@ -603,6 +602,7 @@ precise=$(grep "Ubuntu 12.04" /etc/issue | wc -l) trusty=$(grep "Ubuntu 14.04" /etc/issue | wc -l) vivid=$(grep "Ubuntu 15.04" /etc/issue | wc -l) xenial=$(grep "Ubuntu 16.04" /etc/issue | wc -l) +bionic=$(grep "Ubuntu 18.04" /etc/issue | wc -l) if [ $trusty -eq 1 ]; then psql_version=9.3 @@ -613,9 +613,12 @@ elif [ $vivid -eq 1 ]; then elif [ $xenial -eq 1 ]; then psql_version=9.5 pgis_version=2.2 +elif [ $bionic -eq 1 ]; then + psql_version=10 + pgis_version=2.4 fi -if [ $trusty -eq 1 -o $vivid -eq 1 -o $xenial -eq 1 ] ; then +if [ $trusty -eq 1 -o $vivid -eq 1 -o $xenial -eq 1 -o $bionic -eq 1 ] ; then geotrek_setup elif [ $precise -eq 1 ] ; then exit_error 5 "Support for Ubuntu Precise 12.04 was dropped. Upgrade your server first. Aborted."