Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH v4 1/1] mosh: new package
@ 2015-07-23 22:00 Christian Stewart
  2015-07-24  5:14 ` Baruch Siach
  2015-07-24  7:07 ` Thomas Petazzoni
  0 siblings, 2 replies; 4+ messages in thread
From: Christian Stewart @ 2015-07-23 22:00 UTC (permalink / raw)
  To: buildroot

Adding mosh, the mobile shell.

Signed-off-by: Christian Stewart <christian@paral.in>
---
 package/Config.in                                  |  1 +
 package/mosh/0001-remove-system-locale-calls.patch | 49 ++++++++++++++++++++++
 package/mosh/Config.in                             | 28 +++++++++++++
 package/mosh/mosh.hash                             |  1 +
 package/mosh/mosh.mk                               | 16 +++++++
 5 files changed, 95 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

diff --git a/package/Config.in b/package/Config.in
index cfa7512..d1e6640 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -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"
diff --git a/package/mosh/0001-remove-system-locale-calls.patch b/package/mosh/0001-remove-system-locale-calls.patch
new file mode 100644
index 0000000..f44e166
--- /dev/null
+++ b/package/mosh/0001-remove-system-locale-calls.patch
@@ -0,0 +1,49 @@
+From b6075c578d2104b58d55e088dccb74370019dde9 Mon Sep 17 00:00:00 2001
+From: Christian Stewart <christian@paral.in>
+Date: Thu, 23 Jul 2015 13:52:35 -0700
+Subject: [PATCH 1/1] Remove system("locale") calls.
+
+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.
+
+Signed-off-by: Christian Stewart <christian@paral.in>
+---
+ 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
+
diff --git a/package/mosh/Config.in b/package/mosh/Config.in
new file mode 100644
index 0000000..da5aa10
--- /dev/null
+++ b/package/mosh/Config.in
@@ -0,0 +1,28 @@
+
+comment "mosh needs openssh and openssl to be built"
+	depends on !BR2_PACKAGE_OPENSSH || !BR2_PACKAGE_OPENSSL
+
+comment "mosh works on arm, i386, mipsel, or x64 architectures"
+	depends on BR2_arm || BR2_i386 || BR2_mipsel || BR2_x86_64
+
+comment "mosh needs a toolchain w/ threads"
+	depends on !BR2_TOOLCHAIN_HAS_THREADS
+
+comment "mosh needs a host architecture of x64 or x86"
+	depends on BR2_HOSTARCH = "x86_64" || BR2_HOSTARCH = "x86"
+
+config BR2_PACKAGE_MOSH
+	bool "mosh"
+	depends on BR2_PACKAGE_OPENSSL
+	depends on BR2_PACKAGE_OPENSSH
+	depends on BR2_TOOLCHAIN_HAS_THREADS
+	depends on BR2_arm || BR2_i386 || BR2_mipsel || BR2_x86_64
+	depends on BR2_HOSTARCH = "x86_64" || BR2_HOSTARCH = "x86"
+	select BR2_PACKAGE_PROTOBUF
+	select BR2_PACKAGE_NCURSES
+	help
+	  Remote terminal application that supports intermittent connectivity,
+	  allows roaming, and provides speculative local echo and line editing
+	  of user keystrokes.
+
+	  https://github.com/keithw/mosh
diff --git a/package/mosh/mosh.hash b/package/mosh/mosh.hash
new file mode 100644
index 0000000..1dfc1ba
--- /dev/null
+++ b/package/mosh/mosh.hash
@@ -0,0 +1 @@
+sha256 35025d412046ee5199ebaa8d876131fc683dccedde18b3945b3bc3662bc9f373  mosh-1.2.5.tar.gz
diff --git a/package/mosh/mosh.mk b/package/mosh/mosh.mk
new file mode 100644
index 0000000..1c58e05
--- /dev/null
+++ b/package/mosh/mosh.mk
@@ -0,0 +1,16 @@
+################################################################################
+#
+# mosh
+#
+################################################################################
+
+MOSH_VERSION = 1.2.5
+MOSH_SITE = $(call github,keithw,mosh,mosh-$(MOSH_VERSION))
+MOSH_DEPENDENCIES = zlib ncurses protobuf openssl
+MOSH_LICENSE = GPLv3+
+MOSH_LICENSE_FILES = COPYING COPYING.iOS
+
+# Necessary as we are pulling from Git.
+MOSH_AUTORECONF = YES
+
+$(eval $(autotools-package))
-- 
2.1.4

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [Buildroot] [PATCH v4 1/1] mosh: new package
  2015-07-23 22:00 [Buildroot] [PATCH v4 1/1] mosh: new package Christian Stewart
@ 2015-07-24  5:14 ` Baruch Siach
  2015-07-24  7:07 ` Thomas Petazzoni
  1 sibling, 0 replies; 4+ messages in thread
From: Baruch Siach @ 2015-07-24  5:14 UTC (permalink / raw)
  To: buildroot

Hi Christian,

On Thu, Jul 23, 2015 at 03:00:04PM -0700, Christian Stewart wrote:
> diff --git a/package/mosh/Config.in b/package/mosh/Config.in
> new file mode 100644
> index 0000000..da5aa10
> --- /dev/null
> +++ b/package/mosh/Config.in
> @@ -0,0 +1,28 @@
> +
> +comment "mosh needs openssh and openssl to be built"
> +	depends on !BR2_PACKAGE_OPENSSH || !BR2_PACKAGE_OPENSSL
> +
> +comment "mosh works on arm, i386, mipsel, or x64 architectures"
> +	depends on BR2_arm || BR2_i386 || BR2_mipsel || BR2_x86_64

