2025-08-27 11:24:07 -08:00
|
|
|
#!/bin/bash
|
|
|
|
|
set -euo pipefail
|
|
|
|
|
|
2026-01-21 00:19:07 -09:00
|
|
|
# This script is called very early in the buildah path from build-rootfs
|
|
|
|
|
# after inject_yumrepos() to modify the build environment. Example use cases
|
|
|
|
|
# are to fast-track fixes or work around bugs.
|
2026-09-23 16:44:47 -08:00
|
|
|
# Note that any downloaded packages here needs to be included in lockfiles (the main
|
2026-01-21 00:19:07 -09:00
|
|
|
# or overrides one).
|
2026-09-23 17:08:27 -08:00
|
|
|
|
|
|
|
|
# Get the newer rpm-ostree in `next*` streams. Fedora 45 is the only
|
|
|
|
|
# place where the 2026.3-1 made it into the bootc builder container [1].
|
|
|
|
|
# [1] https://github.com/coreos/fedora-coreos-tracker/issues/2226#issuecomment-5805504703
|
|
|
|
|
if [ "$(rpm -q --qf '%{NVR}' rpm-ostree)" == 'rpm-ostree-2026.3-1.fc45' ]; then
|
|
|
|
|
# hermeto.repo is the repo Konflux injects when hermetic build is enabled
|
|
|
|
|
# and if it's there we can just update from it.
|
|
|
|
|
if [ -f "/etc/yum.repos.d/hermeto.repo" ]; then
|
|
|
|
|
sudo dnf update -y rpm-ostree rpm-ostree-libs
|
|
|
|
|
else
|
|
|
|
|
# else we need to pull from koji for now
|
|
|
|
|
sudo dnf upgrade -y --disablerepo=* \
|
|
|
|
|
https://kojipkgs.fedoraproject.org//packages/rpm-ostree/2026.3/2.fc45/$(arch)/rpm-ostree{,-libs}-2026.3-2.fc45.$(arch).rpm
|
|
|
|
|
fi
|
|
|
|
|
# if we didn't get the update we need then let's error
|
|
|
|
|
if [ "$(rpm -q --qf '%{NVR}' rpm-ostree)" != 'rpm-ostree-2026.3-2.fc45' ]; then
|
|
|
|
|
echo "Expected rpm-ostree-2026.3-2.fc45 but got $(rpm -q --qf '%{NVR}' rpm-ostree)"
|
|
|
|
|
exit 1
|
|
|
|
|
fi
|
|
|
|
|
fi
|