move setting up venv back out of script so it's not run with sudo

This commit is contained in:
Erica Portnoy 2020-08-12 18:49:26 -07:00
parent 171fde5f51
commit ffdc6be514
2 changed files with 9 additions and 4 deletions

View file

@ -192,6 +192,3 @@ elif [ -f /etc/redhat-release ]; then
fi
Bootstrap
cd $1 # REPO_ROOT
$2 # Call the venv setup script here so we don't have to activate Python36SCL in the parent

View file

@ -40,11 +40,19 @@ fi
cd letsencrypt
echo "Bootstrapping dependencies..."
sudo tests/letstest/scripts/bootstrap_os_packages.sh . "tools/venv3.py -e acme[dev] -e certbot[dev,docs] -e certbot-apache"
sudo tests/letstest/scripts/bootstrap_os_packages.sh
if [ $? -ne 0 ] ; then
exit 1
fi
if command -v python && [ $(python -V 2>&1 | cut -d" " -f 2 | cut -d. -f1,2 | sed 's/\.//') -eq 26 ]; then
# RHEL/CentOS 6 will need a special treatment, so we need to detect that environment
# Enable the SCL Python 3.6 installed by letsencrypt-auto bootstrap
PATH="/opt/rh/rh-python36/root/usr/bin:$PATH"
fi
tools/venv3.py -e acme[dev] -e certbot[dev,docs] -e certbot-apache
sudo "venv3/bin/certbot" -v --debug --text --agree-tos \
--renew-by-default --redirect --register-unsafely-without-email \
--domain $PUBLIC_HOSTNAME --server $BOULDER_URL