From 1ab45ffa76eec340d07b8b26c5c5d13a07d2dd24 Mon Sep 17 00:00:00 2001 From: Kevin Fenzi Date: Jun 29 2018 01:52:22 +0000 Subject: Update to 2.6.0. Fixes bug #1596424 --- diff --git a/.gitignore b/.gitignore index 12dbebf..4bbd780 100644 --- a/.gitignore +++ b/.gitignore @@ -58,3 +58,4 @@ /ansible-2.5.2.tar.gz /ansible-2.5.3.tar.gz /ansible-2.5.5.tar.gz +/ansible-2.6.0.tar.gz diff --git a/0001-Changes-to-support-building-docs-with-old-jinja2.patch b/0001-Changes-to-support-building-docs-with-old-jinja2.patch deleted file mode 100644 index 0ba8fae..0000000 --- a/0001-Changes-to-support-building-docs-with-old-jinja2.patch +++ /dev/null @@ -1,194 +0,0 @@ -From e348dc28e922c29e0ab1fd61be24ecc6616e34ed Mon Sep 17 00:00:00 2001 -From: Toshio Kuratomi -Date: Mon, 25 Jun 2018 11:27:15 -0700 -Subject: [PATCH] Changes to support building docs with old jinja2 - -This commit: fa5c0282a4816c4dd48e80b983ffc1e14506a1f5 relied upon -features present in Jinja-2.10 and above. The changes here allow us to -build the *rst* with older versions of jinja2. ---- - docs/bin/plugin_formatter.py | 30 +++++++++++++++++ - docs/templates/plugin.rst.j2 | 80 ++++++++++++++++++++++---------------------- - 2 files changed, 70 insertions(+), 40 deletions(-) - -diff --git a/docs/bin/plugin_formatter.py b/docs/bin/plugin_formatter.py -index 5df8b3d86e..330a7540ab 100755 ---- a/docs/bin/plugin_formatter.py -+++ b/docs/bin/plugin_formatter.py -@@ -85,6 +85,28 @@ pp = PrettyPrinter() - display = Display() - - -+# kludge_ns gives us a kludgey way to set variables inside of loops that need to be visible outside -+# the loop. We can get rid of this when we no longer need to build docs with less than Jinja-2.10 -+# http://jinja.pocoo.org/docs/2.10/templates/#assignments -+# With Jinja-2.10 we can use jinja2's namespace feature, restoring the namespace template portion -+# of: fa5c0282a4816c4dd48e80b983ffc1e14506a1f5 -+NS_MAP = {} -+ -+ -+def to_kludge_ns(key, value): -+ NS_MAP[key] = value -+ return "" -+ -+ -+def from_kludge_ns(key): -+ return NS_MAP[key] -+ -+ -+# The max filter was added in Jinja2-2.10. Until we can require that version, use this -+def do_max(seq): -+ return max(seq) -+ -+ - def rst_ify(text): - ''' convert symbols like I(this is in italics) to valid restructured text ''' - -@@ -298,6 +320,14 @@ def jinja2_environment(template_dir, typ, plugin_type): - trim_blocks=True) - env.globals['xline'] = rst_xline - -+ # Can be removed (and template switched to use namespace) when we no longer need to build -+ # with -- {# Pre-compute the nesting depth to allocate columns #} -- {% set ns = namespace(maxdepth=1) %} -- {% for key, value in options|dictsort recursive %} -- {% set ns.maxdepth = [loop.depth, ns.maxdepth] | max %} -- {% if value.suboptions %} -- {% if value.suboptions.items %} -- @{ loop(value.suboptions.items()) }@ -- {% elif value.suboptions[0].items %} -- @{ loop(value.suboptions[0].items()) }@ -- {% endif %} -- {% endif %} -- {% endfor %} -- {# Header of the documentation #} -+ {# Pre-compute the nesting depth to allocate columns -#} -+ @{ to_kludge_ns('maxdepth', 1) -}@ -+ {% for key, value in options|dictsort recursive -%} -+ @{ to_kludge_ns('maxdepth', [loop.depth, from_kludge_ns('maxdepth')] | max) -}@ -+ {% if value.suboptions -%} -+ {% if value.suboptions.items -%} -+ @{ loop(value.suboptions.items()) -}@ -+ {% elif value.suboptions[0].items -%} -+ @{ loop(value.suboptions[0].items()) -}@ -+ {% endif -%} -+ {% endif -%} -+ {% endfor -%} -+ {# Header of the documentation -#} - -- Parameter -+ Parameter - Choices/Defaults - {% if plugin_type != 'module' %} - Configuration -@@ -116,7 +116,7 @@ Parameters - - {% endfor %} - {# parameter name with required and/or introduced label #} -- -+ - @{ key }@ - {% if value.get('required', False) %}
required
{% endif %} - {% if value.version_added %}
(added in @{value.version_added}@)
{% endif %} -@@ -246,19 +246,19 @@ Facts returned by this module are added/updated in the ``hostvars`` host facts a - - - {# Pre-compute the nesting depth to allocate columns #} -- {% set ns = namespace(maxdepth=1) %} -+ @{ to_kludge_ns('maxdepth', 1) -}@ - {% for key, value in returnfacts|dictsort recursive %} -- {% set ns.maxdepth = [loop.depth, ns.maxdepth] | max %} -- {% if value.contains %} -- {% if value.contains.items %} -- @{ loop(value.contains.items()) }@ -- {% elif value.contains[0].items %} -- @{ loop(value.contains[0].items()) }@ -- {% endif %} -- {% endif %} -- {% endfor %} -+ @{ to_kludge_ns('maxdepth', [loop.depth, from_kludge_ns('maxdepth')] | max) -}@ -+ {% if value.contains -%} -+ {% if value.contains.items -%} -+ @{ loop(value.contains.items()) -}@ -+ {% elif value.contains[0].items -%} -+ @{ loop(value.contains[0].items()) -}@ -+ {% endif -%} -+ {% endif -%} -+ {% endfor -%} - -- -+ - - - -@@ -267,7 +267,7 @@ Facts returned by this module are added/updated in the ``hostvars`` host facts a - {% for i in range(1, loop.depth) %} - - {% endfor %} -- -@@ -317,19 +317,19 @@ Common return values are documented :ref:`here `, the foll - .. raw:: html - -
FactFactReturnedDescription
-+ - @{ key }@ -
@{ value.type }@
-
-- {% set ns = namespace(maxdepth=1) %} -- {% for key, value in returndocs|dictsort recursive %} -- {% set ns.maxdepth = [loop.depth, ns.maxdepth] | max %} -- {% if value.contains %} -- {% if value.contains.items %} -- @{ loop(value.contains.items()) }@ -- {% elif value.contains[0].items %} -- @{ loop(value.contains[0].items()) }@ -- {% endif %} -- {% endif %} -- {% endfor %} -+ @{ to_kludge_ns('maxdepth', 1) -}@ -+ {% for key, value in returndocs|dictsort recursive -%} -+ @{ to_kludge_ns('maxdepth', [loop.depth, from_kludge_ns('maxdepth')] | max) -}@ -+ {% if value.contains -%} -+ {% if value.contains.items -%} -+ @{ loop(value.contains.items()) -}@ -+ {% elif value.contains[0].items -%} -+ @{ loop(value.contains[0].items()) -}@ -+ {% endif -%} -+ {% endif -%} -+ {% endfor -%} - -- -+ - - - -@@ -338,7 +338,7 @@ Common return values are documented :ref:`here `, the foll - {% for i in range(1, loop.depth) %} - - {% endfor %} -- --- -2.14.4 - diff --git a/ansible.spec b/ansible.spec index 6314730..6b7841d 100644 --- a/ansible.spec +++ b/ansible.spec @@ -29,16 +29,13 @@ Name: ansible Summary: SSH-based configuration management, deployment, and task execution system -Version: 2.5.5 -Release: 5%{?dist} +Version: 2.6.0 +Release: 1%{?dist} Group: Development/Libraries License: GPLv3+ Source0: https://releases.ansible.com/ansible/%{name}-%{version}.tar.gz -# Allow building docs with Jinja < 2.10 -# https://github.com/ansible/ansible/pull/41918 -Patch0: 0001-Changes-to-support-building-docs-with-old-jinja2.patch # Patch to utilize a newer jinja2 package on epel6 # Non-upstreamable as it creates a dependency on a specific version of jinja. # This is desirable for us as we have packages for that version but not for @@ -257,7 +254,6 @@ This package installs extensive documentation for ansible %prep %setup -q -%patch0 -p1 %if 0%{?rhel} == 6 %patch100 -p1 %endif @@ -377,7 +373,7 @@ popd %exclude %{_bindir}/ansible*-3* %endif # python3 and 2 %config(noreplace) %{_sysconfdir}/ansible/ -%doc README.rst PKG-INFO COPYING changelogs/CHANGELOG-v2.5.rst +%doc README.rst PKG-INFO COPYING changelogs/CHANGELOG-v2.6.rst %doc %{_mandir}/man1/ansible* %if 0%{?with_python3} @@ -385,7 +381,7 @@ popd %files -n ansible-python3 %defattr(-,root,root,-) %config(noreplace) %{_sysconfdir}/ansible/ -%doc README.rst PKG-INFO COPYING changelogs/CHANGELOG-v2.5.rst +%doc README.rst PKG-INFO COPYING changelogs/CHANGELOG-v2.6.rst %doc %{_mandir}/man1/ansible* %{_bindir}/ansible*-3* %endif # python2 @@ -399,6 +395,9 @@ popd %endif %changelog +* Thu Jun 28 2018 Kevin Fenzi - 2.6.0-1 +- Update to 2.6.0. Fixes bug #1596424 + * Tue Jun 26 2018 Miro HronĨok - 2.5.5-5 - Rebuilt for Python 3.7 diff --git a/sources b/sources index 9c7c09e..ff1c866 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (ansible-2.5.5.tar.gz) = a3d50539d2a109dc0bbcdb440e0800b917f63141dce935e6426cb6bdc51e3a93e02f05c23714c24ab00b19842a86677b8d2f2455d20ca15410fa8d3c8ba379ca +SHA512 (ansible-2.6.0.tar.gz) = 0c7353eeb4a65b21439489ef8a101bb0455d24d88904011460548bfba218688b4a1fdc1d61d60d611c2bcce7f1c301c0d6bcb9f3e9db12eaf9c9ef2f96994af9
KeyKeyReturnedDescription
  -+ - @{ key }@ -
@{ value.type }@
-