From 0839d185b4d57bd93e464603b7298c1546b9662d Mon Sep 17 00:00:00 2001 From: CentOS Sources Date: May 04 2022 18:09:05 +0000 Subject: import ansible-pcp-2.2.5-1.el8 --- diff --git a/.ansible-pcp.metadata b/.ansible-pcp.metadata index 7de5eb1..5c13d1a 100644 --- a/.ansible-pcp.metadata +++ b/.ansible-pcp.metadata @@ -1 +1 @@ -7921a5ebdf54799a87f23c9d6dc1854277475965 SOURCES/ansible-pcp-2.2.2.tar.gz +6ededf0d6f9d2d55aee746b464462f9c9906f4de SOURCES/ansible-pcp-2.2.5.tar.gz diff --git a/.gitignore b/.gitignore index 457b1fb..b5558f6 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1 @@ -SOURCES/ansible-pcp-2.2.2.tar.gz +SOURCES/ansible-pcp-2.2.5.tar.gz diff --git a/SPECS/ansible-pcp.spec b/SPECS/ansible-pcp.spec index a6a130b..83d43a7 100644 --- a/SPECS/ansible-pcp.spec +++ b/SPECS/ansible-pcp.spec @@ -1,3 +1,20 @@ +Name: ansible-pcp +Version: 2.2.5 +Release: 1%{?dist} +Summary: Ansible Metric collection for Performance Co-Pilot +License: MIT +URL: https://github.com/performancecopilot/ansible-pcp +Source: https://github.com/performancecopilot/ansible-pcp/archive/v%{version}/%{name}-%{version}.tar.gz +BuildArch: noarch + +%if 0%{?rhel} +%global collection_namespace redhat +%global collection_name rhel_metrics +%else +%global collection_namespace performancecopilot +%global collection_name metrics +%endif + # NOTE: Even though ansible-core is in 8.6, it is only available # at *runtime*, not at *buildtime* - so we can't have # ansible-core as a build_dep on RHEL8 @@ -6,34 +23,33 @@ %global ansible_build_dep ansible-core >= 2.11.0 %else %if 0%{?rhel} && ! 0%{?epel} -%global collection_namespace redhat -%global collection_name rhel_metrics %bcond_with ansible %else -%global collection_namespace performancecopilot -%global collection_name metrics %bcond_without ansible %global ansible_build_dep ansible >= 2.9.10 %endif %endif -Name: ansible-pcp -Version: 2.2.2 -Release: 2%{?dist} -Summary: Ansible Metric collection for Performance Co-Pilot -License: MIT -URL: https://github.com/performancecopilot/ansible-pcp -Source: https://github.com/performancecopilot/ansible-pcp/archive/v%{version}/%{name}-%{version}.tar.gz - %if 0%{?rhel} >= 8 Requires: (ansible-core >= 2.11.0 or ansible >= 2.9.0) %endif %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 %endif -BuildArch: noarch %description A collection containing roles for Performance Co-Pilot (PCP) and related @@ -88,24 +104,26 @@ find . -name \*.yml -o -name \*.md | while read file; do $file done -%if %{without ansible} -%define ansible_collection_files %{_datadir}/ansible/collections/ansible_collections/%{collection_namespace} -# Empty command. We don't have ansible-galaxy. -%define ansible_collection_build() tar -cf %{_tmppath}/%{collection_namespace}-%{collection_name}-%{version}.tar.gz . -# Simply copy everything instead of galaxy-installing the built artifact. -%define ansible_collection_install() mkdir -p %{buildroot}%{ansible_collection_files}/%{collection_name}; (cd %{buildroot}%{ansible_collection_files}/%{collection_name}; tar -xf %{_tmppath}/%{collection_namespace}-%{collection_name}-%{version}.tar.gz) -%endif - %build +%if %{with ansible} %ansible_collection_build +%else +tar -cf %{_tmppath}/%{collection_namespace}-%{collection_name}-%{version}.tar.gz . +%endif %install +%if %{with ansible} %ansible_collection_install +%else +mkdir -p %{buildroot}%{ansible_collection_files}/%{collection_name} +cd %{buildroot}%{ansible_collection_files}/%{collection_name} +tar -xf %{_tmppath}/%{collection_namespace}-%{collection_name}-%{version}.tar.gz +%endif %check mv yamllint.yml .yamllint.yml mv yamllint_defaults.yml .yamllint_defaults.yml -%if %{with ansible} +%if %{with ansible_lint} ansible-lint `find roles -name \*.yml` %endif @@ -115,6 +133,10 @@ ansible-lint `find roles -name \*.yml` %{ansible_collection_files} %changelog +* Thu Apr 21 2022 Nathan Scott 2.2.5-1 +- Switch to using bcond spec file mechanisms +- Latest upstream release (BZ 2059463) + * Tue Feb 15 2022 Nathan Scott 2.2.2-2 - RHEL8.6+, RHEL9+, Fedora - add "ansible-core or ansible" dep