From 05dadc33c2159ed6395c627cc35b650a9e361f96 Mon Sep 17 00:00:00 2001 From: Micah Abbott Date: Fri, 7 Aug 2026 16:19:31 -0400 Subject: [PATCH] ci: use dnf builddep to install make-rpm build dependencies greenboot-rs.spec has an unconditional BuildRequires: systemd-rpm-macros, but the make-rpm job's dnf install step never installs it, only git/make/rpm-build/rust-toolset. rpmbuild then fails dependency resolution before it ever gets to building anything: error: Failed build dependencies: systemd-rpm-macros is needed by greenboot-rs-0.16.3-0.el9.x86_64 Rather than hardcode systemd-rpm-macros alongside rust-toolset (which would just be one more package to keep in sync with the spec by hand), use 'dnf builddep' against greenboot-rs.spec directly so the job always installs whatever the spec's BuildRequires actually resolve to on this container, including the rust-toolset/cargo-rpm-macros conditional branch, with no separate list to maintain. Verified against the exact quay.io/centos/centos:stream9 image the job uses: 'dnf install -y git make rpm-build dnf-plugins-core' followed by 'dnf builddep -y greenboot-rs.spec' correctly resolves rust-toolset and systemd-rpm-macros, and 'make rpm' completes and produces all four expected RPMs. Also checked this doesn't regress the Fedora build path: 'dnf builddep' alone only sees the spec's static BuildRequires, not the per-crate rust-*-devel packages that %generate_buildrequires/ %cargo_generate_buildrequires enumerate dynamically during %prep on Fedora. That's fine here because this CI job only ever runs in the CentOS Stream 9 container above; the Fedora path is handled entirely separately by the Makefile's own Fedora-conditional dnf install of GREENBOOT_RUST_DEPENDENCIES, which this change doesn't touch. Assisted-by: OpenCode (Claude Sonnet 5) --- .github/workflows/comment-ci.yaml | 3 ++- .github/workflows/greenboot-ci.yaml | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/comment-ci.yaml b/.github/workflows/comment-ci.yaml index 9fa0e8a..34da52a 100644 --- a/.github/workflows/comment-ci.yaml +++ b/.github/workflows/comment-ci.yaml @@ -59,7 +59,8 @@ jobs: - name: Build RPMs run: | - dnf install -y git make rpm-build rust-toolset + dnf install -y git make rpm-build dnf-plugins-core + dnf builddep -y greenboot-rs.spec make rpm - name: Verify RPMs were created diff --git a/.github/workflows/greenboot-ci.yaml b/.github/workflows/greenboot-ci.yaml index 7aca053..ac1062f 100644 --- a/.github/workflows/greenboot-ci.yaml +++ b/.github/workflows/greenboot-ci.yaml @@ -59,7 +59,8 @@ jobs: - name: Build RPMs run: | - dnf install -y git make rpm-build rust-toolset + dnf install -y git make rpm-build dnf-plugins-core + dnf builddep -y greenboot-rs.spec git config --global --add safe.directory /__w/greenboot-rs/greenboot-rs make rpm