From 575750ac4a3abb6fdfa45e2cc65186df291d8ddf Mon Sep 17 00:00:00 2001 From: Paride Legovini Date: Thu, 27 Aug 2020 16:37:14 +0200 Subject: redhat spec: add missing BuildRequires (#552) 456fb55744a1acc6bd2f464b7656a9c33d0b7ac5 made tools/read-dependencies and package/brpm distinguish between build dependencies and runtime dependencies, however packages/redhat/cloud-init.spec.in expects all the dependencies to be in the 'requires' list, thus missing some build dependencies. This change makes cloud-init.spec use 'buildrequires' too. The build happens to succeed without python3-devel on the epel-8 copr chroot as it pulls in the epel-rpm-macros package, which in turn depends on python3-devel. In other words the dependency is satisfied by chance. Packages building for Python 3 need to explicitly specify BuildRequires: python3-devel, see: [1]. [1] https://docs.fedoraproject.org/en-US/packaging-guidelines/Python/ --- packages/redhat/cloud-init.spec.in | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'packages') diff --git a/packages/redhat/cloud-init.spec.in b/packages/redhat/cloud-init.spec.in index 4cff2c97..16138012 100644 --- a/packages/redhat/cloud-init.spec.in +++ b/packages/redhat/cloud-init.spec.in @@ -39,10 +39,7 @@ Requires(post): chkconfig Requires(preun): chkconfig %endif -# These are runtime dependencies, but declared as BuildRequires so that -# - tests can be run here. -# - parts of cloud-init such (setup.py) use these dependencies. -{% for r in requires %} +{% for r in buildrequires %} BuildRequires: {{r}} {% endfor %} @@ -57,8 +54,10 @@ Requires: python-argparse %endif -# Install 'dynamic' runtime reqs from *requirements.txt and pkg-deps.json +# Install 'dynamic' runtime reqs from *requirements.txt and pkg-deps.json. +# Install them as BuildRequires too as they're used for testing. {% for r in requires %} +BuildRequires: {{r}} Requires: {{r}} {% endfor %} -- cgit v1.2.3