gnu: Adjust synopses as recommended by 'guix lint'.
[jackhill/guix/guix.git] / gnu / packages / ssh.scm
CommitLineData
2fbf053b 1;;; GNU Guix --- Functional package management for GNU
06ed5982 2;;; Copyright © 2013, 2014 Andreas Enge <andreas@enge.fr>
9a03b893 3;;; Copyright © 2014 Mark H Weaver <mhw@netris.org>
2fbf053b
AE
4;;;
5;;; This file is part of GNU Guix.
6;;;
7;;; GNU Guix is free software; you can redistribute it and/or modify it
8;;; under the terms of the GNU General Public License as published by
9;;; the Free Software Foundation; either version 3 of the License, or (at
10;;; your option) any later version.
11;;;
12;;; GNU Guix is distributed in the hope that it will be useful, but
13;;; WITHOUT ANY WARRANTY; without even the implied warranty of
14;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15;;; GNU General Public License for more details.
16;;;
17;;; You should have received a copy of the GNU General Public License
18;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
19
20(define-module (gnu packages ssh)
21 #:use-module ((guix licenses)
22 #:renamer (symbol-prefix-proc 'license:))
23 #:use-module (gnu packages compression)
24 #:use-module (gnu packages gnupg)
fe0b8a78
AE
25 #:use-module (gnu packages groff)
26 #:use-module (gnu packages openssl)
3e778ad3 27 #:use-module (gnu packages elf)
49d294e5
LC
28 #:use-module (gnu packages guile)
29 #:use-module (gnu packages pkg-config)
30 #:use-module (gnu packages autotools)
00ee3a71 31 #:use-module (gnu packages texinfo)
87bf526b
LC
32 #:use-module (gnu packages perl)
33 #:use-module (gnu packages ncurses)
34 #:autoload (gnu packages protobuf) (protobuf)
35 #:autoload (gnu packages boost) (boost)
49d294e5 36 #:use-module (gnu packages which)
9c333da6 37 #:use-module (gnu packages)
2fbf053b
AE
38 #:use-module (guix packages)
39 #:use-module (guix download)
1681cd4a
LC
40 #:use-module (guix build-system gnu)
41 #:use-module (guix build-system cmake))
42
43(define-public libssh
44 (package
45 (name "libssh")
c27d8597 46 (version "0.6.3")
1681cd4a
LC
47 (source (origin
48 (method url-fetch)
c27d8597
MW
49 (uri (string-append "https://red.libssh.org/attachments/download/87/libssh-"
50 version ".tar.xz"))
1681cd4a
LC
51 (sha256
52 (base32
c27d8597 53 "1jyaj9h1iglvn02hrvcchbx8ycjpj8b91h8mi459k7q5jp2xgd9b"))))
1681cd4a 54 (build-system cmake-build-system)
deed349b 55 (arguments
06ed5982 56 '(#:configure-flags '("-DWITH_GCRYPT=ON")
deed349b
LC
57
58 ;; TODO: Add 'CMockery' and '-DWITH_TESTING=ON' for the test suite.
06ed5982 59 #:tests? #f))
1681cd4a 60 (inputs `(("zlib" ,zlib)
678110b9
LC
61 ;; Link against an older gcrypt, because libssh tries to access
62 ;; fields of 'gcry_thread_cbs' that are now private:
63 ;; src/threads.c:72:26: error: 'struct gcry_thread_cbs' has no member named 'mutex_init'
a53421fd 64 ("libgcrypt", libgcrypt-1.5)))
deed349b 65 (native-inputs `(("patchelf" ,patchelf)))
1681cd4a
LC
66 (synopsis "SSH client library")
67 (description
68 "libssh is a C library implementing the SSHv2 and SSHv1 protocol for
69client and server implementations. With libssh, you can remotely execute
70programs, transfer files, and use a secure and transparent tunnel for your
71remote applications.")
72 (home-page "http://www.libssh.org")
73 (license license:lgpl2.1+)))
2fbf053b 74
9c333da6
LC
75(define libssh-0.5 ; kept private
76 (package (inherit libssh)
77 (version "0.5.5")
78 (source (origin
79 (method url-fetch)
80 (uri (string-append "https://red.libssh.org/attachments/download/51/libssh-"
81 version ".tar.gz"))
82 (sha256
83 (base32
84 "17cfdff4hc0ijzrr15biq29fiabafz0bw621zlkbwbc1zh2hzpy0"))
85 (patches (list (search-patch "libssh-CVE-2014-0017.patch")))))))
86
2fbf053b
AE
87(define-public libssh2
88 (package
89 (name "libssh2")
90 (version "1.4.3")
91 (source (origin
92 (method url-fetch)
93 (uri (string-append
94 "http://www.libssh2.org/download/libssh2-"
95 version ".tar.gz"))
96 (sha256 (base32
97 "0vdr478dbhbdgnniqmirawjb7mrcxckn4slhhrijxnzrkmgziipa"))))
98 (build-system gnu-build-system)
e9c14f37
EB
99 ;; The installed libssh2.pc file does not include paths to libgcrypt and
100 ;; zlib libraries, so we need to propagate the inputs.
101 (propagated-inputs `(("libgcrypt" ,libgcrypt)
102 ("zlib" ,zlib)))
103 (arguments '(#:configure-flags `("--with-libgcrypt")))
2fbf053b
AE
104 (synopsis "libssh2, a client-side C library implementing the SSH2 protocol")
105 (description
106 "libssh2 is a library intended to allow software developers access to
107the SSH-2 protocol in an easy-to-use self-contained package. It can be built
108into an application to perform many different tasks when communicating with
109a server that supports the SSH-2 protocol.")
110 (license license:bsd-3)
111 (home-page "http://www.libssh2.org/")))
fe0b8a78
AE
112
113(define-public openssh
114 (package
115 (name "openssh")
9a03b893 116 (version "6.6p1")
fe0b8a78
AE
117 (source (origin
118 (method url-fetch)
ca2baf10
NK
119 (uri (let ((tail (string-append name "-" version ".tar.gz")))
120 (list (string-append "ftp://ftp.fr.openbsd.org/pub/OpenBSD/OpenSSH/portable/"
121 tail)
122 (string-append "ftp://ftp2.fr.openbsd.org/pub/OpenBSD/OpenSSH/portable/"
123 tail))))
fe0b8a78 124 (sha256 (base32
9a03b893 125 "1fq3w86q05y5nn6z878wm312k0svaprw8k007188fd259dkg1ha8"))))
fe0b8a78
AE
126 (build-system gnu-build-system)
127 (inputs `(("groff" ,groff)
128 ("openssl" ,openssl)
129 ("zlib" ,zlib)))
130 (arguments
131 `(#:test-target "tests"
132 #:phases
d4bf49b1
EB
133 (alist-cons-after
134 'configure 'reset-/var/empty
135 (lambda* (#:key outputs #:allow-other-keys)
136 (let ((out (assoc-ref outputs "out")))
137 (substitute* "Makefile"
138 (("PRIVSEP_PATH=/var/empty")
139 (string-append "PRIVSEP_PATH=" out "/var/empty")))))
140 (alist-cons-before
141 'check 'patch-tests
142 (lambda _
143 ;; remove tests that require the user sshd
144 (substitute* "regress/Makefile"
145 (("t10 t-exec") "t10")))
fe0b8a78
AE
146 (alist-replace
147 'install
148 (lambda* (#:key (make-flags '()) #:allow-other-keys)
149 ;; install without host keys and system configuration files
150 (zero? (apply system* "make" "install-nosysconf" make-flags)))
151 %standard-phases)))))
152 (synopsis "OpenSSH, a client and server for the secure shell (ssh) protocol")
153 (description
154 "The SSH2 protocol implemented in OpenSSH is standardised by the
155IETF secsh working group and is specified in several RFCs and drafts.
156It is composed of three layered components:
157
158The transport layer provides algorithm negotiation and a key exchange.
159The key exchange includes server authentication and results in a
160cryptographically secured connection: it provides integrity, confidentiality
161and optional compression.
162
163The user authentication layer uses the established connection and relies on
164the services provided by the transport layer. It provides several mechanisms
165for user authentication. These include traditional password authentication
166as well as public-key or host-based authentication mechanisms.
167
168The connection layer multiplexes many different concurrent channels over the
169authenticated connection and allows tunneling of login sessions and
170TCP-forwarding. It provides a flow control service for these channels.
171Additionally, various channel-specific options can be negotiated.")
172 (license (license:bsd-style "file://LICENSE"
173 "See LICENSE in the distribution."))
174 (home-page "http://www.openssh.org/")))
175
49d294e5
LC
176(define-public guile-ssh
177 (package
178 (name "guile-ssh")
afde8da3 179 (version "0.6.0")
49d294e5
LC
180 (source (origin
181 (method url-fetch)
182 (uri (string-append
183 "https://github.com/artyom-poptsov/libguile-ssh/archive/v"
184 version ".tar.gz"))
185 (sha256
186 (base32
afde8da3 187 "1v4y5vrwg0g6804pzbr160zahlqvj7k7iwys2bdpfzp7m2i47siq"))))
49d294e5
LC
188 (build-system gnu-build-system)
189 (arguments
190 '(#:phases (alist-cons-before
191 'configure 'autoreconf
192 (lambda* (#:key inputs #:allow-other-keys)
00ee3a71 193 (substitute* "ssh/Makefile.am"
49d294e5
LC
194 (("-lssh_threads" match)
195 (string-append "-L" (assoc-ref inputs "libssh")
196 "/lib " match)))
197
198 (zero? (system* "autoreconf" "-vfi")))
199 (alist-cons-after
200 'install 'fix-libguile-ssh-file-name
201 (lambda* (#:key outputs #:allow-other-keys)
202 (let* ((out (assoc-ref outputs "out"))
203 (libdir (string-append out "/lib"))
204 (guiledir (string-append out
205 "/share/guile/site/2.0")))
206 (substitute* (find-files guiledir ".scm")
207 (("\"libguile-ssh\"")
208 (string-append "\"" libdir "/libguile-ssh\"")))
209
210 ;; Make sure it works.
211 (setenv "GUILE_LOAD_PATH" guiledir)
212 (setenv "GUILE_LOAD_COMPILED_PATH" guiledir)
213 (system* "guile" "-c" "(use-modules (ssh session))")))
214 %standard-phases))
215 #:configure-flags (list (string-append "--with-guilesitedir="
216 (assoc-ref %outputs "out")
00ee3a71
LC
217 "/share/guile/site/2.0"))
218
afde8da3
LC
219 ;; Building the .go requires building libguile-ssh.so first.
220 #:parallel-build? #f
00ee3a71 221
afde8da3
LC
222 ;; Tests are not parallel-safe.
223 #:parallel-tests? #f))
49d294e5
LC
224 (native-inputs `(("autoconf" ,autoconf)
225 ("automake" ,automake)
226 ("libtool" ,libtool "bin")
00ee3a71 227 ("texinfo" ,texinfo)
49d294e5
LC
228 ("pkg-config" ,pkg-config)
229 ("which" ,which)))
230 (inputs `(("guile" ,guile-2.0)
9c333da6 231 ("libssh" ,libssh-0.5)))
49d294e5
LC
232 (synopsis "Guile bindings to libssh")
233 (description
234 "Guile-SSH is a library that provides access to the SSH protocol for
235programs written in GNU Guile interpreter. It is a wrapper to the underlying
236libssh library.")
237 (home-page "https://github.com/artyom-poptsov/libguile-ssh")
238 (license license:gpl3+)))
513e1950
SHT
239
240(define-public corkscrew
241 (package
242 (name "corkscrew")
243 (version "2.0")
244 (source
245 (origin
246 (method url-fetch)
247 (uri (string-append "http://www.agroman.net/corkscrew/corkscrew-"
248 version ".tar.gz"))
249 (sha256 (base32
250 "1gmhas4va6gd70i2x2mpxpwpgww6413mji29mg282jms3jscn3qd"))))
251 (build-system gnu-build-system)
252 (arguments
253 ;; Replace configure phase as the ./configure script does not link
254 ;; CONFIG_SHELL and SHELL passed as parameters
255 '(#:phases
256 (alist-replace
257 'configure
258 (lambda* (#:key outputs inputs system target
259 #:allow-other-keys #:rest args)
260 (let* ((configure (assoc-ref %standard-phases 'configure))
261 (prefix (assoc-ref outputs "out"))
262 (bash (which "bash"))
263 ;; Set --build and --host flags as the provided config.guess
264 ;; is not able to detect them
265 (flags `(,(string-append "--prefix=" prefix)
266 ,(string-append "--build=" system)
267 ,(string-append "--host="
268 (or target system)))))
269 (setenv "CONFIG_SHELL" bash)
270 (zero? (apply system* bash
271 (string-append "." "/configure")
272 flags))))
273 %standard-phases)))
274 (home-page "http://www.agroman.net/corkscrew")
9e771e3b 275 (synopsis "Tunneling SSH through HTTP proxies")
513e1950
SHT
276 (description
277 "Corkscrew allows creating TCP tunnels through HTTP proxies. WARNING:
278At the moment only plain text authentication is supported, should you require
279to use it with your HTTP proxy. Digest based authentication may be supported
280in future and NTLM based authentication is most likey never be supported.")
281 (license license:gpl2+)))
87bf526b
LC
282
283(define-public mosh
284 (package
285 (name "mosh")
286 (version "1.2.4")
287 (source (origin
288 (method url-fetch)
289 (uri (string-append "http://mosh.mit.edu/mosh-"
290 version ".tar.gz"))
291 (sha256
292 (base32
293 "0inzfmqrab3n97m7rrmhd4xh3hjz0xva2sfl5m06w11668r0skg7"))))
294 (build-system gnu-build-system)
295 (arguments
296 '(#:phases (alist-cons-after
297 'install 'wrap
298 (lambda* (#:key outputs #:allow-other-keys)
299 ;; Make sure 'mosh' can find 'mosh-client' and
300 ;; 'mosh-server'.
301 (let* ((out (assoc-ref outputs "out"))
302 (bin (string-append out "/bin")))
303 (wrap-program (string-append bin "/mosh")
304 `("PATH" ":" prefix (,bin)))))
305 %standard-phases)))
306 (native-inputs
307 `(("pkg-config" ,pkg-config)))
308 (inputs
309 `(("openssl" ,openssl)
310 ("perl" ,perl)
311 ("perl-io-tty" ,perl-io-tty)
312 ("zlib" ,zlib)
313 ("ncurses" ,ncurses)
314 ("protobuf" ,protobuf)
315 ("boost-headers" ,boost)))
316 (home-page "http://mosh.mit.edu/")
317 (synopsis "Remote shell tolerant to intermittent connectivity")
318 (description
319 "Remote terminal application that allows roaming, supports intermittent
320connectivity, and provides intelligent local echo and line editing of user
321keystrokes. Mosh is a replacement for SSH. It's more robust and responsive,
322especially over Wi-Fi, cellular, and long-distance links.")
323 (license license:gpl3+)))
8c6cfd55
JD
324
325(define-public dropbear
326 (package
327 (name "dropbear")
328 (version "2014.63")
329 (source (origin
330 (method url-fetch)
331 (uri (string-append
332 "http://matt.ucc.asn.au/" name "/releases/" name "-" version ".tar.bz2"))
333 (sha256
334 (base32 "1bjpbg2vi5f332q4bqxkidkjfxsqmnqvp4g1wyh8d99b8gg94nar"))))
335 (build-system gnu-build-system)
336 (arguments `(#:tests? #f)) ; There is no "make check" or anything similar
337 (inputs `(("zlib" ,zlib)))
338 (synopsis "Small SSH server and client")
339 (description "Dropbear is a relatively small SSH server and
340client. It runs on a variety of POSIX-based platforms. Dropbear is
341particularly useful for embedded systems, such as wireless routers.")
342 (home-page "https://matt.ucc.asn.au/dropbear/dropbear.html")
343 (license (license:x11-style "" "See file LICENSE."))))