gnu: Use HTTPS for almost all gnu.org HOME-PAGEs.
[jackhill/guix/guix.git] / gnu / packages / kerberos.scm
1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2012, 2013 Andreas Enge <andreas@enge.fr>
3 ;;; Copyright © 2014, 2015, 2016 Mark H Weaver <mhw@netris.org>
4 ;;; Copyright © 2016 Leo Famulari <leo@famulari.name>
5 ;;; Copyright © 2016 Efraim Flashner <efraim@flashner.co.il>
6 ;;; Copyright © 2012, 2013 Nikita Karetnikov <nikita@karetnikov.org>
7 ;;; Copyright © 2012, 2017 Ludovic Courtès <ludo@gnu.org>
8 ;;;
9 ;;; This file is part of GNU Guix.
10 ;;;
11 ;;; GNU Guix is free software; you can redistribute it and/or modify it
12 ;;; under the terms of the GNU General Public License as published by
13 ;;; the Free Software Foundation; either version 3 of the License, or (at
14 ;;; your option) any later version.
15 ;;;
16 ;;; GNU Guix is distributed in the hope that it will be useful, but
17 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
18 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 ;;; GNU General Public License for more details.
20 ;;;
21 ;;; You should have received a copy of the GNU General Public License
22 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
23
24 (define-module (gnu packages kerberos)
25 #:use-module (gnu packages)
26 #:use-module (gnu packages bison)
27 #:use-module (gnu packages perl)
28 #:use-module (gnu packages gnupg)
29 #:use-module (gnu packages libidn)
30 #:use-module (gnu packages linux)
31 #:use-module (gnu packages pkg-config)
32 #:use-module (gnu packages compression)
33 #:use-module (gnu packages databases)
34 #:use-module (gnu packages readline)
35 #:use-module (gnu packages tls)
36 #:use-module ((guix licenses) #:prefix license:)
37 #:use-module (guix packages)
38 #:use-module (guix download)
39 #:use-module (guix utils)
40 #:use-module (guix build-system gnu))
41
42 (define-public mit-krb5
43 (package
44 (name "mit-krb5")
45 (version "1.14.3")
46 (source (origin
47 (method url-fetch)
48 (uri (string-append "http://web.mit.edu/kerberos/dist/krb5/"
49 (version-major+minor version)
50 "/krb5-" version ".tar.gz"))
51 (sha256
52 (base32
53 "1jgjiyh1sp72lkxvk437lz5hzcibvw99jc4ihzfz03fg43aj0ind"))))
54 (build-system gnu-build-system)
55 (native-inputs
56 `(("bison" ,bison)
57 ("perl" ,perl)))
58 (arguments
59 `(;; Work around "No rule to make target '../../include/gssapi/gssapi.h',
60 ;; needed by 'authgss_prot.so'."
61 #:parallel-build? #f
62
63 ;; Likewise with tests.
64 #:parallel-tests? #f
65
66 ;; XXX: On 32-bit systems, 'kdb5_util' hangs on an fcntl/F_SETLKW call
67 ;; while running the tests in 'src/tests'.
68 #:tests? ,(string=? (%current-system) "x86_64-linux")
69
70 #:phases
71 (modify-phases %standard-phases
72 (add-after 'unpack 'enter-source-directory
73 (lambda _
74 (chdir "src")
75 #t))
76 (add-before 'check 'pre-check
77 (lambda* (#:key inputs #:allow-other-keys)
78 (let ((perl (assoc-ref inputs "perl")))
79 (substitute* "plugins/kdb/db2/libdb2/test/run.test"
80 (("/bin/cat") (string-append perl "/bin/perl"))
81 (("D/bin/sh") (string-append "D" (which "bash")))
82 (("bindir=/bin/.") (string-append "bindir=" perl "/bin"))))
83
84 ;; avoid service names since /etc/services is unavailable
85 (substitute* "tests/resolve/Makefile"
86 (("-p telnet") "-p 23"))
87 #t)))))
88 (synopsis "MIT Kerberos 5")
89 (description
90 "Massachusetts Institute of Technology implementation of Kerberos.
91 Kerberos is a network authentication protocol designed to provide strong
92 authentication for client/server applications by using secret-key
93 cryptography.")
94 (license (license:non-copyleft "file://NOTICE"
95 "See NOTICE in the distribution."))
96 (home-page "http://web.mit.edu/kerberos/")))
97
98 (define-public shishi
99 (package
100 (name "shishi")
101 (version "1.0.2")
102 (source
103 (origin
104 (method url-fetch)
105 (uri (string-append "mirror://gnu/shishi/shishi-"
106 version ".tar.gz"))
107 (sha256
108 (base32
109 "032qf72cpjdfffq1yq54gz3ahgqf2ijca4vl31sfabmjzq9q370d"))))
110 (build-system gnu-build-system)
111 (native-inputs `(("pkg-config" ,pkg-config)))
112 (inputs
113 `(("gnutls" ,gnutls)
114 ("libidn" ,libidn)
115 ("linux-pam" ,linux-pam-1.2)
116 ("zlib" ,zlib)
117 ;; libgcrypt 1.6 fails because of the following test:
118 ;; #include <gcrypt.h>
119 ;; /* GCRY_MODULE_ID_USER was added in 1.4.4 and gc-libgcrypt.c
120 ;; will fail on startup if we don't have 1.4.4 or later, so
121 ;; test for it early. */
122 ;; #if !defined GCRY_MODULE_ID_USER
123 ;; error too old libgcrypt
124 ;; #endif
125 ("libgcrypt" ,libgcrypt-1.5)
126 ("libtasn1" ,libtasn1)))
127 (home-page "https://www.gnu.org/software/shishi/")
128 (synopsis "Implementation of the Kerberos 5 network security system")
129 (description
130 "GNU Shishi is a free implementation of the Kerberos 5 network security
131 system. It is used to allow non-secure network nodes to communicate in a
132 secure manner through client-server mutual authentication via tickets.")
133 (license license:gpl3+)))
134
135 (define-public heimdal
136 (package
137 (name "heimdal")
138 (version "1.5.3")
139 (source (origin
140 (method url-fetch)
141 (uri (string-append "http://www.h5l.org/dist/src/heimdal-"
142 version ".tar.gz"))
143 (sha256
144 (base32
145 "19gypf9vzfrs2bw231qljfl4cqc1riyg0ai0xmm1nd1wngnpphma"))
146 (modules '((guix build utils)))
147 (snippet
148 '(substitute* "configure"
149 (("User=.*$") "User=Guix\n")
150 (("Date=.*$") "Date=2017\n")))))
151 (build-system gnu-build-system)
152 (arguments
153 '(#:configure-flags (list
154 ;; Work around a linker error.
155 "CFLAGS=-pthread"
156
157 ;; Avoid 7 MiB of .a files.
158 "--disable-static"
159
160 ;; Do not build libedit.
161 (string-append
162 "--with-readline-lib="
163 (assoc-ref %build-inputs "readline") "/lib")
164 (string-append
165 "--with-readline-include="
166 (assoc-ref %build-inputs "readline") "/include"))
167
168 #:phases (modify-phases %standard-phases
169 (add-before 'check 'skip-tests
170 (lambda _
171 ;; The test simply runs 'ftp --version && ftp --help'
172 ;; but that fails in the chroot because 'ftp' tries to
173 ;; do a service lookup before printing the help/version.
174 (substitute* "appl/ftp/ftp/Makefile.in"
175 (("^CHECK_LOCAL =.*")
176 "CHECK_LOCAL = no-check-local\n"))
177 #t)))))
178 (native-inputs `(("e2fsprogs" ,e2fsprogs))) ;for 'compile_et'
179 (inputs `(("readline" ,readline)
180 ("bdb" ,bdb)
181 ("e2fsprogs" ,e2fsprogs))) ;for libcom_err
182 (home-page "http://www.h5l.org/")
183 (synopsis "Kerberos 5 network authentication")
184 (description
185 "Heimdal is an implementation of Kerberos 5 network authentication
186 service.")
187 (license license:bsd-3)))