From 854a0868b7214a8872f9135a7fc61ab9119143bb Mon Sep 17 00:00:00 2001 From: Maxwell G Date: Tue, 26 Apr 2022 21:13:39 -0500 Subject: [PATCH] Restore compatability with f34 and f35. --- ansible-generator | 2 +- ansible-packaging.spec | 11 ++++++++--- ansible.attr | 1 + 3 files changed, 10 insertions(+), 4 deletions(-) diff --git a/ansible-generator b/ansible-generator index 862947e..3d485e7 100755 --- a/ansible-generator +++ b/ansible-generator @@ -38,7 +38,7 @@ def main(): f"ansible-collection({info['namespace']}.{info['name']}) = {info['version']}" ) if args.action == "requires": - print("ansible-core >= 2.12.0") + print("(ansible-core or (ansible < 2.10.0 with ansible >= 2.9.10))") for dep, req in info.get("dependencies", {}).items(): print(f"ansible-collection({dep})", end="") if req == "*": diff --git a/ansible-packaging.spec b/ansible-packaging.spec index 4aec199..5833189 100644 --- a/ansible-packaging.spec +++ b/ansible-packaging.spec @@ -1,6 +1,6 @@ Name: ansible-packaging Version: 1 -Release: 3%{?dist} +Release: 4%{?dist} Summary: RPM packaging macros and generators for Ansible collections License: GPLv3+ @@ -10,13 +10,15 @@ Source1: ansible.attr Source2: macros.ansible Source3: COPYING -Requires: ansible-core +# Require either ansible-core or a version of ansible 2.9 that supports collections but prefer ansible-core. +Requires: (ansible-core or (ansible < 2.10.0 with ansible >= 2.9.10)) +Suggests: ansible-core # Conflict with anything providing its own copies of these files %if ! (0%{?rhel} >= 8) Conflicts: ansible-core < 2.12.1-3 %endif -Conflicts: ansible <= 2.9.99 +Conflicts: ansible < 2.9.27-3 BuildArch: noarch @@ -47,6 +49,9 @@ install -Dpm0755 -t %{buildroot}%{_rpmconfigdir} ansible-generator %changelog +* Tue Apr 26 2022 Maxwell G - 1-4 +- Restore compatability with f34 and f35. + * Mon Jan 31 2022 Neal Gompa - 1-3 - Drop vestigial support for the legacy ansible package - Make compatibile with RHEL 8.6+ diff --git a/ansible.attr b/ansible.attr index 997dafa..7c0c346 100644 --- a/ansible.attr +++ b/ansible.attr @@ -1,3 +1,4 @@ %__ansible_provides %{_rpmconfigdir}/ansible-generator --provides %__ansible_requires %{_rpmconfigdir}/ansible-generator --requires +%__ansible_suggests /usr/bin/echo ansible-core %__ansible_path ^%{_datadir}/ansible/collections/ansible_collections/[^/]+/[^/]+/MANIFEST.json$