diff --git a/letsencrypt-auto-source/Dockerfile.centos6 b/letsencrypt-auto-source/Dockerfile.centos6 index 1a3bf2d54..fe77b12c1 100644 --- a/letsencrypt-auto-source/Dockerfile.centos6 +++ b/letsencrypt-auto-source/Dockerfile.centos6 @@ -31,9 +31,9 @@ RUN update-ca-trust COPY . /home/lea/certbot/letsencrypt-auto-source # Fetch previous letsencrypt-auto that was installing python 3.4 -RUN curl https://raw.githubusercontent.com/certbot/certbot/v0.36.0/letsencrypt-auto-source/letsencrypt-auto \ - -o /home/lea/certbot/letsencrypt-auto-source/letsencrypt-auto_pre_0_37 \ - && chmod +x /home/lea/certbot/letsencrypt-auto-source/letsencrypt-auto_pre_0_37 +RUN curl https://raw.githubusercontent.com/certbot/certbot/v0.38.0/letsencrypt-auto-source/letsencrypt-auto \ + -o /home/lea/certbot/letsencrypt-auto-source/letsencrypt-auto_py_34 \ + && chmod +x /home/lea/certbot/letsencrypt-auto-source/letsencrypt-auto_py_34 RUN chmod +x /home/lea/certbot/letsencrypt-auto-source/tests/centos6_tests.sh diff --git a/letsencrypt-auto-source/letsencrypt-auto b/letsencrypt-auto-source/letsencrypt-auto index 84bbb0f86..5d0c08ebc 100755 --- a/letsencrypt-auto-source/letsencrypt-auto +++ b/letsencrypt-auto-source/letsencrypt-auto @@ -814,8 +814,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" + # Enable SCL rh-python36 + source scl_source enable rh-python36 else # Starting to Fedora 29, python2 is on a deprecation path. Let's move to python3 then. # RHEL 8 also uses python3 by default. diff --git a/letsencrypt-auto-source/letsencrypt-auto.template b/letsencrypt-auto-source/letsencrypt-auto.template index c9b1086a3..91a9afdc9 100755 --- a/letsencrypt-auto-source/letsencrypt-auto.template +++ b/letsencrypt-auto-source/letsencrypt-auto.template @@ -353,8 +353,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" + # Enable SCL rh-python36 + source scl_source enable rh-python36 else # Starting to Fedora 29, python2 is on a deprecation path. Let's move to python3 then. # RHEL 8 also uses python3 by default. diff --git a/letsencrypt-auto-source/tests/centos6_tests.sh b/letsencrypt-auto-source/tests/centos6_tests.sh index 0517c85b6..ecc32864e 100644 --- a/letsencrypt-auto-source/tests/centos6_tests.sh +++ b/letsencrypt-auto-source/tests/centos6_tests.sh @@ -4,7 +4,7 @@ yum update -y > /dev/null yum install -y centos-release-scl > /dev/null yum install -y python27 > /dev/null 2> /dev/null -LE_AUTO_PRE_0_37="certbot/letsencrypt-auto-source/letsencrypt-auto_pre_0_37" +LE_AUTO_PY_34="certbot/letsencrypt-auto-source/letsencrypt-auto_py_34" LE_AUTO="certbot/letsencrypt-auto-source/letsencrypt-auto" # we're going to modify env variables, so do this in a subshell @@ -55,11 +55,11 @@ if ! "$LE_AUTO" 2>&1 | grep -q "WARNING: couldn't find Python"; then exit 1 fi -# add SCL rh-python36 to path for proper python 3.x resolution -PATH="/opt/rh/rh-python36/root/usr/bin:$PATH" +# Enable SCL rh-python36 +source scl_source enable rh-python36 # bootstrap from the old letsencrypt-auto, this time installing python3.4 -"$LE_AUTO_PRE_0_37" --no-self-upgrade -n > /dev/null 2> /dev/null +"$LE_AUTO_PY_34" --no-self-upgrade -n > /dev/null 2> /dev/null # ensure python 3.4 is installed python3.4 --version > /dev/null 2> /dev/null