# HG changeset patch # User Pascal Bellard # Date 1436001796 -7200 # Node ID 7dd80db4b5f97d9d64448a6979e3c242ff9dd146 # Parent c5bef900f5dfd30fe220eb4c1ee0d4f31269eea8 mosh: add dropbear support diff -r c5bef900f5df -r 7dd80db4b5f9 mosh/receipt --- a/mosh/receipt Fri Jul 03 04:23:02 2015 +0300 +++ b/mosh/receipt Sat Jul 04 11:23:16 2015 +0200 @@ -10,16 +10,20 @@ WEB_SITE="http://mosh.mit.edu/" WGET_URL="${WEB_SITE}$TARBALL" TAGS="ssh" -NOTE1="On remote server: need -a in /etc/daemons.conf DROPBEAR_OPTIONS" -NOTE2="Mosh client *needs* openssh. Not compatible with dropbear yet" DEPENDS="gcc-lib-base perl protobuf libssl libcrypto zlib ncursesw ssh" BUILD_DEPENDS="pkg-config protobuf-dev openssl-dev libcrypto-dev zlib-dev ncursesw-dev" -SUGGESTED="openssh" # Rules to configure and make the package. compile_rules() { + sed -i '/.*quoted_self = shell_quote.*/r/dev/stdin' scripts/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 ./configure --prefix=/usr --sysconfdir=/etc \ --enable-compile-warnings=error && make && @@ -32,3 +36,20 @@ mkdir -p $fs/usr cp -a $install/usr/bin $fs/usr } + +post_install() +{ + if ! grep ^DROPBEAR_OPTIONS $1/etc/daemons.conf | grep -q -- -a; then + cat <