%global collection_namespace community %global collection_name docker %global forgeurl https://github.com/ansible-collections/%{collection_namespace}.%{collection_name} # Only run tests where %%generate_buildrequires and test deps are available. %if 0%{?fedora} %bcond_without tests %else %bcond_with tests %endif Name: ansible-collection-%{collection_namespace}-%{collection_name} Version: 2.7.0 %global tag %{version} %forgemeta Release: 1%{?dist} Summary: Ansible modules and plugins for working with Docker # All files are GPLv3+ except plugins/module_utils/_version.py. License: GPLv3+ and Python URL: %{ansible_collection_url} Source0: %{forgesource} Patch0: build_ignore-unnecessary-files.patch BuildArch: noarch # Needed for %%py3_shebang_fix. Buildrequires: python3-devel BuildRequires: ansible-packaging # The new ansible-core, specifically, is required for the `build_ignore:` patch and ansible-test to work properly. # Therefore, we cannot rely on ansible-packaging which might pull in ansible 2.9. BuildRequires: ansible-core %if %{with tests} BuildRequires: /usr/bin/ansible-test %endif %description %{name} provides the %{collection_namespace}.%{collection_name} Ansible collection. The collection includes Ansible modules and plugins for working with Docker. %prep %forgeautosetup -p1 find -type f ! -executable -name '*.py' -print -exec sed -i -e '1{\@^#!.*@d}' '{}' + %if %{with tests} %generate_buildrequires %pyproject_buildrequires -N tests/unit/requirements.txt %{python3_sitelib}/ansible_test/_data/requirements/units.txt %endif %build %ansible_collection_build %install %ansible_collection_install %check %if %{with tests} mkdir -p ../ansible_collections/%{collection_namespace} cp -a $(pwd) ../ansible_collections/%{collection_namespace}/%{collection_name} pushd ../ansible_collections/%{collection_namespace}/%{collection_name} # mkdir -p ansible_collections/%%{collection_namespace} # ln -sr . ansible_collections/%%{collection_namespace}/%%{collection_name} # pushd ansible_collections/%%{collection_namespace}/%%{collection_name} ansible-test units --python-interpreter %{__python3} --local popd %endif %files %license COPYING PSF-license.txt %doc README.md CHANGELOG.rst %{ansible_collection_files} %changelog * Sat Jul 02 2022 Maxwell G - 2.7.0-1 - Update to 2.7.0. Fixes rhbz#2103337. - Fix shebangs * Wed May 25 2022 Maxwell G - 2.6.0-1 - Update to 2.6.0. Fixes rhbz#2089991. * Mon May 16 2022 Maxwell G - 2.5.1-1 - Update to 2.5.1. Fixes rhbz#2086832. - Change license from `GPLv3+` > `GPLv3+ and Python` * Sat May 14 2022 Maxwell G - 2.5.0-1 - Update to 2.5.0. Fixes rhbz#2086185. - Run unit tests. - Rebuild for new ansible-packaging. * Mon Apr 25 2022 Maxwell G - 2.4.0-1 - Update to 2.4.0. * Wed Apr 06 2022 Maxwell G - 2.3.0-1 - Preform initial import (rhbz#2028702). * Fri Apr 01 2022 Maxwell G - 2.3.0-0 - Update to 2.3.0. * Mon Feb 21 2022 Maxwell G - 2.2.0-1 - Update to 2.2.0. Fix shebangs. Switch to ansible-packaging. * Thu Dec 16 2021 Maxwell G - 2.0.2-1 - Update to 2.0.2. * Thu Dec 02 2021 Maxwell G - 2.0.1-1 - Initial package