From da674c4e5b3a18b6d15e377f98c685c9a7632a47 Mon Sep 17 00:00:00 2001 From: Clark Boylan Date: Fri, 23 Apr 2021 15:04:26 -0700 Subject: [PATCH] Install pbr before glean to address SNI issues Some older distros (like centos8 and xenial) don't support SNI in their easy_install implementations which are used to install setup_requires for python packages. PBR is a setup_requires for glean. We work around this problem when installing glean by preinstalling PBR with pip. Change-Id: Ie9f5c9ed06954cbe51f23fe8cca0655a931a5201 --- .../simple-init/install.d/simple-init-repo-install/40-glean | 3 +++ .../simple-init/install.d/simple-init-source-install/40-glean | 3 +++ 2 files changed, 6 insertions(+) diff --git a/diskimage_builder/elements/simple-init/install.d/simple-init-repo-install/40-glean b/diskimage_builder/elements/simple-init/install.d/simple-init-repo-install/40-glean index 5a838de75..246d78c69 100755 --- a/diskimage_builder/elements/simple-init/install.d/simple-init-repo-install/40-glean +++ b/diskimage_builder/elements/simple-init/install.d/simple-init-repo-install/40-glean @@ -22,6 +22,9 @@ set -eu set -o pipefail python3 -m venv /usr/glean +# glean requires PBR to install. We explicitly pip install it to avoid +# SNI problems with pypi.org on older distros. +/usr/glean/bin/pip install pbr /usr/glean/bin/pip install /tmp/glean.git mkdir -p /usr/local/bin diff --git a/diskimage_builder/elements/simple-init/install.d/simple-init-source-install/40-glean b/diskimage_builder/elements/simple-init/install.d/simple-init-source-install/40-glean index 2107a87de..37603ed88 100755 --- a/diskimage_builder/elements/simple-init/install.d/simple-init-source-install/40-glean +++ b/diskimage_builder/elements/simple-init/install.d/simple-init-source-install/40-glean @@ -22,6 +22,9 @@ set -eu set -o pipefail python3 -m venv /usr/glean +# glean requires PBR to install. We explicitly pip install it to avoid +# SNI problems with pypi.org on older distros. +/usr/glean/bin/pip install pbr /usr/glean/bin/pip install glean mkdir -p /usr/local/bin