commit a0a2de05af68c1ae6a429eca826c39e679c16e47 Author: MSVSphere Packaging Team Date: Fri Oct 25 19:07:35 2024 +0300 import rhc-worker-playbook-0.2.2-1.el10 diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..541a994 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +SOURCES/rhc-worker-playbook-0.2.2.tar.xz diff --git a/.rhc-worker-playbook.metadata b/.rhc-worker-playbook.metadata new file mode 100644 index 0000000..470dab2 --- /dev/null +++ b/.rhc-worker-playbook.metadata @@ -0,0 +1 @@ +79fe52d8eeea96b459a639915fd6d3ddb4d1959b SOURCES/rhc-worker-playbook-0.2.2.tar.xz diff --git a/SPECS/rhc-worker-playbook.spec b/SPECS/rhc-worker-playbook.spec new file mode 100644 index 0000000..d967090 --- /dev/null +++ b/SPECS/rhc-worker-playbook.spec @@ -0,0 +1,174 @@ +## START: Set by rpmautospec +## (rpmautospec version 0.6.5) +## RPMAUTOSPEC: autorelease, autochangelog +%define autorelease(e:s:pb:n) %{?-p:0.}%{lua: + release_number = 1; + base_release_number = tonumber(rpm.expand("%{?-b*}%{!?-b:1}")); + print(release_number + base_release_number - 1); +}%{?-e:.%{-e*}}%{?-s:.%{-s*}}%{!?-n:%{?dist}} +## END: Set by rpmautospec + +%bcond_without check + +%global goipath github.com/redhatinsights/rhc-worker-playbook +Version: 0.2.2 +%global tag v%{version} + +%gometa -f + +%global common_description %{expand: +A worker for yggdrasil that receives Ansible playbooks and executes them against +the local host.} + +%global golicenses LICENSE +%global godocs CONTRIBUTING.md README.md + +Name: rhc-worker-playbook +Release: %autorelease +Summary: Ansible playbook yggdrasil worker + +License: GPL-2.0-or-later +URL: %{gourl} +Source: %{url}/releases/download/%{tag}/rhc-worker-playbook-%{version}.tar.xz + +BuildRequires: ansible-core +BuildRequires: golang >= 1.18 +BuildRequires: jq +BuildRequires: meson +BuildRequires: pkgconfig(dbus-1) +BuildRequires: pkgconfig(systemd) +BuildRequires: pkgconfig(yggdrasil) +BuildRequires: python3dist(pip) +BuildRequires: systemd-rpm-macros +BuildRequires: python3-rpm-macros + +%if %{with check} +BuildRequires: insights-client +%endif + +Requires: ansible-core + +%description %common_description + +%global setup_flags -Dvendor=True + +%gopkg + +%prep +%goprep %{?rhel:-k} + +%if %{undefined rhel} +%generate_buildrequires +%go_generate_buildrequires +%endif + +%build +%undefine _auto_set_build_flags +export %gomodulesmode +%{?gobuilddir:export GOPATH="%{gobuilddir}:${GOPATH:+${GOPATH}:}%{?gopath}"} +%meson %setup_flags "-Dgobuildflags=[%(echo %{expand:%gocompilerflags} | sed -e s/"^"/"'"/ -e s/" "/"', '"/g -e s/"$"/"'"/), '-tags', '"rpm_crashtraceback\ ${BUILDTAGS:-}"', '-a', '-v', '-x']" -Dgoldflags='%{?currentgoldflags} -B 0x%(head -c20 /dev/urandom|od -An -tx1|tr -d " \n") -compressdwarf=false -linkmode=external -extldflags "%{build_ldflags} %{?__golang_extldflags}"' +%meson_build + +%install +%meson_install +%py3_shebang_fix \ + %{buildroot}%{_datadir}/rhc-worker-playbook/ansible/collections/ansible_collections/ansible/posix/.azure-pipelines/scripts/*.py \ + %{buildroot}%{_datadir}/rhc-worker-playbook/ansible/collections/ansible_collections/ansible/posix/tests/utils/shippable/*.py \ + %{buildroot}%{_datadir}/rhc-worker-playbook/ansible/collections/ansible_collections/community/general/.azure-pipelines/scripts/*.py \ + %{buildroot}%{_datadir}/rhc-worker-playbook/ansible/collections/ansible_collections/community/general/tests/*/extra/*.py \ + %{buildroot}%{_datadir}/rhc-worker-playbook/ansible/collections/ansible_collections/community/general/tests/integration/targets/django_manage/files/base_test/1045-single-app-project/single_app_project/*.py \ + %{buildroot}%{_datadir}/rhc-worker-playbook/ansible/collections/ansible_collections/community/general/tests/integration/targets/django_manage/files/base_test/simple_project/p1/*.py \ + %{nil} +%{__install} --directory %{buildroot}%{_localstatedir}/lib/%{name} + +%if %{with check} +%check +%meson_test +%endif + +%post +%systemd_post com.redhat.Yggdrasil1.Worker1.rhc_worker_playbook.service + +%preun +%systemd_preun com.redhat.Yggdrasil1.Worker1.rhc_worker_playbook.service + +%postun +%systemd_postun_with_restart com.redhat.Yggdrasil1.Worker1.rhc_worker_playbook.service + +%files +%license LICENSE +%if %{defined rhel} +%license vendor/modules.txt +%endif +%doc CONTRIBUTING.md README.md +%{_libexecdir}/* +%config(noreplace) %{_sysconfdir}/%{name}/%{name}.toml +%{_unitdir}/* +%{_datadir}/dbus-1/{interfaces,system-services,system.d}/* +%{_datadir}/%{name} +%{_libdir}/%{name} +%dir %attr(700, root, yggdrasil-worker) %{_localstatedir}/lib/%{name} + +%changelog +* Fri Oct 25 2024 MSVSphere Packaging Team - 0.2.2-1 +- Rebuilt for MSVSphere 10 + +## START: Generated by rpmautospec +* Thu Oct 03 2024 Link Dupont - 0.2.2-1 +- Update to 0.2.2 + +* Thu May 30 2024 Jiri Hnidek 0.1.8-8 +- Use SPDX format of GPLv2+ license in .spec file + +* Fri Dec 08 2023 Pino Toscano 0.1.8-7 +- Avoid writing Python bytecode (RHEL-14277) + +* Wed Mar 22 2023 Link Dupont 0.1.8-6 +- Enable stripping of debug symbols into a debuginfo package. + +* Fri Mar 03 2023 Link Dupont 0.1.8-5 +- Drop ExclusiveArch, but exclude i686 (RHBZ#2178692) + +* Thu Oct 20 2022 Gael Chamoulaud 0.1.8-4 +- Use thread.join(timeout) to avoid busy waiting and simplify interval event posting logic (rhbz#2115848) + +* Fri Aug 05 2022 Gael Chamoulaud 0.1.8-3 +- Do not busy-wait when playbook is running (rhbz#2115848) + +* Mon Mar 14 2022 Gaël Chamoulaud - 0.1.8-2 +- Add DROP-IN-RPM patches_ignore rule for rdopkg + +* Mon Feb 20 2022 Gaël Chamoulaud - 0.1.8-1 +- Patch to fix Execute Playbook Asynchronously (RHBZ#2056861) + +* Thu Feb 16 2022 Alba Hita - 0.1.8-0 +- Fix: Bump ansible-runner to 1.1.1 and dependencies in vendor (RHBZ#2053212) +- Upload new rhc-worker-playbook-1.1.8.tar.gz source + +* Thu Feb 03 2022 Gaël Chamoulaud - 0.1.7-0 +- Add Ansible community general and ansible.posix Collections +- New Upstream Version + +* Mon Nov 1 2021 Link Dupont - 0.1.6-3 +- Disable LTO due to RHBZ#1893533 + +* Thu Sep 23 2021 Link Dupont - 0.1.6-2 +- Ensure build flags are exported to the build environment + +* Thu Aug 26 2021 Link Dupont - 0.1.6-1 +- New upstream version + +* Fri Aug 6 2021 Link Dupont - 0.1.5^0.9ef03b90.wtree.0663ne +- New upstream version + +* Mon Apr 19 2021 Jeremy Crafts - 0.1.5-1 +- Changes to playbook validation logic +- Enhancements for logging to rhcd +- Fix for subprocess environment + +* Thu Mar 25 2021 Jeremy Crafts - 0.1.4-1 +- Enhancements to playbook validation +- Fixes for regular execution status updates +- Configuration fixes + +## END: Generated by rpmautospec