2022-05-26 04:51:36 +00:00
|
|
|
# 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.
|
|
|
|
%global debug_package %{nil}
|
|
|
|
|
|
|
|
# Disable shebang munging for specific paths. These files are data files.
|
|
|
|
# ansible-test munges the shebangs itself.
|
|
|
|
%global __brp_mangle_shebangs_exclude_from_file %{SOURCE1}
|
|
|
|
|
2022-07-08 02:12:12 +00:00
|
|
|
%global commitId e9f633ec720fbd4367d2f694574dec101e22d3b9
|
|
|
|
%global python39_sitelib /usr/lib/python3.9/site-packages/
|
2022-05-26 04:51:36 +00:00
|
|
|
|
|
|
|
# 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$
|
|
|
|
|
|
|
|
# RHEL and Fedora add -s to the shebang line. We do *not* use -s -E -S or -I
|
|
|
|
# with ansible because it has many optional features which users need to
|
|
|
|
# install libraries on their own to use. For instance, paramiko for the
|
|
|
|
# network connection plugins or winrm to talk to windows hosts.
|
|
|
|
# Set this to nil to remove -s
|
|
|
|
%define py_shbang_opts %{nil}
|
|
|
|
%define py2_shbang_opts %{nil}
|
|
|
|
%define py3_shbang_opts %{nil}
|
|
|
|
|
2022-07-08 02:12:12 +00:00
|
|
|
%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}
|
2022-05-26 04:51:36 +00:00
|
|
|
|
|
|
|
# These control which bundled dep versions we pin against
|
2022-07-08 02:12:12 +00:00
|
|
|
%global jinja2_version 3.1.2
|
|
|
|
%global markupsafe_version 2.1.0
|
2022-05-26 04:51:36 +00:00
|
|
|
%global packaging_version 20.4
|
|
|
|
%global pyparsing_version 2.4.7
|
2022-07-08 02:12:12 +00:00
|
|
|
%global resolvelib_version 0.5.4
|
2022-05-26 04:51:36 +00:00
|
|
|
%global straightplugin_version 1.4.1
|
|
|
|
|
|
|
|
|
|
|
|
Name: ansible-core
|
|
|
|
Summary: SSH-based configuration management, deployment, and task execution system
|
2022-07-08 02:12:12 +00:00
|
|
|
Version: 2.13.1
|
2022-06-21 15:39:23 +00:00
|
|
|
Release: 1%{?dist}
|
2022-05-26 04:51:36 +00:00
|
|
|
ExcludeArch: i686
|
|
|
|
|
|
|
|
Group: Development/Libraries
|
|
|
|
License: GPLv3+
|
|
|
|
Source0: ansible-%{commitId}.tar.gz
|
|
|
|
Source1: ansible-test-data-files.txt
|
|
|
|
|
|
|
|
# And bundled deps
|
2022-07-08 02:12:12 +00:00
|
|
|
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
|
2022-05-26 04:51:36 +00:00
|
|
|
|
|
|
|
# Deps to build man pages
|
2022-07-08 02:12:12 +00:00
|
|
|
Source7: straightplugin-6634ea8e1e89d5bb23804f50e676f196c52c46ed.tar.gz
|
2022-05-26 04:51:36 +00:00
|
|
|
|
|
|
|
URL: http://ansible.com
|
|
|
|
|
|
|
|
# We conflict old ansible, and any version of ansible-base.
|
|
|
|
Conflicts: ansible < 2.10.0
|
|
|
|
Conflicts: ansible-base
|
|
|
|
|
|
|
|
# ... and provide 'ansible' so that old packages still work without updated
|
|
|
|
# spec files.
|
|
|
|
# Provides: ansible
|
|
|
|
|
|
|
|
# Bundled provides that are sprinkled throughout the codebase.
|
|
|
|
Provides: bundled(python-backports-ssl_match_hostname) = 3.7.0.1
|
2022-07-08 02:12:12 +00:00
|
|
|
Provides: bundled(python-distro) = 1.6.0
|
2022-05-26 04:51:36 +00:00
|
|
|
Provides: bundled(python-selectors2) = 1.1.1
|
2022-07-08 02:12:12 +00:00
|
|
|
Provides: bundled(python-six) = 1.16.0
|
2022-05-26 04:51:36 +00:00
|
|
|
|
|
|
|
# Things we explicitly bundle via src rpm, and put in ansible._vendor
|
2022-07-08 02:12:12 +00:00
|
|
|
Provides: bundled(python-jinja2) = %{jinja2_version}
|
|
|
|
Provides: bundled(python-markupsafe) = %{markupsafe_version}
|
2022-05-26 04:51:36 +00:00
|
|
|
Provides: bundled(python-packaging) = %{packaging_version}
|
|
|
|
Provides: bundled(python-pyparsing) = %{pyparsing_version}
|
2022-07-08 02:12:12 +00:00
|
|
|
Provides: bundled(python-resolvelib) = %{resolvelib_version}
|
2022-05-26 04:51:36 +00:00
|
|
|
Provides: bundled(python-straightplugin) = %{straightplugin_version}
|
|
|
|
|
2022-06-11 08:11:11 +00:00
|
|
|
BuildRequires: python3-docutils
|
2022-07-08 02:12:12 +00:00
|
|
|
BuildRequires: python39-devel
|
|
|
|
BuildRequires: python39-pip
|
|
|
|
BuildRequires: python39-pyyaml
|
|
|
|
BuildRequires: python39-rpm-macros
|
|
|
|
BuildRequires: python39-setuptools
|
|
|
|
BuildRequires: python39-wheel
|
|
|
|
BuildRequires: make git-core gcc
|
2022-05-26 04:51:36 +00:00
|
|
|
|
2022-06-08 08:12:05 +00:00
|
|
|
Requires: git-core
|
2022-07-08 02:12:12 +00:00
|
|
|
Requires: python39
|
|
|
|
Requires: python39-PyYAML >= 5.1
|
|
|
|
Requires: python39-cryptography
|
|
|
|
Requires: python39-six
|
2022-05-26 04:51:36 +00:00
|
|
|
Requires: sshpass
|
|
|
|
|
|
|
|
%description
|
|
|
|
Ansible is a radically simple model-driven configuration management,
|
|
|
|
multi-node deployment, and remote task execution system. Ansible works
|
|
|
|
over SSH and does not require any software or daemons to be installed
|
|
|
|
on remote nodes. Extension modules can be written in any language and
|
|
|
|
are transferred to managed machines automatically.
|
|
|
|
|
|
|
|
%package -n ansible-test
|
|
|
|
Summary: Tool for testing ansible plugin and module code
|
|
|
|
Requires: %{name} = %{version}-%{release}
|
|
|
|
|
|
|
|
%description -n ansible-test
|
|
|
|
Ansible is a radically simple model-driven configuration management,
|
|
|
|
multi-node deployment, and remote task execution system. Ansible works
|
|
|
|
over SSH and does not require any software or daemons to be installed
|
|
|
|
on remote nodes. Extension modules can be written in any language and
|
|
|
|
are transferred to managed machines automatically.
|
|
|
|
|
|
|
|
This package installs the ansible-test command for testing modules and plugins
|
|
|
|
developed for ansible.
|
|
|
|
|
|
|
|
%prep
|
2022-07-08 02:12:12 +00:00
|
|
|
%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
|
2022-05-26 04:51:36 +00:00
|
|
|
%setup -q -n ansible-%{commitId}
|
|
|
|
|
|
|
|
# Fix all Python shebangs recursively in ansible-test
|
|
|
|
# -p preserves timestamps
|
|
|
|
# -n prevents creating ~backup files
|
|
|
|
# -i specifies the interpreter for the shebang
|
2022-07-08 02:12:12 +00:00
|
|
|
pathfix3.9.py -pni "%{__python3} %{py3_shbang_opts}" test/lib/ansible_test
|
2022-05-26 04:51:36 +00:00
|
|
|
|
|
|
|
%build
|
2022-07-08 02:12:12 +00:00
|
|
|
/usr/bin/python3.9 setup.py build
|
2022-05-26 04:51:36 +00:00
|
|
|
|
|
|
|
%install
|
2022-07-08 02:12:12 +00:00
|
|
|
/usr/bin/python3.9 setup.py install --root %{buildroot}
|
2022-05-26 04:51:36 +00:00
|
|
|
|
|
|
|
# Handle bundled deps:
|
|
|
|
%{vendor_pip} \
|
2022-07-08 02:12:12 +00:00
|
|
|
../jinja2-b08cd4bc64bb980df86ed2876978ae5735572280/ \
|
|
|
|
../markupsafe-b5a517506d6cb8091e215a4a89e47db5eee6a68f/ \
|
|
|
|
../packaging-ded06cedf6e20680eea0363fac894cb4a09e7831/ \
|
2022-05-26 04:51:36 +00:00
|
|
|
../pyparsing-6a844ee35ca5125490a28dbd6dd2d15b6498e605/ \
|
2022-07-08 02:12:12 +00:00
|
|
|
../resolvelib-d935f9fd07246d9641436c7a8e6ae39423374e28
|
2022-05-26 04:51:36 +00:00
|
|
|
|
|
|
|
# Create system directories that Ansible defines as default locations in
|
|
|
|
# ansible/config/base.yml
|
|
|
|
DATADIR_LOCATIONS='%{_datadir}/ansible/collections
|
|
|
|
%{_datadir}/ansible/plugins/doc_fragments
|
|
|
|
%{_datadir}/ansible/plugins/action
|
|
|
|
%{_datadir}/ansible/plugins/become
|
|
|
|
%{_datadir}/ansible/plugins/cache
|
|
|
|
%{_datadir}/ansible/plugins/callback
|
|
|
|
%{_datadir}/ansible/plugins/cliconf
|
|
|
|
%{_datadir}/ansible/plugins/connection
|
|
|
|
%{_datadir}/ansible/plugins/filter
|
|
|
|
%{_datadir}/ansible/plugins/httpapi
|
|
|
|
%{_datadir}/ansible/plugins/inventory
|
|
|
|
%{_datadir}/ansible/plugins/lookup
|
|
|
|
%{_datadir}/ansible/plugins/modules
|
|
|
|
%{_datadir}/ansible/plugins/module_utils
|
|
|
|
%{_datadir}/ansible/plugins/netconf
|
|
|
|
%{_datadir}/ansible/roles
|
|
|
|
%{_datadir}/ansible/plugins/strategy
|
|
|
|
%{_datadir}/ansible/plugins/terminal
|
|
|
|
%{_datadir}/ansible/plugins/test
|
|
|
|
%{_datadir}/ansible/plugins/vars'
|
|
|
|
|
|
|
|
UPSTREAM_DATADIR_LOCATIONS=$(grep -ri default lib/ansible/config/base.yml | tr ':' '\n' | grep '/usr/share/ansible')
|
|
|
|
|
|
|
|
if [ "$SYSTEM_LOCATIONS" != "$UPSTREAM_SYSTEM_LOCATIONS" ] ; then
|
|
|
|
echo "The upstream Ansible datadir locations have changed. Spec file needs to be updated"
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
|
|
|
mkdir -p %{buildroot}%{_datadir}/ansible/plugins/
|
|
|
|
for location in $DATADIR_LOCATIONS ; do
|
|
|
|
mkdir %{buildroot}"$location"
|
|
|
|
done
|
|
|
|
mkdir -p %{buildroot}%{_sysconfdir}/ansible/
|
|
|
|
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
|
2022-06-11 08:11:11 +00:00
|
|
|
|
|
|
|
mkdir /tmp/_vendor
|
2022-07-08 02:12:12 +00:00
|
|
|
/usr/bin/python3.9 -m pip install ../straightplugin-6634ea8e1e89d5bb23804f50e676f196c52c46ed -t /tmp/_vendor --no-build-isolation
|
2022-06-11 08:11:11 +00:00
|
|
|
|
|
|
|
# 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 {} +
|
|
|
|
|
2022-07-08 02:12:12 +00:00
|
|
|
PYTHON=python3.9 PYTHONPATH=%{vendor_path}:/tmp/_vendor make docs
|
2022-06-11 08:11:11 +00:00
|
|
|
cp -v docs/man/man1/*.1 %{buildroot}/%{_mandir}/man1/
|
|
|
|
|
|
|
|
cp -pr docs/docsite/rst .
|
2022-05-26 04:51:36 +00:00
|
|
|
cp -p lib/ansible_core.egg-info/PKG-INFO .
|
|
|
|
|
|
|
|
%files
|
|
|
|
%defattr(-,root,root)
|
|
|
|
%{_bindir}/ansible*
|
|
|
|
%exclude %{_bindir}/ansible-test
|
|
|
|
%config(noreplace) %{_sysconfdir}/ansible/
|
|
|
|
%doc README.rst PKG-INFO COPYING
|
|
|
|
%doc changelogs/CHANGELOG-v2.*.rst
|
2022-06-11 08:11:11 +00:00
|
|
|
%doc %{_mandir}/man1/ansible*
|
2022-05-26 04:51:36 +00:00
|
|
|
%{_datadir}/ansible/
|
2022-07-08 02:12:12 +00:00
|
|
|
%{python39_sitelib}/ansible*
|
|
|
|
%exclude %{python39_sitelib}/ansible_test
|
|
|
|
%exclude %{python39_sitelib}/ansible/_vendor/markupsafe/_speedups.c
|
2022-05-26 04:51:36 +00:00
|
|
|
|
|
|
|
%files -n ansible-test
|
|
|
|
%{_bindir}/ansible-test
|
2022-07-08 02:12:12 +00:00
|
|
|
%{python39_sitelib}/ansible_test
|
2022-05-26 04:51:36 +00:00
|
|
|
|
|
|
|
%changelog
|
2022-07-08 02:12:12 +00:00
|
|
|
* Mon Jul 04 2022 Dimitri Savineau <dsavinea@redhat.com> - 2.13.1-1
|
|
|
|
- ansible-core 2.13.1 release (rhbz#2103699)
|
|
|
|
- add bundled version of jinja2, markupsafe and resolvelib
|
|
|
|
- rebuild with python 3.9
|
|
|
|
|
2022-06-21 15:39:23 +00:00
|
|
|
* Mon Jun 20 2022 Dimitri Savineau <dsavinea@redhat.com> - 2.12.7-1
|
|
|
|
- ansible-core 2.12.7 release (rhbz#2099323)
|
|
|
|
|
2022-06-11 08:11:11 +00:00
|
|
|
* Thu Jun 09 2022 Dimitri Savineau <dsavinea@redhat.com> - 2.12.6-3
|
|
|
|
- Build manpages (rhbz#2032809)
|
|
|
|
- Remove legacy files
|
|
|
|
|
2022-06-08 08:12:05 +00:00
|
|
|
* Tue Jun 07 2022 Dimitri Savineau <dsavinea@redhat.com> - 2.12.6-2
|
|
|
|
- switch from git to git-core dependency (rhbz#2094549)
|
|
|
|
|
|
|
|
* Tue May 24 2022 James Marshall <jamarsha@redhat.com> - 2.12.6-1
|
|
|
|
- ansible-core 2.12.6 release
|
|
|
|
|
2022-05-31 18:22:42 +00:00
|
|
|
* Mon May 09 2022 Dimitri Savineau <dsavinea@redhat.com> - 2.12.5-1
|
|
|
|
- ansible-core 2.12.5 release
|
|
|
|
|
|
|
|
* Mon Apr 11 2022 James Marshall <jamarsha@redhat.com> - 2.12.4-1
|
|
|
|
- ansible-core 2.12.4 release
|
|
|
|
|
2022-05-26 04:51:36 +00:00
|
|
|
* Mon Mar 14 2022 Dimitri Savineau <dsavinea@redhat.com> - 2.12.3-1
|
|
|
|
- ansible-core 2.12.3 release
|
|
|
|
- re-enable changelog and manpages
|
|
|
|
|
|
|
|
* Mon Mar 07 2022 Dimitri Savineau <dsavinea@redhat.com> - 2.12.2-3
|
|
|
|
- replace Obsolete to Conflicts
|
|
|
|
|
|
|
|
* Wed Feb 02 2022 Dimitri Savineau <dsavinea@redhat.com> - 2.12.2-2
|
|
|
|
- fix ansible tarball setup
|
|
|
|
|
|
|
|
* Wed Feb 02 2022 Dimitri Savineau <dsavinea@redhat.com> - 2.12.2-1
|
|
|
|
- ansible-core 2.12.2 release
|
|
|
|
- add gating and test files
|
|
|
|
|
|
|
|
* Wed Jan 19 2022 Dimitri Savineau <dsavinea@redhat.com> - 2.12.1-2
|
|
|
|
- Remove Provides on ansible
|
|
|
|
|
|
|
|
* Thu Dec 16 2021 Yanis Guenane <yguenane@redhat.com> - 2.12.1-1
|
|
|
|
- ansible-core 2.12.1-1
|
|
|
|
|
|
|
|
* Wed Jul 21 2021 Paul Belanger <pabelanger@redhat.com> - 2.11.3-2
|
|
|
|
- Add git dependency for ansible-galaxy CLI command.
|
|
|
|
|
|
|
|
* Tue Jul 20 2021 Yanis Guenane <yguenane@redhat.com> - 2.11.3-1
|
|
|
|
- ansible-core 2.11.3-1
|
|
|
|
|
|
|
|
* Fri Jul 02 2021 Satoe Imaishi <simaishi@redhat.com> - 2.11.2-2
|
|
|
|
- Add man pages
|
|
|
|
|
|
|
|
* Tue Jun 29 2021 Paul Belanger <pabelanger@redhat.com> - 2.11.2-1
|
|
|
|
- ansible-core 2.11.2 released.
|
|
|
|
- Drop bundled version of resolvelib in favor of
|
|
|
|
python38-resolvelib.
|
|
|
|
|
|
|
|
* Wed Mar 31 2021 Rick Elrod <relrod@redhat.com> - 2.11.0b4-1
|
|
|
|
- ansible-core 2.11.0 beta 4
|
|
|
|
|
|
|
|
* Thu Mar 18 2021 Rick Elrod <relrod@redhat.com> - 2.11.0b2-3
|
|
|
|
- Try adding a Provides for old ansible.
|
|
|
|
|
|
|
|
* Thu Mar 18 2021 Rick Elrod <relrod@redhat.com> - 2.11.0b2-2
|
|
|
|
- Try Obsoletes instead of Conflicts.
|
|
|
|
|
|
|
|
* Thu Mar 18 2021 Rick Elrod <relrod@redhat.com> - 2.11.0b2-1
|
|
|
|
- ansible-core 2.11.0 beta 2
|
|
|
|
- Conflict with old ansible and ansible-base.
|
|
|
|
|
|
|
|
* Thu Mar 11 2021 Rick Elrod <relrod@redhat.com> - 2.11.0b1-1
|
|
|
|
- ansible-core 2.11.0 beta 1
|
|
|
|
|
|
|
|
* Mon Nov 30 2020 Rick Elrod <relrod@redhat.com> - 2.11.0-1
|
|
|
|
- ansible-core, beta
|
|
|
|
|
|
|
|
* Wed Jun 10 2020 Rick Elrod <relrod@redhat.com> - 2.10.0-1
|
|
|
|
- ansible-base, beta
|