diff options
Diffstat (limited to 'distro')
| -rw-r--r-- | distro/packages/lsh.scm | 125 | ||||
| -rw-r--r-- | distro/packages/patches/lsh-guile-compat.patch | 9 | ||||
| -rw-r--r-- | distro/packages/patches/lsh-no-root-login.patch | 16 | ||||
| -rw-r--r-- | distro/packages/patches/lsh-pam-service-name.patch | 14 |
4 files changed, 164 insertions, 0 deletions
diff --git a/distro/packages/lsh.scm b/distro/packages/lsh.scm new file mode 100644 index 00000000000..f6caf52caf8 --- /dev/null +++ b/distro/packages/lsh.scm | |||
| @@ -0,0 +1,125 @@ | |||
| 1 | ;;; Guix --- Nix package management from Guile. -*- coding: utf-8 -*- | ||
| 2 | ;;; Copyright (C) 2012 Ludovic Courtès <ludo@gnu.org> | ||
| 3 | ;;; | ||
| 4 | ;;; This file is part of Guix. | ||
| 5 | ;;; | ||
| 6 | ;;; Guix is free software; you can redistribute it and/or modify it | ||
| 7 | ;;; under the terms of the GNU General Public License as published by | ||
| 8 | ;;; the Free Software Foundation; either version 3 of the License, or (at | ||
| 9 | ;;; your option) any later version. | ||
| 10 | ;;; | ||
| 11 | ;;; Guix is distributed in the hope that it will be useful, but | ||
| 12 | ;;; WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 13 | ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 14 | ;;; GNU General Public License for more details. | ||
| 15 | ;;; | ||
| 16 | ;;; You should have received a copy of the GNU General Public License | ||
| 17 | ;;; along with Guix. If not, see <http://www.gnu.org/licenses/>. | ||
| 18 | |||
| 19 | (define-module (distro packages lsh) | ||
| 20 | #:use-module (guix packages) | ||
| 21 | #:use-module (guix download) | ||
| 22 | #:use-module (guix build-system gnu) | ||
| 23 | #:use-module (distro) | ||
| 24 | #:use-module (distro packages m4) | ||
| 25 | #:use-module (distro packages linux) | ||
| 26 | #:use-module (distro packages compression) | ||
| 27 | #:use-module (distro packages multiprecision) | ||
| 28 | #:use-module (distro packages readline) | ||
| 29 | #:use-module (distro packages gperf) | ||
| 30 | #:use-module (distro packages base)) | ||
| 31 | |||
| 32 | (define-public liboop | ||
| 33 | (package | ||
| 34 | (name "liboop") | ||
| 35 | (version "1.0") | ||
| 36 | (source | ||
| 37 | (origin | ||
| 38 | (method url-fetch) | ||
| 39 | (uri (string-append "http://download.ofb.net/liboop/liboop-" | ||
| 40 | version ".tar.gz")) | ||
| 41 | (sha256 | ||
| 42 | (base32 | ||
| 43 | "0z6rlalhvfca64jpvksppc9bdhs7jwhiw4y35g5ibvh91xp3rn1l")))) | ||
| 44 | (build-system gnu-build-system) | ||
| 45 | (home-page "http://liboop.ofb.net/") | ||
| 46 | (synopsis "`liboop', an event loop library") | ||
| 47 | (description "liboop is an event loop library.") | ||
| 48 | (license "LGPLv2.1+"))) | ||
| 49 | |||
| 50 | (define-public lsh | ||
| 51 | (package | ||
| 52 | (name "lsh") | ||
| 53 | (version "2.0.4") | ||
| 54 | (source | ||
| 55 | (origin | ||
| 56 | (method url-fetch) | ||
| 57 | (uri (string-append "mirror://gnu/lsh/lsh-" | ||
| 58 | version ".tar.gz")) | ||
| 59 | (sha256 | ||
| 60 | (base32 | ||
| 61 | "149hf49xcj99wwvi7hcb59igq4vpyv8har1br1if3lrsw5irsjv1")))) | ||
| 62 | (build-system gnu-build-system) | ||
| 63 | (inputs | ||
| 64 | `(("linux-pam" ,linux-pam) | ||
| 65 | ("m4" ,m4) | ||
| 66 | ("readline" ,readline) | ||
| 67 | ("liboop" ,liboop) | ||
| 68 | ("zlib" ,zlib) | ||
| 69 | ("gmp" ,gmp) | ||
| 70 | ("guile" ,guile-final) | ||
| 71 | ("gperf" ,gperf) | ||
| 72 | ("psmisc" ,psmisc) ; for `killall' | ||
| 73 | |||
| 74 | ("patch/no-root-login" ,(search-patch "lsh-no-root-login.patch")) | ||
| 75 | ("patch/guile-compat" ,(search-patch "lsh-guile-compat.patch")) | ||
| 76 | ("patch/pam-service-name" | ||
| 77 | ,(search-patch "lsh-pam-service-name.patch")))) | ||
| 78 | (arguments | ||
| 79 | '(#:patches (list (assoc-ref %build-inputs "patch/no-root-login") | ||
| 80 | (assoc-ref %build-inputs "patch/pam-service-name") | ||
| 81 | (assoc-ref %build-inputs "patch/guile-compat")) | ||
| 82 | |||
| 83 | ;; Skip the `configure' test that checks whether /dev/ptmx & | ||
| 84 | ;; co. work as expected, because it relies on impurities (for | ||
| 85 | ;; instance, /dev/pts may be unavailable in chroots.) | ||
| 86 | #:configure-flags '("lsh_cv_sys_unix98_ptys=yes") | ||
| 87 | |||
| 88 | ;; FIXME: Tests won't run in a chroot, presumably because | ||
| 89 | ;; /etc/profile is missing, and thus clients get an empty $PATH | ||
| 90 | ;; and nothing works. | ||
| 91 | #:tests? #f | ||
| 92 | |||
| 93 | #:phases | ||
| 94 | (alist-cons-before | ||
| 95 | 'configure 'fix-test-suite | ||
| 96 | (lambda _ | ||
| 97 | ;; Tests rely on $USER being set. | ||
| 98 | (setenv "USER" "guix") | ||
| 99 | |||
| 100 | (substitute* "src/testsuite/functions.sh" | ||
| 101 | (("localhost") | ||
| 102 | ;; Avoid host name lookups since they don't work in chroot | ||
| 103 | ;; builds. | ||
| 104 | "127.0.0.1") | ||
| 105 | (("set -e") | ||
| 106 | ;; Make tests more verbose. | ||
| 107 | "set -e\nset -x")) | ||
| 108 | |||
| 109 | (substitute* (find-files "src/testsuite" "-test$") | ||
| 110 | (("localhost") "127.0.0.1")) | ||
| 111 | |||
| 112 | (substitute* "src/testsuite/login-auth-test" | ||
| 113 | (("/bin/cat") | ||
| 114 | ;; Use the right path to `cat'. | ||
| 115 | (search-path (search-path-as-string->list (getenv "PATH")) | ||
| 116 | "cat")))) | ||
| 117 | %standard-phases))) | ||
| 118 | (home-page "http://www.lysator.liu.se/~nisse/lsh/") | ||
| 119 | (synopsis | ||
| 120 | "GNU lsh, a GPL'd implementation of the SSH protocol") | ||
| 121 | (description | ||
| 122 | "lsh is a free implementation (in the GNU sense) of the ssh | ||
| 123 | version 2 protocol, currently being standardised by the IETF | ||
| 124 | SECSH working group.") | ||
| 125 | (license "GPLv2+"))) | ||
diff --git a/distro/packages/patches/lsh-guile-compat.patch b/distro/packages/patches/lsh-guile-compat.patch new file mode 100644 index 00000000000..0fe0484580d --- /dev/null +++ b/distro/packages/patches/lsh-guile-compat.patch | |||
| @@ -0,0 +1,9 @@ | |||
| 1 | Use (ice-9 rdelim) for `read-line'. | ||
| 2 | |||
| 3 | --- lsh-2.0.4/src/scm/guile-compat.scm 2012-12-03 23:28:01.000000000 +0100 | ||
| 4 | +++ lsh-2.0.4/src/scm/guile-compat.scm 2012-12-03 23:28:04.000000000 +0100 | ||
| 5 | @@ -21,3 +21,4 @@ | ||
| 6 | ;; Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
| 7 | |||
| 8 | (use-syntax (ice-9 syncase)) | ||
| 9 | +(use-modules (ice-9 rdelim)) | ||
diff --git a/distro/packages/patches/lsh-no-root-login.patch b/distro/packages/patches/lsh-no-root-login.patch new file mode 100644 index 00000000000..9dd81de3fbc --- /dev/null +++ b/distro/packages/patches/lsh-no-root-login.patch | |||
| @@ -0,0 +1,16 @@ | |||
| 1 | Correctly handle the `--no-root-login' option. | ||
| 2 | |||
| 3 | --- lsh-2.0.4/src/lshd.c 2006-05-01 13:47:44.000000000 +0200 | ||
| 4 | +++ lsh-2.0.4/src/lshd.c 2009-09-08 12:20:36.000000000 +0200 | ||
| 5 | @@ -758,6 +758,10 @@ main_argp_parser(int key, char *arg, str | ||
| 6 | self->allow_root = 1; | ||
| 7 | break; | ||
| 8 | |||
| 9 | + case OPT_NO_ROOT_LOGIN: | ||
| 10 | + self->allow_root = 0; | ||
| 11 | + break; | ||
| 12 | + | ||
| 13 | case OPT_KERBEROS_PASSWD: | ||
| 14 | self->pw_helper = PATH_KERBEROS_HELPER; | ||
| 15 | break; | ||
| 16 | |||
diff --git a/distro/packages/patches/lsh-pam-service-name.patch b/distro/packages/patches/lsh-pam-service-name.patch new file mode 100644 index 00000000000..6a6156855c5 --- /dev/null +++ b/distro/packages/patches/lsh-pam-service-name.patch | |||
| @@ -0,0 +1,14 @@ | |||
| 1 | Tell `lsh-pam-checkpw', the PAM password helper program, to use a more | ||
| 2 | descriptive service name. | ||
| 3 | |||
| 4 | --- lsh-2.0.4/src/lsh-pam-checkpw.c 2003-02-16 22:30:10.000000000 +0100 | ||
| 5 | +++ lsh-2.0.4/src/lsh-pam-checkpw.c 2008-11-28 16:16:58.000000000 +0100 | ||
| 6 | @@ -38,7 +38,7 @@ | ||
| 7 | #include <security/pam_appl.h> | ||
| 8 | |||
| 9 | #define PWD_MAXLEN 1024 | ||
| 10 | -#define SERVICE_NAME "other" | ||
| 11 | +#define SERVICE_NAME "lshd" | ||
| 12 | #define TIMEOUT 600 | ||
| 13 | |||
| 14 | static int | ||
