From ed896d32cd409e40f0ce9ed0472052e8565e7450 Mon Sep 17 00:00:00 2001 From: Marcin Krol Date: Sun, 7 Jan 2024 21:06:00 +0100 Subject: [PATCH] - ansible-core 2.16.2 --- ansible.spec | 37 ++++++++----------------------------- poldek.patch | 18 +++++++++--------- 2 files changed, 17 insertions(+), 38 deletions(-) diff --git a/ansible.spec b/ansible.spec index 940732f..46fbc1d 100644 --- a/ansible.spec +++ b/ansible.spec @@ -1,17 +1,16 @@ Summary: SSH-based configuration management, deployment, and task execution system Name: ansible -Version: 2.9.27 +Version: 2.16.2 Release: 1 License: GPL v3+ Group: Development/Libraries -Source0: https://releases.ansible.com/ansible/%{name}-%{version}.tar.gz -# Source0-md5: 7d593641125be0e1e9d299340710663e +Source0: https://github.com/ansible/ansible/archive/refs/tags/v%{version}.tar.gz +# Source0-md5: 91855c745f4304113e5f3bc8df7525cf Source1: poldek.py Patch0: poldek.patch -URL: http://ansible.github.com/ +URL: https://ansible.com BuildRequires: python3-PyYAML BuildRequires: python3-modules -BuildRequires: python3-straight-plugin BuildRequires: rpm-pythonprov BuildRequires: rpmbuild(macros) >= 1.710 Requires: python3-PyYAML @@ -35,32 +34,21 @@ are transferred to managed machines automatically. %setup -q %patch0 -p1 +%{__sed} -i '1s,/usr/bin/env python,%{__python3},' test/lib/ansible_test/_util/target/cli/ansible_test_cli_stub.py + %build %py3_build -%{__make} docs %install rm -rf $RPM_BUILD_ROOT %py3_install -install -p %{SOURCE1} $RPM_BUILD_ROOT%{py3_sitescriptdir}/ansible/modules/packaging/os - -install -d $RPM_BUILD_ROOT{%{_sysconfdir}/%{name},%{_mandir}} -sed -re '/^#/ !s,[^#]+$,#&,' examples/hosts > $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/hosts -cp -p examples/ansible.cfg $RPM_BUILD_ROOT%{_sysconfdir}/%{name} -cp -a docs/man/* $RPM_BUILD_ROOT%{_mandir} - -%{__rm} $RPM_BUILD_ROOT%{_mandir}/man3/.gitdir - %clean rm -rf $RPM_BUILD_ROOT %files %defattr(644,root,root,755) -%doc README.rst -%dir %{_sysconfdir}/%{name} -%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/hosts -%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/%{name}.cfg +%doc README.md %attr(755,root,root) %{_bindir}/ansible %attr(755,root,root) %{_bindir}/ansible-connection %attr(755,root,root) %{_bindir}/ansible-test @@ -72,15 +60,6 @@ rm -rf $RPM_BUILD_ROOT %{_bindir}/ansible-playbook %{_bindir}/ansible-pull %{_bindir}/ansible-vault -%{_mandir}/man1/ansible-config.1* -%{_mandir}/man1/ansible-console.1* -%{_mandir}/man1/ansible-galaxy.1* -%{_mandir}/man1/ansible-inventory.1* -%{_mandir}/man1/ansible-vault.1* -%{_mandir}/man1/ansible.1* -%{_mandir}/man1/ansible-doc.1* -%{_mandir}/man1/ansible-playbook.1* -%{_mandir}/man1/ansible-pull.1* %{py3_sitescriptdir}/ansible -%{py3_sitescriptdir}/ansible-%{version}-*.egg-info +%{py3_sitescriptdir}/ansible_core-%{version}-*.egg-info %{py3_sitescriptdir}/ansible_test diff --git a/poldek.patch b/poldek.patch index 37d2a10..9777eb3 100644 --- a/poldek.patch +++ b/poldek.patch @@ -1,13 +1,13 @@ -diff -ur ansible-2.8.0.orig/lib/ansible/module_utils/facts/system/pkg_mgr.py ansible-2.8.0/lib/ansible/module_utils/facts/system/pkg_mgr.py ---- ansible-2.8.0.orig/lib/ansible/module_utils/facts/system/pkg_mgr.py 2019-06-21 22:50:15.462000000 +0200 -+++ ansible-2.8.0/lib/ansible/module_utils/facts/system/pkg_mgr.py 2019-06-21 22:51:42.117000000 +0200 -@@ -13,7 +13,8 @@ +-diff -ur ansible-2.16.2.orig/lib/ansible/module_utils/facts/system/pkg_mgr.py ansible-2.16.2/lib/ansible/module_utils/facts/system/pkg_mgr.py +--- ansible-2.16.2.orig/lib/ansible/module_utils/facts/system/pkg_mgr.py 2023-12-11 21:48:58.000000000 +0100 ++++ ansible-2.16.2/lib/ansible/module_utils/facts/system/pkg_mgr.py 2024-01-07 20:19:31.342969058 +0100 +@@ -15,7 +15,8 @@ # A list of dicts. If there is a platform with more than one # package manager, put the preferred one last. If there is an # ansible module, use that as the value for the 'name' key. --PKG_MGRS = [{'path': '/usr/bin/yum', 'name': 'yum'}, +-PKG_MGRS = [{'path': '/usr/bin/rpm-ostree', 'name': 'atomic_container'}, +PKG_MGRS = [{'path': '/usr/bin/poldek', 'name': 'poldek'}, -+ {'path': '/usr/bin/yum', 'name': 'yum'}, - {'path': '/usr/bin/dnf', 'name': 'dnf'}, - {'path': '/usr/bin/apt-get', 'name': 'apt'}, - {'path': '/usr/bin/zypper', 'name': 'zypper'}, ++ {'path': '/usr/bin/rpm-ostree', 'name': 'atomic_container'}, + {'path': '/usr/bin/yum', 'name': 'yum'}, + + # NOTE the `path` key for dnf/dnf5 is effectively discarded when matched for Red Hat OS family, -- 2.44.0