|
|
|
@ -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 <dsavinea@redhat.com> - 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 <chadams@redhat.com> - 2.14.2-2
|
|
|
|
|
- fix debuginfo symbols from markupsafe dependency (rhbz#2166414)
|
|
|
|
|
|
|
|
|
|