gnu: mrustc: Clean up.
[jackhill/guix/guix.git] / gnu / packages / ssh.scm
index 83a8316..ec4f00d 100644 (file)
@@ -1,8 +1,8 @@
 ;;; GNU Guix --- Functional package management for GNU
-;;; Copyright © 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020 Ludovic Courtès <ludo@gnu.org>
 ;;; Copyright © 2013, 2014 Andreas Enge <andreas@enge.fr>
 ;;; Copyright © 2014, 2015, 2016 Mark H Weaver <mhw@netris.org>
-;;; Copyright © 2015, 2016, 2018 Efraim Flashner <efraim@flashner.co.il>
+;;; Copyright © 2015, 2016, 2018, 2019 Efraim Flashner <efraim@flashner.co.il>
 ;;; Copyright © 2016, 2019 Leo Famulari <leo@famulari.name>
 ;;; Copyright © 2016 Nicolas Goaziou <mail@nicolasgoaziou.fr>
 ;;; Copyright © 2016 Christopher Allan Webber <cwebber@dustycloud.org>
@@ -32,7 +32,7 @@
   #:use-module (gnu packages)
   #:use-module (gnu packages autotools)
   #:use-module (gnu packages base)
-  #:autoload   (gnu packages boost) (boost)
+  #:use-module (gnu packages boost)
   #:use-module (gnu packages compression)
   #:use-module (gnu packages crypto)
   #:use-module (gnu packages elf)
@@ -51,7 +51,7 @@
   #:use-module (gnu packages perl)
   #:use-module (gnu packages pkg-config)
   #:use-module (gnu packages popt)
-  #:autoload   (gnu packages protobuf) (protobuf)
+  #:use-module (gnu packages protobuf)
   #:use-module (gnu packages python)
   #:use-module (gnu packages python-xyz)
   #:use-module (gnu packages readline)
   #:use-module (guix git-download)
   #:use-module ((guix licenses) #:prefix license:)
   #:use-module (guix packages)
