f29152
%global __python3 /usr/bin/python3.11
f29152
%global python3_pkgversion 3.11
f29152
083352
# We need this because we are no longer noarch, since our bundled deps might
083352
# conceivably need to compile arch-specific things. But we currently have no
083352
# useful debuginfo stuff.
083352
%global debug_package %{nil}
083352
083352
# Disable shebang munging for specific paths.  These files are data files.
083352
# ansible-test munges the shebangs itself.
083352
%global __brp_mangle_shebangs_exclude_from_file %{SOURCE1}
083352
083352
# RHEL and Fedora add -s to the shebang line.  We do *not* use -s -E -S or -I
083352
# with ansible because it has many optional features which users need to
083352
# install libraries on their own to use.  For instance, paramiko for the
083352
# network connection plugins or winrm to talk to windows hosts.
083352
# Set this to nil to remove -s
083352
%define py_shbang_opts %{nil}
083352
%define py2_shbang_opts %{nil}
083352
%define py3_shbang_opts %{nil}
083352
f29152
%define vendor_path %{buildroot}%{python3_sitelib}/ansible/_vendor/
f29152
%define vendor_pip %{__python3} -m pip install --no-deps -v --no-build-isolation --no-binary :all: -t %{vendor_path}
083352
083352
# These control which bundled dep versions we pin against
99cb13
%global jinja2_version 3.1.2
99cb13
%global markupsafe_version 2.1.0
083352
%global packaging_version 20.4
083352
%global pyparsing_version 2.4.7
f29152
%global resolvelib_version 0.5.4
083352
083352
083352
Name: ansible-core
083352
Summary: SSH-based configuration management, deployment, and task execution system
f29152
Version: 2.14.2
f29152
Release: 4%{?dist}
083352
083352
Group: Development/Libraries
083352
License: GPLv3+
f29152
Source0: https://files.pythonhosted.org/packages/source/a/ansible-core/ansible-core-%{version}.tar.gz
083352
Source1: ansible-test-data-files.txt
083352
083352
# And bundled deps
f29152
Source2: https://files.pythonhosted.org/packages/source/J/Jinja2/Jinja2-%{jinja2_version}.tar.gz
f29152
Source3: https://files.pythonhosted.org/packages/source/M/MarkupSafe/MarkupSafe-%{markupsafe_version}.tar.gz
f29152
Source4: https://files.pythonhosted.org/packages/source/p/packaging/packaging-%{packaging_version}.tar.gz
f29152
Source5: https://files.pythonhosted.org/packages/source/p/pyparsing/pyparsing-%{pyparsing_version}.tar.gz
f29152
Source6: https://files.pythonhosted.org/packages/source/r/resolvelib/resolvelib-%{resolvelib_version}.tar.gz
083352
f29152
Patch0: remove-bundled-deps-from-requirements.patch
e0818b
083352
URL: http://ansible.com
083352
083352
# We obsolete old ansible, and any version of ansible-base.
083352
Obsoletes: ansible < 2.10.0
f29152
Obsoletes: ansible-base < 2.11.0
083352
083352
# ... and provide 'ansible' so that old packages still work without updated
083352
# spec files.
083352
# Provides: ansible
083352
083352
# Bundled provides that are sprinkled throughout the codebase.
083352
Provides: bundled(python-backports-ssl_match_hostname) = 3.7.0.1
99cb13
Provides: bundled(python-distro) = 1.6.0
083352
Provides: bundled(python-selectors2) = 1.1.1
99cb13
Provides: bundled(python-six) = 1.16.0
083352
083352
# Things we explicitly bundle via src rpm, and put in ansible._vendor
99cb13
Provides: bundled(python-jinja2) = %{jinja2_version}
99cb13
Provides: bundled(python-markupsafe) = %{markupsafe_version}
083352
Provides: bundled(python-packaging) = %{packaging_version}
083352
Provides: bundled(python-pyparsing) = %{pyparsing_version}
f29152
Provides: bundled(python-resolvelib) = %{resolvelib_version}
f29152
f29152
BuildRequires: python%{python3_pkgversion}-devel
f29152
BuildRequires: python%{python3_pkgversion}-pip
f29152
BuildRequires: python%{python3_pkgversion}-pyyaml
f29152
BuildRequires: python%{python3_pkgversion}-rpm-macros
f29152
BuildRequires: python%{python3_pkgversion}-setuptools
f29152
BuildRequires: python%{python3_pkgversion}-wheel
99cb13
BuildRequires: make git-core gcc
083352
99cb13
Requires: git-core
f29152
Requires: python%{python3_pkgversion}-PyYAML >= 5.1
f29152
Requires: python%{python3_pkgversion}-cryptography
f29152
Requires: python%{python3_pkgversion}-six
083352
Requires: sshpass
083352
083352
%description
083352
Ansible is a radically simple model-driven configuration management,
083352
multi-node deployment, and remote task execution system. Ansible works
083352
over SSH and does not require any software or daemons to be installed
083352
on remote nodes. Extension modules can be written in any language and
083352
are transferred to managed machines automatically.
083352
083352
%package -n ansible-test
083352
Summary: Tool for testing ansible plugin and module code
083352
Requires: %{name} = %{version}-%{release}
083352
083352
%description -n ansible-test
083352
Ansible is a radically simple model-driven configuration management,
083352
multi-node deployment, and remote task execution system. Ansible works
083352
over SSH and does not require any software or daemons to be installed
083352
on remote nodes. Extension modules can be written in any language and
083352
are transferred to managed machines automatically.
083352
083352
This package installs the ansible-test command for testing modules and plugins
083352
developed for ansible.
083352
083352
%prep
f29152
%setup -q -b2 -b3 -b4 -b5 -b6 -n ansible-core-%{version}
f29152
%patch0 -p1
f29152
f29152
# Fix all Python shebangs recursively in ansible-test
f29152
%{py3_shebang_fix} test/lib/ansible_test
083352
083352
%build
f29152
%{py3_build}
083352
083352
%install
f29152
%{py3_install}
083352
083352
# Handle bundled deps:
083352
%{vendor_pip} \
f29152
  ../Jinja2-%{jinja2_version}/ \
