wok-next rev 19991
mosh: update dropbear patch
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Fri Oct 20 15:13:54 2017 +0200 (2017-10-20) |
parents | 8dbfcd66c5a7 |
children | 56b5183a00d7 |
files | mosh/receipt mosh/stuff/patches/mosh.patch mosh/stuff/patches/series |
line diff
1.1 --- a/mosh/receipt Fri Oct 20 08:05:51 2017 +0200 1.2 +++ b/mosh/receipt Fri Oct 20 15:13:54 2017 +0200 1.3 @@ -30,13 +30,6 @@ 1.4 { 1.5 mkdir -p $fs/usr 1.6 cp -a $install/usr/bin $fs/usr 1.7 - sed -i '/.*quoted_self = shell_quote.*/r/proc/self/fd/0' $fs/usr/bin/mosh <<EOT 1.8 - if (\`\$ssh -V 2>&1\` =~ m{Dropbear}) { 1.9 - my \$host = \$userhost; \$host = \$1 if (\$userhost =~ m{@(.*)}); 1.10 - my \$port = 22; \$port = \$1 if (\$ssh =~ m{-p *(\d+)}); 1.11 - exec "\$ssh " . shell_quote( '-J', "\$quoted_self --fake-proxy -- \$host \$port", '-t', \$userhost, "\$server " . shell_quote( @server ) ); 1.12 - } 1.13 -EOT 1.14 } 1.15 1.16 post_install()
2.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 2.2 +++ b/mosh/stuff/patches/mosh.patch Fri Oct 20 15:13:54 2017 +0200 2.3 @@ -0,0 +1,27 @@ 2.4 +--- a/scripts/mosh 2.5 ++++ b/scripts/mosh 2.6 +@@ -347,8 +347,10 @@ 2.7 + open(STDERR, ">&STDOUT") or die; 2.8 + 2.9 + my @sshopts = ( '-n' ); 2.10 ++ my @dbopts = ( ); 2.11 + if ($ssh_pty) { 2.12 + push @sshopts, '-tt'; 2.13 ++ push @dbopts, '-t'; 2.14 + } 2.15 + 2.16 + my $ssh_connection = ""; 2.17 +@@ -395,8 +397,13 @@ 2.18 + # proxy to break mysteriously. 2.19 + $ENV{ 'SHELL' } = '/bin/sh'; 2.20 + my $quoted_proxy_command = shell_quote( $0, "--family=$family" ); 2.21 ++ my $host = $userhost; $host = $1 if ($userhost =~ m{@(.*)}); 2.22 ++ my $ssh = join(' ', @ssh); 2.23 ++ my $port = 22; $port = $1 if ($ssh =~ m{-p *(\d+)}); 2.24 ++ push @dbopts, ('-J', "$quoted_proxy_command --fake-proxy -- $host $port"); 2.25 + push @sshopts, ( '-S', 'none', '-o', "ProxyCommand=$quoted_proxy_command --fake-proxy -- %h %p" ); 2.26 + } 2.27 ++ @sshopts = @dbopts if (`@ssh -V 2>&1` =~ m{Dropbear}); 2.28 + my @exec_argv = ( @ssh, @sshopts, $userhost, '--', $ssh_connection . "$server " . shell_quote( @server ) ); 2.29 + exec @exec_argv; 2.30 + die "Cannot exec ssh: $!\n";