From e5d7331c526f94c394e7aa43271d5498ee8a6db9 Mon Sep 17 00:00:00 2001 From: Chris Patterson Date: Wed, 13 Nov 2024 13:16:56 -0800 Subject: [PATCH] fix(build-rpm): remove builddep in favor of simple grep dnf builddep interfaces changed between fedora 40 and 41 where --spec is dropped. Instead of trying to guess the right interface for the OS, just grep the build requirements from the spec and install them. Signed-off-by: Chris Patterson --- scripts/build-rpm.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/build-rpm.sh b/scripts/build-rpm.sh index dbfce86..2c7bf1d 100755 --- a/scripts/build-rpm.sh +++ b/scripts/build-rpm.sh @@ -29,7 +29,8 @@ git archive --verbose --format=tar.gz --prefix="azure-vm-utils-${version}/" HEAD cd "${project_dir}/packaging/${distro}" # Install dependencies. -sudo dnf builddep -y --spec azure-vm-utils.spec +build_requirements=$(grep ^BuildRequires azure-vm-utils.spec | awk '{{print $2}}' | tr '\n' ' ') +sudo dnf install -y ${build_requirements} # Build RPM. rpmbuild -ba --define "__git_version ${version}" --define "__git_release ${release}" --define "_topdir ${build_dir}" azure-vm-utils.spec