From be9530ae163b8f27b219c4122c3583436c36e107 Mon Sep 17 00:00:00 2001 From: Clark Boylan Date: Tue, 11 Feb 2020 08:41:49 -0800 Subject: [PATCH] Use virtualenv --seeder=pip so that libs are accessible New virtualenv will by default use a common location for seed libs like setuptools, wheel, and pip. Unfortunately this breaks if root installs the virtualenv and other users are expected to use it because these other users cannot access /root/.local (where the files are stashed). We fix this by using --seeder=pip which will install all of those libs into the virtualenv itself. Change-Id: I4922ea50e31dceda96f545a0d409c0d7dc022e19 --- .../elements/infra-package-needs/install.d/40-install-bindep | 2 +- nodepool/elements/nodepool-base/install.d/91-venv-os-testr | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/nodepool/elements/infra-package-needs/install.d/40-install-bindep b/nodepool/elements/infra-package-needs/install.d/40-install-bindep index 88150c9c97..85c9d1d07b 100755 --- a/nodepool/elements/infra-package-needs/install.d/40-install-bindep +++ b/nodepool/elements/infra-package-needs/install.d/40-install-bindep @@ -22,5 +22,5 @@ if [ ${DIB_DEBUG_TRACE:-0} -gt 0 ]; then fi set -e -$DIB_PYTHON_VIRTUALENV /usr/bindep-env +$DIB_PYTHON_VIRTUALENV --seeder=pip /usr/bindep-env /usr/bindep-env/bin/pip install bindep diff --git a/nodepool/elements/nodepool-base/install.d/91-venv-os-testr b/nodepool/elements/nodepool-base/install.d/91-venv-os-testr index 09d3f75d53..0a5e315d24 100755 --- a/nodepool/elements/nodepool-base/install.d/91-venv-os-testr +++ b/nodepool/elements/nodepool-base/install.d/91-venv-os-testr @@ -18,5 +18,6 @@ if [ ${DIB_DEBUG_TRACE:-0} -gt 0 ]; then fi set -e -$DIB_PYTHON_VIRTUALENV /usr/os-testr-env +# TODO is this used anymore? +$DIB_PYTHON_VIRTUALENV --seeder=pip /usr/os-testr-env /usr/os-testr-env/bin/pip install os-testr