Target architecture dependency comments are not very helpful, since the user 
can't do much about it is most cases. Moreover the other dependency comment 
should only show when the target architecture is supported.

> +
> +comment "mosh needs a toolchain w/ threads"
> +	depends on !BR2_TOOLCHAIN_HAS_THREADS
> +
> +comment "mosh needs a host architecture of x64 or x86"
> +	depends on BR2_HOSTARCH = "x86_64" || BR2_HOSTARCH = "x86"
> +
> +config BR2_PACKAGE_MOSH
> +	bool "mosh"
> +	depends on BR2_PACKAGE_OPENSSL
> +	depends on BR2_PACKAGE_OPENSSH

I still think this two should be 'select'.

> +	depends on BR2_TOOLCHAIN_HAS_THREADS
> +	depends on BR2_arm || BR2_i386 || BR2_mipsel || BR2_x86_64
> +	depends on BR2_HOSTARCH = "x86_64" || BR2_HOSTARCH = "x86"
> +	select BR2_PACKAGE_PROTOBUF
> +	select BR2_PACKAGE_NCURSES
> +	help
> +	  Remote terminal application that supports intermittent connectivity,
> +	  allows roaming, and provides speculative local echo and line editing
> +	  of user keystrokes.
> +
> +	  https://github.com/keithw/mosh
> diff --git a/package/mosh/mosh.hash b/package/mosh/mosh.hash
> new file mode 100644
> index 0000000..1dfc1ba
> --- /dev/null
> +++ b/package/mosh/mosh.hash
> @@ -0,0 +1 @@
> +sha256 35025d412046ee5199ebaa8d876131fc683dccedde18b3945b3bc3662bc9f373  mosh-1.2.5.tar.gz

This doesn't match the hash mentioned at 
https://github.com/keithw/mosh/releases/tag/mosh-1.2.5. This is most likely 
due to your use of git checkout. Please use the official release tarballs, 
either https://mosh.mit.edu/mosh-1.2.5.tar.gz or 
https://github.com/keithw/mosh/releases/download/mosh-1.2.5/mosh-1.2.5.tar.gz. 
Both match tag message hash.

> diff --git a/package/mosh/mosh.mk b/package/mosh/mosh.mk
> new file mode 100644
> index 0000000..1c58e05
> --- /dev/null
> +++ b/package/mosh/mosh.mk
> @@ -0,0 +1,16 @@
> +################################################################################
> +#
> +# mosh
> +#
> +################################################################################
> +
> +MOSH_VERSION = 1.2.5
> +MOSH_SITE = $(call github,keithw,mosh,mosh-$(MOSH_VERSION))
> +MOSH_DEPENDENCIES = zlib ncurses protobuf openssl
> +MOSH_LICENSE = GPLv3+

License exceptions?

> +MOSH_LICENSE_FILES = COPYING COPYING.iOS
> +
> +# Necessary as we are pulling from Git.
> +MOSH_AUTORECONF = YES

The official tarball should not need autoreconf.

> +$(eval $(autotools-package))

baruch

-- 
     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 -

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Buildroot] [PATCH v4 1/1] mosh: new package
  2015-07-23 22:00 [Buildroot] [PATCH v4 1/1] mosh: new package Christian Stewart
  2015-07-24  5:14 ` Baruch Siach
@ 2015-07-24  7:07 ` Thomas Petazzoni
  2015-07-24 12:40   ` Baruch Siach
  1 sibling, 1 reply; 4+ messages in thread
From: Thomas Petazzoni @ 2015-07-24  7:07 UTC (permalink / raw)
  To: buildroot

Dear Christian Stewart,

On Thu, 23 Jul 2015 15:00:04 -0700, Christian Stewart wrote:

> +comment "mosh needs a host architecture of x64 or x86"
> +	depends on BR2_HOSTARCH = "x86_64" || BR2_HOSTARCH = "x86"

Why ?

Thanks!

Thomas
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Buildroot] [PATCH v4 1/1] mosh: new package
  2015-07-24  7:07 ` Thomas Petazzoni
@ 2015-07-24 12:40   ` Baruch Siach
  0 siblings, 0 replies; 4+ messages in thread
From: Baruch Siach @ 2015-07-24 12:40 UTC (permalink / raw)
  To: buildroot

Hi Thomas,

On Fri, Jul 24, 2015 at 09:07:32AM +0200, Thomas Petazzoni wrote:
> On Thu, 23 Jul 2015 15:00:04 -0700, Christian Stewart wrote:
> > +comment "mosh needs a host architecture of x64 or x86"
> > +	depends on BR2_HOSTARCH = "x86_64" || BR2_HOSTARCH = "x86"
> 
> Why ?

Copied from protobuf dependencies.

baruch


-- 
     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 -

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2015-07-24 12:40 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-07-23 22:00 [Buildroot] [PATCH v4 1/1] mosh: new package Christian Stewart
2015-07-24  5:14 ` Baruch Siach
2015-07-24  7:07 ` Thomas Petazzoni
2015-07-24 12:40   ` Baruch Siach

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox