test/diff-manifests.sh: install build dependencies via spec file

This test is compiling `gen-manifests` via `go run` and thus needs
to pick up build requirements for the source. Instead of manually
installing the go toolchain use the `dnf build-dep` command on the
spec file so we pick up current and future build dependencies.
This commit is contained in:
Christian Kellner 2022-07-13 11:11:48 +02:00 committed by Ondřej Budai
parent f93b38c1a8
commit f76b1545ca

View file

@ -44,8 +44,14 @@ if [[ "${head}" == "${mergebase}" ]]; then
exit 0
fi
greenprint "Installing go"
sudo dnf install -y go
# We are compiling things, install the build requirements
greenprint "Installing build dependencies"
# first we need to install the rpm macros so that dnf can parse our spec file
sudo dnf install -y redhat-rpm-config
# we need to have access to codeready-builder repos for the dependencies
sudo dnf config-manager --set-enabled codeready-builder-for-rhel-9-rhui-rpms
# now install our build requirements
sudo dnf build-dep -y osbuild-composer.spec
manifestdir=$(mktemp -d)