Merge remote-tracking branch 'origin/master' into staging
[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, 2017 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 ;;; Copyright © 2017 Ricardo Wurmus <rekado@elephly.net>
9 ;;; Copyright © 2018 Tobias Geerinckx-Rice <me@tobias.gr>
10 ;;; Copyright © 2017 Alex Vong <alexvong1995@gmail.com>
11 ;;;
12 ;;; This file is part of GNU Guix.
13 ;;;
14 ;;; GNU Guix is free software; you can redistribute it and/or modify it
15 ;;; under the terms of the GNU General Public License as published by
16 ;;; the Free Software Foundation; either version 3 of the License, or (at
17 ;;; your option) any later version.
18 ;;;
19 ;;; GNU Guix is distributed in the hope that it will be useful, but
20 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
21 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22 ;;; GNU General Public License for more details.
23 ;;;
24 ;;; You should have received a copy of the GNU General Public License
25 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
26
27 (define-module (gnu packages kerberos)
28 #:use-module (gnu packages)
29 #:use-module (gnu packages autotools)
30 #:use-module (gnu packages bison)
31 #:use-module (gnu packages perl)
32 #:use-module (gnu packages gettext)
33 #:use-module (gnu packages gnupg)
34 #:use-module (gnu packages libidn)
35 #:use-module (gnu packages linux)
36 #:use-module (gnu packages pkg-config)
37 #:use-module (gnu packages compression)
38 #:use-module (gnu packages databases)
39 #:use-module (gnu packages readline)
40 #:use-module (gnu packages texinfo)
41 #:use-module (gnu packages tls)
42 #:use-module ((guix licenses) #:prefix license:)
43 #:use-module (guix packages)
44 #:use-module (guix download)
45 #:use-module (guix utils)
46 #:use-module (guix build-system gnu))
47
48 (define-public mit-krb5
49 (package
50 (name "mit-krb5")
51 (version "1.16.2")
52 (source (origin
53 (method url-fetch)
54 (uri (list
55 (string-append "https://web.mit.edu/kerberos/dist/krb5/"
56 (version-major+minor version)
57 "/krb5-" version ".tar.gz")
58 (string-append "https://kerberos.org/dist/krb5/"
59 (version-major+minor version)
60 "/krb5-" version ".tar.gz")))
61 (sha256
62 (base32
63 "09zhhzj19bmjjxsvxdrysabql8n72kjivis08wbikhlkwlgiwwlz"))))
64 (build-system gnu-build-system)
65 (native-inputs
66 `(("bison" ,bison)
67 ("perl" ,perl)))
68 (arguments
69 `(;; XXX: On 32-bit systems, 'kdb5_util' hangs on an fcntl/F_SETLKW call
70 ;; while running the tests in 'src/tests'.
71 #:tests? ,(string=? (%current-system) "x86_64-linux")
72
73 #:phases
74 (modify-phases %standard-phases
75 (add-after 'unpack 'enter-source-directory
76 (lambda _
77 (chdir "src")
78 #t))
79 (add-before 'check 'pre-check
80 (lambda* (#:key inputs #:allow-other-keys)
81 (let ((perl (assoc-ref inputs "perl")))
82 (substitute* "plugins/kdb/db2/libdb2/test/run.test"
83 (("/bin/cat") (string-append perl "/bin/perl"))
84 (("D/bin/sh") (string-append "D" (which "sh")))
85 (("bindir=/bin/.") (string-append "bindir=" perl "/bin"))))
86
87 ;; avoid service names since /etc/services is unavailable
88 (substitute* "tests/resolve/Makefile"
89 (("-p telnet") "-p 23"))
90 #t)))))
91 (synopsis "MIT Kerberos 5")
92 (description
93 "Massachusetts Institute of Technology implementation of Kerberos.
94 Kerberos is a network authentication protocol designed to provide strong
95 authentication for client/server applications by using secret-key
96 cryptography.")
97 (license (license:non-copyleft "file://NOTICE"
98 "See NOTICE in the distribution."))
99 (home-page "http://web.mit.edu/kerberos/")
100 (properties '((cpe-name . "kerberos")))))
101
102 (define-public shishi
103 (package
104 (name "shishi")
105 (version "1.0.2")
106 (source
107 (origin
108 (method url-fetch)
109 (uri (string-append "mirror://gnu/shishi/shishi-"
110 version ".tar.gz"))
111 (patches (search-patches "shishi-fix-libgcrypt-detection.patch"))
112 (sha256
113 (base32
114 "032qf72cpjdfffq1yq54gz3ahgqf2ijca4vl31sfabmjzq9q370d"))))
115 (build-system gnu-build-system)
116 (arguments
117 '(;; This is required since we patch some of the build scripts.
118 ;; Remove for the next Shishi release after 1.0.2 or when
119 ;; removing 'shishi-fix-libgcrypt-detection.patch'.
120 #:configure-flags '("ac_cv_libgcrypt=yes" "--disable-static")))
121 (native-inputs `(("pkg-config" ,pkg-config)))
122 (inputs
123 `(("gnutls" ,gnutls)
124 ("libidn" ,libidn)
125 ("linux-pam" ,linux-pam-1.2)
126 ("zlib" ,zlib)
127 ("libgcrypt" ,libgcrypt)
128 ("libtasn1" ,libtasn1)))
129 (home-page "https://www.gnu.org/software/shishi/")
130 (synopsis "Implementation of the Kerberos 5 network security system")
131 (description
132 "GNU Shishi is a free implementation of the Kerberos 5 network security
133 system. It is used to allow non-secure network nodes to communicate in a
134 secure manner through client-server mutual authentication via tickets.")
135 (license license:gpl3+)))
136
137 (define-public heimdal
138 (package
139 (name "heimdal")
140 (version "7.5.0")
141 (source (origin
142 (method url-fetch)
143 (uri (string-append
144 "https://github.com/heimdal/heimdal/releases/download/"
145 "heimdal-" version "/" "heimdal-" version ".tar.gz"))
146 (sha256
147 (base32
148 "1bdc682in55ygrxmhncs7cf4s239apcblci3z8i80wnc1w1s18n5"))
149 (modules '((guix build utils)))
150 (snippet
151 '(begin
152 (substitute* "configure"
153 (("User=.*$") "User=Guix\n")
154 (("Host=.*$") "Host=GNU")
155 (("Date=.*$") "Date=2017\n"))
156 #t))))
157 (build-system gnu-build-system)
158 (arguments
159 '(#:configure-flags (list
160 ;; Avoid 7 MiB of .a files.
161 "--disable-static"
162
163 ;; Do not build libedit.
164 (string-append
165 "--with-readline-lib="
166 (assoc-ref %build-inputs "readline") "/lib")
167 (string-append
168 "--with-readline-include="
169 (assoc-ref %build-inputs "readline") "/include")
170
171 ;; Do not build sqlite.
172 (string-append
173 "--with-sqlite3="
174 (assoc-ref %build-inputs "sqlite")))
175
176 #:phases (modify-phases %standard-phases
177 (add-before 'configure 'pre-configure
178 (lambda _
179 (substitute* '("appl/afsutil/pagsh.c"
180 "tools/Makefile.in")
181 (("/bin/sh") (which "sh")))
182 #t))
183 (add-before 'check 'pre-check
184 (lambda _
185 ;; For 'getxxyyy-test'.
186 (setenv "USER" (passwd:name (getpwuid (getuid))))
187
188 ;; Skip 'db' and 'kdc' tests for now.
189 ;; FIXME: figure out why 'kdc' tests fail.
190 (with-output-to-file "tests/db/have-db.in"
191 (lambda ()
192 (format #t "#!~a~%exit 1~%" (which "sh"))))
193 #t)))
194 ;; Tests fail when run in parallel.
195 #:parallel-tests? #f))
196 (native-inputs `(("e2fsprogs" ,e2fsprogs) ;for 'compile_et'
197 ("texinfo" ,texinfo)
198 ("unzip" ,unzip))) ;for tests
199 (inputs `(("readline" ,readline)
200 ("bdb" ,bdb)
201 ("e2fsprogs" ,e2fsprogs) ;for libcom_err
202 ("sqlite" ,sqlite)))
203 (home-page "http://www.h5l.org/")
204 (synopsis "Kerberos 5 network authentication")
205 (description
206 "Heimdal is an implementation of Kerberos 5 network authentication
207 service.")
208 (license license:bsd-3)))