From cc3497823cce49e9a7790e59ec259d958351f586 Mon Sep 17 00:00:00 2001 From: CentOS Sources Date: Mar 29 2022 10:36:57 +0000 Subject: import rhc-worker-playbook-0.1.8-0.el8 --- diff --git a/.gitignore b/.gitignore index d5e3200..efda5ae 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,3 @@ -SOURCES/rhc-worker-playbook-0.1.5.tar.gz +SOURCES/ansible-collection-ansible-posix-1.3.0.tar.gz +SOURCES/ansible-collection-community-general-4.4.0.tar.gz +SOURCES/rhc-worker-playbook-0.1.8.tar.gz diff --git a/.rhc-worker-playbook.metadata b/.rhc-worker-playbook.metadata index 642e56f..be9935f 100644 --- a/.rhc-worker-playbook.metadata +++ b/.rhc-worker-playbook.metadata @@ -1 +1,3 @@ -7c24c708337f9ddc6aa9d8295aba78a4b03b7688 SOURCES/rhc-worker-playbook-0.1.5.tar.gz +7027d309191f35d3dafb3fc37d9fe25b195ef769 SOURCES/ansible-collection-ansible-posix-1.3.0.tar.gz +1f333c73866dd59f120a3576ab701555d0e9bdf5 SOURCES/ansible-collection-community-general-4.4.0.tar.gz +e1db71388a14032b902941426a0ab0dda71b2f43 SOURCES/rhc-worker-playbook-0.1.8.tar.gz diff --git a/SPECS/rhc-worker-playbook.spec b/SPECS/rhc-worker-playbook.spec index 898bd61..08c22e7 100644 --- a/SPECS/rhc-worker-playbook.spec +++ b/SPECS/rhc-worker-playbook.spec @@ -1,17 +1,22 @@ %define debug_package %{nil} +%define community_general_version 4.4.0 +%define ansible_posix_version 1.3.0 Name: rhc-worker-playbook Summary: Red Hat connect worker for launching Ansible Runner -Version: 0.1.5 -Release: 1%{?dist} +Version: 0.1.8 +Release: 0%{?dist} License: GPLv2+ -Source: rhc-worker-playbook-0.1.5.tar.gz +Source: rhc-worker-playbook-0.1.8.tar.gz +Source1: https://github.com/ansible-collections/community.general/archive/%{community_general_version}/ansible-collection-community-general-%{community_general_version}.tar.gz +Source2: https://github.com/ansible-collections/ansible.posix/archive/%{ansible_posix_version}/ansible-collection-ansible-posix-%{ansible_posix_version}.tar.gz ExclusiveArch: %{go_arches} %{?__python3:Requires: %{__python3}} Requires: insights-client Requires: python3dist(requests) +Requires: ansible-core BuildRequires: rhc BuildRequires: pkgconfig BuildRequires: python3-devel @@ -26,7 +31,21 @@ BuildRequires: python3dist(cython) Python-based worker for Red Hat connect, used to launch Ansible playbooks via Ansible Runner. %prep -%setup -q +%setup -q -a1 -a2 +pushd community.general-%{community_general_version} +rm -vr .github .azure-pipelines +rm -rvf tests/ +find -type f ! -executable -name '*.py' -print -exec sed -i -e '1{\@^#!.*@d}' '{}' + +find -type f -name '.gitignore' -print -delete +popd + +pushd ansible.posix-%{ansible_posix_version} +rm -vr tests/{integration,utils} .github changelogs/fragments/.keep {test-,}requirements.txt shippable.yml +rm -vr .azure-pipelines +rm -rvf tests/ +find -type f ! -executable -name '*.py' -print -exec sed -i -e '1{\@^#!.*@d}' '{}' + +find -type f -name '.gitignore' -print -delete +popd %build export GRPC_PYTHON_BUILD_WITH_CYTHON=True @@ -39,19 +58,53 @@ export GRPC_PYTHON_DISABLE_LIBC_COMPATIBILITY=True %{__make} PREFIX=%{_prefix} LIBDIR=%{_libdir} PYTHON_PKGDIR=%{python3_sitelib} CONFIG_DIR=%{rhc_config_dir} installed-lib-dir %{make_build} build +# Building the Ansible Collections +pushd community.general-%{community_general_version} +tar -cf %{_tmppath}/community-general-%{community_general_version}.tar.gz . +popd + +pushd ansible.posix-%{ansible_posix_version} +tar -cf %{_tmppath}/ansible-posix-%{ansible_posix_version}.tar.gz . +popd + %install %{make_install} PREFIX=%{_prefix} LIBDIR=%{_libdir} CONFIG_DIR=%{rhc_config_dir} PYTHON_PKGDIR=%{python3_sitelib} +# Installing the Ansible Collections +mkdir -p %{buildroot}%{_datadir}/rhc-worker-playbook/ansible/collections/ansible_collections/community/general +mkdir -p %{buildroot}%{_datadir}/rhc-worker-playbook/ansible/collections/ansible_collections/ansible/posix + +pushd %{buildroot}%{_datadir}/rhc-worker-playbook/ansible/collections/ansible_collections/community/general +tar -xf %{_tmppath}/community-general-%{community_general_version}.tar.gz +popd + +pushd %{buildroot}%{_datadir}/rhc-worker-playbook/ansible/collections/ansible_collections/ansible/posix +tar -xf %{_tmppath}/ansible-posix-%{ansible_posix_version}.tar.gz +popd + +# Creating the logs directory for ansible-runner +mkdir -p %{buildroot}%{_localstatedir}/log/rhc-worker-playbook/ansible + %files %{_libexecdir}/rhc/rhc-worker-playbook.worker %{python3_sitelib}/rhc_worker_playbook/ %{python3_sitelib}/rhc_worker_playbook*.egg-info/ %{_libdir}/rhc-worker-playbook/ +%{_datadir}/rhc-worker-playbook/ansible/collections/ansible_collections/ +%{_localstatedir}/log/rhc-worker-playbook/ansible/ %config %{_sysconfdir}/rhc/workers/rhc-worker-playbook.toml %doc %changelog +* Thu Feb 03 2022 Gaël Chamoulaud - 0.1.8-0 +- Fix: Bump ansible-runner to 2.1.1 and dependencies in vendor (RHBZ#2053207) +- Upload new rhc-worker-playbook-0.1.8.tar.gz source + +* Thu Feb 03 2022 Gaël Chamoulaud - 0.1.7-0 +- Add Ansible community general and ansible.posix Collections +- Upload new rhc-worker-playbook-0.1.7.tar.gz source + * Mon Apr 19 2021 Jeremy Crafts - 0.1.5-1 - Changes to playbook validation logic - Enhancements for logging to rhcd