From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 818281382C5 for ; Tue, 6 Feb 2018 10:26:08 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id DEE99E0A89; Tue, 6 Feb 2018 10:26:07 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id AC4A3E0A89 for ; Tue, 6 Feb 2018 10:26:07 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 5F04B335C07 for ; Tue, 6 Feb 2018 10:26:06 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 2210F1CE for ; Tue, 6 Feb 2018 10:26:05 +0000 (UTC) From: "Tim Harder" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Tim Harder" Message-ID: <1517912746.d53245ce5666e61659ee995ff3645b26fcc5cbbb.radhermit@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: net-proxy/sshuttle/, net-proxy/sshuttle/files/ X-VCS-Repository: repo/gentoo X-VCS-Files: net-proxy/sshuttle/files/sshuttle-0.78.3-remote-python.patch net-proxy/sshuttle/sshuttle-0.78.3-r1.ebuild net-proxy/sshuttle/sshuttle-0.78.3-r2.ebuild X-VCS-Directories: net-proxy/sshuttle/ net-proxy/sshuttle/files/ X-VCS-Committer: radhermit X-VCS-Committer-Name: Tim Harder X-VCS-Revision: d53245ce5666e61659ee995ff3645b26fcc5cbbb X-VCS-Branch: master Date: Tue, 6 Feb 2018 10:26:05 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: 90f3ed1c-dd33-4aec-97f6-0de35b7b4132 X-Archives-Hash: 44d8e862cb1578b87a80c27b407fc1ee commit: d53245ce5666e61659ee995ff3645b26fcc5cbbb Author: Tim Harder gentoo org> AuthorDate: Tue Feb 6 09:56:59 2018 +0000 Commit: Tim Harder gentoo org> CommitDate: Tue Feb 6 10:25:46 2018 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d53245ce net-proxy/sshuttle: use upstream python3 patch .../files/sshuttle-0.78.3-remote-python.patch | 67 ++++++++++++++++++++-- ...-0.78.3-r1.ebuild => sshuttle-0.78.3-r2.ebuild} | 0 2 files changed, 62 insertions(+), 5 deletions(-) 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 index d7404fd45b0..c8138f73277 100644 --- a/net-proxy/sshuttle/files/sshuttle-0.78.3-remote-python.patch +++ b/net-proxy/sshuttle/files/sshuttle-0.78.3-remote-python.patch @@ -1,13 +1,70 @@ -Check for more generic remote python versions. +From 9b7ce2811ec3ef35b9b7f7dfc157127bc46ece47 Mon Sep 17 00:00:00 2001 +From: vieira +Date: Fri, 20 Oct 2017 22:52:06 +0000 +Subject: [PATCH] Use versions of python3 greater than 3.5 when available (e.g. + 3.6) ---- sshuttle-0.78.3/sshuttle/ssh.py -+++ sshuttle-0.78.3/sshuttle/ssh.py -@@ -116,7 +116,7 @@ +Some Linux distros, like Alpine, Arch, etc and some BSDs, like FreeBSD, are +now shipping with python3.6 as the default python3. Both the client and the +server are failing to run in this distros, because we are specifically looking +for python3.5. + +These changes make the run shell script use python3 if the version is greater +than 3.5, otherwise falling back as usual. + +On the server any version of python3 will do, use it before falling back to +python, as the server code can run with any version of python3. +--- + run | 28 +++++++++++++++++----------- + sshuttle/ssh.py | 2 +- + 2 files changed, 18 insertions(+), 12 deletions(-) + +diff --git a/run b/run +index ec2d3f0..a14d831 100755 +--- a/run ++++ b/run +@@ -1,11 +1,17 @@ +-#!/bin/sh +-source_dir="$(dirname $0)" +-(cd "$source_dir" && "$source_dir/setup.py" --version > /dev/null) +-export PYTHONPATH="$source_dir:$PYTHONPATH" +-if python3.5 -V >/dev/null 2>&1; then +- exec python3.5 -m "sshuttle" "$@" +-elif python2.7 -V >/dev/null 2>&1; then +- exec python2.7 -m "sshuttle" "$@" +-else +- exec python -m "sshuttle" "$@" +-fi ++#!/usr/bin/env sh ++set -e ++export PYTHONPATH="$(dirname $0):$PYTHONPATH" ++ ++python_best_version() { ++ if [ -x "$(command -v python3)" ]; then ++ if python3 -c "import sys; sys.exit(not sys.version_info > (3, 5))"; then ++ exec python3 "$@" ++ fi ++ elif [ -x "$(command -v python2.7)" ]; then ++ exec python2.7 "$@" ++ else ++ exec python "$@" ++ fi ++} ++ ++python_best_version -m "sshuttle" "$@" +diff --git a/sshuttle/ssh.py b/sshuttle/ssh.py +index f4c84cc..a1f2997 100644 +--- a/sshuttle/ssh.py ++++ b/sshuttle/ssh.py +@@ -116,7 +116,7 @@ def connect(ssh_cmd, rhostport, python, stderr, options): 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; " ++ pycmd = ("P=python3; $P -V 2>/dev/null || P=python; " "exec \"$P\" -c %s") % quote(pyscript) pycmd = ("exec /bin/sh -c %s" % quote(pycmd)) argv = (sshl + +-- +2.16.1 + diff --git a/net-proxy/sshuttle/sshuttle-0.78.3-r1.ebuild b/net-proxy/sshuttle/sshuttle-0.78.3-r2.ebuild similarity index 100% rename from net-proxy/sshuttle/sshuttle-0.78.3-r1.ebuild rename to net-proxy/sshuttle/sshuttle-0.78.3-r2.ebuild