# HG changeset patch # User Pascal Bellard # Date 1508505234 -7200 # Node ID ee7238bfeb844907eff97ce9a618ac5fc6c3fd0b # Parent 8dbfcd66c5a77218c25e78c08593f57c8f036f11 mosh: update dropbear patch diff -r 8dbfcd66c5a7 -r ee7238bfeb84 mosh/receipt --- a/mosh/receipt Fri Oct 20 08:05:51 2017 +0200 +++ b/mosh/receipt Fri Oct 20 15:13:54 2017 +0200 @@ -30,13 +30,6 @@ { mkdir -p $fs/usr cp -a $install/usr/bin $fs/usr - sed -i '/.*quoted_self = shell_quote.*/r/proc/self/fd/0' $fs/usr/bin/mosh <&1\` =~ m{Dropbear}) { - my \$host = \$userhost; \$host = \$1 if (\$userhost =~ m{@(.*)}); - my \$port = 22; \$port = \$1 if (\$ssh =~ m{-p *(\d+)}); - exec "\$ssh " . shell_quote( '-J', "\$quoted_self --fake-proxy -- \$host \$port", '-t', \$userhost, "\$server " . shell_quote( @server ) ); - } -EOT } post_install() diff -r 8dbfcd66c5a7 -r ee7238bfeb84 mosh/stuff/patches/mosh.patch --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mosh/stuff/patches/mosh.patch Fri Oct 20 15:13:54 2017 +0200 @@ -0,0 +1,27 @@ +--- a/scripts/mosh ++++ b/scripts/mosh +@@ -347,8 +347,10 @@ + open(STDERR, ">&STDOUT") or die; + + my @sshopts = ( '-n' ); ++ my @dbopts = ( ); + if ($ssh_pty) { + push @sshopts, '-tt'; ++ push @dbopts, '-t'; + } + + my $ssh_connection = ""; +@@ -395,8 +397,13 @@ + # proxy to break mysteriously. + $ENV{ 'SHELL' } = '/bin/sh'; + my $quoted_proxy_command = shell_quote( $0, "--family=$family" ); ++ my $host = $userhost; $host = $1 if ($userhost =~ m{@(.*)}); ++ my $ssh = join(' ', @ssh); ++ my $port = 22; $port = $1 if ($ssh =~ m{-p *(\d+)}); ++ push @dbopts, ('-J', "$quoted_proxy_command --fake-proxy -- $host $port"); + push @sshopts, ( '-S', 'none', '-o', "ProxyCommand=$quoted_proxy_command --fake-proxy -- %h %p" ); + } ++ @sshopts = @dbopts if (`@ssh -V 2>&1` =~ m{Dropbear}); + my @exec_argv = ( @ssh, @sshopts, $userhost, '--', $ssh_connection . "$server " . shell_quote( @server ) ); + exec @exec_argv; + die "Cannot exec ssh: $!\n"; diff -r 8dbfcd66c5a7 -r ee7238bfeb84 mosh/stuff/patches/series --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mosh/stuff/patches/series Fri Oct 20 15:13:54 2017 +0200 @@ -0,0 +1,1 @@ +mosh.patch