From fd08ba8934631ec416abca8837e238288ad90f3e Mon Sep 17 00:00:00 2001 From: CentOS Sources Date: May 16 2023 06:07:52 +0000 Subject: import ansible-core-2.14.2-3.el8 --- diff --git a/.ansible-core.metadata b/.ansible-core.metadata index b44cd82..0d8afab 100644 --- a/.ansible-core.metadata +++ b/.ansible-core.metadata @@ -1,7 +1,6 @@ -56057bba4714e59b0f28bbb778bdb8321a198dd7 SOURCES/ansible-c1bb0c6ab89a344bdcc07ef66887c310e661e3a6.tar.gz -6a9e1e0eec23c0f3091fa53f91eb8701ad7caaeb SOURCES/jinja2-b08cd4bc64bb980df86ed2876978ae5735572280.tar.gz -72c5fe7f8145d4cff66426c444c33104a9ae3d53 SOURCES/markupsafe-b5a517506d6cb8091e215a4a89e47db5eee6a68f.tar.gz -d5b06047a8a5937c9433c8e0e88bcf2ccb6a4f84 SOURCES/packaging-ded06cedf6e20680eea0363fac894cb4a09e7831.tar.gz -f20e820c8fa08ff162ace90735a2a89c599f7166 SOURCES/pyparsing-6a844ee35ca5125490a28dbd6dd2d15b6498e605.tar.gz -2203e09b2add3d1edceb28e20b2a091e5e6c0344 SOURCES/resolvelib-d935f9fd07246d9641436c7a8e6ae39423374e28.tar.gz -c17fd6000af4ccf32930c41e928fea1e38cb5d0a SOURCES/straightplugin-6634ea8e1e89d5bb23804f50e676f196c52c46ed.tar.gz +560f248ccb0b98256c5b50c86a002c2c1e57edb6 SOURCES/Jinja2-3.1.2.tar.gz +acb6dca5cbec84f4c707225a8b6b2505fae28c90 SOURCES/MarkupSafe-2.1.0.tar.gz +b7e3b3c247a445c1986e5ec350b13bb1984a7207 SOURCES/ansible-core-2.14.2.tar.gz +b99fa7af153646722b2d1817bb09906cc5a94bc6 SOURCES/packaging-20.4.tar.gz +ca8d892c93fe2d54ea5e6f31c5798e40c58e8667 SOURCES/pyparsing-2.4.7.tar.gz +ae564e766fc147e87d7f009d42b5204b7ae3a832 SOURCES/resolvelib-0.5.4.tar.gz diff --git a/.gitignore b/.gitignore index 27d037d..2d79bb0 100644 --- a/.gitignore +++ b/.gitignore @@ -1,7 +1,6 @@ -SOURCES/ansible-c1bb0c6ab89a344bdcc07ef66887c310e661e3a6.tar.gz -SOURCES/jinja2-b08cd4bc64bb980df86ed2876978ae5735572280.tar.gz -SOURCES/markupsafe-b5a517506d6cb8091e215a4a89e47db5eee6a68f.tar.gz -SOURCES/packaging-ded06cedf6e20680eea0363fac894cb4a09e7831.tar.gz -SOURCES/pyparsing-6a844ee35ca5125490a28dbd6dd2d15b6498e605.tar.gz -SOURCES/resolvelib-d935f9fd07246d9641436c7a8e6ae39423374e28.tar.gz -SOURCES/straightplugin-6634ea8e1e89d5bb23804f50e676f196c52c46ed.tar.gz +SOURCES/Jinja2-3.1.2.tar.gz +SOURCES/MarkupSafe-2.1.0.tar.gz +SOURCES/ansible-core-2.14.2.tar.gz +SOURCES/packaging-20.4.tar.gz +SOURCES/pyparsing-2.4.7.tar.gz +SOURCES/resolvelib-0.5.4.tar.gz diff --git a/SOURCES/0001-Use-python-re-to-parse-service-output-in.patch b/SOURCES/0001-Use-python-re-to-parse-service-output-in.patch deleted file mode 100644 index 5356be8..0000000 --- a/SOURCES/0001-Use-python-re-to-parse-service-output-in.patch +++ /dev/null @@ -1,72 +0,0 @@ -From 1a583e3c0d67a63cef1b1a433f176b7983d39812 Mon Sep 17 00:00:00 2001 -From: Matt Martz -Date: Wed, 26 Oct 2022 16:06:43 -0500 -Subject: [PATCH] [stable-2.13] Use python re to parse service output instead - of grep (#79015) (#79051) - -* Use python re to parse service output instead of grep. Fixes #78541 - -* Add clog frag - -* Add an extra guard to abort if rc is 4, and /etc/init.d is missing -(cherry picked from commit 4458128) - -Co-authored-by: Matt Martz ---- - .../fragments/78541-service-facts-re.yml | 3 +++ - lib/ansible/modules/service_facts.py | 20 +++++++++++-------- - 2 files changed, 15 insertions(+), 8 deletions(-) - create mode 100644 changelogs/fragments/78541-service-facts-re.yml - -diff --git a/changelogs/fragments/78541-service-facts-re.yml b/changelogs/fragments/78541-service-facts-re.yml -new file mode 100644 -index 0000000000..b96d584246 ---- /dev/null -+++ b/changelogs/fragments/78541-service-facts-re.yml -@@ -0,0 +1,3 @@ -+bugfixes: -+- service_facts - Use python re to parse service output instead of grep -+ (https://github.com/ansible/ansible/issues/78541) -diff --git a/lib/ansible/modules/service_facts.py b/lib/ansible/modules/service_facts.py -index 996b47fd59..60555fdc4a 100644 ---- a/lib/ansible/modules/service_facts.py -+++ b/lib/ansible/modules/service_facts.py -@@ -89,6 +89,7 @@ ansible_facts: - ''' - - -+import os - import platform - import re - from ansible.module_utils.basic import AnsibleModule -@@ -104,16 +105,19 @@ class BaseService(object): - class ServiceScanService(BaseService): - - def _list_sysvinit(self, services): -- -- rc, stdout, stderr = self.module.run_command("%s --status-all 2>&1 | grep -E \"\\[ (\\+|\\-) \\]\"" % self.service_path, use_unsafe_shell=True) -+ rc, stdout, stderr = self.module.run_command("%s --status-all" % self.service_path) -+ if rc == 4 and not os.path.exists('/etc/init.d'): -+ # This function is not intended to run on Red Hat but it could happen -+ # if `chkconfig` is not installed. `service` on RHEL9 returns rc 4 -+ # when /etc/init.d is missing, add the extra guard of checking /etc/init.d -+ # instead of solely relying on rc == 4 -+ return - if rc != 0: - self.module.warn("Unable to query 'service' tool (%s): %s" % (rc, stderr)) -- for line in stdout.split("\n"): -- line_data = line.split() -- if len(line_data) < 4: -- continue # Skipping because we expected more data -- service_name = " ".join(line_data[3:]) -- if line_data[1] == "+": -+ p = re.compile(r'^\s*\[ (?P\+|\-) \]\s+(?P.+)$', flags=re.M) -+ for match in p.finditer(stdout): -+ service_name = match.group('name') -+ if match.group('state') == "+": - service_state = "running" - else: - service_state = "stopped" --- -2.30.2 - diff --git a/SOURCES/remove-bundled-deps-from-requirements.patch b/SOURCES/remove-bundled-deps-from-requirements.patch new file mode 100644 index 0000000..9e6b433 --- /dev/null +++ b/SOURCES/remove-bundled-deps-from-requirements.patch @@ -0,0 +1,18 @@ +diff --git a/requirements.txt b/requirements.txt +index 20562c3e0f..792daa209a 100644 +--- a/requirements.txt ++++ b/requirements.txt +@@ -3,13 +3,5 @@ + # packages. Thus, this should be the loosest set possible (only required + # packages, not optional ones, and with the widest range of versions that could + # be suitable) +-jinja2 >= 3.0.0 + PyYAML >= 5.1 # PyYAML 5.1 is required for Python 3.8+ support + cryptography +-packaging +-# NOTE: resolvelib 0.x version bumps should be considered major/breaking +-# NOTE: and we should update the upper cap with care, at least until 1.0 +-# NOTE: Ref: https://github.com/sarugaku/resolvelib/issues/69 +-# NOTE: When updating the upper bound, also update the latest version used +-# NOTE: in the ansible-galaxy-collection test suite. +-resolvelib >= 0.5.3, < 0.9.0 # dependency resolver used by ansible-galaxy diff --git a/SPECS/ansible-core.spec b/SPECS/ansible-core.spec index e346e92..534f225 100644 --- a/SPECS/ansible-core.spec +++ b/SPECS/ansible-core.spec @@ -1,3 +1,6 @@ +%global __python3 /usr/bin/python3.11 +%global python3_pkgversion 3.11 + # We need this because we are no longer noarch, since our bundled deps might # conceivably need to compile arch-specific things. But we currently have no # useful debuginfo stuff. @@ -7,9 +10,6 @@ # ansible-test munges the shebangs itself. %global __brp_mangle_shebangs_exclude_from_file %{SOURCE1} -%global commitId c1bb0c6ab89a344bdcc07ef66887c310e661e3a6 -%global python39_sitelib /usr/lib/python3.9/site-packages/ - # NOTE(pabelanger): Don't auto add pwsh as Requires for ansible-test. We do # not wish to package it. %global __requires_exclude ^/usr/bin/pwsh$ @@ -23,8 +23,8 @@ %define py2_shbang_opts %{nil} %define py3_shbang_opts %{nil} -%define vendor_path %{buildroot}%{python39_sitelib}/ansible/_vendor/ -%define vendor_pip /usr/bin/python3.9 -m pip install --no-deps -v --no-use-pep517 --no-binary :all: -t %{vendor_path} +%define vendor_path %{buildroot}%{python3_sitelib}/ansible/_vendor/ +%define vendor_pip %{__python3} -m pip install --no-deps -v --no-build-isolation --no-binary :all: -t %{vendor_path} # These control which bundled dep versions we pin against %global jinja2_version 3.1.2 @@ -32,31 +32,27 @@ %global packaging_version 20.4 %global pyparsing_version 2.4.7 %global resolvelib_version 0.5.4 -%global straightplugin_version 1.4.1 Name: ansible-core Summary: SSH-based configuration management, deployment, and task execution system -Version: 2.13.3 -Release: 2%{?dist} +Version: 2.14.2 +Release: 3%{?dist} ExcludeArch: i686 Group: Development/Libraries License: GPLv3+ -Source0: ansible-%{commitId}.tar.gz +Source0: https://files.pythonhosted.org/packages/source/a/ansible-core/ansible-core-%{version}.tar.gz Source1: ansible-test-data-files.txt # And bundled deps -Source2: jinja2-b08cd4bc64bb980df86ed2876978ae5735572280.tar.gz -Source3: markupsafe-b5a517506d6cb8091e215a4a89e47db5eee6a68f.tar.gz -Source4: packaging-ded06cedf6e20680eea0363fac894cb4a09e7831.tar.gz -Source5: pyparsing-6a844ee35ca5125490a28dbd6dd2d15b6498e605.tar.gz -Source6: resolvelib-d935f9fd07246d9641436c7a8e6ae39423374e28.tar.gz +Source2: https://files.pythonhosted.org/packages/source/J/Jinja2/Jinja2-%{jinja2_version}.tar.gz +Source3: https://files.pythonhosted.org/packages/source/M/MarkupSafe/MarkupSafe-%{markupsafe_version}.tar.gz +Source4: https://files.pythonhosted.org/packages/source/p/packaging/packaging-%{packaging_version}.tar.gz +Source5: https://files.pythonhosted.org/packages/source/p/pyparsing/pyparsing-%{pyparsing_version}.tar.gz +Source6: https://files.pythonhosted.org/packages/source/r/resolvelib/resolvelib-%{resolvelib_version}.tar.gz -# Deps to build man pages -Source7: straightplugin-6634ea8e1e89d5bb23804f50e676f196c52c46ed.tar.gz - -Patch0: 0001-Use-python-re-to-parse-service-output-in.patch +Patch0: remove-bundled-deps-from-requirements.patch URL: http://ansible.com @@ -80,22 +76,19 @@ Provides: bundled(python-markupsafe) = %{markupsafe_version} Provides: bundled(python-packaging) = %{packaging_version} Provides: bundled(python-pyparsing) = %{pyparsing_version} Provides: bundled(python-resolvelib) = %{resolvelib_version} -Provides: bundled(python-straightplugin) = %{straightplugin_version} - -BuildRequires: python3-docutils -BuildRequires: python39-devel -BuildRequires: python39-pip -BuildRequires: python39-pyyaml -BuildRequires: python39-rpm-macros -BuildRequires: python39-setuptools -BuildRequires: python39-wheel + +BuildRequires: python%{python3_pkgversion}-devel +BuildRequires: python%{python3_pkgversion}-pip +BuildRequires: python%{python3_pkgversion}-pyyaml +BuildRequires: python%{python3_pkgversion}-rpm-macros +BuildRequires: python%{python3_pkgversion}-setuptools +BuildRequires: python%{python3_pkgversion}-wheel BuildRequires: make git-core gcc Requires: git-core -Requires: python39 -Requires: python39-PyYAML >= 5.1 -Requires: python39-cryptography -Requires: python39-six +Requires: python%{python3_pkgversion}-PyYAML >= 5.1 +Requires: python%{python3_pkgversion}-cryptography +Requires: python%{python3_pkgversion}-six Requires: sshpass %description @@ -120,34 +113,25 @@ This package installs the ansible-test command for testing modules and plugins developed for ansible. %prep -%setup -q -T -b 2 -n jinja2-b08cd4bc64bb980df86ed2876978ae5735572280 -%setup -q -T -b 3 -n markupsafe-b5a517506d6cb8091e215a4a89e47db5eee6a68f -%setup -q -T -b 4 -n packaging-ded06cedf6e20680eea0363fac894cb4a09e7831 -%setup -q -T -b 5 -n pyparsing-6a844ee35ca5125490a28dbd6dd2d15b6498e605 -%setup -q -T -b 6 -n resolvelib-d935f9fd07246d9641436c7a8e6ae39423374e28 -%setup -q -T -b 7 -n straightplugin-6634ea8e1e89d5bb23804f50e676f196c52c46ed -%setup -q -n ansible-%{commitId} -%patch0 -p 1 +%setup -q -b2 -b3 -b4 -b5 -b6 -n ansible-core-%{version} +%patch0 -p1 # Fix all Python shebangs recursively in ansible-test -# -p preserves timestamps -# -n prevents creating ~backup files -# -i specifies the interpreter for the shebang -pathfix3.9.py -pni "%{__python3} %{py3_shbang_opts}" test/lib/ansible_test +%{py3_shebang_fix} test/lib/ansible_test %build -/usr/bin/python3.9 setup.py build +%{py3_build} %install -/usr/bin/python3.9 setup.py install --root %{buildroot} +%{py3_install} # Handle bundled deps: %{vendor_pip} \ - ../jinja2-b08cd4bc64bb980df86ed2876978ae5735572280/ \ - ../markupsafe-b5a517506d6cb8091e215a4a89e47db5eee6a68f/ \ - ../packaging-ded06cedf6e20680eea0363fac894cb4a09e7831/ \ - ../pyparsing-6a844ee35ca5125490a28dbd6dd2d15b6498e605/ \ - ../resolvelib-d935f9fd07246d9641436c7a8e6ae39423374e28 + ../Jinja2-%{jinja2_version}/ \ + ../MarkupSafe-%{markupsafe_version}/ \ + ../packaging-%{packaging_version}/ \ + ../pyparsing-%{pyparsing_version}/ \ + ../resolvelib-%{resolvelib_version} # Create system directories that Ansible defines as default locations in # ansible/config/base.yml @@ -189,20 +173,14 @@ mkdir -p %{buildroot}%{_sysconfdir}/ansible/roles/ cp examples/hosts %{buildroot}%{_sysconfdir}/ansible/ cp examples/ansible.cfg %{buildroot}%{_sysconfdir}/ansible/ mkdir -p %{buildroot}/%{_mandir}/man1/ -## Build man pages -mkdir /tmp/_vendor -/usr/bin/python3.9 -m pip install ../straightplugin-6634ea8e1e89d5bb23804f50e676f196c52c46ed -t /tmp/_vendor --no-build-isolation - -# Remove plugins not needed, they bring in more dependencies -find hacking/build_library/build_ansible/command_plugins ! -name 'generate_man.py' -type f -exec rm -f {} + - -PYTHON=python3.9 PYTHONPATH=%{vendor_path}:/tmp/_vendor make docs cp -v docs/man/man1/*.1 %{buildroot}/%{_mandir}/man1/ cp -pr docs/docsite/rst . cp -p lib/ansible_core.egg-info/PKG-INFO . +strip --strip-unneeded %{vendor_path}/markupsafe/_speedups%{python3_ext_suffix} + %files %defattr(-,root,root) %{_bindir}/ansible* @@ -212,19 +190,44 @@ cp -p lib/ansible_core.egg-info/PKG-INFO . %doc changelogs/CHANGELOG-v2.*.rst %doc %{_mandir}/man1/ansible* %{_datadir}/ansible/ -%{python39_sitelib}/ansible* -%exclude %{python39_sitelib}/ansible_test -%exclude %{python39_sitelib}/ansible/_vendor/markupsafe/_speedups.c +%{python3_sitelib}/ansible* +%exclude %{python3_sitelib}/ansible_test +%exclude %{python3_sitelib}/ansible/_vendor/markupsafe/_speedups.c %files -n ansible-test %{_bindir}/ansible-test -%{python39_sitelib}/ansible_test +%{python3_sitelib}/ansible_test %changelog -* Thu Dec 08 2022 Dimitri Savineau - 2.13.3-2 -- Use python re to parse service output instead of grep (rhbz#2151902) +* Tue Feb 14 2023 Dimitri Savineau - 2.14.2-3 +- rebuild with python 3.11 (rhbz#2169524) +- remove bundled dependencies from requirements file (rhbz#2143974) +- use PyPi sources (rhbz#2160277) +- remove straightplugin + +* Thu Feb 02 2023 Christian Adams - 2.14.2-2 +- fix debuginfo symbols from markupsafe dependency (rhbz#2166414) + +* Wed Feb 01 2023 Christian Adams - 2.14.2-1 +- ansible-core 2.14.2 release (rhbz#2166414) + +* Wed Dec 07 2022 Dimitri Savineau - 2.14.1-1 +- ansible-core 2.14.1 release (rhbz#2151594) + +* Tue Nov 08 2022 Dimitri Savineau - 2.14.0-1 +- ansible-core 2.14.0 release (rhbz#2141386) + +* Mon Nov 07 2022 Dimitri Savineau - 2.13.6-1 +- ansible-core 2.13.6 release (rhbz#2141109) +- fix service_facts module parsing (rhbz#2141111) + +* Wed Oct 12 2022 James Marshall - 2.13.5-1 +- ansible-core 2.13.5 release (rhbz#2134116) + +* Fri Oct 07 2022 Dimitri Savineau - 2.13.4-1 +- ansible-core 2.13.4 release (rhbz#2133024) -* Wed Aug 15 2022 James Marshall - 2.13.3-1 +* Mon Aug 15 2022 James Marshall - 2.13.3-1 - ansible-core 2.13.3 release (rhbz#2118475) * Wed Jul 20 2022 James Marshall - 2.13.2-1