Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 22 Jan 2016 17:30:58 +0000 (UTC)
From:      Matthew Seaman <matthew@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r406939 - in head/sysutils: ansible ansible/files ansible1
Message-ID:  <201601221730.u0MHUwPP058840@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: matthew
Date: Fri Jan 22 17:30:58 2016
New Revision: 406939
URL: https://svnweb.freebsd.org/changeset/ports/406939

Log:
  Fix default low-level command submission
    -- on FreeBSD root's default shell (/bin/csh) would fail to
       understand the /bin/sh syntax ansible issues.
  
  Import the fix from upstream.
  
  PR:		206498
  Submitted by:	matthew
  Approved by:	lifanov@mail.lifanov.com (maintainer)
  Obtained from:	https://github.com/ansible/ansible/commit/8647fdc7f25ba1c707c5333ca1581a1fa0ffe566

Added:
  head/sysutils/ansible/files/extra-patch-8647fdc   (contents, props changed)
Modified:
  head/sysutils/ansible/Makefile
  head/sysutils/ansible1/Makefile

Modified: head/sysutils/ansible/Makefile
==============================================================================
--- head/sysutils/ansible/Makefile	Fri Jan 22 17:20:28 2016	(r406938)
+++ head/sysutils/ansible/Makefile	Fri Jan 22 17:30:58 2016	(r406939)
@@ -3,6 +3,7 @@
 
 PORTNAME=	ansible
 PORTVERSION?=	2.0.0.2
+PORTREVISION?=	1
 CATEGORIES=	sysutils python
 MASTER_SITES=	http://releases.ansible.com/ansible/
 
@@ -19,6 +20,8 @@ RUN_DEPENDS=	${PYTHON_PKGNAMEPREFIX}yaml
 
 OPTIONS_DEFINE=	DOCS EXAMPLES
 
+EXTRA_PATCHES?=	${FILESDIR}/extra-patch-8647fdc
+
 NO_ARCH=	yes
 USES=		cpe python:2 shebangfix
 USE_PYTHON=	autoplist distutils

Added: head/sysutils/ansible/files/extra-patch-8647fdc
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/sysutils/ansible/files/extra-patch-8647fdc	Fri Jan 22 17:30:58 2016	(r406939)
@@ -0,0 +1,21 @@
+--- lib/ansible/plugins/action/__init__.py.orig	2016-01-14 22:33:27 UTC
++++ lib/ansible/plugins/action/__init__.py
+@@ -475,8 +475,7 @@ class ActionBase(with_metaclass(ABCMeta,
+         display.debug("done with _execute_module (%s, %s)" % (module_name, module_args))
+         return data
+ 
+-    def _low_level_execute_command(self, cmd, sudoable=True, in_data=None,
+-            executable=None, encoding_errors='replace'):
++    def _low_level_execute_command(self, cmd, sudoable=True, in_data=None, executable=C.DEFAULT_EXECUTABLE, encoding_errors='replace'):
+         '''
+         This is the function which executes the low level shell command, which
+         may be commands to create/remove directories for temporary files, or to
+@@ -492,7 +491,7 @@ class ActionBase(with_metaclass(ABCMeta,
+         '''
+ 
+         if executable is not None:
+-            cmd = executable + ' -c ' + cmd
++            cmd = executable + ' -c ' + pipes.quote(cmd)
+ 
+         display.debug("_low_level_execute_command(): starting")
+         if not cmd:

Modified: head/sysutils/ansible1/Makefile
==============================================================================
--- head/sysutils/ansible1/Makefile	Fri Jan 22 17:20:28 2016	(r406938)
+++ head/sysutils/ansible1/Makefile	Fri Jan 22 17:30:58 2016	(r406939)
@@ -3,6 +3,7 @@
 
 PKGNAMESUFFIX=	1
 PORTVERSION=	1.9.4
+PORTREVISION=
 
 CONFLICTS=	ansible-*
 
@@ -11,4 +12,6 @@ DISTINFO_FILE=	${.CURDIR}/distinfo
 
 SHEBANG_FILES=	lib/ansible/runner/action_plugins/synchronize.py
 
+EXTRA_PATCHES=
+
 .include "${MASTERDIR}/Makefile"



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201601221730.u0MHUwPP058840>