On Tue, Jul 25, 2017 at 12:25:18PM +0200, Stef Walter wrote:
On 25.07.2017 12:10, Pierre-Yves Chibon wrote:
> On Tue, Jul 25, 2017 at 09:49:22AM +0200, Stef Walter wrote:
>> The Ansible dynamic inventory scripts need certain dependencies in order
>> to run successfully. I think we can handle this with Recommends in the
>> standard-test-roles package:
>>
>> diff --git a/standard-test-roles.spec b/standard-test-roles.spec
>> index 05d6cf5..5970bb9 100644
>> --- a/standard-test-roles.spec
>> +++ b/standard-test-roles.spec
>> @@ -10,6 +10,9 @@ Source0:
>>
http://releases.pagure.org/%{name}/%{name}-%{version}.tar.gz
>> BuildArch: noarch
>> BuildRequires: coreutils
>> Requires: ansible
>> +Recommends: docker
>> +Recommends: genisoimage
>> +Recommends: qemu-system-x86
>>
>> %description
>> Shared Ansible roles to support the Standard Test Interface as described
>>
>>
>> What do you think? Once we need package this for RHEL or older Fedora we
>> can make these a hard dependency for those operating systems using an
>> %if block.
>>
> I am not sure Recommends are allowed in any version of Fedora, so we may have to
> use plain Requires or maybe use subpackages?
I've used them since Fedora 24. So perhaps this is a better patch:
You're right it's allowed:
https://fedoraproject.org/wiki/Packaging:Guidelines#Weak_dependencies
I thought it wasn't, my bad :)
Pierre
diff --git a/standard-test-roles.spec b/standard-test-roles.spec
index 05d6cf5..5e1c099 100644
--- a/standard-test-roles.spec
+++ b/standard-test-roles.spec
@@ -11,6 +11,16 @@ BuildArch: noarch
BuildRequires: coreutils
Requires: ansible
+%if 0%{?fedora} >= 24 || 0%{?rhel} >= 8
+Recommends: docker
+Recommends: genisoimage
+Recommends: qemu-system-x86
+%else
+Requires: docker
+Recommends: genisoimage
+Recommends: qemu-system-x86
+%endif
+
%description
Shared Ansible roles to support the Standard Test Interface as described
at %{url}.
Cheers,
Stef