certbot/letstest/scripts/bootstrap_os_packages.sh
Brad Warren 10747555ae
upgrade python-augeas (#10286)
a couple weeks ago, [python-augeas
1.2.0](https://pypi.org/project/python-augeas/#history) was uploaded to
pypi. unfortunately, this broke things for us

the first major change was from
https://github.com/hercules-team/python-augeas/pull/49 where
python-augeas now needs the new OS packages described in the initial
comment there

the second change was from
https://github.com/hercules-team/python-augeas/pull/51 which added a
python interface to augeas functions that weren't introduced until
[augeas
1.13.0](af2aa88ab3/NEWS (L65-L66)).
this isn't ideal, but i don't think it's a big deal for us. augeas
1.13.0 is over three years old and [ubuntu
20.04](https://ubuntu.com/blog/ubuntu-20-04-eol-for-devicesional) and
[debian bullseye](https://www.debian.org/releases/) which have older
versions than that are technically EOL'd

regardless of how we feel about these changes, our tests don't currently
work with an updated version of python-augeas and this PR fixes it. i'm
also tracking https://github.com/certbot/certbot/issues/10282 to update
certbot.eff.org to list the newly required OS packages
2025-05-08 13:03:31 -07: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 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