diff --git a/test/image-blueprints/layer5-bootc/group1/rhel94-bootc-source-ostree-parent.containerfile b/test/image-blueprints/layer5-bootc/group1/rhel94-bootc-source-ostree-parent.containerfile index 9171fb69c6..84426f3fa5 100644 --- a/test/image-blueprints/layer5-bootc/group1/rhel94-bootc-source-ostree-parent.containerfile +++ b/test/image-blueprints/layer5-bootc/group1/rhel94-bootc-source-ostree-parent.containerfile @@ -12,6 +12,16 @@ RUN ln -sr /run/secrets/etc-pki-entitlement /etc/pki/entitlement-host && \ ln -sr /run/secrets/rhsm /etc/rhsm-host && \ mkdir -p /var/opt +# Lock the OS release version and enable EUS repositories to prevent +# the installation of packages belonging to a newer OS release +# hadolint ignore=SC1091 +RUN source /etc/os-release && \ + echo "${VERSION_ID}" > /etc/dnf/vars/releasever && \ + dnf config-manager --set-disabled '*' && \ + dnf config-manager --set-enabled \ + "rhel-9-for-$(uname -m)-baseos-eus-rpms" \ + "rhel-9-for-$(uname -m)-appstream-eus-rpms" + # Copy the repository configuration script COPY --chmod=755 ./bootc-images/microshift_repo_config.sh ${REPO_CONFIG_SCRIPT} diff --git a/test/image-blueprints/layer5-bootc/group1/rhel94-bootc-source.containerfile b/test/image-blueprints/layer5-bootc/group1/rhel94-bootc-source.containerfile index 218c3d7bfc..d22b75480e 100644 --- a/test/image-blueprints/layer5-bootc/group1/rhel94-bootc-source.containerfile +++ b/test/image-blueprints/layer5-bootc/group1/rhel94-bootc-source.containerfile @@ -5,6 +5,16 @@ ARG REPO_CONFIG_SCRIPT=/tmp/microshift_repo_config.sh ARG USHIFT_RPM_REPO_NAME=microshift-local ARG USHIFT_RPM_REPO_PATH=/tmp/$USHIFT_RPM_REPO_NAME +# Lock the OS release version and enable EUS repositories to prevent +# the installation of packages belonging to a newer OS release +# hadolint ignore=SC1091 +RUN source /etc/os-release && \ + echo "${VERSION_ID}" > /etc/dnf/vars/releasever && \ + dnf config-manager --set-disabled '*' && \ + dnf config-manager --set-enabled \ + "rhel-9-for-$(uname -m)-baseos-eus-rpms" \ + "rhel-9-for-$(uname -m)-appstream-eus-rpms" + # Copy the repository configuration script COPY --chmod=755 ./bootc-images/microshift_repo_config.sh ${REPO_CONFIG_SCRIPT}