From f6eacae0fc6648d98a5bd365ab398720836c3b61 Mon Sep 17 00:00:00 2001 From: Bill Cromie Date: Wed, 25 Jan 2017 09:59:26 -0500 Subject: [PATCH 1/4] adding setuptools to initial pip3 installation --- setup/management.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup/management.sh b/setup/management.sh index 7299ec50..28217916 100755 --- a/setup/management.sh +++ b/setup/management.sh @@ -17,7 +17,7 @@ apt_install build-essential libssl-dev libffi-dev python3-dev # NOTE: email_validator is repeated in setup/questions.sh, so please keep the versions synced. hide_output pip3 install --upgrade \ rtyaml "email_validator>=1.0.0" "free_tls_certificates>=0.1.3" "exclusiveprocess" \ - "idna>=2.0.0" "cryptography>=1.0.2" boto psutil + "idna>=2.0.0" "cryptography>=1.0.2" boto psutil setuptools # duplicity uses python 2 so we need to get the python 2 package of boto to have backups to S3. # boto from the Ubuntu package manager is too out-of-date -- it doesn't support the newer From 6d513cb4a6e11ab347a259b5493f86ff58d20057 Mon Sep 17 00:00:00 2001 From: Bill Cromie Date: Wed, 25 Jan 2017 11:51:37 -0500 Subject: [PATCH 2/4] specifying python library versions --- setup/management.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/setup/management.sh b/setup/management.sh index 28217916..40f053c5 100755 --- a/setup/management.sh +++ b/setup/management.sh @@ -15,9 +15,11 @@ apt_install build-essential libssl-dev libffi-dev python3-dev # Install other Python 3 packages used by the management daemon. # The first line is the packages that Josh maintains himself! # NOTE: email_validator is repeated in setup/questions.sh, so please keep the versions synced. +hide_output pip3 install --upgrade setuptools + hide_output pip3 install --upgrade \ rtyaml "email_validator>=1.0.0" "free_tls_certificates>=0.1.3" "exclusiveprocess" \ - "idna>=2.0.0" "cryptography>=1.0.2" boto psutil setuptools + "idna>=2.0.0" "cryptography<=1.0.2" boto psutil # duplicity uses python 2 so we need to get the python 2 package of boto to have backups to S3. # boto from the Ubuntu package manager is too out-of-date -- it doesn't support the newer From 40cadb268e4cfef2e55521480cad14cfead2ce13 Mon Sep 17 00:00:00 2001 From: Bill Cromie Date: Wed, 25 Jan 2017 12:07:42 -0500 Subject: [PATCH 3/4] specifying a version of cryptography that will definitely work. now, will it all work together? --- setup/management.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup/management.sh b/setup/management.sh index 40f053c5..2ae9f93b 100755 --- a/setup/management.sh +++ b/setup/management.sh @@ -19,7 +19,7 @@ hide_output pip3 install --upgrade setuptools hide_output pip3 install --upgrade \ rtyaml "email_validator>=1.0.0" "free_tls_certificates>=0.1.3" "exclusiveprocess" \ - "idna>=2.0.0" "cryptography<=1.0.2" boto psutil + "idna>=2.0.0" "cryptography>=1.7.1" boto psutil # duplicity uses python 2 so we need to get the python 2 package of boto to have backups to S3. # boto from the Ubuntu package manager is too out-of-date -- it doesn't support the newer From 1c5f7ebce5993a5874ac363913f4adc4c66db23d Mon Sep 17 00:00:00 2001 From: Bill Cromie Date: Mon, 30 Jan 2017 18:26:36 -0500 Subject: [PATCH 4/4] adding steps that should fix broken systems and ensure that we can install in a clean 14.0.4.5 environment --- setup/management.sh | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/setup/management.sh b/setup/management.sh index 2ae9f93b..2745fd71 100755 --- a/setup/management.sh +++ b/setup/management.sh @@ -15,7 +15,19 @@ apt_install build-essential libssl-dev libffi-dev python3-dev # Install other Python 3 packages used by the management daemon. # The first line is the packages that Josh maintains himself! # NOTE: email_validator is repeated in setup/questions.sh, so please keep the versions synced. -hide_output pip3 install --upgrade setuptools + +# the below fixes the issue with an older version of pip3 and setup tools +# breaking pip3 via a race condition +# see https://github.com/pypa/pip/issues/4253 +# and +# https://github.com/mail-in-a-box/mailinabox/issues/1086 + +# need to use hide output, because we have to re-install this. +hide_output apt-get install -y --reinstall python-pkg-resources +# ensure that we have a modern version of setuptools, distribute and pip3 first +hide_output python3 -m pip install --upgrade setuptools +hide_output python3 -m pip install --upgrade distribute +hide_output python3 -m pip install --upgrade pip hide_output pip3 install --upgrade \ rtyaml "email_validator>=1.0.0" "free_tls_certificates>=0.1.3" "exclusiveprocess" \