mirror of
https://github.com/certbot/certbot.git
synced 2026-05-28 04:34:11 -04:00
I think test_apache2.sh still has value as it allows us to test our Apache plugin with the Apache layouts found on different OSes. Unfortunately, many of the OSes we're currently testing against don't have Python 3.7+ packaged yet we still support these OSes through things like snap where we bundle our own version of Python. To allow us to continue testing on these OSes, I switched to installing Python through pyenv. I also took the opportunity to clean up the scripts, removing a lot of code, failing more quickly, and simplifying failure logic in test_apache2.sh.
29 lines
956 B
Bash
Executable file
29 lines
956 B
Bash
Executable file
#!/bin/sh
|
|
#
|
|
# Install OS dependencies for test farm tests.
|
|
|
|
set -ex # Work even if somebody does "sh thisscript.sh".
|
|
|
|
error() {
|
|
echo "$@"
|
|
}
|
|
|
|
if [ -f /etc/debian_version ]; then
|
|
sudo apt-get update || error apt-get update hit problems but continuing anyway...
|
|
|
|
PYENV_DEPS="make build-essential libssl-dev zlib1g-dev libbz2-dev libreadline-dev libsqlite3-dev \
|
|
wget curl llvm libncursesw5-dev xz-utils tk-dev libxml2-dev libxmlsec1-dev libffi-dev \
|
|
liblzma-dev git"
|
|
ALL_DEPS="libaugeas0 $PYENV_DEPS"
|
|
sudo DEBIAN_FRONTEND=noninteractive apt-get install -y $ALL_DEPS
|
|
elif [ -f /etc/redhat-release ]; then
|
|
PYENV_DEPS="gcc zlib-devel bzip2 bzip2-devel readline-devel sqlite sqlite-devel openssl-devel \
|
|
tk-devel libffi-devel xz-devel git"
|
|
ALL_DEPS="augeas-libs $PYENV_DEPS"
|
|
|
|
if yum list installed "httpd" >/dev/null 2>&1; then
|
|
ALL_DEPS="mod_ssl $ALL_DEPS"
|
|
fi
|
|
|
|
sudo yum install -y $ALL_DEPS
|
|
fi
|