From 201c6127e01e3a989c89c612e9ffc10db115292e Mon Sep 17 00:00:00 2001 From: Nick Dokos Date: Mon, 13 Jun 2022 13:21:16 -0400 Subject: [PATCH 1/2] CentOS-Stream-8/9 dependency fixes - backport to b0.71 Centos-Stream-8/9: change the 'ansible' dependency to 'ansible-core'. Everybody else (at least for now) can get its hands on an 'ansible' package (EPEL packages it for RHEL: it has a dependency on 'ansible-core' and includes some curated roles). --- agent/rpm/pbench-agent.spec.j2 | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/agent/rpm/pbench-agent.spec.j2 b/agent/rpm/pbench-agent.spec.j2 index 7b8796a6df..fd4fd93742 100644 --- a/agent/rpm/pbench-agent.spec.j2 +++ b/agent/rpm/pbench-agent.spec.j2 @@ -8,16 +8,22 @@ URL: https://github.com/distributed-system-analysis/pbench Source0: pbench-agent-%{version}.tar.gz Buildarch: noarch -%if 0%{?rhel} < 9 -Requires: ansible -%else +# EPEL provides ansible (a curated set of roles with a dependency on ansible-core) +# on RHEL 8 and RHEL9. Only CentOS-Stream seems to not have an ansible package +# available. + +%if 0%{?centos} >= 8 Requires: ansible-core +%else +Requires: ansible %endif -%if 0%{?rhel} == 7 + +%if 0%{?rhel} == 7 Requires: python3, python3-pip %endif +# this applies to CentOS-Stream-8 as well %if 0%{?rhel} == 8 Requires: python36, python3-pip # RPMs for modules in requirements.txt @@ -26,6 +32,7 @@ Requires: python3-cffi, python3-click, python3-requests Requires: python3-docutils, python3-psutil %endif +# this applies to CentOS-Stream-9 as well %if 0%{?rhel} == 9 Requires: python3-pip # RPMs for modules in requirements.txt @@ -34,6 +41,7 @@ Requires: python3-cffi, python3-requests Requires: python3-docutils, python3-psutil %endif + %if 0%{?fedora} != 0 Requires: python3, python3-pip # RPMs for modules in requirements.txt From 2e44e4b4538ac9940a5a48e430875134e90b474a Mon Sep 17 00:00:00 2001 From: Nick Dokos Date: Wed, 15 Jun 2022 11:27:57 -0400 Subject: [PATCH 2/2] Fixes from review comments --- agent/rpm/pbench-agent.spec.j2 | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/agent/rpm/pbench-agent.spec.j2 b/agent/rpm/pbench-agent.spec.j2 index fd4fd93742..9f33f3843a 100644 --- a/agent/rpm/pbench-agent.spec.j2 +++ b/agent/rpm/pbench-agent.spec.j2 @@ -19,11 +19,11 @@ Requires: ansible %endif -%if 0%{?rhel} == 7 +%if 0%{?rhel} == 7 Requires: python3, python3-pip %endif -# this applies to CentOS-Stream-8 as well +# This condition will be true on a CentOS-Stream-8 system as well %if 0%{?rhel} == 8 Requires: python36, python3-pip # RPMs for modules in requirements.txt @@ -32,7 +32,7 @@ Requires: python3-cffi, python3-click, python3-requests Requires: python3-docutils, python3-psutil %endif -# this applies to CentOS-Stream-9 as well +# This condition will be true on a CentOS-Stream-9 system as well %if 0%{?rhel} == 9 Requires: python3-pip # RPMs for modules in requirements.txt