From bb1f8408db50c4ea99c48cd41eafcc98c0460be0 Mon Sep 17 00:00:00 2001
From: Tim Harder <radhermit@gentoo.org>
Date: Mon, 5 Feb 2018 22:15:57 -0500
Subject: net-proxy/sshuttle: check for more generic remote python versions

---
 .../sshuttle/files/sshuttle-0.78.3-remote-python.patch      | 13 +++++++++++++
 net-proxy/sshuttle/sshuttle-0.78.3-r1.ebuild                |  2 ++
 2 files changed, 15 insertions(+)
 create mode 100644 net-proxy/sshuttle/files/sshuttle-0.78.3-remote-python.patch

(limited to 'net-proxy')

diff --git a/net-proxy/sshuttle/files/sshuttle-0.78.3-remote-python.patch b/net-proxy/sshuttle/files/sshuttle-0.78.3-remote-python.patch
new file mode 100644
index 000000000000..d7404fd45b00
--- /dev/null
+++ b/net-proxy/sshuttle/files/sshuttle-0.78.3-remote-python.patch
@@ -0,0 +1,13 @@
+Check for more generic remote python versions.
+
+--- sshuttle-0.78.3/sshuttle/ssh.py
++++ sshuttle-0.78.3/sshuttle/ssh.py
+@@ -116,7 +116,7 @@
+         if python:
+             pycmd = "'%s' -c '%s'" % (python, pyscript)
+         else:
+-            pycmd = ("P=python3.5; $P -V 2>/dev/null || P=python; "
++            pycmd = ("P=python3; $P -V 2>/dev/null || P=python2; $P -V 2>/dev/null || P=python; "
+                      "exec \"$P\" -c %s") % quote(pyscript)
+             pycmd = ("exec /bin/sh -c %s" % quote(pycmd))
+         argv = (sshl +
diff --git a/net-proxy/sshuttle/sshuttle-0.78.3-r1.ebuild b/net-proxy/sshuttle/sshuttle-0.78.3-r1.ebuild
index 49502d961803..254601915e1c 100644
--- a/net-proxy/sshuttle/sshuttle-0.78.3-r1.ebuild
+++ b/net-proxy/sshuttle/sshuttle-0.78.3-r1.ebuild
@@ -31,6 +31,8 @@ DEPEND="
 
 CONFIG_CHECK="~NETFILTER_XT_TARGET_HL ~IP_NF_TARGET_REDIRECT ~IP_NF_MATCH_TTL ~NF_NAT"
 
+PATCHES=( "${FILESDIR}"/${P}-remote-python.patch )
+
 python_prepare_all() {
 	# don't run tests via setup.py pytest
 	sed -i "/setup_requires=/s/'pytest-runner'//" setup.py || die
-- 
cgit v1.2.3-65-gdbad