FreeBSD Bugzilla – Attachment 166202 Details for
Bug 206591
sysutils/ansible: 2.0.0.2_1 appears to have a quoting problem causing broken playbook
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
ansible backport 6bf2f45
ansible-backport-6bf2f45.diff (text/plain), 2.97 KB, created by
Nikolai Lifanov
on 2016-01-27 20:12:44 UTC
(
hide
)
Description:
ansible backport 6bf2f45
Filename:
MIME Type:
Creator:
Nikolai Lifanov
Created:
2016-01-27 20:12:44 UTC
Size:
2.97 KB
patch
obsolete
>Index: Makefile >=================================================================== >--- Makefile (revision 407381) >+++ Makefile (working copy) >@@ -3,7 +3,7 @@ > > PORTNAME= ansible > PORTVERSION?= 2.0.0.2 >-PORTREVISION?= 2 >+PORTREVISION?= 3 > CATEGORIES= sysutils python > MASTER_SITES= http://releases.ansible.com/ansible/ > >@@ -18,7 +18,8 @@ > ${PYTHON_PKGNAMEPREFIX}paramiko>0:${PORTSDIR}/security/py-paramiko \ > ${PYTHON_PKGNAMEPREFIX}Jinja2>0:${PORTSDIR}/devel/py-Jinja2 > >-EXTRA_PATCHES?= ${FILESDIR}/extra-patch-8647fdc >+EXTRA_PATCHES?= ${FILESDIR}/extra-patch-8647fdc \ >+ ${FILESDIR}/extra-patch-6bf2f45 > > NO_ARCH= yes > USES= cpe python:2 shebangfix >Index: files/extra-patch-6bf2f45 >=================================================================== >--- files/extra-patch-6bf2f45 (nonexistent) >+++ files/extra-patch-6bf2f45 (working copy) >@@ -0,0 +1,31 @@ >+--- lib/ansible/playbook/play_context.py.orig 2016-01-14 22:33:27 UTC >++++ lib/ansible/playbook/play_context.py >+@@ -446,8 +446,10 @@ class PlayContext(Base): >+ >+ if self.become_method == 'sudo': >+ # If we have a password, we run sudo with a randomly-generated >+- # prompt set using -p. Otherwise we run it with -n, which makes >++ # prompt set using -p. Otherwise we run it with default -n, which makes >+ # it fail if it would have prompted for a password. >++ # Cannot rely on -n as it can be removed from defaults, which should be >++ # done for older versions of sudo that do not support the option. >+ # >+ # Passing a quoted compound command to sudo (or sudo -s) >+ # directly doesn't work, so we shellquote it with pipes.quote() >+@@ -463,12 +465,14 @@ class PlayContext(Base): >+ >+ elif self.become_method == 'su': >+ >++ # passing code ref to examine prompt as simple string comparisson isn't good enough with su >+ def detect_su_prompt(data): >+ SU_PROMPT_LOCALIZATIONS_RE = re.compile("|".join(['(\w+\'s )?' + x + ' ?: ?' for x in SU_PROMPT_LOCALIZATIONS]), flags=re.IGNORECASE) >+ return bool(SU_PROMPT_LOCALIZATIONS_RE.match(data)) >+- >+ prompt = detect_su_prompt >+- becomecmd = '%s %s %s -c "%s -c %s"' % (exe, flags, self.become_user, executable, success_cmd) >++ >++ su_success_cmd = '%s -c %s' % (executable, success_cmd) # this is here cause su too succeptible to overquoting >++ becomecmd = '%s %s %s -c %s' % (exe, flags, self.become_user, su_success_cmd) #works with sh >+ >+ elif self.become_method == 'pbrun': >+ > >Property changes on: files/extra-patch-6bf2f45 >___________________________________________________________________ >Added: fbsd:nokeywords >## -0,0 +1 ## >+yes >\ No newline at end of property >Added: svn:eol-style >## -0,0 +1 ## >+native >\ No newline at end of property >Added: svn:mime-type >## -0,0 +1 ## >+text/plain >\ No newline at end of property
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 206591
:
166104
|
166108
| 166202