From 7d4f3f7616cc95037c240d8bd243f02ece8e41b7 Mon Sep 17 00:00:00 2001 From: Maxwell G Date: Apr 27 2022 01:58:51 +0000 Subject: Ensure correct version of ansible-core is available at buildtime. Implement support for epel8. --- diff --git a/ansible.spec b/ansible.spec index 2bac7ef..bfeb139 100644 --- a/ansible.spec +++ b/ansible.spec @@ -4,10 +4,26 @@ %global ansible_licensedir %{_defaultlicensedir}/ansible %global ansible_docdir %{_defaultdocdir}/ansible +# This should be updated after each release to match upstream's metadata +# https://github.com/ansible-community/community-topics/issues/84 +%global ansible_core_version 2.12.3 +%global ansible_core_next_version 2.13 +%global ansible_core_requires (ansible-core >= %{ansible_core_version} with ansible-core < %{ansible_core_next_version}) + +%if 0%{?rhel} == 8 +# RHEL 8's ansible-core package is built using Python 3.8, which is not the default version. +%define python3_pkgversion 38 +BuildRequires: python%{python3_pkgversion}-rpm-macros + +# RHEL 8's RPM Python dependency generator ignores the version constraints, so we manually specify the dependency. +%{?python_disable_dependency_generator} +Requires: %{ansible_core_requires} +%endif + Name: ansible Summary: Curated set of Ansible collections included in addition to ansible-core Version: 5.5.0 -Release: 1%{?dist} +Release: 2%{?dist} License: GPLv3+ Source0: %{pypi_source} @@ -15,8 +31,9 @@ Url: https://ansible.com BuildArch: noarch BuildRequires: findutils -BuildRequires: python3-devel -BuildRequires: python3-setuptools +BuildRequires: python%{python3_pkgversion}-devel +BuildRequires: python%{python3_pkgversion}-setuptools +BuildRequires: %{ansible_core_requires} %if 0%{?with_tests} # TODO build-requires @@ -108,6 +125,10 @@ echo "[END] Delete unnecessary files and directories" %{python3_sitelib}/*egg-info %changelog +* Mon Apr 25 2022 Maxwell G - 5.5.0-2 +- Ensure correct version of ansible-core is available at buildtime. +- Implement support for epel8. + * Tue Mar 15 2022 David Moreau-Simard - 5.5.0-1 - Update to latest upstream release