Blame SPECS/ansible-core.spec

083352
# Is this a nightly build?
083352
%global nightly 0
083352
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
%if 0%{?nightly}
083352
%global snap %(date +'%Y%m%d')git
083352
%global nightly_pretag .dev0
083352
%endif
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
%global commitId 6c75cf5c83da044d1fd69bc444ce4de50d728d09
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
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
083352
Version: 2.12.2
083352
%if 0%{?nightly}
083352
Release: 0.1.%{snap}%{?dist}
083352
%else
083352
Release: 1%{?dist}
083352
%endif
083352
083352
Group: Development/Libraries
083352
License: GPLv3+
083352
%if 0%{?nightly}
083352
Source0: %{name}-%{version}%{nightly_pretag}.tar.gz
083352
%else
083352
Source0: ansible-%{commitId}.tar.gz
083352
%endif
083352
Source1: ansible-test-data-files.txt
083352
083352
# And bundled deps
083352
Source2: packaging-ded06cedf6e20680eea0363fac894cb4a09e7831.tar.gz
083352
Source3: pyparsing-6a844ee35ca5125490a28dbd6dd2d15b6498e605.tar.gz
083352
083352
# Deps to build man pages
083352
Source5: straightplugin-6634ea8e1e89d5bb23804f50e676f196c52c46ed.tar.gz
083352
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
083352
Provides: bundled(python-distro) = 1.5.0
083352
Provides: bundled(python-selectors2) = 1.1.1
083352
Provides: bundled(python-six) = 1.13.0
083352
083352
# Things we explicitly bundle via src rpm, and put in ansible._vendor
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-jinja2
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
083352
BuildRequires: make git-core
083352
083352
Requires: git
083352
Requires: python3
083352
Requires: python3-jinja2
083352
Requires: python3-PyYAML
083352
Requires: python3-cryptography
083352
Requires: python3-resolvelib
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
083352
%setup -q -T -b 2 -n packaging-ded06cedf6e20680eea0363fac894cb4a09e7831
083352
%setup -q -T -b 3 -n pyparsing-6a844ee35ca5125490a28dbd6dd2d15b6498e605
083352
%setup -q -T -b 5 -n straightplugin-6634ea8e1e89d5bb23804f50e676f196c52c46ed
083352
%setup -q -n ansible-%{commitId}
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} \
083352
  ../pyparsing-6a844ee35ca5125490a28dbd6dd2d15b6498e605/ \
083352
  ../packaging-ded06cedf6e20680eea0363fac894cb4a09e7831/
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
083352
083352
%files -n ansible-test
083352
%{_bindir}/ansible-test
083352
%{python39_sitelib}/ansible_test
083352
083352
%changelog
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