Skip to content

test: propagate Copr NEVR pinning (eb7d75c) to bootc/fedora-iot-raw scripts - #196

Open
miabbott wants to merge 4 commits into
fedora-iot:mainfrom
miabbott:fix-copr-pin-on-178
Open

test: propagate Copr NEVR pinning (eb7d75c) to bootc/fedora-iot-raw scripts#196
miabbott wants to merge 4 commits into
fedora-iot:mainfrom
miabbott:fix-copr-pin-on-178

Conversation

@miabbott

@miabbott miabbott commented Aug 7, 2026

Copy link
Copy Markdown
Member

Problem

Commit eb7d75c ("test(ostree): pin greenboot to exact Copr NEVR") fixed a bug where dnf would silently install a stock Fedora/RHEL greenboot package instead of the per-PR Copr build, because Copr snapshot builds use a Release starting at 0.<timestamp>... which can be outranked by an official package's NEVRA. That fix only landed in tests/greenboot-ostree.sh.

This PR propagates the same fix to the three sibling scripts that still resolve greenboot/greenboot-default-health-checks via unscoped dnf calls after enabling the per-PR Copr repo:

  • tests/greenboot-fedora-iot-raw.sh
  • tests/greenboot-bootc-anaconda-iso.sh
  • tests/greenboot-bootc-qcow2.sh

This was surfaced by Testing Farm failures on #193, where all three affected checks failed on an unrelated assertion because the VM had the stock greenboot RPM installed instead of the Copr PR build. See #195 for the full root-cause writeup.

Fix

Adds --from-repo='copr:copr.fedorainfracloud.org:packit:fedora-iot-greenboot-rs-<PR_NUMBER>' to the relevant dnf download/dnf reinstall/dnf install calls in each script, restricting package resolution to just the just-enabled Copr repo so no other repo can compete regardless of NEVRA. The exact repo-ID format was confirmed against both the dnf4 (dnf-plugins-core/copr.py) and dnf5 (dnf5/copr_plugin/copr_repo.cpp) plugin source — both construct copr:<hub>:<owner>:<project> identically.

The fix lands inside the else (Copr) branch of the if [[ "${USE_COMPOSE_RPMS}" == true ]]; then ... else ... fi conditional that #178 introduced in both bootc scripts (now merged to main), so it doesn't touch or affect the compose-RPM install path at all.

Validation

Pending a /test run on this PR. Success criteria: the Ansible/journalctl log shows the post-#190 INFO "No previous boot journal available..." message (not the pre-#190 WARN) on at least one fedora-iot-raw and one bootc target.

rhel-10.2-bootc / rhel-9.8-ostree are expected to still fail on this fork-originated PR due to an unrelated Testing Farm ranch ACL restriction — not in scope here.

Closes #195

Updated context

The bootc scripts were further updated to replace the dnf reinstall || dnf install --from-repo approach with dnf download --from-repo + dnf install /tmp/copr-rpms/*.rpm.

dnf reinstall --from-repo requires the exact same NEVR in the target repo, which fails when the base image ships a different Release than the Copr snapshot build (e.g. base image has 0.16.3-0.fc44, Copr has 0.16.3-0<timestamp>.pr196...fc44). dnf install --from-repo won't replace an already-installed package. Downloading first and installing from local RPMs avoids both issues, matching the ostree and compose-RPM patterns.

🤖 Assisted-by: OpenCode (Claude Sonnet 5)

@pcdubs

pcdubs commented Aug 13, 2026

Copy link
Copy Markdown
Member

CI Status

The dnf download --from-repo + local install fix is working correctly — confirmed that the Copr RPMs are being downloaded and installed in both ostree and bootc tests:

  • ostree: dnf download --from-repo + rpm-ostree override replace
  • bootc: dnf download --from-repo + dnf install /tmp/copr-rpms/*.rpm ✅ (successfully downgrades from 0.16.3-1 to the Copr build)

RHEL/CentOS failures

The RHEL and CentOS test failures are due to Testing Farm's repository allowlist — miabbott/greenboot-rs is not allowed on the redhat ranch. These will pass once the PR is merged to fedora-iot/greenboot-rs.

miabbott and others added 4 commits August 13, 2026 10:59
Listing greenboot/greenboot-default-health-checks by name after enabling
the per-PR Copr repo isn't enough: dnf resolves 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 Fedora ships a greenboot release that
outranks the current Copr build, dnf silently downloads the stock
package and the test exercises unpatched code -- the same class of bug
eb7d75c fixed for the ostree/osbuild-composer flow, just unpropagated
to this script's SSH-based dnf5 download.

Assisted-by: OpenCode (Claude Sonnet 5)
Same dnf NEVRA-precedence issue eb7d75c fixed for the ostree/osbuild-
composer flow applies here: the generated Containerfile's dnf5 reinstall/
install calls resolve greenboot/greenboot-default-health-checks against
every enabled repo, so a base-repo greenboot release that outranks the
Copr snapshot's "0.<timestamp>..." release silently wins and the test
exercises unpatched code.

Assisted-by: OpenCode (Claude Sonnet 5)
Identical fix to the anaconda-iso sibling script: the generated
Containerfile's dnf5 reinstall/install calls need to be scoped to the
just-enabled Copr repo so a competing base-repo greenboot release can't
outrank the Copr snapshot build and silently install unpatched code.

Assisted-by: OpenCode (Claude Sonnet 5)
dnf reinstall --from-repo requires the exact same NEVR in the target
repo, which fails when the base image ships a different Release than
the Copr snapshot build. dnf install --from-repo won't replace an
already-installed package. Switch to dnf download + local install,
matching the ostree and compose-RPM patterns.

Assisted-by: Claude (Anthropic)
Signed-off-by: Paul Whalen <pwhalen@fedoraproject.org>
@pcdubs
pcdubs force-pushed the fix-copr-pin-on-178 branch from 47988a0 to e4d1d2e Compare August 13, 2026 15:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

test: propagate Copr NEVR pinning (eb7d75c) to bootc/fedora-iot-raw scripts

2 participants