certbot/letstest/scripts/bootstrap_os_packages.sh
Brad Warren 089581cad2
update centos pyenv deps (#10529)
this PR fixes the recently nightly test failures by installing the
updated [build dependencies needed by pyenv on
centos](https://github.com/pyenv/pyenv/wiki#suggested-build-environment)

you can see tests passing with this change at
https://dev.azure.com/certbot/certbot/_build/results?buildId=9958&view=results

fwiw, i don't think this PR requires two reviews
2026-01-05 12:40:47 -08:00

35 lines
1.3 KiB
Bash
Executable file

#!/bin/sh
#
# Install OS dependencies for test farm tests.
#
# This does not include the dependencies needed to build cryptography. See
# https://cryptography.io/en/latest/installation/#building-cryptography-on-linux
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="libaugeas-dev $PYENV_DEPS"
sudo DEBIAN_FRONTEND=noninteractive apt-get install -y $ALL_DEPS
elif [ -f /etc/redhat-release ]; then
# the "codeready builder" repository must be enabled to install the
# augeas-devel package needed to compile newer versions of python-augeas
sudo yum config-manager --set-enabled crb
PYENV_DEPS="gcc make patch zlib-devel bzip2 bzip2-devel readline-devel sqlite sqlite-devel \
openssl-devel tk-devel libffi-devel xz-devel git"
ALL_DEPS="augeas-devel $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