Update ansible-pcp to package version 2.2.5

Resolves: rhbz#2059464
This commit is contained in:
Nathan Scott 2022-05-03 13:04:42 +10:00
parent 35ca58568b
commit 314505421f
3 changed files with 32 additions and 27 deletions

1
.gitignore vendored
View File

@ -2,3 +2,4 @@
/ansible-pcp-2.1.4.tar.gz /ansible-pcp-2.1.4.tar.gz
/ansible-pcp-2.2.1.tar.gz /ansible-pcp-2.2.1.tar.gz
/ansible-pcp-2.2.2.tar.gz /ansible-pcp-2.2.2.tar.gz
/ansible-pcp-2.2.5.tar.gz

View File

@ -1,6 +1,6 @@
Name: ansible-pcp Name: ansible-pcp
Version: 2.2.2 Version: 2.2.5
Release: 2%{?dist} Release: 1%{?dist}
Summary: Ansible Metric collection for Performance Co-Pilot Summary: Ansible Metric collection for Performance Co-Pilot
License: MIT License: MIT
URL: https://github.com/performancecopilot/ansible-pcp URL: https://github.com/performancecopilot/ansible-pcp
@ -15,39 +15,39 @@ BuildArch: noarch
%global collection_name metrics %global collection_name metrics
%endif %endif
%if 0%{?rhel} >= 8
Requires: (ansible-core >= 2.11.0 or ansible >= 2.9.0)
%endif
# NOTE: Even though ansible-core is in 8.6, it is only available # NOTE: Even though ansible-core is in 8.6, it is only available
# at *runtime*, not at *buildtime* - so we can't have # at *runtime*, not at *buildtime* - so we can't have
# ansible-core as a build_dep on RHEL8 # ansible-core as a build_dep on latest RHEL versions.
%if 0%{?fedora} || 0%{?rhel} >= 9 %if 0%{?fedora}
%global have_ansible 0 %bcond_without ansible
%global ansible_build_dep ansible-core >= 2.11.0 %global ansible_build_dep ansible-core >= 2.11.0
%else %else
%if 0%{?rhel} && ! 0%{?epel} %if 0%{?rhel} && ! 0%{?epel}
%global have_ansible 1 %bcond_with ansible
%else %else
%global have_ansible 0 %bcond_without ansible
%global ansible_build_dep ansible >= 2.9.10 %global ansible_build_dep ansible >= 2.9.10
%endif %endif
%endif %endif
%if %{have_ansible} %if 0%{?rhel} >= 8
BuildRequires: %{ansible_build_dep} Requires: (ansible-core >= 2.11.0 or ansible >= 2.9.0)
# package has been removed from RHEL9
%if 0%{?rhel} >= 9
%global have_ansible_lint 0
%else
%global have_ansible_lint 1
%endif
%else
%global have_ansible_lint 0
%global ansible_collection_files %{_datadir}/ansible/collections/ansible_collections/%{collection_namespace}
%endif %endif
%if %{have_ansible_lint} %if %{with ansible}
BuildRequires: %{ansible_build_dep}
%endif
%{!?ansible_collection_files:%define ansible_collection_files %{_datadir}/ansible/collections/ansible_collections/%{collection_namespace}/}
# package has been removed from RHEL8
%if 0%{?rhel} >= 8
%bcond_with ansible_lint
%else
%bcond_without ansible_lint
%endif
%if %{with ansible_lint}
BuildRequires: python3-ansible-lint BuildRequires: python3-ansible-lint
%endif %endif
@ -105,14 +105,14 @@ find . -name \*.yml -o -name \*.md | while read file; do
done done
%build %build
%if %{have_ansible} %if %{with ansible}
%ansible_collection_build %ansible_collection_build
%else %else
tar -cf %{_tmppath}/%{collection_namespace}-%{collection_name}-%{version}.tar.gz . tar -cf %{_tmppath}/%{collection_namespace}-%{collection_name}-%{version}.tar.gz .
%endif %endif
%install %install
%if %{have_ansible} %if %{with ansible}
%ansible_collection_install %ansible_collection_install
%else %else
mkdir -p %{buildroot}%{ansible_collection_files}/%{collection_name} mkdir -p %{buildroot}%{ansible_collection_files}/%{collection_name}
@ -123,7 +123,7 @@ tar -xf %{_tmppath}/%{collection_namespace}-%{collection_name}-%{version}.tar.gz
%check %check
mv yamllint.yml .yamllint.yml mv yamllint.yml .yamllint.yml
mv yamllint_defaults.yml .yamllint_defaults.yml mv yamllint_defaults.yml .yamllint_defaults.yml
%if %{have_ansible_lint} %if %{with ansible_lint}
ansible-lint `find roles -name \*.yml` ansible-lint `find roles -name \*.yml`
%endif %endif
@ -133,6 +133,10 @@ ansible-lint `find roles -name \*.yml`
%{ansible_collection_files} %{ansible_collection_files}
%changelog %changelog
* Thu Apr 21 2022 Nathan Scott <nathans@redhat.com> 2.2.5-1
- Switch to using bcond spec file mechanisms
- Latest upstream release (BZ 2059464)
* Tue Feb 15 2022 Nathan Scott <nathans@redhat.com> 2.2.2-2 * Tue Feb 15 2022 Nathan Scott <nathans@redhat.com> 2.2.2-2
- RHEL8.6+, RHEL9+, Fedora - add "ansible-core or ansible" dep - RHEL8.6+, RHEL9+, Fedora - add "ansible-core or ansible" dep

View File

@ -1 +1 @@
SHA512 (ansible-pcp-2.2.2.tar.gz) = 76c4ffecef2147601971fc8d02df007cb043246e0de0addd308f3a63492d4fa744856ac8d2059c170583a932ac358fe58de3b1db060c705332a0a92b2e227ec9 SHA512 (ansible-pcp-2.2.5.tar.gz) = 0c41454454c3d5fc8cba63c821e25e323cd4ebbe3842b2b27e7590c26c6394d9c0ea5125c94803f6a9154ea267ea1f8897af931c34fe6bab29cba9b2b086ff3d