wok-current rev 21488

mosh: update patch
author Pascal Bellard <pascal.bellard@slitaz.org>
date Wed May 01 15:49:51 2019 +0200 (2019-05-01)
parents 90e20bb5b8f2
children aaa3fcf79cf3
files mosh/receipt
line diff
     1.1 --- a/mosh/receipt	Wed May 01 14:25:01 2019 +0100
     1.2 +++ b/mosh/receipt	Wed May 01 15:49:51 2019 +0200
     1.3 @@ -33,14 +33,28 @@
     1.4  {
     1.5  	mkdir -p $fs/usr
     1.6  	cp -a $install/usr/bin $fs/usr
     1.7 -
     1.8 -	sed -i '/.*quoted_self = shell_quote.*/r/dev/stdin' $fs/usr/bin/mosh <<EOT
     1.9 -  if (\`\$ssh -V 2>&1\` =~ m{Dropbear}) {
    1.10 -    my \$host = \$userhost; \$host = \$1 if (\$userhost =~ m{@(.*)});
    1.11 -    my \$port = 22; \$port = \$1 if (\$ssh =~ m{-p *(\d+)});
    1.12 -    exec "\$ssh " . shell_quote( '-J', "\$quoted_self --fake-proxy -- \$host \$port", '-t', \$userhost, "\$server " . shell_quote( @server ) );
    1.13 -  }
    1.14 + 
    1.15 +	cd $fs/usr/bin
    1.16 +	patch -p0 <<EOT
    1.17 +--- mosh
    1.18 ++++ mosh
    1.19 +@@ -395,6 +395,14 @@
    1.20 +     # proxy to break mysteriously.
    1.21 +     $ENV{ 'SHELL' } = '/bin/sh';
    1.22 +     my $quoted_proxy_command = shell_quote( $0, "--family=$family" );
    1.23 ++    my $ssh = 'ssh';
    1.24 ++    if (`$ssh -V 2>&1` =~ m{Dropbear}) {
    1.25 ++      my $host = $userhost; $host = $1 if ($userhost =~ m{@(.*)});
    1.26 ++      my $port = 22; $port = $1 if ($ssh =~ m{-p *(\d+)});
    1.27 ++      my $quoted_self = shell_quote( $0, "--family=$family" );
    1.28 ++      exec "$ssh " . shell_quote( '-J', "$quoted_self --fake-proxy -- $host $port",
    1.29 ++	'-t', $userhost, "$server " .  shell_quote( @server ) );
    1.30 ++    }
    1.31 +     push @sshopts, ( '-S', 'none', '-o', "ProxyCommand=$quoted_proxy_command --fake-proxy -- %h %p" );
    1.32 +   }
    1.33 +   my @exec_argv = ( @ssh, @sshopts, $userhost, '--', $ssh_connection . "$server " . shell_quote( @server ) );
    1.34  EOT
    1.35 +	cd - > /dev/null
    1.36  }
    1.37  
    1.38  post_install()