+  #:use-module (guix utils)
   #:use-module (srfi srfi-1))
 
 (define-public libssh
   (package
     (name "libssh")
-    (version "0.8.7")
+    (version "0.9.3")
     (source (origin
               (method git-fetch)
               (uri (git-reference
                      (commit (string-append "libssh-" version))))
               (sha256
                (base32
-                "1iqik1ba0g008k1mb1n85iih1azi7giy0c485jnlmsrjxik4q3j2"))
+                "175i3xybg69d5lb078334v6dd3njm743kww8f67ix9w33969rmzf"))
               (file-name (git-file-name name version))))
     (build-system cmake-build-system)
     (outputs '("out" "debug"))
     (arguments
      '(#:configure-flags '("-DWITH_GCRYPT=ON")
 
-       #:phases (modify-phases %standard-phases
-                  (add-before 'configure 'avoid-werror
-                    (lambda _
-                      ;; Avoid '-Werror'.  Presumably this works fine with
-                      ;; gcc@8 on x86_64 but leads to errors with our older
-                      ;; compiler.
-                      (substitute* "CompilerChecks.cmake"
-                        (("-Werror=") "-W"))
-                      #t)))
-
        ;; TODO: Add 'CMockery' and '-DWITH_TESTING=ON' for the test suite.
        #:tests? #f))
     (inputs `(("zlib" ,zlib)
@@ -111,7 +102,7 @@ applications.")
 (define-public libssh2
   (package
    (name "libssh2")
-   (version "1.8.2")
+   (version "1.9.0")
    (source (origin
             (method url-fetch)
             (uri (string-append
@@ -119,21 +110,13 @@ applications.")
                    version ".tar.gz"))
             (sha256
              (base32
-              "0rqd37pc80nm2pz4sa2m9pfc48axys7jwq1l7z0vii5nyvchg0q8"))
-            (patches
-             (search-patches "libssh2-fix-build-failure-with-gcrypt.patch"))))
+              "1zfsz9nldakfz61d2j70pk29zlmj7w2vv46s9l3x2prhcgaqpyym"))))
    (build-system gnu-build-system)
    ;; The installed libssh2.pc file does not include paths to libgcrypt and
    ;; zlib libraries, so we need to propagate the inputs.
    (propagated-inputs `(("libgcrypt" ,libgcrypt)
                         ("zlib" ,zlib)))
-   (arguments `(#:configure-flags `("--with-libgcrypt")
-                #:phases (modify-phases %standard-phases
-                           (replace 'bootstrap
-                             (lambda _
-                               (invoke "autoreconf" "-v"))))))
-   (native-inputs `(("autoconf" ,autoconf)
-                    ("automake" ,automake)))
+   (arguments `(#:configure-flags `("--with-libgcrypt")))
    (synopsis "Client-side C library implementing the SSH2 protocol")
    (description
     "libssh2 is a library intended to allow software developers access to
@@ -143,36 +126,17 @@ a server that supports the SSH-2 protocol.")
    (license license:bsd-3)
    (home-page "https://www.libssh2.org/")))
 
-;; XXX A hidden special obsolete libssh2 for temporary use in the curl package.
-;; <https://bugs.gnu.org/34927>
-(define-public libssh2-1.8.0
-  (hidden-package
-    (package
-      (inherit libssh2)
-      (version "1.8.0")
-      (source (origin
-                (method url-fetch)
-                (uri (string-append
-                      "https://www.libssh2.org/download/libssh2-"
-                      version ".tar.gz"))
-                (sha256
-                 (base32
-                  "1m3n8spv79qhjq4yi0wgly5s5rc8783jb1pyra9bkx1md0plxwrr"))
-                (patches
-                 (search-patches "libssh2-fix-build-failure-with-gcrypt.patch")))))))
-
 (define-public openssh
   (package
    (name "openssh")
-   (version "7.9p1")
+   (version "8.0p1")
    (source (origin
              (method url-fetch)
              (uri (string-append "mirror://openbsd/OpenSSH/portable/"
                                  name "-" version ".tar.gz"))
-             (patches (search-patches "openssh-CVE-2018-20685.patch"))
              (sha256
               (base32
-               "1b8sy6v0b8v4ggmknwcqx3y1rjcpsll0f1f8f4vyv11x4ni3njvb"))))
+               "0s7xh4s0qcipnjh9ls5blxcpvhyd116z9dxn3q1yi64lwrwki55x"))))
    (build-system gnu-build-system)
    (native-inputs `(("groff" ,groff)
                     ("pkg-config" ,pkg-config)))
@@ -284,6 +248,11 @@ Additionally, various channel-specific options can be negotiated.")
                   (substitute* "tests/server.scm"
                     (("= %libssh-minor-version 7")
                      ">= %libssh-minor-version 7"))
+
+                  ;; Allow builds with Guile 3.0.
+                  (substitute* "configure.ac"
+                    (("^GUILE_PKG.*$")
+                     "GUILE_PKG([3.0 2.2 2.0])\n"))
                   #t))))
     (build-system gnu-build-system)
     (outputs '("out" "debug"))
@@ -292,9 +261,6 @@ Additionally, various channel-specific options can be negotiated.")
        #:configure-flags '("--disable-static")
 
        #:phases (modify-phases %standard-phases
-                  (add-after 'unpack 'autoreconf
-                    (lambda* (#:key inputs #:allow-other-keys)
-                      (invoke "autoreconf" "-vfi")))
                   (add-before 'build 'fix-libguile-ssh-file-name
                     (lambda* (#:key outputs #:allow-other-keys)
                       ;; Build and install libguile-ssh.so so that we can use
@@ -341,9 +307,6 @@ programs written in GNU Guile interpreter.  It is a wrapper to the underlying
 libssh library.")
     (license license:gpl3+)))
 
-(define-public guile2.2-ssh
-  (deprecated-package "guile2.2-ssh" guile-ssh))
-
 (define-public guile2.0-ssh
   (package
     (inherit guile-ssh)
@@ -351,6 +314,39 @@ libssh library.")
     (inputs `(("guile" ,guile-2.0)
               ,@(alist-delete "guile" (package-inputs guile-ssh))))))
 
+(define-public guile3.0-ssh
+  (package
+    (inherit guile-ssh)
+    (name "guile3.0-ssh")
+    (arguments
+     (substitute-keyword-arguments (package-arguments guile-ssh)
+       ((#:phases phases)
+        `(modify-phases ,phases
+           (add-before 'bootstrap 'delete-old-guile-m4
+             (lambda _
+               ;; The old 'guile.m4' that's shipped would fail to recognize
+               ;; Guile 2.9 as "3.0".
+               (delete-file "m4/guile.m4")
+               #t))
+           (add-before 'build 'adjust-for-guile3
+             (lambda _
+               ;; Adjust for things that are deprecated in 2.2 and removed in
+               ;; 3.0.
+               (substitute* "tests/common.scm"
+                 (("define-module \\(tests common\\)")
+                  "define-module (tests common)
+  #:use-module (ice-9 threads)\n"))
+               (substitute* "modules/ssh/tunnel.scm"
+                 (("define-module \\(ssh tunnel\\)")
+                  "define-module (ssh tunnel)
+  #:use-module (ice-9 threads)"))
+               (substitute* "modules/srfi/srfi-64.upstream.scm"
+                 (("_IOLBF")
+                  "'line"))
+               #t))))))
+    (inputs `(("guile" ,guile-next)
+              ,@(alist-delete "guile" (package-inputs guile-ssh))))))
+
 (define-public corkscrew
   (package
     (name "corkscrew")
@@ -443,12 +439,13 @@ especially over Wi-Fi, cellular, and long-distance links.")
     (version "3.1.0")
     (source
      (origin
-       (method url-fetch)
-       (uri (string-append
-             "https://github.com/MisterTea/EternalTCP/archive/et-v"
-             version ".tar.gz"))
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://github.com/MisterTea/EternalTCP.git")
+             (commit (string-append "et-v" version))))
+       (file-name (git-file-name name version))
        (sha256
-        (base32 "1n2w2kqbshdmbb0gz4yizyw9gqfls6qm2dnwx1d9c2hz7hmi7521"))))
+        (base32 "1m5caxckn2ihwp9s2pbyh5amxlpwr7yc54q8s0kb10fr52w2vfnm"))))
     (build-system cmake-build-system)
     (arguments `(#:tests? #f))
     (native-inputs
@@ -736,16 +733,15 @@ shell services and remote host selection.")
 (define-public clustershell
   (package
     (name "clustershell")
-    (version "1.8")
+    (version "1.8.3")
     (source
      (origin
        (method url-fetch)
-       (uri (string-append "https://github.com/cea-hpc/clustershell/archive/v"
-                           version
-                           ".tar.gz"))
+       (uri (string-append "https://github.com/cea-hpc/clustershell/releases"
+                           "/download/v" version
+                           "/ClusterShell-" version ".tar.gz"))
        (sha256
-        (base32 "1qyf6zp5ikk8rk7zvx5ssbgr9si2bqv3a3415590kd07s7i16nmd"))
-       (file-name (string-append name "-" version ".tar.gz"))))
+        (base32 "1qdcgh733szwj9r1gambrgfkizvbjci0bnnkds9a8mnyb3sasnan"))))
     (build-system python-build-system)
     (inputs `(("openssh" ,openssh)))
     (propagated-inputs `(("python-pyyaml" ,python-pyyaml)))
@@ -770,3 +766,37 @@ optimized execution algorithms, as well as gathering results and merging
 identical outputs, or retrieving return codes.  ClusterShell takes advantage
 of existing remote shell facilities such as SSH.")
     (license license:lgpl2.1+)))
+
+(define-public endlessh
+  (package
+    (name "endlessh")
+    (version "1.0")
+    (source
+      (origin
+        (method url-fetch)
+        (uri (string-append "https://github.com/skeeto/endlessh/releases/"
+                            "download/" version "/endlessh-" version ".tar.xz"))
+        (sha256
+         (base32
+          "0hhsr65hzrcb7ylskmxyr92svzndhks8hqzn8hvg7f7j89rkvq5k"))))
+    (build-system gnu-build-system)
+    (arguments
+     '(#:make-flags (list (string-append "PREFIX=" (assoc-ref %outputs "out"))
+                          "CC=gcc")
+       #:tests? #f ; no test target
+       #:phases
+       (modify-phases %standard-phases
+         (delete 'configure)))) ; no configure script
+    (home-page "https://github.com/skeeto/endlessh")
+    (synopsis "SSH tarpit that slowly sends an endless banner")
+    (description
+     "Endlessh is an SSH tarpit that very slowly sends an endless, random SSH
+banner.  It keeps SSH clients locked up for hours or even days at a time.  The
+purpose is to put your real SSH server on another port and then let the script
+kiddies get stuck in this tarpit instead of bothering a real server.
+
+Since the tarpit is in the banner before any cryptographic exchange occurs, this
+program doesn't depend on any cryptographic libraries.  It's a simple,
+single-threaded, standalone C program.  It uses @code{poll()} to trap multiple
+clients at a time.")
+    (license license:unlicense)))