diff --git a/.gitignore b/.gitignore index 3fddea4..ff36be9 100644 --- a/.gitignore +++ b/.gitignore @@ -85,3 +85,4 @@ /ansible-2.8.4.tar.gz /ansible-2.8.5.tar.gz /ansible-2.8.6.tar.gz +/ansible-2.9.0.tar.gz diff --git a/56806.patch b/56806.patch deleted file mode 100644 index db06d26..0000000 --- a/56806.patch +++ /dev/null @@ -1,50 +0,0 @@ -From 702e044b90fd0a0524fa4574648fe7dae4d4f2fe Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= -Date: Wed, 22 May 2019 21:31:22 +0200 -Subject: [PATCH] Don't change dictionary keys during iteration - -With Python 3.8.0a4+, we get the following RuntimeError in Fedora: - -PYTHONPATH=../../lib ../bin/dump_keywords.py --template-dir=../templates --output-dir=rst/reference_appendices/ -d ./keyword_desc.yml -Traceback (most recent call last): - File "../bin/dump_keywords.py", line 49, in - for a in oblist[name]: -RuntimeError: dictionary keys changed during iteration - -And: - - def populate(self): - super(Interfaces, self).populate() - self.facts['all_ipv4_addresses'] = list() - self.facts['all_ipv6_addresses'] = list() - - data = self.responses[0] - interfaces = self.parse_interfaces(data) - -> for key in interfaces.keys(): -E RuntimeError: dictionary keys changed during iteration - -In TestDellos9Facts.test_dellos9_facts_gather_subset_default -and TestDellos9Facts.test_dellos9_facts_gather_subset_interfaces. - -Python change: https://github.com/python/cpython/pull/12596 - -Downstream bug: https://bugzilla.redhat.com/show_bug.cgi?id=1712531 ---- - docs/bin/dump_keywords.py | 2 +- - lib/ansible/modules/network/dellos9/dellos9_facts.py | 4 ++-- - 2 files changed, 3 insertions(+), 3 deletions(-) - -diff --git a/docs/bin/dump_keywords.py b/docs/bin/dump_keywords.py -index 30056a6fc8cc..e25171126576 100755 ---- a/docs/bin/dump_keywords.py -+++ b/docs/bin/dump_keywords.py -@@ -46,7 +46,7 @@ - oblist[name] = dict((x, aobj.__dict__['_attributes'][x]) for x in aobj.__dict__['_attributes'] if 'private' not in x or not x.private) - - # pick up docs if they exist -- for a in oblist[name]: -+ for a in list(oblist[name]): - if a in docs: - oblist[name][a] = docs[a] - else: diff --git a/ansible-newer-jinja.patch b/ansible-newer-jinja.patch deleted file mode 100644 index c393067..0000000 --- a/ansible-newer-jinja.patch +++ /dev/null @@ -1,14 +0,0 @@ -diff -Nur ansible-2.4.1.0.orig/requirements.txt ansible-2.4.1.0/requirements.txt ---- ansible-2.4.1.0.orig/requirements.txt 2017-10-25 16:05:04.000000000 -0700 -+++ ansible-2.4.1.0/requirements.txt 2017-10-30 14:41:31.202896847 -0700 -@@ -3,8 +3,8 @@ - # packages. Thus, this should be the loosest set possible (only required - # packages, not optional ones, and with the widest range of versions that could - # be suitable) --jinja2 -+jinja2 >= 2.6 - PyYAML - paramiko --cryptography -+pycrypto >= 2.6 - setuptools diff --git a/ansible.spec b/ansible.spec index 46967da..fe21749 100644 --- a/ansible.spec +++ b/ansible.spec @@ -5,11 +5,19 @@ # in Fedora and EPEL8 build with docs and tests by default %global with_docs 1 + +# Disable tests on f29/f30 and epel8 for now. +# epel8 is missing 2 required packages. +# fedora29 and fedora30 have too old pytest +%if 0%{?fedora} < 31 || 0%{?rhel} >= 8 +%global with_tests 0 +%else %global with_tests 1 +%endif Name: ansible Summary: SSH-based configuration management, deployment, and task execution system -Version: 2.8.6 +Version: 2.9.0 Release: 1%{?dist} License: GPLv3+ @@ -17,10 +25,11 @@ Source0: https://releases.ansible.com/ansible/%{name}-%{version}.tar.gz Url: http://ansible.com BuildArch: noarch -# Python 3.8 compatibility in docs -# https://bugzilla.redhat.com/show_bug.cgi?id=1712531 -# rebased from https://github.com/ansible/ansible/pull/56806 -Patch101: 56806.patch +# We used to have a ansible-python3 package that a number of other things +# started depending on, so we should now provide/obsolete it until they +# can all adjust to just needing ansible. +Provides: ansible-python3 = %{version}-%{release} +Obsoletes: ansible-python3 < %{version}-%{release} %if 0%{?with_tests} # @@ -54,6 +63,7 @@ BuildRequires: python3-sphinx BuildRequires: python3-sphinx-theme-alabaster BuildRequires: python3-sphinx-notfound-page BuildRequires: asciidoc +BuildRequires: python3-straight-plugin %endif BuildRequires: python3-devel BuildRequires: python3-setuptools @@ -108,14 +118,13 @@ This package installs extensive documentation for ansible %autosetup -p1 -n %{name}-%{version} %build -%py3_build -sed -i -e 's|/usr/bin/env python|/usr/bin/python3|' docs/bin/*.py +# Fix some files shebangs +sed -i -e 's|/usr/bin/env python|/usr/bin/python3|' test/lib/ansible_test/_data/*.py test/lib/ansible_test/_data/*/*.py test/lib/ansible_test/_data/*/*/*.py docs/bin/find-plugin-refs.py -ls -l /usr/bin/python* +%py3_build %if 0%{?with_docs} - pathfix.py -i %{__python3} -p docs/bin test/runner make PYTHON=/usr/bin/python3 SPHINXBUILD=sphinx-build-3 webdocs %else make PYTHON=/usr/bin/python3 -Cdocs/docsite config cli keywords modules plugins testing @@ -175,8 +184,7 @@ cp -pr docs/docsite/rst . %check %if 0%{?with_tests} ln -s /usr/bin/pytest-3 bin/pytest -pathfix.py -i %{__python3} -p test/runner -pathfix.py -i %{__python3} -p bin/ansible-test +pathfix.py -i %{__python3} -p test/lib/ansible_test/_data/cli/ansible_test_cli_stub.py # This test needs a module not packaged in Fedora so disable it. rm -f test/units/modules/cloud/cloudstack/test_cs_traffic_type.py %if 0%{?fedora} < 30 @@ -189,12 +197,13 @@ make PYTHON=/usr/bin/python3 tests-py3 %files %license COPYING -%doc README.rst PKG-INFO changelogs/CHANGELOG-v2.8.rst +%doc README.rst PKG-INFO changelogs/CHANGELOG-v2.9.rst %doc %{_mandir}/man1/ansible* %config(noreplace) %{_sysconfdir}/ansible/ %{_bindir}/ansible* %{_datadir}/ansible/ %{python3_sitelib}/ansible +%{python3_sitelib}/ansible_test %{python3_sitelib}/*egg-info %files -n ansible-doc @@ -204,6 +213,9 @@ make PYTHON=/usr/bin/python3 tests-py3 %endif %changelog +* Thu Oct 31 2019 Kevin Fenzi - 2.9.0-1 +- Update to 2.9.0. + * Thu Oct 17 2019 Kevin Fenzi - 2.8.6-1 - Update to 2.8.6. - Rework spec file to drop old conditionals. diff --git a/sources b/sources index 90d4c47..88bb11d 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (ansible-2.8.6.tar.gz) = 8e29644b4651e72bd3fbd4ca91c2a36b76e5dde9bb445d3c6e0061c315eb66e1bc507729b70d82998c1cbb25f3ef0e20d281ab8354a047193e60bf4831938418 +SHA512 (ansible-2.9.0.tar.gz) = 47e0738bbf9918254d7b33ddc0a8f89a101995ccc3cb846be9ff10bdbc7687fb8a5390d8b976b3ce17fa1325ab63a592161b026d5d943a01f8a5803fca67312a