Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 15 additions & 1 deletion tests/greenboot-bootc-anaconda-iso.sh
Original file line number Diff line number Diff line change
Expand Up @@ -302,6 +302,18 @@ EOF
;;
esac

# Listing greenboot/greenboot-default-health-checks by name isn't enough to
# guarantee the Copr build gets picked: dnf always resolves to the highest
# NEVRA across all enabled repos, and Copr snapshot builds conventionally use
# a Release starting at "0.<timestamp>...", the same convention official
# pre-GA/rebuilt packages use. Whenever a base repo ships a greenboot release
# that outranks the current Copr build, an unscoped reinstall/install would
# silently fall back to the stock package instead. Restrict resolution to
# just the just-enabled Copr repo so there is only one candidate regardless
# of what other repos offer (see commit eb7d75c, which fixed the same class
# of bug for the ostree/osbuild-composer flow).
GREENBOOT_COPR_REPO_ID="copr:copr.fedorainfracloud.org:packit:fedora-iot-greenboot-rs-${PR_NUMBER}"

if [[ "${USE_COMPOSE_RPMS}" == true && -n "${GREENBOOT_PACKAGES_URL}" ]]; then
tee -a Containerfile > /dev/null << EOF
COPY greenboot-*.rpm /tmp/
Expand All @@ -314,7 +326,9 @@ else
RUN (dnf install -y 'dnf5-command(copr)' || dnf install -y 'dnf-command(copr)') && \
dnf copr enable -y packit/fedora-iot-greenboot-rs-${PR_NUMBER} ${COPR_CHROOT} && \
dnf clean metadata && \
(dnf reinstall -y greenboot greenboot-default-health-checks || dnf install -y greenboot greenboot-default-health-checks) && \
dnf download --from-repo='${GREENBOOT_COPR_REPO_ID}' --destdir /tmp/copr-rpms greenboot greenboot-default-health-checks && \
dnf install -y /tmp/copr-rpms/*.rpm && \
rm -rf /tmp/copr-rpms && \
systemctl enable greenboot-healthcheck.service
EOF
fi
Expand Down
16 changes: 15 additions & 1 deletion tests/greenboot-bootc-qcow2.sh
Original file line number Diff line number Diff line change
Expand Up @@ -302,6 +302,18 @@ EOF
;;
esac

# Listing greenboot/greenboot-default-health-checks by name isn't enough to
# guarantee the Copr build gets picked: dnf always resolves to the highest
# NEVRA across all enabled repos, and Copr snapshot builds conventionally use
# a Release starting at "0.<timestamp>...", the same convention official
# pre-GA/rebuilt packages use. Whenever a base repo ships a greenboot release
# that outranks the current Copr build, an unscoped reinstall/install would
# silently fall back to the stock package instead. Restrict resolution to
# just the just-enabled Copr repo so there is only one candidate regardless
# of what other repos offer (see commit eb7d75c, which fixed the same class
# of bug for the ostree/osbuild-composer flow).
GREENBOOT_COPR_REPO_ID="copr:copr.fedorainfracloud.org:packit:fedora-iot-greenboot-rs-${PR_NUMBER}"

if [[ "${USE_COMPOSE_RPMS}" == true && -n "${GREENBOOT_PACKAGES_URL}" ]]; then
tee -a Containerfile > /dev/null << EOF
COPY greenboot-*.rpm /tmp/
Expand All @@ -314,7 +326,9 @@ else
RUN (dnf install -y 'dnf5-command(copr)' || dnf install -y 'dnf-command(copr)') && \
dnf copr enable -y packit/fedora-iot-greenboot-rs-${PR_NUMBER} ${COPR_CHROOT} && \
dnf clean metadata && \
(dnf reinstall -y greenboot greenboot-default-health-checks || dnf install -y greenboot greenboot-default-health-checks) && \
dnf download --from-repo='${GREENBOOT_COPR_REPO_ID}' --destdir /tmp/copr-rpms greenboot greenboot-default-health-checks && \
dnf install -y /tmp/copr-rpms/*.rpm && \
rm -rf /tmp/copr-rpms && \
systemctl enable greenboot-healthcheck.service
EOF
fi
Expand Down
14 changes: 13 additions & 1 deletion tests/greenboot-fedora-iot-raw.sh
Original file line number Diff line number Diff line change
Expand Up @@ -308,9 +308,21 @@ if [[ $copr_result != 0 ]]; then
exit 1
fi

# Listing greenboot/greenboot-default-health-checks by name isn't enough to
# guarantee the Copr build gets picked: dnf always resolves to the highest
# NEVRA across all enabled repos, and Copr snapshot builds conventionally use
# a Release starting at "0.<timestamp>...", the same convention official
# pre-GA/rebuilt packages use. Whenever BaseOS/AppStream/Fedora ships a
# greenboot release that outranks the current Copr build, an unscoped
# download would silently fetch the stock package instead. Restrict
# resolution to just the just-enabled Copr repo so there is only one
# candidate regardless of what other repos offer (see commit eb7d75c, which
# fixed the same class of bug for the ostree/osbuild-composer flow).
GREENBOOT_COPR_REPO_ID="copr:copr.fedorainfracloud.org:packit:fedora-iot-greenboot-rs-${PR_NUMBER}"

greenprint "📦 Downloading greenboot RPMs from Copr"
ssh "${SSH_OPTIONS[@]}" -i "${SSH_KEY}" "${SSH_USER}@${GUEST_ADDRESS}" \
"dnf download --destdir /tmp/greenboot-rpms greenboot greenboot-default-health-checks"
"dnf download --from-repo='${GREENBOOT_COPR_REPO_ID}' --destdir /tmp/greenboot-rpms greenboot greenboot-default-health-checks"

greenprint "📦 Replacing greenboot packages with PR build"
ssh "${SSH_OPTIONS[@]}" -i "${SSH_KEY}" "${SSH_USER}@${GUEST_ADDRESS}" \
Expand Down
Loading