diff --git a/.ansible-core.metadata b/.ansible-core.metadata index 5296c70..0d8afab 100644 --- a/.ansible-core.metadata +++ b/.ansible-core.metadata @@ -1,7 +1,6 @@ -85a4bb30dc7d18f3e3861586c5d6531957ee196e SOURCES/ansible-ad9867ca5eb8ba27f827d5d5a7999cfb96ae0986.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 3cf7e50..2d79bb0 100644 --- a/.gitignore +++ b/.gitignore @@ -1,7 +1,6 @@ -SOURCES/ansible-ad9867ca5eb8ba27f827d5d5a7999cfb96ae0986.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/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 77d614a..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 ad9867ca5eb8ba27f827d5d5a7999cfb96ae0986 -%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,29 +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.14.2 -Release: 2%{?dist} +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: remove-bundled-deps-from-requirements.patch URL: http://ansible.com @@ -78,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 @@ -118,33 +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} +%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 @@ -186,15 +173,7 @@ 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 . @@ -211,15 +190,21 @@ strip --strip-unneeded %{vendor_path}/markupsafe/_speedups%{python3_ext_suffix} %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 +* 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)