diff --git a/tests/letstest/scripts/bootstrap_os_packages.sh b/tests/letstest/scripts/bootstrap_os_packages.sh index e3dfb28df..9b6bf4ceb 100755 --- a/tests/letstest/scripts/bootstrap_os_packages.sh +++ b/tests/letstest/scripts/bootstrap_os_packages.sh @@ -1,6 +1,6 @@ #!/bin/sh # -# Download and run the latest release version of the Certbot client. +# Install OS dependencies for test farm tests. set -ex # Work even if somebody does "sh thisscript.sh". @@ -50,13 +50,7 @@ BootstrapDebCommon() { } -# If new packages are installed by BootstrapRpmCommonBase below, version -# numbers in rpm_common.sh and rpm_python3.sh must be increased. - # Sets TOOL to the name of the package manager -# Note: this function is called both while selecting the bootstrap scripts and -# during the actual bootstrap. Some things like prompting to user can be done in the latter -# case, but not in the former one. InitializeRPMCommonBase() { if type dnf 2>/dev/null then @@ -75,7 +69,7 @@ InitializeRPMCommonBase() { BootstrapRpmCommonBase() { # Arguments: whitespace-delimited python packages to install - InitializeRPMCommonBase # This call is superfluous in practice + InitializeRPMCommonBase pkgs=" gcc @@ -104,22 +98,6 @@ BootstrapRpmCommonBase() { fi } -# Try to enable rh-python36 from SCL if it is necessary and possible. -EnablePython36SCL() { - if "$EXISTS" python3.6 > /dev/null 2> /dev/null; then - return 0 - fi - if [ ! -f /opt/rh/rh-python36/enable ]; then - return 0 - fi - set +e - if ! . /opt/rh/rh-python36/enable; then - error 'Unable to enable rh-python36!' - exit 1 - fi - set -e -} - # This bootstrap concerns old RedHat-based distributions that do not ship by default # with Python 2.7, but only Python 2.6. We bootstrap them by enabling SCL and installing # Python 3.6. Some of these distributions are: CentOS/RHEL/OL/SL 6. @@ -153,9 +131,6 @@ BootstrapRpmPython3Legacy() { fi BootstrapRpmCommonBase "${python_pkgs}" - - # Enable SCL rh-python36 after bootstrapping. - EnablePython36SCL } BootstrapRpmPython3() { @@ -181,9 +156,6 @@ elif [ -f /etc/redhat-release ]; then Bootstrap() { BootstrapRpmPython3Legacy } - # Try now to enable SCL rh-python36 for systems already bootstrapped - # NB: EnablePython36SCL has been defined along with BootstrapRpmPython3Legacy in certbot-auto - EnablePython36SCL else Bootstrap() { BootstrapRpmPython3 diff --git a/tests/letstest/scripts/test_sdists.sh b/tests/letstest/scripts/test_sdists.sh index 5c17556f5..05afb63dc 100755 --- a/tests/letstest/scripts/test_sdists.sh +++ b/tests/letstest/scripts/test_sdists.sh @@ -5,7 +5,7 @@ cd letsencrypt BOOTSTRAP_SCRIPT="tests/letstest/scripts/bootstrap_os_packages.sh" VENV_PATH=venv3 -# bootstrap and setup venv +# install OS packages sudo $BOOTSTRAP_SCRIPT if command -v python && [ $(python -V 2>&1 | cut -d" " -f 2 | cut -d. -f1,2 | sed 's/\.//') -eq 26 ]; then @@ -14,6 +14,7 @@ if command -v python && [ $(python -V 2>&1 | cut -d" " -f 2 | cut -d. -f1,2 | se PATH="/opt/rh/rh-python36/root/usr/bin:$PATH" fi +# setup venv CERTBOT_PIP_NO_BINARY=:all: tools/venv3.py --requirement letsencrypt-auto-source/pieces/dependency-requirements.txt . "$VENV_PATH/bin/activate" # pytest is needed to run tests on some of our packages so we install a pinned version here.