diff -Nru sshuttle-0.78.5/debian/changelog sshuttle-0.78.5/debian/changelog --- sshuttle-0.78.5/debian/changelog 2019-01-28 20:00:29.000000000 -0300 +++ sshuttle-0.78.5/debian/changelog 2020-07-02 12:49:21.000000000 -0400 @@ -1,3 +1,12 @@ +sshuttle (0.78.5-1ubuntu1) focal; urgency=medium + + * d/p/lp1873368.patch: Backport patch to make sshuttle compatible with + python-3.8 (LP: #1873368) + * d/control: drop python-pytest-cov from the build dependencies since its + source package dropped python2 support. + + -- Felipe Reyes Thu, 02 Jul 2020 12:49:21 -0400 + sshuttle (0.78.5-1) unstable; urgency=medium [ Ondřej Nový ] diff -Nru sshuttle-0.78.5/debian/control sshuttle-0.78.5/debian/control --- sshuttle-0.78.5/debian/control 2019-01-28 19:57:51.000000000 -0300 +++ sshuttle-0.78.5/debian/control 2020-07-02 12:49:21.000000000 -0400 @@ -4,7 +4,7 @@ Maintainer: Brian May Build-Depends: debhelper (>= 9), dh-python, python3-all, python3-setuptools, python3-pytest, python3-mock, - python-pytest-runner, python-pytest-cov, + python-pytest-runner, python3-sphinx (>= 1.0.7+dfsg-1~), python3-setuptools-scm, python3-pytest-runner, python3-pytest-cov Standards-Version: 4.0.0 diff -Nru sshuttle-0.78.5/debian/patches/lp1873368.patch sshuttle-0.78.5/debian/patches/lp1873368.patch --- sshuttle-0.78.5/debian/patches/lp1873368.patch 1969-12-31 21:00:00.000000000 -0300 +++ sshuttle-0.78.5/debian/patches/lp1873368.patch 2020-07-02 12:49:02.000000000 -0400 @@ -0,0 +1,109 @@ +From 9c873579348e3308123d1bf2a917b0c2f82b9dae Mon Sep 17 00:00:00 2001 +From: Brian May +Date: Fri, 15 May 2020 07:55:38 +1000 +Subject: [PATCH] Fix Python 3.8 file operations + +Under Python 3.8 we can not wrap a File in a Sock. + +Note this currently requires Python >= 3.5 +--- + sshuttle/client.py | 2 +- + sshuttle/server.py | 5 +---- + sshuttle/ssnet.py | 28 ++++++++++++++-------------- + 3 files changed, 16 insertions(+), 19 deletions(-) + +--- a/sshuttle/client.py ++++ b/sshuttle/client.py +@@ -460,7 +460,7 @@ + raise Fatal("failed to establish ssh session (1)") + else: + raise +- mux = Mux(serversock, serversock) ++ mux = Mux(serversock.makefile("rb"), serversock.makefile("wb")) + handlers.append(mux) + + expected = b'SSHUTTLE0001' +--- a/sshuttle/server.py ++++ b/sshuttle/server.py +@@ -295,10 +295,7 @@ + sys.stdout.flush() + + handlers = [] +- mux = Mux(socket.fromfd(sys.stdin.fileno(), +- socket.AF_INET, socket.SOCK_STREAM), +- socket.fromfd(sys.stdout.fileno(), +- socket.AF_INET, socket.SOCK_STREAM)) ++ mux = Mux(sys.stdin, sys.stdout) + handlers.append(mux) + + debug1('auto-nets:' + str(auto_nets) + '\n') +--- a/sshuttle/ssnet.py ++++ b/sshuttle/ssnet.py +@@ -334,10 +334,10 @@ + + class Mux(Handler): + +- def __init__(self, rsock, wsock): +- Handler.__init__(self, [rsock, wsock]) +- self.rsock = rsock +- self.wsock = wsock ++ def __init__(self, rfile, wfile): ++ Handler.__init__(self, [rfile, wfile]) ++ self.rfile = rfile ++ self.wfile = wfile + self.new_channel = self.got_dns_req = self.got_routes = None + self.got_udp_open = self.got_udp_data = self.got_udp_close = None + self.got_host_req = self.got_host_list = None +@@ -434,9 +434,9 @@ + callback(cmd, data) + + def flush(self): +- self.wsock.setblocking(False) ++ os.set_blocking(self.wfile.fileno(), False) + if self.outbuf and self.outbuf[0]: +- wrote = _nb_clean(os.write, self.wsock.fileno(), self.outbuf[0]) ++ wrote = _nb_clean(os.write, self.wfile.fileno(), self.outbuf[0]) + debug2('mux wrote: %r/%d\n' % (wrote, len(self.outbuf[0]))) + if wrote: + self.outbuf[0] = self.outbuf[0][wrote:] +@@ -444,9 +444,9 @@ + self.outbuf[0:1] = [] + + def fill(self): +- self.rsock.setblocking(False) ++ os.set_blocking(self.rfile.fileno(), False) + try: +- read = _nb_clean(os.read, self.rsock.fileno(), 32768) ++ read = _nb_clean(os.read, self.rfile.fileno(), 32768) + except OSError: + _, e = sys.exc_info()[:2] + raise Fatal('other end: %r' % e) +@@ -476,22 +476,22 @@ + break + + def pre_select(self, r, w, x): +- _add(r, self.rsock) ++ _add(r, self.rfile) + if self.outbuf: +- _add(w, self.wsock) ++ _add(w, self.wfile) + + def callback(self, sock): +- (r, w, _) = select.select([self.rsock], [self.wsock], [], 0) +- if self.rsock in r: ++ (r, w, _) = select.select([self.rfile], [self.wfile], [], 0) ++ if self.rfile in r: + self.handle() +- if self.outbuf and self.wsock in w: ++ if self.outbuf and self.wfile in w: + self.flush() + + + class MuxWrapper(SockWrapper): + + def __init__(self, mux, channel): +- SockWrapper.__init__(self, mux.rsock, mux.wsock) ++ SockWrapper.__init__(self, mux.rfile, mux.wfile) + self.mux = mux + self.channel = channel + self.mux.channels[channel] = self.got_packet diff -Nru sshuttle-0.78.5/debian/patches/series sshuttle-0.78.5/debian/patches/series --- sshuttle-0.78.5/debian/patches/series 1969-12-31 21:00:00.000000000 -0300 +++ sshuttle-0.78.5/debian/patches/series 2020-07-02 12:46:25.000000000 -0400 @@ -0,0 +1 @@ +lp1873368.patch