2025-08-27 11:24:07 -08:00
|
|
|
#!/bin/bash
|
|
|
|
|
set -euo pipefail
|
|
|
|
|
|
2025-08-28 13:23:18 -08:00
|
|
|
# This script is called in the buildah path to modify the build environment
|
|
|
|
|
# before entering the shared build-rootfs script. Example use cases are to
|
|
|
|
|
# fast-track fixes or work around bugs.
|
|
|
|
|
|
2025-08-27 11:24:07 -08:00
|
|
|
arch=$(uname -m)
|
|
|
|
|
. /etc/os-release
|
|
|
|
|
|
2025-09-05 01:06:53 -08:00
|
|
|
# cachi2 is the repo Konflux injects when hermetic build is enabled and
|
|
|
|
|
# is self-sufficient to pull all the required RPMs.
|
|
|
|
|
if [ ! -f "/etc/yum.repos.d/cachi2.repo" ]; then
|
|
|
|
|
cp /src/fedora-coreos-continuous.repo /etc/yum.repos.d
|
|
|
|
|
fi
|
2025-09-19 08:59:11 -08:00
|
|
|
# NOTE: try to remove anything that queries repos here once it's no longer
|
|
|
|
|
# needed so that we don't unnecessarily pay for repo metadata.
|
|
|
|
|
|
|
|
|
|
# make sure we have https://github.com/coreos/rpm-ostree/pull/5454
|
|
|
|
|
if ! rpm-ostree compose build-chunked-oci -h | grep -q -- --label; then
|
2025-09-17 15:08:28 -08:00
|
|
|
sudo dnf update rpm-ostree -y --repo fedora-coreos-continuous --releasever "$VERSION_ID"
|
|
|
|
|
fi
|