Skip to content

Commit 05dadc3

Browse files
committed
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)
1 parent 74f42a1 commit 05dadc3

2 files changed

Lines changed: 4 additions & 2 deletions

File tree

.github/workflows/comment-ci.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,8 @@ jobs:
5959

6060
- name: Build RPMs
6161
run: |
62-
dnf install -y git make rpm-build rust-toolset
62+
dnf install -y git make rpm-build dnf-plugins-core
63+
dnf builddep -y greenboot-rs.spec
6364
make rpm
6465
6566
- name: Verify RPMs were created

.github/workflows/greenboot-ci.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,8 @@ jobs:
5959

6060
- name: Build RPMs
6161
run: |
62-
dnf install -y git make rpm-build rust-toolset
62+
dnf install -y git make rpm-build dnf-plugins-core
63+
dnf builddep -y greenboot-rs.spec
6364
git config --global --add safe.directory /__w/greenboot-rs/greenboot-rs
6465
make rpm
6566

0 commit comments

Comments
 (0)