diff options
author | Guido Falsi <madpilot@FreeBSD.org> | 2022-03-07 18:30:12 +0000 |
---|---|---|
committer | Guido Falsi <madpilot@FreeBSD.org> | 2022-03-07 18:30:12 +0000 |
commit | f6949eb9b50f5d161dd959270451d93db5268146 (patch) | |
tree | 66cec2c5719cfce7c2c965010539a261e2666932 | |
parent | cca8d599c888df3de766ae7d4f1b2d22f165e07e (diff) | |
download | ports-f6949eb9b50f5d161dd959270451d93db5268146.tar.gz ports-f6949eb9b50f5d161dd959270451d93db5268146.zip |
sysutils/ansible-sshjail: Fix runtime issue with py-ansible-core 2.12.3
Changes in recent py-ansible-core 2.12.3 cause connection falures
in ansible-sshjail. Apply suggested fix from upstream issue report.
While here rename patch file.
Obtained from: https://github.com/austinhyde/ansible-sshjail/issues/40
-rw-r--r-- | sysutils/ansible-sshjail/Makefile | 1 | ||||
-rw-r--r-- | sysutils/ansible-sshjail/files/patch-sshjail.py (renamed from sysutils/ansible-sshjail/files/patch-pr38) | 20 |
2 files changed, 12 insertions, 9 deletions
diff --git a/sysutils/ansible-sshjail/Makefile b/sysutils/ansible-sshjail/Makefile index 94eac87dc146..8806d55507df 100644 --- a/sysutils/ansible-sshjail/Makefile +++ b/sysutils/ansible-sshjail/Makefile @@ -1,4 +1,5 @@ PORTNAME= ansible-sshjail +PORTREVISION= 1 DISTVERSIONPREFIX= v DISTVERSION= 1.1.0-37 DISTVERSIONSUFFIX= -ge712c53 diff --git a/sysutils/ansible-sshjail/files/patch-pr38 b/sysutils/ansible-sshjail/files/patch-sshjail.py index 62ea8f53f789..b0c8b6cc43e1 100644 --- a/sysutils/ansible-sshjail/files/patch-pr38 +++ b/sysutils/ansible-sshjail/files/patch-sshjail.py @@ -3,15 +3,9 @@ From: =?UTF-8?q?Lo=C3=AFc=20Blot?= <nerzhul@users.noreply.github.com> Date: Sat, 18 Dec 2021 11:16:53 +0100 Subject: [PATCH] fix: ansible 2.12 and + compat + become fix ---- - sshjail.py | 19 ++++++++++++++++--- - 1 file changed, 16 insertions(+), 3 deletions(-) - -diff --git a/sshjail.py b/sshjail.py -index 7987d39..118f96f 100644 ---- sshjail.py +--- sshjail.py.orig 2021-08-15 18:02:16 UTC +++ sshjail.py -@@ -289,6 +289,17 @@ +@@ -289,6 +289,17 @@ DOCUMENTATION = ''' vars: - name: ansible_ssh_use_tty version_added: '2.7' @@ -29,7 +23,15 @@ index 7987d39..118f96f 100644 timeout: default: 10 description: -@@ -442,9 +453,11 @@ def _normalize_path(self, path, prefix): +@@ -420,6 +431,7 @@ class Connection(ConnectionBase): + if 'sudo' in cmd: + cmd = self._strip_sudo(executable, cmd) + ++ self.set_option('host', self.host) + cmd = ' '.join([executable, '-c', pipes.quote(cmd)]) + if slpcmd: + cmd = '%s %s %s %s' % (self.get_jail_connector(), self.get_jail_id(), cmd, '&& sleep 0') +@@ -442,9 +454,11 @@ class Connection(ConnectionBase): return os.path.join(prefix, normpath[1:]) def _copy_file(self, from_file, to_file, executable='/bin/sh'): |