git: f6949eb9b50f - main - sysutils/ansible-sshjail: Fix runtime issue with py-ansible-core 2.12.3
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Mon, 07 Mar 2022 18:33:46 UTC
The branch main has been updated by madpilot: URL: https://cgit.FreeBSD.org/ports/commit/?id=f6949eb9b50f5d161dd959270451d93db5268146 commit f6949eb9b50f5d161dd959270451d93db5268146 Author: Guido Falsi <madpilot@FreeBSD.org> AuthorDate: 2022-03-07 18:30:12 +0000 Commit: Guido Falsi <madpilot@FreeBSD.org> CommitDate: 2022-03-07 18:30:12 +0000 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 --- sysutils/ansible-sshjail/Makefile | 1 + .../files/{patch-pr38 => patch-sshjail.py} | 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 similarity index 75% rename from sysutils/ansible-sshjail/files/patch-pr38 rename to 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'):