f29152
  ../MarkupSafe-%{markupsafe_version}/ \
f29152
  ../packaging-%{packaging_version}/ \
f29152
  ../pyparsing-%{pyparsing_version}/ \
f29152
  ../resolvelib-%{resolvelib_version}
083352
083352
# Create system directories that Ansible defines as default locations in
083352
# ansible/config/base.yml
083352
DATADIR_LOCATIONS='%{_datadir}/ansible/collections
083352
%{_datadir}/ansible/plugins/doc_fragments
083352
%{_datadir}/ansible/plugins/action
083352
%{_datadir}/ansible/plugins/become
083352
%{_datadir}/ansible/plugins/cache
083352
%{_datadir}/ansible/plugins/callback
083352
%{_datadir}/ansible/plugins/cliconf
083352
%{_datadir}/ansible/plugins/connection
083352
%{_datadir}/ansible/plugins/filter
083352
%{_datadir}/ansible/plugins/httpapi
083352
%{_datadir}/ansible/plugins/inventory
083352
%{_datadir}/ansible/plugins/lookup
083352
%{_datadir}/ansible/plugins/modules
083352
%{_datadir}/ansible/plugins/module_utils
083352
%{_datadir}/ansible/plugins/netconf
083352
%{_datadir}/ansible/roles
083352
%{_datadir}/ansible/plugins/strategy
083352
%{_datadir}/ansible/plugins/terminal
083352
%{_datadir}/ansible/plugins/test
083352
%{_datadir}/ansible/plugins/vars'
083352
083352
UPSTREAM_DATADIR_LOCATIONS=$(grep -ri default lib/ansible/config/base.yml | tr ':' '\n' | grep '/usr/share/ansible')
083352
083352
if [ "$SYSTEM_LOCATIONS" != "$UPSTREAM_SYSTEM_LOCATIONS" ] ; then
083352
	echo "The upstream Ansible datadir locations have changed.  Spec file needs to be updated"
083352
	exit 1
083352
fi
083352
083352
mkdir -p %{buildroot}%{_datadir}/ansible/plugins/
083352
for location in $DATADIR_LOCATIONS ; do
083352
	mkdir %{buildroot}"$location"
