mosh: new package
PATCH v8 1/1 mosh: new package
Adding mosh, the mobile shell. Mosh uses ssh or dropbear as an initial transport to start mosh-server which uses UDP to communicate with the client. Supports a predictive model to enhance performance on weak connections and compensate for general lag. Also supports disconnections and reconnections seamlessly.
--- package/Config.in | 1 + package/mosh/0001-remove-system-locale-calls.patch | 46 ++++++++++++++++++++++ package/mosh/Config.in | 19 +++++++++ package/mosh/mosh.hash | 2 + package/mosh/mosh.mk | 13 ++++++ 5 files changed, 81 insertions(+) create mode 100644 package/mosh/0001-remove-system-locale-calls.patch create mode 100644 package/mosh/Config.in create mode 100644 package/mosh/mosh.hash create mode 100644 package/mosh/mosh.mk
package/Config.in +1 -0
@@ -1250,6 +1250,7 @@ endif source "package/mongoose/Config.in" source "package/mongrel2/Config.in" source "package/monkey/Config.in" + source "package/mosh/Config.in" source "package/mosquitto/Config.in" source "package/mrouted/Config.in" source "package/mtr/Config.in"
package/mosh/0001-remove-system-locale-calls.patch new file +46 -0
46 lines not on this page · raw message
package/mosh/Config.in new file +19 -0
@@ -0,0 +1,19 @@ +comment "mosh needs a toolchain w/ threads" + depends on !BR2_TOOLCHAIN_HAS_THREADS + +config BR2_PACKAGE_MOSH + bool "mosh" + depends on BR2_arm || BR2_i386 || BR2_mipsel || BR2_x86_64 # protobuf + depends on BR2_TOOLCHAIN_HAS_THREADS #protobuf + depends on BR2_HOSTARCH = "x86_64" || BR2_HOSTARCH = "x86" # protobuf + select BR2_PACKAGE_PROTOBUF + select BR2_PACKAGE_NCURSES + select BR2_PACKAGE_OPENSSL + select BR2_PACKAGE_OPENSSH if !BR2_PACKAGE_DROPBEAR_CLIENT + select BR2_PACKAGE_ZLIB + help + Remote terminal application that supports intermittent connectivity, + allows roaming, and provides speculative local echo and line editing + of user keystrokes. + + https://mosh.mit.edu
package/mosh/mosh.hash new file +2 -0
@@ -0,0 +1,2 @@ +# From: http://mailman.mit.edu/pipermail/mosh-users/2015-July/000283.html +sha256 1af809e5d747c333a852fbf7acdbf4d354dc4bbc2839e3afe5cf798190074be3 mosh-1.2.5.tar.gz
package/mosh/mosh.mk new file +13 -0
@@ -0,0 +1,13 @@ +################################################################################ +# +# mosh +# +################################################################################ + +MOSH_VERSION = 1.2.5 +MOSH_SITE = https://mosh.mit.edu/ +MOSH_DEPENDENCIES = zlib ncurses protobuf openssl +MOSH_LICENSE = GPLv3+ with exception +MOSH_LICENSE_FILES = COPYING COPYING.iOS + +$(eval $(autotools-package))
Signature · 1 line
2.1.4
PATCH v8 1/1 mosh: new package
Christian, All,
On 2015-07-26 09:34 -0700, Christian Stewart spake thusly:
Quoted 7 lines
Adding mosh, the mobile shell. Mosh uses ssh or dropbear as an initial transport to start mosh-server which uses UDP to communicate with the client. Supports a predictive model to enhance performance on weak connections and compensate for general lag. Also supports disconnections and reconnections seamlessly.
Signed-off-by Christian Stewart <[email protected]>
mosh needs host-pkgconf:
checking pkg-config is at least version 0.9.0... ./configure: line 7378: /home/ymorin/dev/buildroot/O/host/usr/bin/pkg-config: No such file or directory
With that fixed:
(I think Thomas will fix that when applying...)
Regards,
Yann E. MORIN.
Quoted 135 lines
--- package/Config.in | 1 + package/mosh/0001-remove-system-locale-calls.patch | 46 ++++++++++++++++++++++ package/mosh/Config.in | 19 +++++++++ package/mosh/mosh.hash | 2 + package/mosh/mosh.mk | 13 ++++++ 5 files changed, 81 insertions(+) create mode 100644 package/mosh/0001-remove-system-locale-calls.patch create mode 100644 package/mosh/Config.in create mode 100644 package/mosh/mosh.hash create mode 100644 package/mosh/mosh.mkpackage/Config.in +1
-0@@ -1250,6 +1250,7 @@ endif source "package/mongoose/Config.in" source "package/mongrel2/Config.in" source "package/monkey/Config.in" + source "package/mosh/Config.in" source "package/mosquitto/Config.in" source "package/mrouted/Config.in" source "package/mtr/Config.in"package/mosh/0001-remove-system-locale-calls.patch new file +46
-0@@ -0,0 +1,46 @@ +The locale command is not available on many systems. As this variable +is unused and appears to have been written with the intent of +displaying the locale settings to the user, it's not really necessary. +As this breaks Mosh on a lot of systems, it's best to remove the calls. + +Upstream status: refused, see: https://github.com/keithw/mosh/issues/650 + +Signed-off-by: Christian Stewart <[email protected]> +--- + src/frontend/mosh-server.cc | 4 +++- + src/frontend/stmclient.cc | 4 +++- + 2 files changed, 6 insertions(+), 2 deletions(-) + +diff --git a/src/frontend/mosh-server.cc b/src/frontend/mosh-server.cc +index 76ed2ed..0d2f222 100644 +--- a/src/frontend/mosh-server.cc ++++ b/src/frontend/mosh-server.cc +@@ -313,7 +313,9 @@ int main( int argc, char *argv[] ) + fprintf( stderr, "mosh-server needs a UTF-8 native locale to run.\n\n" ); + fprintf( stderr, "Unfortunately, the local environment (%s) specifies\nthe character set \"%s\",\n\n", native_ctype.str().c_str(), native_charset.c_str() ); + fprintf( stderr, "The client-supplied environment (%s) specifies\nthe character set \"%s\".\n\n", client_ctype.str().c_str(), client_charset.c_str() ); +- int unused __attribute((unused)) = system( "locale" ); ++ ++ fprintf( stderr, "This is a buildroot system, 'locale' debug output has been removed." ); ++ + exit( 1 ); + } + } +diff --git a/src/frontend/stmclient.cc b/src/frontend/stmclient.cc +index 9e4d916..06fac8b 100644 +--- a/src/frontend/stmclient.cc ++++ b/src/frontend/stmclient.cc +@@ -85,7 +85,9 @@ void STMClient::init( void ) + + fprintf( stderr, "mosh-client needs a UTF-8 native locale to run.\n\n" ); + fprintf( stderr, "Unfortunately, the client's environment (%s) specifies\nthe character set \"%s\".\n\n", native_ctype.str().c_str(), native_charset.c_str() ); +- int unused __attribute((unused)) = system( "locale" ); ++ ++ fprintf( stderr, "This is a buildroot system, 'locale' debug output has been removed." ); ++ + exit( 1 ); + } + +-- +2.1.4 +package/mosh/Config.in new file +19
-0@@ -0,0 +1,19 @@ +comment "mosh needs a toolchain w/ threads" + depends on !BR2_TOOLCHAIN_HAS_THREADS + +config BR2_PACKAGE_MOSH + bool "mosh" + depends on BR2_arm || BR2_i386 || BR2_mipsel || BR2_x86_64 # protobuf + depends on BR2_TOOLCHAIN_HAS_THREADS #protobuf + depends on BR2_HOSTARCH = "x86_64" || BR2_HOSTARCH = "x86" # protobuf + select BR2_PACKAGE_PROTOBUF + select BR2_PACKAGE_NCURSES + select BR2_PACKAGE_OPENSSL + select BR2_PACKAGE_OPENSSH if !BR2_PACKAGE_DROPBEAR_CLIENT + select BR2_PACKAGE_ZLIB + help + Remote terminal application that supports intermittent connectivity, + allows roaming, and provides speculative local echo and line editing + of user keystrokes. + + https://mosh.mit.edupackage/mosh/mosh.hash new file +2
-0@@ -0,0 +1,2 @@ +# From: http://mailman.mit.edu/pipermail/mosh-users/2015-July/000283.html +sha256 1af809e5d747c333a852fbf7acdbf4d354dc4bbc2839e3afe5cf798190074be3 mosh-1.2.5.tar.gzpackage/mosh/mosh.mk new file +13
-0@@ -0,0 +1,13 @@ +################################################################################ +# +# mosh +# +################################################################################ + +MOSH_VERSION = 1.2.5 +MOSH_SITE = https://mosh.mit.edu/ +MOSH_DEPENDENCIES = zlib ncurses protobuf openssl +MOSH_LICENSE = GPLv3+ with exception +MOSH_LICENSE_FILES = COPYING COPYING.iOS + +$(eval $(autotools-package))Signature · 6 lines
2.1.4 _______________________________________________ buildroot mailing list buildroot at busybox.net http://lists.busybox.net/mailman/listinfo/buildroot
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------. | Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: | | +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ | | +33 223 225 172 `------------.-------: X AGAINST | \e/ There is no | | http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. | '------------------------------^-------^------------------^--------------------'
PATCH v8 1/1 mosh: new package
In reply to Christian StewartChristian,
Quoted 7 lines · Christian Stewart
Adding mosh, the mobile shell. Mosh uses ssh or dropbear as an initial transport to start mosh-server which uses UDP to communicate with the client. Supports a predictive model to enhance performance on weak connections and compensate for general lag. Also supports disconnections and reconnections seamlessly.
Signed-off-by Christian Stewart <[email protected]>
I applied, with some more changes:
[Thomas:
- Add missing dependency on host-pkgconf, as noticed by Yann E. Morin.
- Indicate that openssh/dropbear is a runtime dependency.
- Pass some variables in the configure environment to tell that SSP support is not available when it isn't. Otherwise, it misdetects the SSP support as being available, causing a build failure.]
The last item clearly meant that the build was never tested with uClibc, which is our default C library. Please do at least a test build with uClibc before submitting new packages.
Also, one comment below.
package/mosh/0001-remove-system-locale-calls.patch line 6
Quoted 12 lines
package/mosh/0001-remove-system-locale-calls.patch new file +6
-0@@ -0,0 +1,46 @@ +The locale command is not available on many systems. As this variable +is unused and appears to have been written with the intent of +displaying the locale settings to the user, it's not really necessary. +As this breaks Mosh on a lot of systems, it's best to remove the calls. + +Upstream status: refused, see: https://github.com/keithw/mosh/issues/650
I think upstream refused it, because the approach of your patch is not acceptable upstream.
Quoted 7 lines
package/mosh/0001-remove-system-locale-calls.patch new file +7
-0+Signed-off-by: Christian Stewart <[email protected]> +--- + src/frontend/mosh-server.cc | 4 +++- + src/frontend/stmclient.cc | 4 +++- + 2 files changed, 6 insertions(+), 2 deletions(-) + +diff --git a/src/frontend/mosh-server.cc b/src/frontend/mosh-server.cc
package/mosh/0001-remove-system-locale-calls.patch line 24
Quoted 10 lines
package/mosh/0001-remove-system-locale-calls.patch new file +10
-0+index 76ed2ed..0d2f222 100644 +--- a/src/frontend/mosh-server.cc ++++ b/src/frontend/mosh-server.cc +@@ -313,7 +313,9 @@ int main( int argc, char *argv[] ) + fprintf( stderr, "mosh-server needs a UTF-8 native locale to run.\n\n" ); + fprintf( stderr, "Unfortunately, the local environment (%s) specifies\nthe character set \"%s\",\n\n", native_ctype.str().c_str(), native_charset.c_str() ); + fprintf( stderr, "The client-supplied environment (%s) specifies\nthe character set \"%s\".\n\n", client_ctype.str().c_str(), client_charset.c_str() ); +- int unused __attribute((unused)) = system( "locale" ); ++ ++ fprintf( stderr, "This is a buildroot system, 'locale' debug output has been removed." );
Here is what your patch should do instead:
if (locale command exists) int unused __attribute((unused)) = system( "locale" ); else fprintf( stderr, "locale command not found, cannot show related debug output." );
I'm pretty sure this is going to make your patch much more acceptable upstream. Can you retry with something like that?
Thanks!
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com
PATCH v8 1/1 mosh: new package
Thomas,
No, they will reject it regardless of how it is coded. Checking a global POSIX command exists is not worth it to them as it exists on most systems anyway. They requested I make a patch for BR that outputs a special debug line for buildroot users so they know what they're dealing with if someone submits a log.
Thank you for the fixes!
Christian
Quoted 82 lines · Thomas Petazzoni
Christian,
Quoted 1 line · Christian Stewart
Adding mosh, the mobile shell. Mosh uses ssh or dropbear as an initial
transport to
Quoted 6 lines
start mosh-server which uses UDP to communicate with the client. Supports a predictive model to enhance performance on weak connections and compensate for general lag. Also supports disconnections and reconnections seamlessly.
Signed-off-by Christian Stewart <[email protected]>I applied, with some more changes:
[Thomas:
- Add missing dependency on host-pkgconf, as noticed by Yann E. Morin.
- Indicate that openssh/dropbear is a runtime dependency.
- Pass some variables in the configure environment to tell that SSP support is not available when it isn't. Otherwise, it misdetects the SSP support as being available, causing a build failure.]The last item clearly meant that the build was never tested with uClibc, which is our default C library. Please do at least a test build with uClibc before submitting new packages.
Also, one comment below.
Review
Quoted 1 line
(quoted diff) +0
-0
b/package/mosh/0001-remove-system-locale-calls.patchpackage/mosh/0001-remove-system-locale-calls.patch line 6
Quoted 11 lines
new file mode 100644
index 0000000..114e6edpackage/mosh/0001-remove-system-locale-calls.patch new file +6
-0@@ -0,0 +1,46 @@ +The locale command is not available on many systems. As this variable +is unused and appears to have been written with the intent of +displaying the locale settings to the user, it's not really necessary. +As this breaks Mosh on a lot of systems, it's best to remove the calls. + +Upstream status: refused, see:https://github.com/keithw/mosh/issues/650
I think upstream refused it, because the approach of your patch is not acceptable upstream.
package/mosh/0001-remove-system-locale-calls.patch
Quoted 12 lines
package/mosh/0001-remove-system-locale-calls.patch new file +12
-0+Signed-off-by: Christian Stewart <[email protected]> +--- + src/frontend/mosh-server.cc | 4 +++- + src/frontend/stmclient.cc | 4 +++- + 2 files changed, 6 insertions(+), 2 deletions(-) + +diff --git a/src/frontend/mosh-server.cc b/src/frontend/mosh-server.cc +index 76ed2ed..0d2f222 100644 +--- a/src/frontend/mosh-server.cc ++++ b/src/frontend/mosh-server.cc +@@ -313,7 +313,9 @@ int main( int argc, char *argv[] ) + fprintf( stderr, "mosh-server needs a UTF-8 native locale torun.\n\n" );
package/mosh/0001-remove-system-locale-calls.patch line 19
Quoted 1 line
package/mosh/0001-remove-system-locale-calls.patch new file +1
-0+ fprintf( stderr, "Unfortunately, the local environment (%s)specifies\nthe character set \"%s\",\n\n", native_ctype.str().c_str(),
native_charset.c_str());package/mosh/0001-remove-system-locale-calls.patch line 20
Quoted 1 line
package/mosh/0001-remove-system-locale-calls.patch new file +1
-0+ fprintf( stderr, "The client-supplied environment (%s)specifies\nthe character set \"%s\".\n\n", client_ctype.str().c_str(),
client_charset.c_str());package/mosh/0001-remove-system-locale-calls.patch
Quoted 3 lines
package/mosh/0001-remove-system-locale-calls.patch new file +3
-0+- int unused __attribute((unused)) = system( "locale" ); ++ ++ fprintf( stderr, "This is a buildroot system, 'locale' debugoutput has been removed." );
Here is what your patch should do instead:
if (locale command exists)
int unused __attribute((unused)) =system( "locale" );
else
fprintf( stderr, "locale command not found, cannot show
related debug output." );I'm pretty sure this is going to make your patch much more acceptable upstream. Can you retry with something like that?
Quoted 8 lines
Thanks!
Thomas
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20150726/47cb4e8e/attachment.html>
PATCH v8 1/1 mosh: new package
Dear Christian Stewart,
Please don't top-post, thanks!
Quoted 5 lines · Christian Stewart
No, they will reject it regardless of how it is coded. Checking a global POSIX command exists is not worth it to them as it exists on most systems anyway. They requested I make a patch for BR that outputs a special debug line for buildroot users so they know what they're dealing with if someone submits a log.
Can you try anyway? Because what I'm proposing is significantly different from what you proposed in your pull request. My proposal has the advantage of keeping the locale output when 'locale' is available *and* warn that locale is not available otherwise. Basically it exactly matches the requirements of the upstream mosh developers.
We don't like to keep patches in Buildroot forever, so having an upstreamable solution is important.
Thanks,
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com
PATCH v8 1/1 mosh: new package
Hi Thomas,
Quoted 2 lines · Thomas Petazzoni
Dear Christian Stewart,
[snip]
Quoted 6 lines
Can you try anyway? Because what I'm proposing is significantly different from what you proposed in your pull request. My proposal has the advantage of keeping the locale output when 'locale' is available *and* warn that locale is not available otherwise. Basically it exactly matches the requirements of the upstream mosh developers.
Their opinion is that since Mosh is going to exit immediately after "locale" is called anyways, they would prefer to just have the default "command not found" be printed rather than check that the command exists at all.
Quoted 3 lines
We don't like to keep patches in Buildroot forever, so having an upstreamable solution is important.
Honestly it's not as bad as I thought originally to have this error, you could probably safely delete the patch without any upstream changes or repercussions.
Christian
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20150727/9a055602/attachment.html>
PATCH v8 1/1 mosh: new package
In reply to Christian StewartHi Christian,
package/mosh/Config.in line 2
Quoted 8 lines · Christian Stewart
package/mosh/Config.in new file +2
-0@@ -0,0 +1,19 @@ +comment "mosh needs a toolchain w/ threads" + depends on !BR2_TOOLCHAIN_HAS_THREADS
The dependencies comment should depend on supported arches. Since this patch has already been applied, I'll send a follow-up.
Quoted 6 lines
package/mosh/Config.in new file +6
-0+config BR2_PACKAGE_MOSH + bool "mosh" + depends on BR2_arm || BR2_i386 || BR2_mipsel || BR2_x86_64 # protobuf + depends on BR2_TOOLCHAIN_HAS_THREADS #protobuf + depends on BR2_HOSTARCH = "x86_64" || BR2_HOSTARCH = "x86" # protobuf + select BR2_PACKAGE_PROTOBUF
package/mosh/Config.in line 19
Quoted 10 lines
package/mosh/Config.in new file +10
-0+ select BR2_PACKAGE_NCURSES + select BR2_PACKAGE_OPENSSL + select BR2_PACKAGE_OPENSSH if !BR2_PACKAGE_DROPBEAR_CLIENT + select BR2_PACKAGE_ZLIB + help + Remote terminal application that supports intermittent connectivity, + allows roaming, and provides speculative local echo and line editing + of user keystrokes. + + https://mosh.mit.edu
baruch
Signature · 3 lines
http://baruch.siach.name/blog/ ~. .~ Tk Open Systems
=}------------------------------------------------ooO--U--Ooo------------{=
- baruch at tkos.co.il - tel: +972.2.679.5364, http://www.tkos.co.il -