Blame SPECS/ansible-core.spec

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
99cb13
# Filter requires on jinja2 since bundled
99cb13
%global __requires_exclude jinja2
99cb13
99cb13
%global commitId c1bb0c6ab89a344bdcc07ef66887c310e661e3a6
083352
%global python39_sitelib /usr/lib/python3.9/site-packages/
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
083352
%define vendor_path %{buildroot}%{python39_sitelib}/ansible/_vendor/
083352
%define vendor_pip /usr/bin/python3.9 -m pip install --no-deps -v --no-use-pep517 --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
083352
%global straightplugin_version 1.4.1
083352
083352
083352
Name: ansible-core
083352
Summary: SSH-based configuration management, deployment, and task execution system
99cb13
Version: 2.13.3
e0818b
Release: 2%{?dist}
083352
083352
Group: Development/Libraries
083352
License: GPLv3+
083352
Source0: ansible-%{commitId}.tar.gz
083352
Source1: ansible-test-data-files.txt
083352
083352
# And bundled deps
99cb13
Source2: jinja2-b08cd4bc64bb980df86ed2876978ae5735572280.tar.gz
99cb13
Source3: markupsafe-b5a517506d6cb8091e215a4a89e47db5eee6a68f.tar.gz
99cb13
Source4: packaging-ded06cedf6e20680eea0363fac894cb4a09e7831.tar.gz
99cb13
Source5: pyparsing-6a844ee35ca5125490a28dbd6dd2d15b6498e605.tar.gz
083352
083352
# Deps to build man pages
99cb13
Source6: straightplugin-6634ea8e1e89d5bb23804f50e676f196c52c46ed.tar.gz
eefa2c
e0818b
Patch0: 0001-Use-python-re-to-parse-service-output-in.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
083352
Obsoletes: ansible-base
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}
083352
Provides: bundled(python-straightplugin) = %{straightplugin_version}
083352
083352
BuildRequires: python3-devel
083352
BuildRequires: python3-docutils
083352
BuildRequires: python3-pip
083352
BuildRequires: python3-pyyaml
083352
BuildRequires: python3-resolvelib
083352
BuildRequires: python3-rpm-macros
083352
BuildRequires: python3-setuptools
083352
BuildRequires: python3-wheel
99cb13
BuildRequires: make git-core gcc
083352
99cb13
Requires: git-core
083352
Requires: python3
99cb13
Requires: python3-PyYAML >= 5.1
083352
Requires: python3-cryptography
99cb13
Requires: python3-resolvelib >= 0.5.3
083352
Requires: python3-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
99cb13
%setup -q -T -b 2 -n jinja2-b08cd4bc64bb980df86ed2876978ae5735572280
99cb13
%setup -q -T -b 3 -n markupsafe-b5a517506d6cb8091e215a4a89e47db5eee6a68f
99cb13
%setup -q -T -b 4 -n packaging-ded06cedf6e20680eea0363fac894cb4a09e7831
99cb13
%setup -q -T -b 5 -n pyparsing-6a844ee35ca5125490a28dbd6dd2d15b6498e605
99cb13
%setup -q -T -b 6 -n straightplugin-6634ea8e1e89d5bb23804f50e676f196c52c46ed
083352
%setup -q -n ansible-%{commitId}
e0818b
%patch0 -p 1
083352
083352
%build
083352
/usr/bin/python3.9 setup.py build
083352
083352
%install
083352
/usr/bin/python3.9 setup.py install --root %{buildroot}
083352
083352
# Handle bundled deps:
083352
%{vendor_pip} \
99cb13
  ../jinja2-b08cd4bc64bb980df86ed2876978ae5735572280/ \
99cb13
  ../markupsafe-b5a517506d6cb8091e215a4a89e47db5eee6a68f/ \
99cb13
  ../packaging-ded06cedf6e20680eea0363fac894cb4a09e7831/ \
99cb13
  ../pyparsing-6a844ee35ca5125490a28dbd6dd2d15b6498e605/
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
# Build man pages
083352
083352
mkdir /tmp/_vendor
083352
/usr/bin/python3.9 -m pip install ../straightplugin-6634ea8e1e89d5bb23804f50e676f196c52c46ed -t /tmp/_vendor --no-build-isolation
083352
083352
# Remove plugins not needed, they bring in more dependencies
083352
find hacking/build_library/build_ansible/command_plugins ! -name 'generate_man.py' -type f -exec rm -f {} +
083352
083352
PYTHON=python3.9 PYTHONPATH=%{vendor_path}:/tmp/_vendor make docs
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
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/
083352
%{python39_sitelib}/ansible*
083352
%exclude %{python39_sitelib}/ansible_test
99cb13
%exclude %{python39_sitelib}/ansible/_vendor/markupsafe/_speedups.c
083352
083352
%files -n ansible-test
083352
%{_bindir}/ansible-test
083352
%{python39_sitelib}/ansible_test
083352
083352
%changelog
e0818b
* Thu Dec 08 2022 Dimitri Savineau <dsavinea@redhat.com> - 2.13.3-2
e0818b
- Use python re to parse service output instead of grep (rhbz#2151901)
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