From c2d165e88b304608e01fbc4b6b9d05055dbd9d25 Mon Sep 17 00:00:00 2001 From: Adrien Ferrand Date: Thu, 25 Jul 2019 15:03:53 +0200 Subject: [PATCH] Maintain PATH for further invocations of letsencrypt-auto after bootstrap. --- letsencrypt-auto-source/letsencrypt-auto | 5 ++--- letsencrypt-auto-source/letsencrypt-auto.template | 2 ++ .../pieces/bootstrappers/rpm_python3_legacy.sh | 3 --- 3 files changed, 4 insertions(+), 6 deletions(-) diff --git a/letsencrypt-auto-source/letsencrypt-auto b/letsencrypt-auto-source/letsencrypt-auto index ec877e81c..5eea70575 100755 --- a/letsencrypt-auto-source/letsencrypt-auto +++ b/letsencrypt-auto-source/letsencrypt-auto @@ -529,9 +529,6 @@ BootstrapRpmPython3Legacy() { exit 1 fi - # Insert the SCL specific path in PATH to resolve the correct virtualenv binary from SCL - PATH="/opt/rh/rh-python36/root/usr/bin:$PATH" - BootstrapRpmCommonBase "$python_pkgs" } @@ -808,6 +805,8 @@ elif [ -f /etc/redhat-release ]; then } USE_PYTHON_3=1 BOOTSTRAP_VERSION="BootstrapRpmPython3Legacy $BOOTSTRAP_RPM_PYTHON3_LEGACY_VERSION" + # Insert the SCL specific path in PATH to resolve the correct python binaries from SCL + PATH="/opt/rh/rh-python36/root/usr/bin:$PATH" elif [ "$RPM_DIST_NAME" = "fedora" -a "$RPM_DIST_VERSION" -ge 29 -o "$PYVER" -eq 26 ]; then Bootstrap() { BootstrapMessage "RedHat-based OSes that will use Python3" diff --git a/letsencrypt-auto-source/letsencrypt-auto.template b/letsencrypt-auto-source/letsencrypt-auto.template index 923b10c7b..2d804bf2a 100755 --- a/letsencrypt-auto-source/letsencrypt-auto.template +++ b/letsencrypt-auto-source/letsencrypt-auto.template @@ -344,6 +344,8 @@ elif [ -f /etc/redhat-release ]; then } USE_PYTHON_3=1 BOOTSTRAP_VERSION="BootstrapRpmPython3Legacy $BOOTSTRAP_RPM_PYTHON3_LEGACY_VERSION" + # Insert the SCL specific path in PATH to resolve the correct python binaries from SCL + PATH="/opt/rh/rh-python36/root/usr/bin:$PATH" elif [ "$RPM_DIST_NAME" = "fedora" -a "$RPM_DIST_VERSION" -ge 29 -o "$PYVER" -eq 26 ]; then Bootstrap() { BootstrapMessage "RedHat-based OSes that will use Python3" diff --git a/letsencrypt-auto-source/pieces/bootstrappers/rpm_python3_legacy.sh b/letsencrypt-auto-source/pieces/bootstrappers/rpm_python3_legacy.sh index 3f57bc5a8..db0d7b955 100644 --- a/letsencrypt-auto-source/pieces/bootstrappers/rpm_python3_legacy.sh +++ b/letsencrypt-auto-source/pieces/bootstrappers/rpm_python3_legacy.sh @@ -39,8 +39,5 @@ BootstrapRpmPython3Legacy() { exit 1 fi - # Insert the SCL specific path in PATH to resolve the correct virtualenv binary from SCL - PATH="/opt/rh/rh-python36/root/usr/bin:$PATH" - BootstrapRpmCommonBase "$python_pkgs" }