From 48f30db639cd46c2e33936b00d30d62a2c916ba1 Mon Sep 17 00:00:00 2001 From: Toshio Kuratomi Date: Sep 08 2015 14:19:22 +0000 Subject: Pull in patch for yum module that fixes state=latest issue --- diff --git a/ansible-1.9.3-yum-return-val.patch b/ansible-1.9.3-yum-return-val.patch new file mode 100644 index 0000000..ff0764c --- /dev/null +++ b/ansible-1.9.3-yum-return-val.patch @@ -0,0 +1,21 @@ +diff -ur ansible-1.9.3/lib/ansible/modules/core/packaging/os/yum.py ansible-1.9.4/lib/ansible/modules/core/packaging/os/yum.py +--- ansible-1.9.3/lib/ansible/modules/core/packaging/os/yum.py 2015-09-03 16:03:12.000000000 -0700 ++++ ansible-1.9.4/lib/ansible/modules/core/packaging/os/yum.py 2015-09-04 10:03:32.000000000 -0700 +@@ -733,7 +733,7 @@ + rc, out, err = module.run_command(yum_basecmd + ['check-update']) + if rc == 0 and update_all: + res['results'].append('Nothing to do here, all packages are up to date') +- return res ++ module.exit_json(**res) + elif rc == 100: + available_updates = out.split('\n') + # build update dictionary +@@ -813,7 +813,7 @@ + if len(will_update) > 0 or len(pkgs['install']) > 0: + res['changed'] = True + +- return res ++ module.exit_json(**res) + + # run commands + if cmd: # update all diff --git a/ansible.spec b/ansible.spec index 69928a1..6afd500 100644 --- a/ansible.spec +++ b/ansible.spec @@ -10,10 +10,10 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot Name: ansible Summary: SSH-based configuration management, deployment, and task execution system Version: 1.9.3 -Release: 1%{?dist} +Release: 2%{?dist} Group: Development/Libraries -License: GPLv3 +License: GPLv3+ Source0: http://releases.ansible.com/ansible/%{name}-%{version}.tar.gz Url: http://ansible.com # @@ -21,6 +21,8 @@ Url: http://ansible.com # already upstream with https://github.com/opoplawski/ansible/commit/f624ec4cb8771736ffbe3fe81b2949edda159863 # https://bugzilla.redhat.com/show_bug.cgi?id=1258080 Patch0: ansible-1.9.3-dnf.patch +# Upstream, will be in 1.9.4 +Patch1: ansible-1.9.3-yum-return-val.patch BuildArch: noarch %if 0%{?rhel} && 0%{?rhel} <= 5 @@ -76,6 +78,7 @@ are transferred to managed machines automatically. %setup -q %patch0 -p1 +%patch1 -p1 %build %{__python} setup.py build @@ -106,6 +109,9 @@ rm -rf $RPM_BUILD_ROOT %doc %{_mandir}/man1/ansible* %changelog +* Tue Sep 8 2015 Toshio Kuratomi - 1.9.3-2 +- Pull in patch for yum module that fixes state=latest issue + * Thu Sep 03 2015 Kevin Fenzi 1.9.3-1 - Update to 1.9.3 - Patch dnf as package manager. Fixes bug #1258080