083352
done
083352
mkdir -p %{buildroot}%{_sysconfdir}/ansible/
083352
mkdir -p %{buildroot}%{_sysconfdir}/ansible/roles/
083352
083352
cp examples/hosts %{buildroot}%{_sysconfdir}/ansible/
083352
cp examples/ansible.cfg %{buildroot}%{_sysconfdir}/ansible/
083352
mkdir -p %{buildroot}/%{_mandir}/man1/
083352
083352
cp -v docs/man/man1/*.1 %{buildroot}/%{_mandir}/man1/
083352
083352
cp -pr docs/docsite/rst .
083352
cp -p lib/ansible_core.egg-info/PKG-INFO .
083352
f29152
strip --strip-unneeded %{vendor_path}/markupsafe/_speedups%{python3_ext_suffix}
f29152
083352
%files
083352
%defattr(-,root,root)
083352
%{_bindir}/ansible*
083352
%exclude %{_bindir}/ansible-test
083352
%config(noreplace) %{_sysconfdir}/ansible/
083352
%doc README.rst PKG-INFO COPYING
083352
%doc changelogs/CHANGELOG-v2.*.rst
083352
%doc %{_mandir}/man1/ansible*
083352
%{_datadir}/ansible/
f29152
%{python3_sitelib}/ansible*
f29152
%exclude %{python3_sitelib}/ansible_test
f29152
%exclude %{python3_sitelib}/ansible/_vendor/markupsafe/_speedups.c
083352
083352
%files -n ansible-test
083352
%{_bindir}/ansible-test
f29152
%{python3_sitelib}/ansible_test
f29152
083352
083352
%changelog
f29152
* Mon Feb 13 2023 Dimitri Savineau <dsavinea@redhat.com> - 2.14.2-4
f29152
- rebuild with python 3.11 (rhbz#2169466)
f29152
- remove bundled dependencies from requirements file (rhbz#2152615)
f29152
- add bundled version of resolvelib
f29152
- use PyPi sources
f29152
- remove straightplugin
f29152
- add missing obsoletes constraint
f29152
f29152
* Wed Feb 01 2023 Dimitri Savineau <dsavinea@redhat.com> - 2.14.2-3
f29152
- fix debuginfo symbols from markupsafe dependency (rhbz#2166433)
f29152
f29152
* Wed Feb 01 2023 Christian Adams <chadams@redhat.com> - 2.14.2-2
f29152
- fix bogus date in changelog (rhbz#2165763)
f29152
f29152
* Tue Jan 31 2023 Christian Adams <chadams@redhat.com> - 2.14.2-1
f29152
- ansible-core 2.14.2 release (rhbz#2165763)
f29152
f29152
* Wed Dec 07 2022 Dimitri Savineau <dsavinea@redhat.com> - 2.14.1-1
f29152
- ansible-core 2.14.1 release (rhbz#2151593)
f29152
f29152
* Tue Nov 08 2022 Dimitri Savineau <dsavinea@redhat.com> - 2.14.0-1
f29152
- ansible-core 2.14.0 release (rhbz#2141116)
f29152
f29152
* Mon Nov 07 2022 Dimitri Savineau <dsavinea@redhat.com> - 2.13.6-1
f29152
- ansible-core 2.13.6 release (rhbz#2140778)
f29152
- fix service_facts module parsing (rhbz#2128801)
f29152
f29152
* Tue Oct 11 2022 James Marshall <jamarsha@redhat.com> - 2.13.5-1
f29152
- ansible-core 2.13.5 release (rhbz#2133912)
f29152
f29152
* Thu Oct 06 2022 Dimitri Savineau <dsavinea@redhat.com> - 2.13.4-1
f29152
- ansible-core 2.13.4 release (rhbz#2132807)
e0818b
99cb13
* Mon Aug 15 2022 James Marshall <jamarsha@redhat.com> - 2.13.3-1
99cb13
- ansible-core 2.13.3 release (rhbz#2118458)
99cb13
99cb13
* Mon Jul 18 2022 James Marshall <jamarsha@redhat.com> - 2.13.2-1
99cb13
- ansible-core 2.13.2 release (rhbz#2108229)
99cb13
99cb13
* Mon Jun 27 2022 Dimitri Savineau <dsavinea@redhat.com> - 2.13.1-2
99cb13
- Update bundled jinja2 version to 3.1.2 (rhbz#2101462)
99cb13
99cb13
* Wed Jun 22 2022 Dimitri Savineau <dsavinea@redhat.com> - 2.13.1-1
99cb13
- ansible-core 2.13.1 release (rhbz#2100242)
99cb13
- add bundled version of jinja2 and markupsafe
99cb13
99cb13
* Mon Jun 20 2022 Dimitri Savineau <dsavinea@redhat.com> - 2.12.7-1
99cb13
- ansible-core 2.12.7 release (rhbz#2099317)
99cb13
- remove legacy nightly configuration
99cb13
99cb13
* Tue May 24 2022 James Marshall <jamarsha@redhat.com> - 2.12.6-1
99cb13
- ansible-core 2.12.6 release
99cb13
99cb13
* Fri May 13 2022 Dimitri Savineau <dsavinea@redhat.com> - 2.12.5-2
99cb13
- switch from git to git-core dependency (rhbz#2083386)
99cb13
99cb13
* Mon May 09 2022 Dimitri Savineau <dsavinea@redhat.com> - 2.12.5-1
99cb13
- ansible-core 2.12.5 release
99cb13
99cb13
* Wed Apr 06 2022 James Marshall <jamarsha@redhat.com> - 2.12.4-1
99cb13
- ansible-core 2.12.4 release
99cb13
99cb13
* Mon Mar 14 2022 Dimitri Savineau <dsavinea@redhat.com> - 2.12.3-1
99cb13
- ansible-core 2.12.3 release
eefa2c
083352
* Tue Feb 01 2022 Dimitri Savineau <dsavinea@redhat.com> - 2.12.2-1
083352
- ansible-core 2.12.2 release
083352
083352
* Tue Dec 07 2021 James Marshall <jamarsha@redhat.com> - 2.12.1-1
083352
- ansible-core 2.12.1-1
083352
083352
* Mon Nov 08 2021 Dimitri Savineau <dsavinea@redhat.com> - 2.12.0-1
083352
- ansible-core 2.12.0-1
083352
083352
* Tue Oct 12 2021 Christian Adams <chadams@redhat.com> - 2.11.6-1
083352
- ansible-core 2.11.6-1, fix CVE-2021-3620, ansible-connection module
083352
  no long discloses sensitive info.
083352
083352
* Wed Oct 06 2021 Yanis Guenane <yguenane@redhat.com> - 2.11.5-3
083352
- ansible-core 2.11.5-3, add virtual provide for straightplugin
083352
083352
* Wed Sep 15 2021 Josh Boyer <jwboyer@redhat.com> - 2.11.5-2
083352
- ansible-core 2.11.5-2
083352
083352
* Mon Sep 13 2021 Josh Boyer <jwboyer@redhat.com> - 2.11.3-3
083352
- Bump for build
083352
083352
* Wed Jul 21 2021 Paul Belanger <pabelanger@redhat.com> - 2.11.3-2
083352
- Add git dependency for ansible-galaxy CLI command.
083352
083352
* Tue Jul 20 2021 Yanis Guenane <yguenane@redhat.com> - 2.11.3-1
083352
- ansible-core 2.11.3-1
083352
083352
* Fri Jul 02 2021 Satoe Imaishi <simaishi@redhat.com> - 2.11.2-2
083352
- Add man pages
083352
083352
* Tue Jun 29 2021 Paul Belanger <pabelanger@redhat.com> - 2.11.2-1
083352
- ansible-core 2.11.2 released.
083352
- Drop bundled version of resolvelib in favor of
083352
  python38-resolvelib.
083352
083352
* Wed Mar 31 2021 Rick Elrod <relrod@redhat.com> - 2.11.0b4-1
083352
- ansible-core 2.11.0 beta 4
083352
083352
* Thu Mar 18 2021 Rick Elrod <relrod@redhat.com> - 2.11.0b2-3
083352
- Try adding a Provides for old ansible.
083352
083352
* Thu Mar 18 2021 Rick Elrod <relrod@redhat.com> - 2.11.0b2-2
083352
- Try Obsoletes instead of Conflicts.
083352
083352
* Thu Mar 18 2021 Rick Elrod <relrod@redhat.com> - 2.11.0b2-1
083352
- ansible-core 2.11.0 beta 2
083352
- Conflict with old ansible and ansible-base.
083352
083352
* Thu Mar 11 2021 Rick Elrod <relrod@redhat.com> - 2.11.0b1-1
083352
- ansible-core 2.11.0 beta 1
083352
083352
* Mon Nov 30 2020 Rick Elrod <relrod@redhat.com> - 2.11.0-1
083352
- ansible-core, beta
083352
083352
* Wed Jun 10 2020 Rick Elrod <relrod@redhat.com> - 2.10.0-1
083352
- ansible-base, beta