diff --git a/0556c53f7878c9ac2a59100c2752785482e806aa.patch b/0556c53f7878c9ac2a59100c2752785482e806aa.patch new file mode 100644 index 0000000..561e60f --- /dev/null +++ b/0556c53f7878c9ac2a59100c2752785482e806aa.patch @@ -0,0 +1,38 @@ +From 0556c53f7878c9ac2a59100c2752785482e806aa Mon Sep 17 00:00:00 2001 +From: James Cammarata +Date: Tue, 18 Mar 2014 12:22:58 -0500 +Subject: [PATCH] Execute commands through accelerate with shell when needed + +This fixes an issue related to the new run_command changes, whereby +Popen fails to run a command when an executable is specified + shell=False +and there are multiple positional arguments (see Popen docs for details) +--- + library/utilities/accelerate | 10 +++++++--- + 1 file changed, 7 insertions(+), 3 deletions(-) + +diff --git a/library/utilities/accelerate b/library/utilities/accelerate +index 6508f14..a61e54e 100644 +--- a/library/utilities/accelerate ++++ b/library/utilities/accelerate +@@ -329,11 +329,15 @@ class ThreadedTCPRequestHandler(SocketServer.BaseRequestHandler): + return dict(failed=True, msg='internal error: cmd is required') + if 'tmp_path' not in data: + return dict(failed=True, msg='internal error: tmp_path is required') +- if 'executable' not in data: +- return dict(failed=True, msg='internal error: executable is required') + + vvvv("executing: %s" % data['cmd']) +- rc, stdout, stderr = self.server.module.run_command(data['cmd'], executable=data['executable'], close_fds=True) ++ ++ use_unsafe_shell = False ++ executable = data.get('executable') ++ if executable: ++ use_unsafe_shell = True ++ ++ rc, stdout, stderr = self.server.module.run_command(data['cmd'], executable=executable, use_unsafe_shell=use_unsafe_shell) + if stdout is None: + stdout = '' + if stderr is None: +-- +1.9.1 + diff --git a/ansible.spec b/ansible.spec index 45ffa56..1a9c6c3 100644 --- a/ansible.spec +++ b/ansible.spec @@ -18,6 +18,10 @@ Source0: http://releases.ansible.com/ansible/%{name}-%{version}.tar.gz # Patch to make ansible-vault use the forward-compat python-crypto2.6 package # Upstreamed here: https://github.com/ansible/ansible/pull/6498 Patch0: 0001-Use-setuptools-to-get-a-recent-enough-version-of-pyt.patch +# Patch to fix accelerate with rawhide +# https://github.com/ansible/ansible/commit/0556c53f7878c9ac2a59100c2752785482e806aa.patch +# https://github.com/ansible/ansible/issues/6447 +Patch1: 0556c53f7878c9ac2a59100c2752785482e806aa.patch Url: http://ansible.com BuildArch: noarch @@ -75,6 +79,8 @@ are transferred to managed machines automatically. # Patch to make ansible-vault use a newer pycrypto forward-compat package %patch0 -p1 %endif +# Patch to fix accelerator mode +%patch1 -p1 %build %{__python} setup.py build @@ -105,6 +111,8 @@ rm -rf $RPM_BUILD_ROOT %changelog * Wed Apr 2 2014 Toshio Kuratomi - 1.5.4-1 - Update to 1.5.4 +- Add upstream patch to fix accelerator mode +- Merge fedora and el6 spec files * Fri Mar 14 2014 Kevin Fenzi 1.5.3-2 - Update to NEW 1.5.3 upstream release.