Commit 05dadc3
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
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
59 | 59 | | |
60 | 60 | | |
61 | 61 | | |
62 | | - | |
| 62 | + | |
| 63 | + | |
63 | 64 | | |
64 | 65 | | |
65 | 66 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
59 | 59 | | |
60 | 60 | | |
61 | 61 | | |
62 | | - | |
| 62 | + | |
| 63 | + | |
63 | 64 | | |
64 | 65 | | |
65 | 66 | | |
| |||
0 commit comments