Skip to content

Commit 2899000

Browse files
committed
feat(master): use Jinja2 downgrade workaround (3.0.x => 2.11.3)
Various discussions about the underlying issue: * saltstack/salt#60188 * saltstack-formulas/postgres-formula#311 * saltstack-formulas/docker-formula#290
1 parent a1d8e08 commit 2899000

File tree

6 files changed

+30
-0
lines changed

6 files changed

+30
-0
lines changed

Dockerfile.apt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,11 @@ RUN apt-get update \
4141
apt-get update; \
4242
apt-get install --yes --no-install-recommends salt-minion; \
4343
fi \
44+
# Use temporary workaround of downgrading Jinja2 for `master` image builds
45+
# See https://github.com/saltstack/salt/issues/60188
46+
&& if [ "${SALT_VERSION}" = "master" ]; then \
47+
pip3 install --no-cache-dir Jinja2==2.11.3; \
48+
fi \
4449
# Disable salt's service as we don't need it running
4550
&& systemctl disable salt-minion.service > /dev/null 2>&1 \
4651
# Remove unnecessary getty and udev targets that result in high CPU usage when using

Dockerfile.dnf

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,11 @@ SHELL ["/bin/bash", "-x", "-o", "pipefail", "-c"]
2323
RUN dnf -y update && dnf -y install ${PKGS} --setopt=install_weak_deps=False && dnf clean all \
2424
&& curl -L https://raw.githubusercontent.com/saltstack/salt-bootstrap/develop/bootstrap-salt.sh | \
2525
sh -s -- -XUdfPD -x python$PYTHON_VERSION $SALT_INSTALL_METHOD $SALT_VERSION \
26+
# Use temporary workaround of downgrading Jinja2 for `master` image builds
27+
# See https://github.com/saltstack/salt/issues/60188
28+
&& if [ "${SALT_VERSION}" = "master" ]; then \
29+
pip3 install --no-cache-dir Jinja2==2.11.3; \
30+
fi \
2631
&& systemctl disable salt-minion.service > /dev/null 2>&1 \
2732
# Use the `LEGACY` crypto policy since Kitchen testing currently relies on
2833
# this keypair type (make the SSH policy in Fedora 33+ behave like Fedora 32)

Dockerfile.emg

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,11 @@ RUN mkdir --parents /etc/portage/repos.conf \
3737
&& emerge --noreplace --quiet --with-bdeps-auto=n ${PKGS} \
3838
&& curl -L https://raw.githubusercontent.com/saltstack/salt-bootstrap/develop/bootstrap-salt.sh | \
3939
sh -s -- -XUdfPD -x python$PYTHON_VERSION $SALT_INSTALL_METHOD $SALT_VERSION \
40+
# Use temporary workaround of downgrading Jinja2 for `master` image builds
41+
# See https://github.com/saltstack/salt/issues/60188
42+
&& if [ "${SALT_VERSION}" = "master" ]; then \
43+
pip3 install --no-cache-dir Jinja2==2.11.3; \
44+
fi \
4045
# Generate locales
4146
&& echo "en_US.UTF-8 UTF-8" >> /etc/locale.gen && locale-gen \
4247
# Enable sshd and disable salt's service as we don't need it running

Dockerfile.pac

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,11 @@ RUN pacman --noconfirm -Sy archlinux-keyring \
2424
&& pacman --noconfirm -Syu ${PKGS} \
2525
&& curl -L https://raw.githubusercontent.com/saltstack/salt-bootstrap/develop/bootstrap-salt.sh | \
2626
sh -s -- -XUdfPD -x python$PYTHON_VERSION $SALT_INSTALL_METHOD $SALT_VERSION \
27+
# Use temporary workaround of downgrading Jinja2 for `master` image builds
28+
# See https://github.com/saltstack/salt/issues/60188
29+
&& if [ "${SALT_VERSION}" = "master" ]; then \
30+
pip3 install --no-cache-dir Jinja2==2.11.3; \
31+
fi \
2732
&& systemctl enable sshd \
2833
&& systemctl disable salt-minion.service > /dev/null 2>&1 \
2934
# Remove unnecessary getty and udev targets that result in high CPU usage when using

Dockerfile.yum

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,11 @@ RUN if [[ "${DISTRO_NAME}" = "centos" ]]; then \
6969
yum clean expire-cache; \
7070
yum -y install salt-minion; \
7171
fi \
72+
# Use temporary workaround of downgrading Jinja2 for `master` image builds
73+
# See https://github.com/saltstack/salt/issues/60188
74+
&& if [ "${SALT_VERSION}" = "master" ]; then \
75+
pip3 install --no-cache-dir Jinja2==2.11.3; \
76+
fi \
7277
&& if command -v systemctl; then \
7378
systemctl disable salt-minion.service > /dev/null 2>&1; \
7479
elif [ -f "/etc/init.d/salt-minion" ]; then \

Dockerfile.zyp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,11 @@ RUN zypper refresh && zypper install --no-recommends -y ${PKGS} && zypper clean
3535
# https://github.com/saltstack/salt-bootstrap/blob/4310738bc4cf3b89b2873c0d66f71cbf0888edff/bootstrap-salt.sh#L323-L325
3636
&& curl -L https://raw.githubusercontent.com/saltstack/salt-bootstrap/develop/bootstrap-salt.sh | \
3737
sh -s -- -XUdfPwD -x python$PYTHON_VERSION $SALT_INSTALL_METHOD $SALT_VERSION \
38+
# Use temporary workaround of downgrading Jinja2 for `master` image builds
39+
# See https://github.com/saltstack/salt/issues/60188
40+
&& if [ "${SALT_VERSION}" = "master" ]; then \
41+
pip3 install --no-cache-dir Jinja2==2.11.3; \
42+
fi \
3843
&& systemctl disable salt-minion.service > /dev/null 2>&1 \
3944
# Remove unnecessary getty and udev targets that result in high CPU usage when using
4045
# multiple containers with Molecule or Kitchen (https://github.com/ansible/molecule/issues/1104)

0 commit comments

Comments
 (0)