Skip to content

Commit

Permalink
fix(build-rpm): remove builddep in favor of simple grep
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
cjp256 committed Nov 19, 2024
1 parent 4f7cfa5 commit e5d7331
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion scripts/build-rpm.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit e5d7331

Please sign in to comment.