|
|
b32afd |
%define debug_package %{nil}
|
|
|
b32afd |
%define community_general_version 4.4.0
|
|
|
b32afd |
%define ansible_posix_version 1.3.0
|
|
|
b32afd |
|
|
|
b32afd |
Name: rhc-worker-playbook
|
|
|
b32afd |
Version: 0.1.8
|
|
|
4d5c3e |
Release: 2%{?dist}
|
|
|
b32afd |
Summary: Python worker for Red Hat connector that launches Ansible Runner
|
|
|
b32afd |
License: GPLv2+
|
|
|
b32afd |
URL: https://github.com/redhatinsights/rhc-worker-playbook
|
|
|
b32afd |
Source: rhc-worker-playbook-0.1.8.tar.gz
|
|
|
b32afd |
Source1: https://github.com/ansible-collections/community.general/archive/%{community_general_version}/ansible-collection-community-general-%{community_general_version}.tar.gz
|
|
|
b32afd |
Source2: https://github.com/ansible-collections/ansible.posix/archive/%{ansible_posix_version}/ansible-collection-ansible-posix-%{ansible_posix_version}.tar.gz
|
|
|
b32afd |
|
|
|
4d5c3e |
#
|
|
|
4d5c3e |
# patches_ignore=DROP-IN-RPM
|
|
|
4d5c3e |
# patches_base=8ddc5ccfc97290a021b4c4de673b92fedc38cbfb
|
|
|
4d5c3e |
Patch0001: 0001-fix-Execute-playbook-asynchronously.patch
|
|
|
4d5c3e |
Patch0002: 0002-Do-not-busy-wait-when-playbook-is-running.patch
|
|
|
4d5c3e |
Patch0003: 0003-Use-thread.join-timeout-to-avoid-busy-waiting-and-si.patch
|
|
|
4d5c3e |
|
|
|
b32afd |
|
|
|
b32afd |
%{?__python3:Requires: %{__python3}}
|
|
|
b32afd |
Requires: insights-client
|
|
|
b32afd |
Requires: python3dist(requests)
|
|
|
b32afd |
Requires: python3dist(pyyaml)
|
|
|
b32afd |
Requires: ansible-core
|
|
|
b32afd |
BuildRequires: rhc
|
|
|
b32afd |
BuildRequires: pkgconfig
|
|
|
b32afd |
BuildRequires: python3-devel
|
|
|
b32afd |
BuildRequires: python3dist(pip)
|
|
|
b32afd |
BuildRequires: python3dist(wheel)
|
|
|
b32afd |
BuildRequires: python3dist(setuptools)
|
|
|
b32afd |
BuildRequires: openssl-devel
|
|
|
b32afd |
BuildRequires: c-ares-devel
|
|
|
b32afd |
BuildRequires: zlib-devel
|
|
|
b32afd |
BuildRequires: python3dist(cython)
|
|
|
b32afd |
BuildRequires: gcc
|
|
|
b32afd |
BuildRequires: gcc-c++
|
|
|
b32afd |
|
|
|
b32afd |
ExclusiveArch: x86_64 s390x ppc64 ppc64le
|
|
|
b32afd |
|
|
|
b32afd |
%description
|
|
|
b32afd |
Python-based worker for Red Hat connect, used to launch Ansible playbooks via Ansible Runner.
|
|
|
b32afd |
|
|
|
b32afd |
%prep
|
|
|
b32afd |
%setup -q -a1 -a2 -n %{name}-%{version}
|
|
|
4d5c3e |
|
|
|
b32afd |
%patch0001 -p1
|
|
|
4d5c3e |
%patch0002 -p1
|
|
|
4d5c3e |
%patch0003 -p1
|
|
|
4d5c3e |
|
|
|
b32afd |
pushd community.general-%{community_general_version}
|
|
|
b32afd |
rm -vr .github .azure-pipelines
|
|
|
b32afd |
rm -rvf tests/ hacking/
|
|
|
b32afd |
find -type f ! -executable -name '*.py' -print -exec sed -i -e '1{\@^#!.*@d}' '{}' +
|
|
|
b32afd |
find -type f -name '.gitignore' -print -delete
|
|
|
b32afd |
popd
|
|
|
b32afd |
|
|
|
b32afd |
pushd ansible.posix-%{ansible_posix_version}
|
|
|
b32afd |
rm -vr tests/{integration,utils} .github changelogs/fragments/.keep {test-,}requirements.txt shippable.yml
|
|
|
b32afd |
rm -vr .azure-pipelines
|
|
|
b32afd |
rm -rvf tests/
|
|
|
b32afd |
find -type f ! -executable -name '*.py' -print -exec sed -i -e '1{\@^#!.*@d}' '{}' +
|
|
|
b32afd |
find -type f -name '.gitignore' -print -delete
|
|
|
b32afd |
popd
|
|
|
b32afd |
|
|
|
b32afd |
%build
|
|
|
b32afd |
export GRPC_PYTHON_BUILD_WITH_CYTHON=True
|
|
|
b32afd |
export GRPC_PYTHON_BUILD_SYSTEM_OPENSSL=True
|
|
|
b32afd |
export GRPC_PYTHON_BUILD_SYSTEM_ZLIB=True
|
|
|
b32afd |
export GRPC_PYTHON_BUILD_SYSTEM_CARES=True
|
|
|
b32afd |
export GRPC_PYTHON_DISABLE_LIBC_COMPATIBILITY=True
|
|
|
b32afd |
# TODO(gchamoul): Remove workaround
|
|
|
b32afd |
# once https://bugzilla.redhat.com/show_bug.cgi?id=2056959 is fixed
|
|
|
b32afd |
#%define rhc_config_dir $(pkg-config rhc --variable workerconfdir)
|
|
|
b32afd |
%define rhc_config_dir /etc/rhc/workers
|
|
|
b32afd |
|
|
|
b32afd |
%define _lto_cflags %{nil}
|
|
|
b32afd |
%set_build_flags
|
|
|
b32afd |
%{__make} PREFIX=%{_prefix} LIBDIR=%{_libdir} CONFIG_DIR=%{rhc_config_dir} PYTHON_PKGDIR=%{python3_sitelib} installed-lib-dir
|
|
|
b32afd |
%{make_build} build
|
|
|
b32afd |
|
|
|
b32afd |
# Building the Ansible Collections
|
|
|
b32afd |
pushd community.general-%{community_general_version}
|
|
|
b32afd |
tar -cf %{_tmppath}/community-general-%{community_general_version}.tar.gz .
|
|
|
b32afd |
popd
|
|
|
b32afd |
|
|
|
b32afd |
pushd ansible.posix-%{ansible_posix_version}
|
|
|
b32afd |
tar -cf %{_tmppath}/ansible-posix-%{ansible_posix_version}.tar.gz .
|
|
|
b32afd |
popd
|
|
|
b32afd |
|
|
|
b32afd |
%install
|
|
|
b32afd |
%{make_install} PREFIX=%{_prefix} LIBDIR=%{_libdir} CONFIG_DIR=%{rhc_config_dir} PYTHON_PKGDIR=%{python3_sitelib}
|
|
|
b32afd |
|
|
|
b32afd |
# Installing the Ansible Collections
|
|
|
b32afd |
mkdir -p %{buildroot}%{_datadir}/rhc-worker-playbook/ansible/collections/ansible_collections/community/general
|
|
|
b32afd |
mkdir -p %{buildroot}%{_datadir}/rhc-worker-playbook/ansible/collections/ansible_collections/ansible/posix
|
|
|
b32afd |
|
|
|
b32afd |
pushd %{buildroot}%{_datadir}/rhc-worker-playbook/ansible/collections/ansible_collections/community/general
|
|
|
b32afd |
tar -xf %{_tmppath}/community-general-%{community_general_version}.tar.gz
|
|
|
b32afd |
popd
|
|
|
b32afd |
|
|
|
b32afd |
pushd %{buildroot}%{_datadir}/rhc-worker-playbook/ansible/collections/ansible_collections/ansible/posix
|
|
|
b32afd |
tar -xf %{_tmppath}/ansible-posix-%{ansible_posix_version}.tar.gz
|
|
|
b32afd |
popd
|
|
|
b32afd |
|
|
|
b32afd |
# Creating the logs directory for ansible-runner
|
|
|
b32afd |
mkdir -p %{buildroot}%{_localstatedir}/log/rhc-worker-playbook/ansible/
|
|
|
b32afd |
|
|
|
b32afd |
|
|
|
b32afd |
%files
|
|
|
b32afd |
%{_libexecdir}/rhc/rhc-worker-playbook.worker
|
|
|
b32afd |
%{python3_sitelib}/rhc_worker_playbook/
|
|
|
b32afd |
%{python3_sitelib}/rhc_worker_playbook*.egg-info/
|
|
|
b32afd |
%{_libdir}/rhc-worker-playbook/
|
|
|
b32afd |
%{_datadir}/rhc-worker-playbook/ansible/collections/ansible_collections/
|
|
|
b32afd |
%{_localstatedir}/log/rhc-worker-playbook/ansible/
|
|
|
b32afd |
%config(noreplace) %{_sysconfdir}/rhc/workers/rhc-worker-playbook.toml
|
|
|
b32afd |
|
|
|
b32afd |
%doc
|
|
|
b32afd |
|
|
|
b32afd |
%changelog
|
|
|
4d5c3e |
* Mon Oct 24 2022 Gael Chamoulaud <gchamoul@redhat.com> 0.1.8-2
|
|
|
4d5c3e |
- Use thread.join(timeout) to avoid busy waiting and simplify interval event posting logic (rhbz#2137008)
|
|
|
4d5c3e |
- Do not busy-wait when playbook is running (rhbz#2137008)
|
|
|
4d5c3e |
|
|
|
b32afd |
* Mon Feb 21 2022 Gaël Chamoulaud <gchamoul@redhat.com> - 0.1.8-1
|
|
|
b32afd |
- Patch to fix Execute Playbook Asynchronously (RHBZ#2056862)
|
|
|
b32afd |
|
|
|
b32afd |
* Thu Feb 17 2022 Alba Hita <ahitacat@redhat.com> - 0.1.8-0
|
|
|
b32afd |
- Fix: Bump ansible-runner to 2.1.1 and dependencies in vendor (RHBZ#2053212)
|
|
|
b32afd |
- Upload new rhc-worker-playbook-0.1.8.tar.gz source
|
|
|
b32afd |
|
|
|
b32afd |
* Thu Feb 03 2022 Gaël Chamoulaud <gchamoul@redhat.com> - 0.1.7-0
|
|
|
b32afd |
- Add Ansible community general and ansible.posix Collections
|
|
|
b32afd |
- New Upstream Version
|
|
|
b32afd |
|
|
|
b32afd |
* Mon Nov 1 2021 Link Dupont <link@redhat.com> - 0.1.6-3
|
|
|
b32afd |
- Disable LTO due to RHBZ#1893533
|
|
|
b32afd |
|
|
|
b32afd |
* Thu Sep 23 2021 Link Dupont <link@redhat.com> - 0.1.6-2
|
|
|
b32afd |
- Ensure build flags are exported to the build environment
|
|
|
b32afd |
|
|
|
b32afd |
* Thu Aug 26 2021 Link Dupont <link@redhat.com> - 0.1.6-1
|
|
|
b32afd |
- New upstream version
|
|
|
b32afd |
|
|
|
b32afd |
* Fri Aug 6 2021 Link Dupont <link@redhat.com> - 0.1.5^0.9ef03b90.wtree.0663ne
|
|
|
b32afd |
- New upstream version
|
|
|
b32afd |
|
|
|
b32afd |
* Mon Apr 19 2021 Jeremy Crafts <jcrafts@redhat.com> - 0.1.5-1
|
|
|
b32afd |
- Changes to playbook validation logic
|
|
|
b32afd |
- Enhancements for logging to rhcd
|
|
|
b32afd |
- Fix for subprocess environment
|
|
|
b32afd |
|
|
|
b32afd |
* Thu Mar 25 2021 Jeremy Crafts <jcrafts@redhat.com> - 0.1.4-1
|
|
|
b32afd |
- Enhancements to playbook validation
|
|
|
b32afd |
- Fixes for regular execution status updates
|
|
|
b32afd |
- Configuration fixes
|