mirror of
https://github.com/certbot/certbot.git
synced 2026-06-19 21:49:03 -04:00
Fixes #6955. This updates the Fedora version used in our test farm tests to Fedora 30. The AMI ID comes from https://alt.fedoraproject.org/cloud/ where it is listed as their standard HVM AMI for the region we use us-east-1 (US East (N. Virginia)). Unfortunately, there were a lot of small changes required for this. The big reason for this is on Fedora, there isn't a Python 2 executable installed. In fact, there's not even an executable named python. It's just python3. Rather than installing another Python in each test, I wrote a script that the test scripts can share to figure out the different paths and names that should be used in their script. (This isn't used in test_sdists.sh because the logic is a little different.) Other changes here worth flagging are: I changed the name of the variable RUN_PYTHON3_TESTS in test_leauto_upgrades.sh to RUN_RHEL6_TESTS. The tests that are run when this variable is set test the upgrade from Python 2 to Python 3 on RHEL 6. I think this new name is much better now that we also have Fedora running Python 3. I made tools/simple_http_server.py work on Python 3. You can see tests passing with these changes at https://travis-ci.com/certbot/certbot/builds/113821476. I also ran test_tests.sh and they passed. * Update to Fedora 30 in test farm tests. Fedora 28 is likely to reach its EOL soon. * Add set_python_envvars.sh. * Fix test_apache2.sh on python3 only distros. * Fix test_leauto_upgrades.sh on python3 systems. * Fix certonly_standalone tests with python3 only * Fix test_sdists.sh on python3 only distros. * Make simple_http_server.py work on Python 3. * add comments
48 lines
1.2 KiB
Bash
Executable file
48 lines
1.2 KiB
Bash
Executable file
#!/bin/sh -xe
|
|
|
|
cd letsencrypt
|
|
./certbot-auto --install-only -n --debug
|
|
|
|
PLUGINS="certbot-apache certbot-nginx"
|
|
PYTHON_MAJOR_VERSION=$(/opt/eff.org/certbot/venv/bin/python --version 2>&1 | cut -d" " -f 2 | cut -d. -f1)
|
|
TEMP_DIR=$(mktemp -d)
|
|
|
|
if [ "$PYTHON_MAJOR_VERSION" = "3" ]; then
|
|
# Some distros like Fedora may only have an executable named python3 installed.
|
|
PYTHON_NAME="python3"
|
|
VENV_PATH="venv3"
|
|
VENV_SCRIPT="tools/venv3.py"
|
|
else
|
|
PYTHON_NAME="python"
|
|
VENV_SCRIPT="tools/venv.py"
|
|
VENV_PATH="venv"
|
|
fi
|
|
|
|
VERSION=$("$PYTHON_NAME" letsencrypt-auto-source/version.py)
|
|
|
|
# setup venv
|
|
"$VENV_SCRIPT" --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.
|
|
tools/pip_install.py pytest
|
|
|
|
# build sdists
|
|
for pkg_dir in acme . $PLUGINS; do
|
|
cd $pkg_dir
|
|
python setup.py clean
|
|
rm -rf build dist
|
|
python setup.py sdist
|
|
mv dist/* $TEMP_DIR
|
|
cd -
|
|
done
|
|
|
|
# test sdists
|
|
cd $TEMP_DIR
|
|
for pkg in acme certbot $PLUGINS; do
|
|
tar -xvf "$pkg-$VERSION.tar.gz"
|
|
cd "$pkg-$VERSION"
|
|
python setup.py build
|
|
python setup.py test
|
|
python setup.py install
|
|
cd -
|
|
done
|