Commit | Line | Data |
---|---|---|
2fbf053b | 1 | ;;; GNU Guix --- Functional package management for GNU |
a8b0556e | 2 | ;;; Copyright © 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019 Ludovic Courtès <ludo@gnu.org> |
06ed5982 | 3 | ;;; Copyright © 2013, 2014 Andreas Enge <andreas@enge.fr> |
45f2ffb4 | 4 | ;;; Copyright © 2014, 2015, 2016 Mark H Weaver <mhw@netris.org> |
1121a5c6 | 5 | ;;; Copyright © 2015, 2016, 2018 Efraim Flashner <efraim@flashner.co.il> |
78d80c5c | 6 | ;;; Copyright © 2016 Leo Famulari <leo@famulari.name> |
c777570b | 7 | ;;; Copyright © 2016 Nicolas Goaziou <mail@nicolasgoaziou.fr> |
8caeb117 | 8 | ;;; Copyright © 2016 Christopher Allan Webber <cwebber@dustycloud.org> |
d6bbb7e5 | 9 | ;;; Copyright © 2017, 2018, 2019 Tobias Geerinckx-Rice <me@tobias.gr> |
c9a6a36f | 10 | ;;; Copyright © 2017 Stefan Reichör <stefan@xsteve.at> |
227dbd84 | 11 | ;;; Copyright © 2017 Ricardo Wurmus <rekado@elephly.net> |
4a78fd46 | 12 | ;;; Copyright © 2017 Nils Gillmann <ng0@n0.is> |
ae72b8f5 | 13 | ;;; Copyright © 2018 Manuel Graf <graf@init.at> |
2fbf053b AE |
14 | ;;; |
15 | ;;; This file is part of GNU Guix. | |
16 | ;;; | |
17 | ;;; GNU Guix is free software; you can redistribute it and/or modify it | |
18 | ;;; under the terms of the GNU General Public License as published by | |
19 | ;;; the Free Software Foundation; either version 3 of the License, or (at | |
20 | ;;; your option) any later version. | |
21 | ;;; | |
22 | ;;; GNU Guix is distributed in the hope that it will be useful, but | |
23 | ;;; WITHOUT ANY WARRANTY; without even the implied warranty of | |
24 | ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
25 | ;;; GNU General Public License for more details. | |
26 | ;;; | |
27 | ;;; You should have received a copy of the GNU General Public License | |
28 | ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>. | |
29 | ||
30 | (define-module (gnu packages ssh) | |
2102ae2e DC |
31 | #:use-module (gnu packages) |
32 | #:use-module (gnu packages autotools) | |
33 | #:use-module (gnu packages base) | |
34 | #:autoload (gnu packages boost) (boost) | |
2fbf053b | 35 | #:use-module (gnu packages compression) |
c9a6a36f | 36 | #:use-module (gnu packages crypto) |
2102ae2e | 37 | #:use-module (gnu packages elf) |
2fbf053b | 38 | #:use-module (gnu packages gnupg) |
2102ae2e | 39 | #:use-module (gnu packages gperf) |
fe0b8a78 | 40 | #:use-module (gnu packages groff) |
49d294e5 | 41 | #:use-module (gnu packages guile) |
2102ae2e | 42 | #:use-module (gnu packages linux) |
c9a6a36f | 43 | #:use-module (gnu packages logging) |
2102ae2e DC |
44 | #:use-module (gnu packages m4) |
45 | #:use-module (gnu packages multiprecision) | |
87bf526b | 46 | #:use-module (gnu packages ncurses) |
2102ae2e | 47 | #:use-module (gnu packages nettle) |
89e34644 | 48 | #:use-module (gnu packages kerberos) |
2102ae2e DC |
49 | #:use-module (gnu packages perl) |
50 | #:use-module (gnu packages pkg-config) | |
c9a6a36f | 51 | #:use-module (gnu packages popt) |
87bf526b | 52 | #:autoload (gnu packages protobuf) (protobuf) |
ae72b8f5 | 53 | #:use-module (gnu packages python) |
44d10b1f | 54 | #:use-module (gnu packages python-xyz) |
2102ae2e DC |
55 | #:use-module (gnu packages readline) |
56 | #:use-module (gnu packages texinfo) | |
cc2b77df | 57 | #:use-module (gnu packages tls) |
2102ae2e DC |
58 | #:use-module (gnu packages xorg) |
59 | #:use-module (guix build-system cmake) | |
60 | #:use-module (guix build-system gnu) | |
ae72b8f5 | 61 | #:use-module (guix build-system python) |
2fbf053b | 62 | #:use-module (guix download) |
817efe8b | 63 | #:use-module (guix git-download) |
2102ae2e | 64 | #:use-module ((guix licenses) #:prefix license:) |
befbaebf LC |
65 | #:use-module (guix packages) |
66 | #:use-module (srfi srfi-1)) | |
1681cd4a LC |
67 | |
68 | (define-public libssh | |
eed00f93 LF |
69 | (package |
70 | (name "libssh") | |
a8b0556e | 71 | (version "0.8.6") |
eed00f93 LF |
72 | (source (origin |
73 | (method git-fetch) | |
74 | (uri (git-reference | |
d5401375 | 75 | (url "https://git.libssh.org/projects/libssh.git") |
12995856 | 76 | (commit (string-append "libssh-" version)))) |
eed00f93 LF |
77 | (sha256 |
78 | (base32 | |
a8b0556e | 79 | "0rq57gpmdawljx7hqya4ipzsfpcbr31yy60kl5qv66krc9wimqda")) |
eed00f93 LF |
80 | (file-name (git-file-name name version)))) |
81 | (build-system cmake-build-system) | |
82 | (outputs '("out" "debug")) | |
83 | (arguments | |
84 | '(#:configure-flags '("-DWITH_GCRYPT=ON") | |
deed349b | 85 | |
a8b0556e LC |
86 | #:phases (modify-phases %standard-phases |
87 | (add-before 'configure 'avoid-werror | |
88 | (lambda _ | |
89 | ;; Avoid '-Werror'. Presumably this works fine with | |
90 | ;; gcc@8 on x86_64 but leads to errors with our older | |
91 | ;; compiler. | |
92 | (substitute* "CompilerChecks.cmake" | |
93 | (("-Werror=") "-W")) | |
94 | #t))) | |
95 | ||
eed00f93 LF |
96 | ;; TODO: Add 'CMockery' and '-DWITH_TESTING=ON' for the test suite. |
97 | #:tests? #f)) | |
98 | (inputs `(("zlib" ,zlib) | |
99 | ("libgcrypt" ,libgcrypt))) | |
100 | (synopsis "SSH client library") | |
101 | (description | |
102 | "libssh is a C library implementing the SSHv2 and SSHv1 protocol for client | |
103 | and server implementations. With libssh, you can remotely execute programs, | |
104 | transfer files, and use a secure and transparent tunnel for your remote | |
105 | applications.") | |
106 | (home-page "https://www.libssh.org") | |
107 | (license license:lgpl2.1+))) | |
2fbf053b AE |
108 | |
109 | (define-public libssh2 | |
110 | (package | |
111 | (name "libssh2") | |
5d97f4c7 | 112 | (version "1.8.0") |
2fbf053b AE |
113 | (source (origin |
114 | (method url-fetch) | |
115 | (uri (string-append | |
78d80c5c | 116 | "https://www.libssh2.org/download/libssh2-" |
2fbf053b | 117 | version ".tar.gz")) |
78d80c5c LF |
118 | (sha256 |
119 | (base32 | |
ac2d5de3 MB |
120 | "1m3n8spv79qhjq4yi0wgly5s5rc8783jb1pyra9bkx1md0plxwrr")) |
121 | (patches | |
122 | (search-patches "libssh2-fix-build-failure-with-gcrypt.patch")))) | |
2fbf053b | 123 | (build-system gnu-build-system) |
e9c14f37 EB |
124 | ;; The installed libssh2.pc file does not include paths to libgcrypt and |
125 | ;; zlib libraries, so we need to propagate the inputs. | |
126 | (propagated-inputs `(("libgcrypt" ,libgcrypt) | |
127 | ("zlib" ,zlib))) | |
fe365a3d | 128 | (arguments `(#:configure-flags `("--with-libgcrypt") |
e2c7b7bb MB |
129 | #:phases (modify-phases %standard-phases |
130 | (replace 'bootstrap | |
131 | (lambda _ | |
132 | (invoke "autoreconf" "-v")))))) | |
ac2d5de3 MB |
133 | (native-inputs `(("autoconf" ,autoconf) |
134 | ("automake" ,automake))) | |
35b9e423 | 135 | (synopsis "Client-side C library implementing the SSH2 protocol") |
2fbf053b AE |
136 | (description |
137 | "libssh2 is a library intended to allow software developers access to | |
35b9e423 | 138 | the SSH-2 protocol in an easy-to-use self-contained package. It can be built |
2fbf053b AE |
139 | into an application to perform many different tasks when communicating with |
140 | a server that supports the SSH-2 protocol.") | |
141 | (license license:bsd-3) | |
142 | (home-page "http://www.libssh2.org/"))) | |
fe0b8a78 AE |
143 | |
144 | (define-public openssh | |
145 | (package | |
146 | (name "openssh") | |
df71447e | 147 | (version "7.9p1") |
fe0b8a78 | 148 | (source (origin |
644e5f17 TGR |
149 | (method url-fetch) |
150 | (uri (string-append "mirror://openbsd/OpenSSH/portable/" | |
151 | name "-" version ".tar.gz")) | |
2b65a9e6 | 152 | (patches (search-patches "openssh-CVE-2018-20685.patch")) |
644e5f17 TGR |
153 | (sha256 |
154 | (base32 | |
df71447e | 155 | "1b8sy6v0b8v4ggmknwcqx3y1rjcpsll0f1f8f4vyv11x4ni3njvb")))) |
fe0b8a78 | 156 | (build-system gnu-build-system) |
7d3373a0 LF |
157 | (native-inputs `(("groff" ,groff))) |
158 | (inputs `(("openssl" ,openssl) | |
39012aab | 159 | ("pam" ,linux-pam) |
040b6299 | 160 | ("mit-krb5" ,mit-krb5) |
683a4a34 LC |
161 | ("zlib" ,zlib) |
162 | ("xauth" ,xauth))) ;for 'ssh -X' and 'ssh -Y' | |
fe0b8a78 AE |
163 | (arguments |
164 | `(#:test-target "tests" | |
d3552450 LF |
165 | ;; Otherwise, the test scripts try to use a nonexistent directory and |
166 | ;; fail. | |
167 | #:make-flags '("REGRESSTMP=\"$${BUILDDIR}/regress\"") | |
040b6299 | 168 | #:configure-flags `("--sysconfdir=/etc/ssh" |
39012aab | 169 | |
040b6299 | 170 | ;; Default value of 'PATH' used by sshd. |
9af49832 LC |
171 | "--with-default-path=/run/current-system/profile/bin" |
172 | ||
040b6299 JD |
173 | ;; configure needs to find krb5-config |
174 | ,(string-append "--with-kerberos5=" | |
175 | (assoc-ref %build-inputs "mit-krb5") | |
176 | "/bin") | |
177 | ||
39012aab LC |
178 | ;; Enable PAM support in sshd. |
179 | "--with-pam") | |
180 | ||
fe0b8a78 | 181 | #:phases |
a9ee11d5 RW |
182 | (modify-phases %standard-phases |
183 | (add-after 'configure 'reset-/var/empty | |
184 | (lambda* (#:key outputs #:allow-other-keys) | |
185 | (let ((out (assoc-ref outputs "out"))) | |
186 | (substitute* "Makefile" | |
187 | (("PRIVSEP_PATH=/var/empty") | |
188 | (string-append "PRIVSEP_PATH=" out "/var/empty"))) | |
189 | #t))) | |
190 | (add-before 'check 'patch-tests | |
191 | (lambda _ | |
192 | ;; remove 't-exec' regress target which requires user 'sshd' | |
193 | (substitute* "regress/Makefile" | |
194 | (("^(REGRESS_TARGETS=.*) t-exec(.*)" all pre post) | |
195 | (string-append pre post))) | |
196 | #t)) | |
197 | (replace 'install | |
36f26211 | 198 | (lambda* (#:key outputs (make-flags '()) #:allow-other-keys) |
a9ee11d5 | 199 | ;; install without host keys and system configuration files |
27b6adb7 MW |
200 | (apply invoke "make" "install-nosysconf" make-flags) |
201 | (install-file "contrib/ssh-copy-id" | |
202 | (string-append (assoc-ref outputs "out") | |
203 | "/bin/")) | |
204 | (chmod (string-append (assoc-ref outputs "out") | |
205 | "/bin/ssh-copy-id") #o555) | |
206 | (install-file "contrib/ssh-copy-id.1" | |
207 | (string-append (assoc-ref outputs "out") | |
208 | "/share/man/man1/")) | |
209 | #t))))) | |
35b9e423 | 210 | (synopsis "Client and server for the secure shell (ssh) protocol") |
fe0b8a78 AE |
211 | (description |
212 | "The SSH2 protocol implemented in OpenSSH is standardised by the | |
213 | IETF secsh working group and is specified in several RFCs and drafts. | |
214 | It is composed of three layered components: | |
215 | ||
216 | The transport layer provides algorithm negotiation and a key exchange. | |
217 | The key exchange includes server authentication and results in a | |
218 | cryptographically secured connection: it provides integrity, confidentiality | |
219 | and optional compression. | |
220 | ||
221 | The user authentication layer uses the established connection and relies on | |
35b9e423 EB |
222 | the services provided by the transport layer. It provides several mechanisms |
223 | for user authentication. These include traditional password authentication | |
fe0b8a78 AE |
224 | as well as public-key or host-based authentication mechanisms. |
225 | ||
226 | The connection layer multiplexes many different concurrent channels over the | |
227 | authenticated connection and allows tunneling of login sessions and | |
35b9e423 | 228 | TCP-forwarding. It provides a flow control service for these channels. |
fe0b8a78 | 229 | Additionally, various channel-specific options can be negotiated.") |
166191b3 | 230 | (license (license:non-copyleft "file://LICENSE" |
fe0b8a78 | 231 | "See LICENSE in the distribution.")) |
1121a5c6 | 232 | (home-page "https://www.openssh.com/"))) |
fe0b8a78 | 233 | |
49d294e5 LC |
234 | (define-public guile-ssh |
235 | (package | |
236 | (name "guile-ssh") | |
64bcc76c | 237 | (version "0.11.3") |
6634180f | 238 | (home-page "https://github.com/artyom-poptsov/guile-ssh") |
49d294e5 | 239 | (source (origin |
e98c354d LC |
240 | (method git-fetch) |
241 | (uri (git-reference | |
242 | (url home-page) | |
243 | (commit (string-append "v" version)))) | |
6634180f | 244 | (file-name (string-append name "-" version ".tar.gz")) |
49d294e5 LC |
245 | (sha256 |
246 | (base32 | |
e98c354d | 247 | "03bv3hwp2s8f0bqgfjaan9jx4dyab0abv27n2zn2g0izlidv0vl6")) |
a8b0556e LC |
248 | (modules '((guix build utils))) |
249 | (snippet | |
250 | '(begin | |
251 | ;; libssh >= 0.8.0 no longer provides libssh_threads: see | |
252 | ;; <https://github.com/artyom-poptsov/guile-ssh/issues/9>. | |
253 | (substitute* "libguile-ssh/Makefile.am" | |
254 | (("-lssh_threads") "")) | |
255 | ||
256 | ;; This test would wrongfully pick DSS keys when running on | |
257 | ;; libssh >= 0.8.0, which fails: | |
258 | ;; <https://github.com/artyom-poptsov/guile-ssh/issues/10>. | |
259 | (substitute* "tests/server.scm" | |
260 | (("= %libssh-minor-version 7") | |
261 | ">= %libssh-minor-version 7")) | |
262 | #t)))) | |
49d294e5 | 263 | (build-system gnu-build-system) |
74460d11 | 264 | (outputs '("out" "debug")) |
49d294e5 | 265 | (arguments |
c305ac30 LC |
266 | '(;; It makes no sense to build libguile-ssh.a. |
267 | #:configure-flags '("--disable-static") | |
268 | ||
269 | #:phases (modify-phases %standard-phases | |
8a8f6590 LC |
270 | (add-after 'unpack 'autoreconf |
271 | (lambda* (#:key inputs #:allow-other-keys) | |
e7c37ed5 | 272 | (invoke "autoreconf" "-vfi"))) |
92b72582 | 273 | (add-before 'build 'fix-libguile-ssh-file-name |
8a8f6590 | 274 | (lambda* (#:key outputs #:allow-other-keys) |
92b72582 LC |
275 | ;; Build and install libguile-ssh.so so that we can use |
276 | ;; its absolute file name in .scm files, before we build | |
277 | ;; the .go files. | |
e7c37ed5 TGR |
278 | (let* ((out (assoc-ref outputs "out")) |
279 | (lib (string-append out "/lib"))) | |
280 | (invoke "make" "install" | |
281 | "-C" "libguile-ssh" | |
282 | "-j" (number->string | |
283 | (parallel-job-count))) | |
284 | (substitute* (find-files "." "\\.scm$") | |
285 | (("\"libguile-ssh\"") | |
286 | (string-append "\"" lib "/libguile-ssh\""))) | |
287 | #t))) | |
d0002642 RJ |
288 | (add-after 'install 'remove-bin-directory |
289 | (lambda* (#:key outputs #:allow-other-keys) | |
290 | (let* ((out (assoc-ref outputs "out")) | |
291 | (bin (string-append out "/bin")) | |
292 | (examples (string-append | |
293 | out "/share/guile-ssh/examples"))) | |
294 | (mkdir-p examples) | |
295 | (rename-file (string-append bin "/ssshd.scm") | |
296 | (string-append examples "/ssshd.scm")) | |
297 | (rename-file (string-append bin "/sssh.scm") | |
298 | (string-append examples "/sssh.scm")) | |
299 | (delete-file-recursively bin) | |
300 | #t)))) | |
afde8da3 LC |
301 | ;; Tests are not parallel-safe. |
302 | #:parallel-tests? #f)) | |
49d294e5 LC |
303 | (native-inputs `(("autoconf" ,autoconf) |
304 | ("automake" ,automake) | |
3246cc91 | 305 | ("libtool" ,libtool) |
00ee3a71 | 306 | ("texinfo" ,texinfo) |
49d294e5 LC |
307 | ("pkg-config" ,pkg-config) |
308 | ("which" ,which))) | |
4d8806c3 | 309 | (inputs `(("guile" ,guile-2.2) |
6f9d5b2e | 310 | ("libssh" ,libssh) |
44fd0994 | 311 | ("libgcrypt" ,libgcrypt))) |
49d294e5 LC |
312 | (synopsis "Guile bindings to libssh") |
313 | (description | |
314 | "Guile-SSH is a library that provides access to the SSH protocol for | |
315 | programs written in GNU Guile interpreter. It is a wrapper to the underlying | |
316 | libssh library.") | |
49d294e5 | 317 | (license license:gpl3+))) |
513e1950 | 318 | |
befbaebf | 319 | (define-public guile2.2-ssh |
4d8806c3 LC |
320 | (deprecated-package "guile2.2-ssh" guile-ssh)) |
321 | ||
322 | (define-public guile2.0-ssh | |
75c260ba LC |
323 | (package |
324 | (inherit guile-ssh) | |
4d8806c3 LC |
325 | (name "guile2.0-ssh") |
326 | (inputs `(("guile" ,guile-2.0) | |
75c260ba | 327 | ,@(alist-delete "guile" (package-inputs guile-ssh)))))) |
befbaebf | 328 | |
513e1950 SHT |
329 | (define-public corkscrew |
330 | (package | |
331 | (name "corkscrew") | |
332 | (version "2.0") | |
333 | (source | |
334 | (origin | |
335 | (method url-fetch) | |
040ae44a TGR |
336 | ;; The agroman.net domain name expired on 2017-03-23, and the original |
337 | ;; "http://www.agroman.net/corkscrew/corkscrew-2.0.tar.gz" now returns | |
338 | ;; bogus HTML. Perhaps it will yet return. Until then, use a mirror. | |
339 | (uri (string-append "https://downloads.openwrt.org/sources/" | |
340 | "corkscrew-" version ".tar.gz")) | |
513e1950 SHT |
341 | (sha256 (base32 |
342 | "1gmhas4va6gd70i2x2mpxpwpgww6413mji29mg282jms3jscn3qd")))) | |
343 | (build-system gnu-build-system) | |
344 | (arguments | |
d2656332 | 345 | `(#:phases |
91c52629 EF |
346 | (modify-phases %standard-phases |
347 | (replace 'configure | |
5b34f56c TGR |
348 | ;; Replace configure phase as the ./configure script does not like |
349 | ;; CONFIG_SHELL and SHELL passed as parameters | |
350 | (lambda* (#:key outputs build target #:allow-other-keys) | |
351 | (let* ((out (assoc-ref outputs "out")) | |
352 | (bash (which "bash")) | |
91c52629 EF |
353 | ;; Set --build and --host flags as the provided config.guess |
354 | ;; is not able to detect them | |
5b34f56c | 355 | (flags `(,(string-append "--prefix=" out) |
91c52629 EF |
356 | ,(string-append "--build=" build) |
357 | ,(string-append "--host=" (or target build))))) | |
358 | (setenv "CONFIG_SHELL" bash) | |
5b34f56c | 359 | (apply invoke bash "./configure" flags)))) |
81d95a12 TGR |
360 | (add-after 'install 'install-documentation |
361 | (lambda* (#:key outputs #:allow-other-keys) | |
362 | (let* ((out (assoc-ref outputs "out")) | |
d2656332 | 363 | (doc (string-append out "/share/doc/" ,name "-" ,version))) |
81d95a12 TGR |
364 | (install-file "README" doc) |
365 | #t)))))) | |
513e1950 | 366 | (home-page "http://www.agroman.net/corkscrew") |
10c95711 | 367 | (synopsis "SSH tunneling through HTTP(S) proxies") |
513e1950 | 368 | (description |
10c95711 TGR |
369 | "Corkscrew tunnels SSH connections through most HTTP and HTTPS proxies. |
370 | Proxy authentication is only supported through the plain-text HTTP basic | |
371 | authentication scheme.") | |
513e1950 | 372 | (license license:gpl2+))) |
87bf526b LC |
373 | |
374 | (define-public mosh | |
375 | (package | |
376 | (name "mosh") | |
4b8b245b | 377 | (version "1.3.2") |
87bf526b LC |
378 | (source (origin |
379 | (method url-fetch) | |
c3671282 | 380 | (uri (string-append "https://mosh.org/mosh-" version ".tar.gz")) |
87bf526b LC |
381 | (sha256 |
382 | (base32 | |
4b8b245b | 383 | "05hjhlp6lk8yjcy59zywpf0r6s0h0b9zxq0lw66dh9x8vxrhaq6s")))) |
87bf526b LC |
384 | (build-system gnu-build-system) |
385 | (arguments | |
11379192 EF |
386 | '(#:phases |
387 | (modify-phases %standard-phases | |
388 | (add-after 'install 'wrap | |
389 | (lambda* (#:key outputs #:allow-other-keys) | |
390 | ;; Make sure 'mosh' can find 'mosh-client' and | |
391 | ;; 'mosh-server'. | |
392 | (let* ((out (assoc-ref outputs "out")) | |
393 | (bin (string-append out "/bin"))) | |
394 | (wrap-program (string-append bin "/mosh") | |
395 | `("PATH" ":" prefix (,bin))))))))) | |
87bf526b LC |
396 | (native-inputs |
397 | `(("pkg-config" ,pkg-config))) | |
398 | (inputs | |
399 | `(("openssl" ,openssl) | |
400 | ("perl" ,perl) | |
401 | ("perl-io-tty" ,perl-io-tty) | |
402 | ("zlib" ,zlib) | |
403 | ("ncurses" ,ncurses) | |
404 | ("protobuf" ,protobuf) | |
405 | ("boost-headers" ,boost))) | |
c3671282 | 406 | (home-page "https://mosh.org/") |
87bf526b LC |
407 | (synopsis "Remote shell tolerant to intermittent connectivity") |
408 | (description | |
409 | "Remote terminal application that allows roaming, supports intermittent | |
410 | connectivity, and provides intelligent local echo and line editing of user | |
411 | keystrokes. Mosh is a replacement for SSH. It's more robust and responsive, | |
412 | especially over Wi-Fi, cellular, and long-distance links.") | |
413 | (license license:gpl3+))) | |
8c6cfd55 | 414 | |
c9a6a36f SR |
415 | (define-public et |
416 | (package | |
417 | (name "et") | |
418 | (version "3.1.0") | |
419 | (source | |
420 | (origin | |
421 | (method url-fetch) | |
422 | (uri (string-append | |
423 | "https://github.com/MisterTea/EternalTCP/archive/et-v" | |
424 | version ".tar.gz")) | |
425 | (sha256 | |
426 | (base32 "1n2w2kqbshdmbb0gz4yizyw9gqfls6qm2dnwx1d9c2hz7hmi7521")))) | |
427 | (build-system cmake-build-system) | |
428 | (arguments `(#:tests? #f)) | |
429 | (native-inputs | |
430 | `(("pkg-config" ,pkg-config))) | |
431 | (inputs `(("glog" ,glog) | |
432 | ("gflags" ,gflags) | |
433 | ("libsodium" ,libsodium) | |
434 | ("protobuf" ,protobuf))) | |
435 | (synopsis "Remote shell that automatically reconnects") | |
436 | (description | |
437 | "Eternal Terminal (ET) is a remote shell that automatically reconnects | |
438 | without interrupting the session. Unlike SSH sessions, ET sessions will | |
839ee8d5 TGR |
439 | survive even network outages and IP changes. ET uses a custom protocol over |
440 | TCP, not the SSH protocol.") | |
c9a6a36f SR |
441 | (home-page "https://mistertea.github.io/EternalTCP/") |
442 | (license license:asl2.0))) | |
443 | ||
8c6cfd55 JD |
444 | (define-public dropbear |
445 | (package | |
446 | (name "dropbear") | |
aa08ab38 | 447 | (version "2018.76") |
8c6cfd55 JD |
448 | (source (origin |
449 | (method url-fetch) | |
450 | (uri (string-append | |
dec3e015 | 451 | "https://matt.ucc.asn.au/" name "/releases/" |
a124bbd2 | 452 | name "-" version ".tar.bz2")) |
8a5a1eff | 453 | (patches (search-patches "dropbear-CVE-2018-15599.patch")) |
8c6cfd55 | 454 | (sha256 |
dec3e015 | 455 | (base32 |
aa08ab38 | 456 | "0rgavbzw7jrs5wslxm0dnwx2m409yzxd9hazd92r7kx8xikr3yzj")))) |
8c6cfd55 | 457 | (build-system gnu-build-system) |
aa08ab38 | 458 | (arguments `(#:tests? #f)) ; there is no "make check" or anything similar |
8c6cfd55 JD |
459 | (inputs `(("zlib" ,zlib))) |
460 | (synopsis "Small SSH server and client") | |
461 | (description "Dropbear is a relatively small SSH server and | |
35b9e423 EB |
462 | client. It runs on a variety of POSIX-based platforms. Dropbear is |
463 | particularly useful for embedded systems, such as wireless routers.") | |
8c6cfd55 JD |
464 | (home-page "https://matt.ucc.asn.au/dropbear/dropbear.html") |
465 | (license (license:x11-style "" "See file LICENSE.")))) | |
2102ae2e DC |
466 | |
467 | (define-public liboop | |
468 | (package | |
469 | (name "liboop") | |
506737f1 | 470 | (version "1.0.1") |
2102ae2e DC |
471 | (source |
472 | (origin | |
473 | (method url-fetch) | |
506737f1 TGR |
474 | (uri (string-append "http://ftp.lysator.liu.se/pub/liboop/" |
475 | name "-" version ".tar.gz")) | |
2102ae2e DC |
476 | (sha256 |
477 | (base32 | |
506737f1 | 478 | "1q0p1l72pq9k3bi7a366j2rishv7dzzkg3i6r2npsfg7cnnidbsn")))) |
2102ae2e DC |
479 | (build-system gnu-build-system) |
480 | (home-page "http://www.lysator.liu.se/liboop/") | |
481 | (synopsis "Event loop library") | |
482 | (description "Liboop is a low-level event loop management library for | |
483 | POSIX-based operating systems. It supports the development of modular, | |
484 | multiplexed applications which may respond to events from several sources. It | |
485 | replaces the \"select() loop\" and allows the registration of event handlers | |
486 | for file and network I/O, timers and signals. Since processes use these | |
487 | mechanisms for almost all external communication, liboop can be used as the | |
488 | basis for almost any application.") | |
489 | (license license:lgpl2.1+))) | |
490 | ||
491 | (define-public lsh | |
492 | (package | |
493 | (name "lsh") | |
494 | (version "2.1") | |
495 | (source (origin | |
496 | (method url-fetch) | |
497 | (uri (string-append "mirror://gnu/lsh/lsh-" | |
498 | version ".tar.gz")) | |
499 | (sha256 | |
500 | (base32 | |
501 | "1qqjy9zfzgny0rkb27c8c7dfsylvb6n0ld8h3an2r83pmaqr9gwb")) | |
502 | (modules '((guix build utils))) | |
503 | (snippet | |
504 | '(begin | |
505 | (substitute* "src/testsuite/functions.sh" | |
506 | (("localhost") | |
507 | ;; Avoid host name lookups since they don't work in | |
508 | ;; chroot builds. | |
509 | "127.0.0.1") | |
510 | (("set -e") | |
511 | ;; Make tests more verbose. | |
512 | "set -e\nset -x")) | |
513 | ||
514 | (substitute* (find-files "src/testsuite" "-test$") | |
515 | (("localhost") "127.0.0.1")) | |
516 | ||
517 | (substitute* "src/testsuite/login-auth-test" | |
6cbee49d MW |
518 | (("/bin/cat") "cat")) |
519 | #t)))) | |
2102ae2e DC |
520 | (build-system gnu-build-system) |
521 | (native-inputs | |
522 | `(("m4" ,m4) | |
523 | ("guile" ,guile-2.0) | |
524 | ("gperf" ,gperf) | |
525 | ("psmisc" ,psmisc))) ; for `killall' | |
526 | (inputs | |
527 | `(("nettle" ,nettle-2) | |
528 | ("linux-pam" ,linux-pam) | |
529 | ||
530 | ;; 'rl.c' uses the 'CPPFunction' type, which is no longer in | |
531 | ;; Readline 6.3. | |
532 | ("readline" ,readline-6.2) | |
533 | ||
534 | ("liboop" ,liboop) | |
535 | ("zlib" ,zlib) | |
536 | ("gmp" ,gmp) | |
537 | ||
538 | ;; The server (lshd) invokes xauth when X11 forwarding is requested. | |
539 | ;; This adds 24 MiB (or 27%) to the closure of lsh. | |
540 | ("xauth" ,xauth))) | |
541 | (arguments | |
542 | '(;; Skip the `configure' test that checks whether /dev/ptmx & | |
543 | ;; co. work as expected, because it relies on impurities (for | |
544 | ;; instance, /dev/pts may be unavailable in chroots.) | |
d5c969ce LC |
545 | #:configure-flags '("lsh_cv_sys_unix98_ptys=yes" |
546 | ||
547 | ;; Use glibc's argp rather than the bundled one. | |
548 | "--with-system-argp" | |
549 | ||
550 | ;; 'lsh_argp.h' checks HAVE_ARGP_PARSE but nothing | |
551 | ;; defines it. | |
552 | "CPPFLAGS=-DHAVE_ARGP_PARSE") | |
2102ae2e DC |
553 | |
554 | ;; FIXME: Tests won't run in a chroot, presumably because | |
555 | ;; /etc/profile is missing, and thus clients get an empty $PATH | |
556 | ;; and nothing works. | |
557 | #:tests? #f | |
558 | ||
559 | #:phases | |
560 | (modify-phases %standard-phases | |
561 | (add-before 'configure 'pre-configure | |
562 | (lambda* (#:key inputs #:allow-other-keys) | |
563 | (let* ((nettle (assoc-ref inputs "nettle")) | |
564 | (sexp-conv (string-append nettle "/bin/sexp-conv"))) | |
d5c969ce LC |
565 | ;; Remove argp from the list of sub-directories; we don't want |
566 | ;; to build it, really. | |
567 | (substitute* "src/Makefile.in" | |
568 | (("^SUBDIRS = argp") | |
569 | "SUBDIRS =")) | |
570 | ||
2102ae2e DC |
571 | ;; Make sure 'lsh' and 'lshd' pick 'sexp-conv' in the right place |
572 | ;; by default. | |
573 | (substitute* "src/environ.h.in" | |
574 | (("^#define PATH_SEXP_CONV.*") | |
575 | (string-append "#define PATH_SEXP_CONV \"" | |
576 | sexp-conv "\"\n"))) | |
577 | ||
578 | ;; Same for the 'lsh-authorize' script. | |
579 | (substitute* "src/lsh-authorize" | |
580 | (("=sexp-conv") | |
581 | (string-append "=" sexp-conv))) | |
582 | ||
583 | ;; Tell lshd where 'xauth' lives. Another option would be to | |
584 | ;; hardcode "/run/current-system/profile/bin/xauth", thereby | |
585 | ;; reducing the closure size, but that wouldn't work on foreign | |
586 | ;; distros. | |
587 | (with-fluids ((%default-port-encoding "ISO-8859-1")) | |
588 | (substitute* "src/server_x11.c" | |
589 | (("define XAUTH_PROGRAM.*") | |
590 | (string-append "define XAUTH_PROGRAM \"" | |
591 | (assoc-ref inputs "xauth") | |
592 | "/bin/xauth\"\n"))))) | |
593 | ||
594 | ;; Tests rely on $USER being set. | |
595 | (setenv "USER" "guix")))))) | |
596 | (home-page "http://www.lysator.liu.se/~nisse/lsh/") | |
597 | (synopsis "GNU implementation of the Secure Shell (ssh) protocols") | |
598 | (description | |
599 | "GNU lsh is a free implementation of the SSH version 2 protocol. It is | |
600 | used to create a secure line of communication between two computers, | |
601 | providing shell access to the server system from the client. It provides | |
602 | both the server daemon and the client application, as well as tools for | |
603 | manipulating key files.") | |
604 | (license license:gpl2+))) | |
c777570b NG |
605 | |
606 | (define-public sshpass | |
607 | (package | |
608 | (name "sshpass") | |
609 | (version "1.06") | |
610 | (synopsis "Non-interactive password authentication with SSH") | |
611 | (home-page "https://sourceforge.net/projects/sshpass/") | |
612 | (source | |
613 | (origin | |
614 | (method url-fetch) | |
615 | (uri (string-append "mirror://sourceforge/sshpass/sshpass/" | |
616 | version "/sshpass-" version ".tar.gz")) | |
617 | (sha256 | |
618 | (base32 | |
619 | "0q7fblaczb7kwbsz0gdy9267z0sllzgmf0c7z5c9mf88wv74ycn6")))) | |
620 | (build-system gnu-build-system) | |
621 | (description "sshpass is a tool for non-interactivly performing password | |
622 | authentication with SSH's so-called @dfn{interactive keyboard password | |
623 | authentication}.") | |
624 | (license license:gpl2+))) | |
8caeb117 CAW |
625 | |
626 | (define-public autossh | |
627 | (package | |
628 | (name "autossh") | |
d6bbb7e5 | 629 | (version "1.4g") |
8caeb117 CAW |
630 | (source |
631 | (origin | |
632 | (method url-fetch) | |
633 | (uri (string-append | |
26045af9 | 634 | "https://www.harding.motd.ca/autossh/autossh-" |
8caeb117 CAW |
635 | version ".tgz")) |
636 | (sha256 | |
d6bbb7e5 | 637 | (base32 "0xqjw8df68f4kzkns5gcah61s5wk0m44qdk2z1d6388w6viwxhsz")))) |
8caeb117 CAW |
638 | (build-system gnu-build-system) |
639 | (arguments `(#:tests? #f)) ; There is no "make check" or anything similar | |
640 | (inputs `(("openssh" ,openssh))) | |
641 | (synopsis "Automatically restart SSH sessions and tunnels") | |
642 | (description "autossh is a program to start a copy of @command{ssh} and | |
643 | monitor it, restarting it as necessary should it die or stop passing traffic.") | |
26045af9 | 644 | (home-page "https://www.harding.motd.ca/autossh/") |
8caeb117 CAW |
645 | (license |
646 | ;; Why point to a source file? Well, all the individual files have a | |
647 | ;; copy of this license in their headers, but there's no separate file | |
648 | ;; with that information. | |
649 | (license:non-copyleft "file://autossh.c")))) | |
227dbd84 RW |
650 | |
651 | (define-public pdsh | |
652 | (package | |
653 | (name "pdsh") | |
b982fb1c | 654 | (version "2.33") |
227dbd84 RW |
655 | (source |
656 | (origin | |
657 | (method url-fetch) | |
b982fb1c | 658 | (uri (string-append "https://github.com/chaos/pdsh/" |
659 | "releases/download/pdsh-" version | |
660 | "/pdsh-" version ".tar.gz")) | |
661 | (file-name (string-append name "-" version ".tar.gz")) | |
227dbd84 | 662 | (sha256 |
b982fb1c | 663 | (base32 "0bwlkl9inj66iwvafg00pi3sk9n673phdi0kcc59y9nn55s0hs3k")))) |
227dbd84 RW |
664 | (build-system gnu-build-system) |
665 | (arguments | |
666 | `(#:configure-flags | |
667 | (list "--with-ssh") | |
668 | #:phases | |
669 | (modify-phases %standard-phases | |
670 | (add-after 'unpack 'patch-/bin/sh | |
671 | (lambda _ | |
b982fb1c | 672 | (substitute* '("tests/t0006-pdcp.sh" |
673 | "tests/t0004-module-loading.sh" | |
674 | "tests/t2001-ssh.sh" | |
675 | "tests/t1003-slurm.sh" | |
676 | "tests/t6036-long-output-lines.sh" | |
677 | "tests/aggregate-results.sh" | |
678 | "tests/t2000-exec.sh" | |
679 | "tests/t0002-internal.sh" | |
680 | "tests/t1002-dshgroup.sh" | |
681 | "tests/t5000-dshbak.sh" | |
682 | "tests/t0001-basic.sh" | |
683 | "tests/t0005-rcmd_type-and-user.sh" | |
227dbd84 | 684 | "tests/test-lib.sh" |
b982fb1c | 685 | "tests/t2002-mrsh.sh" |
686 | "tests/t0003-wcoll.sh" | |
227dbd84 RW |
687 | "tests/test-modules/pcptest.c") |
688 | (("/bin/sh") (which "bash"))) | |
b982fb1c | 689 | #t)) |
690 | (add-after 'unpack 'patch-tests | |
691 | (lambda _ | |
692 | (substitute* "tests/t6036-long-output-lines.sh" | |
693 | (("which") (which "which"))) | |
227dbd84 RW |
694 | #t))))) |
695 | (inputs | |
696 | `(("openssh" ,openssh) | |
697 | ("mit-krb5" ,mit-krb5) | |
698 | ("perl" ,perl))) | |
b982fb1c | 699 | (native-inputs |
700 | `(("which" ,which))) | |
701 | (home-page "https://github.com/chaos/pdsh") | |
227dbd84 RW |
702 | (synopsis "Parallel distributed shell") |
703 | (description "Pdsh is a an efficient, multithreaded remote shell client | |
704 | which executes commands on multiple remote hosts in parallel. Pdsh implements | |
705 | dynamically loadable modules for extended functionality such as new remote | |
706 | shell services and remote host selection.") | |
707 | (license license:gpl2+))) | |
ae72b8f5 MG |
708 | |
709 | (define-public clustershell | |
710 | (package | |
711 | (name "clustershell") | |
712 | (version "1.8") | |
713 | (source | |
714 | (origin | |
715 | (method url-fetch) | |
716 | (uri (string-append "https://github.com/cea-hpc/clustershell/archive/v" | |
717 | version | |
718 | ".tar.gz")) | |
719 | (sha256 | |
720 | (base32 "1qyf6zp5ikk8rk7zvx5ssbgr9si2bqv3a3415590kd07s7i16nmd")) | |
721 | (file-name (string-append name "-" version ".tar.gz")))) | |
722 | (build-system python-build-system) | |
723 | (inputs `(("openssh" ,openssh))) | |
724 | (propagated-inputs `(("python-pyyaml" ,python-pyyaml))) | |
725 | (arguments | |
726 | `(#:phases (modify-phases %standard-phases | |
727 | (add-before 'build 'record-openssh-file-name | |
728 | (lambda* (#:key inputs #:allow-other-keys) | |
729 | (let ((ssh (assoc-ref inputs "openssh"))) | |
730 | (substitute* "lib/ClusterShell/Worker/Ssh.py" | |
731 | (("info\\(\"ssh_path\"\\) or \"ssh\"") | |
732 | (string-append "info(\"ssh_path\") or \"" | |
733 | ssh "/bin/ssh\""))) | |
734 | #t)))))) | |
735 | (home-page "https://cea-hpc.github.io/clustershell/") | |
736 | (synopsis "Scalable event-driven Python framework for cluster administration") | |
737 | (description | |
738 | "ClusterShell is an event-driven Python framework, designed to run local | |
739 | or distant commands in parallel on server farms or on large GNU/Linux | |
740 | clusters. It will take care of common issues encountered on HPC clusters, | |
741 | such as operating on groups of nodes, running distributed commands using | |
742 | optimized execution algorithms, as well as gathering results and merging | |
743 | identical outputs, or retrieving return codes. ClusterShell takes advantage | |
744 | of existing remote shell facilities such as SSH.") | |
745 | (license license:lgpl2.1+))) |