on master help sign in
Initial Flatpak for org.mosh.mosh
commit7eee6bd68616c5ae9bfb8bcbec16f4a528909808 authorRobert McQueen <rob@endlessm.com> dateWed 19 Jun 2019, 20:35 (7 years ago) parent746ea89
4 files changed+229
fake-proxy-flatpak.patch+18 flathub.json+3 org.mosh.mosh.appdata.xml+79 org.mosh.mosh.json+129
fake-proxy-flatpak.patchnew file+18
@@ -0,0 +1,18 @@
1+--- mosh-1.3.2/scripts/mosh.pl~ 2019-06-19 15:55:11.717241450 +0100
2++++ mosh-1.3.2/scripts/mosh.pl 2019-06-19 16:40:34.134466931 +0100
3+@@ -394,7 +394,14 @@
4+ # Non-standard shells and broken shrc files cause the ssh
5+ # proxy to break mysteriously.
6+ $ENV{ 'SHELL' } = '/bin/sh';
7+- my $quoted_proxy_command = shell_quote( $0, "--family=$family" );
8++ my @proxy_command;
9++ if ( -f '/.flatpak-info' ) {
10++ push @proxy_command, 'flatpak', 'run', 'org.mosh.mosh';
11++ } else {
12++ push @proxy_command, $0;
13++ }
14++ push @proxy_command, "--family=$family";
15++ my $quoted_proxy_command = shell_quote( @proxy_command );
16+ push @sshopts, ( '-S', 'none', '-o', "ProxyCommand=$quoted_proxy_command --fake-proxy -- %h %p" );
17+ }
18+ my @exec_argv = ( @ssh, @sshopts, $userhost, '--', $ssh_connection . "$server " . shell_quote( @server ) );
flathub.jsonnew file+3
@@ -0,0 +1,3 @@
1+{
2+ "skip-appstream-check": true
3+}
org.mosh.mosh.appdata.xmlnew file+79
@@ -0,0 +1,79 @@
1+<?xml version="1.0" encoding="UTF-8"?>
2+<component type="console-application">
3+ <id>org.mosh.mosh</id>
4+ <name>Mobile Shell</name>
5+ <metadata_license>CC0-1.0</metadata_license>
6+ <project_license>GPL-3.0+</project_license>
7+ <provides><binary>mosh</binary></provides>
8+ <description>
9+ <p>Mosh is a remote terminal application that supports intermittent
10+ connectivity, allows roaming, and provides speculative local echo
11+ and line editing of user keystrokes.</p>
12+
13+ <p>It aims to support the typical interactive uses of SSH, plus:</p>
14+
15+ <ul>
16+ <li>Mosh keeps the session alive if the client goes to sleep and
17+ wakes up later, or temporarily loses its Internet connection.</li>
18+
19+ <li>Mosh allows the client and server to "roam" and change IP
20+ addresses, while keeping the connection alive. Unlike SSH, Mosh
21+ can be used while switching between Wi-Fi networks or from Wi-Fi
22+ to cellular data to wired Ethernet.</li>
23+
24+ <li>The Mosh client runs a predictive model of the server's behavior
25+ in the background and tries to guess intelligently how each
26+ keystroke will affect the screen state. When it is confident in
27+ its predictions, it will show them to the user while waiting for
28+ confirmation from the server. Most typing and uses of the left-
29+ and right-arrow keys can be echoed immediately.</li>
30+ </ul>
31+
32+ <p>As a result, Mosh is usable on high-latency links, e.g. on a
33+ cellular data connection or spotty Wi-Fi. In distinction from
34+ previous attempts at local echo modes in other protocols, Mosh
35+ works properly with full-screen applications such as emacs, vi,
36+ alpine, and irssi, and automatically recovers from occasional
37+ prediction errors within an RTT. On high-latency links, Mosh
38+ underlines its predictions while they are outstanding and removes
39+ the underline when they are confirmed by the server.</p>
40+
41+ <p>Mosh does not support X forwarding or the non-interactive uses of SSH,
42+ including port forwarding.</p>
43+ </description>
44+ <developer_name>Keith Winstein, John Hood, et al.</developer_name>
45+ <releases>
46+ <release date="2017-07-22" version="1.3.2">
47+ <p>Platform support:</p>
48+ <ul>
49+ <li>Explicitly enable binding to both IPv4 and IPv6 addresses.
50+ (Giel van Schijndel)</li>
51+ <li>Restore perl 5.8.8 support for RHEL5. (Alexander Chernyakhovsky)</li>
52+ <li>Make tests detect UTF-8 locale with a helper executable. (John Hood)</li>
53+ <li>Don't print /etc/motd on IllumOS. (John Hood)</li>
54+ <li>Print {,/var}/run/motd.dynamic on Ubuntu. (John Hood)</li>
55+ <li>Fix build on Haiku. (Adrien Destugues)</li>
56+ <li>Disable unicode-later-combining.test for tmux 2.4.
57+ This fixes build failures. (John Hood)</li>
58+ </ul>
59+
60+ <p>Bug fixes:</p>
61+ <ul>
62+ <li>In tests, explicitly set 80x24 tmux window, for newer versions
63+ of tmux. (John Hood)</li>
64+ <li>Work around JuiceSSH rendering bug. (John Hood)</li>
65+ <li>Do not move cursor for SCROLL UP and SCROLL DOWN--
66+ fixes an issue with tmux 2.4. (John Hood)</li>
67+ </ul>
68+ </release>
69+ </releases>
70+ <screenshots>
71+ <screenshot type="default">
72+ <image>https://mosh.org/mosh.png</image>
73+ </screenshot>
74+ </screenshots>
75+ <content_rating type="oars-1.1" />
76+ <url type="homepage">https://mosh.org/</url>
77+ <url type="bugtracker">https://github.com/mobile-shell/mosh/issues</url>
78+ <url type="help">https://mailman.mit.edu/mailman/listinfo/mosh-users</url>
79+</component>
org.mosh.mosh.jsonnew file+129
@@ -0,0 +1,129 @@
1+{
2+ "app-id": "org.mosh.mosh",
3+ "runtime": "org.freedesktop.Platform",
4+ "runtime-version": "18.08",
5+ "sdk": "org.freedesktop.Sdk",
6+ "command": "mosh",
7+ "separate-locales": false,
8+ "finish-args": [
9+ "--share=network",
10+ "--talk-name=org.freedesktop.Flatpak"
11+ ],
12+ "cleanup": [
13+ "*.a",
14+ "*.la",
15+ "/include",
16+ "/lib/pkgconfig",
17+ "/share/man"
18+ ],
19+ "modules": [
20+ {
21+ "name": "protobuf",
22+ "sources": [
23+ {
24+ "type": "archive",
25+ "url": "https://github.com/google/protobuf/releases/download/v3.8.0/protobuf-all-3.8.0.tar.gz",
26+ "sha256": "b7220b41481011305bf9100847cf294393973e869973a9661046601959b2960b"
27+ }
28+ ],
29+ "cleanup": [
30+ "/bin/protoc"
31+ ]
32+ },
33+ {
34+ "name": "perl",
35+ "no-autogen": true,
36+ "config-opts": [
37+ "-des"
38+ ],
39+ "cleanup": [
40+ "/bin/perl5*",
41+ "/bin/c2ph",
42+ "/bin/corelist",
43+ "/bin/cpan",
44+ "/bin/enc2xs",
45+ "/bin/encguess",
46+ "/bin/h2*",
47+ "/bin/instmodsh",
48+ "/bin/json_pp",
49+ "/bin/libnetcfg",
50+ "/bin/perlbug",
51+ "/bin/perldoc",
52+ "/bin/perlivp",
53+ "/bin/perlthanks",
54+ "/bin/piconv",
55+ "/bin/pl2pm",
56+ "/bin/pod*",
57+ "/bin/prove",
58+ "/bin/pstruct",
59+ "/bin/ptar*",
60+ "/bin/shasum",
61+ "/bin/splain",
62+ "/bin/xsubpp",
63+ "/bin/zipdetails",
64+ "/lib/perl5/site_perl",
65+ "/man",
66+ "*.h",
67+ "*.pod"
68+ ],
69+ "sources": [
70+ {
71+ "type": "archive",
72+ "url": "https://www.cpan.org/src/5.0/perl-5.28.0.tar.gz",
73+ "sha256": "7e929f64d4cb0e9d1159d4a59fc89394e27fa1f7004d0836ca0d514685406ea8"
74+ },
75+ {
76+ "type": "script",
77+ "dest-filename": "configure",
78+ "commands": [
79+ "exec ./configure.gnu $@"
80+ ]
81+ }
82+ ],
83+ "post-install": [
84+ "find /app/lib/perl5 -type f -exec chmod u+w {} \\;"
85+ ]
86+ },
87+ {
88+ "name": "mosh",
89+ "config-opts": [
90+ "--disable-server"
91+ ],
92+ "sources": [
93+ {
94+ "type": "archive",
95+ "url": "https://mosh.org/mosh-1.3.2.tar.gz",
96+ "sha256": "da600573dfa827d88ce114e0fed30210689381bbdcff543c931e4d6a2e851216"
97+ },
98+ {
99+ "type": "patch",
100+ "path": "fake-proxy-flatpak.patch"
101+ },
102+ {
103+ "type": "file",
104+ "path": "org.mosh.mosh.appdata.xml"
105+ }
106+ ],
107+ "post-install": [
108+ "install -Dm644 org.mosh.mosh.appdata.xml /app/share/appdata/org.mosh.mosh.appdata.xml"
109+ ]
110+ },
111+ {
112+ "name": "ssh-wrapper",
113+ "buildsystem": "simple",
114+ "sources": [
115+ {
116+ "type": "script",
117+ "dest-filename": "ssh",
118+ "commands": [
119+ "exec flatpak-spawn --host --forward-fd=1 --forward-fd=2 --forward-fd=3 ssh \"$@\""
120+ ]
121+ }
122+ ],
123+ "build-commands": [
124+ "install ssh /app/bin/ssh"
125+ ]
126+ }
127+ ]
128+}
129+