Merge branch 'master' into core-updates
[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 ;;;
10 ;;; This file is part of GNU Guix.
11 ;;;
12 ;;; GNU Guix is free software; you can redistribute it and/or modify it
13 ;;; under the terms of the GNU General Public License as published by
14 ;;; the Free Software Foundation; either version 3 of the License, or (at
15 ;;; your option) any later version.
16 ;;;
17 ;;; GNU Guix is distributed in the hope that it will be useful, but
18 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
19 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 ;;; GNU General Public License for more details.
21 ;;;
22 ;;; You should have received a copy of the GNU General Public License
23 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
24
25 (define-module (gnu packages kerberos)
26 #:use-module (gnu packages)
27 #:use-module (gnu packages autotools)
28 #:use-module (gnu packages bison)
29 #:use-module (gnu packages perl)
30 #:use-module (gnu packages gettext)
31 #:use-module (gnu packages gnupg)
32 #:use-module (gnu packages libidn)
33 #:use-module (gnu packages linux)
34 #:use-module (gnu packages pkg-config)
35 #:use-module (gnu packages compression)
36 #:use-module (gnu packages databases)
37 #:use-module (gnu packages readline)
38 #:use-module (gnu packages texinfo)
39 #:use-module (gnu packages tls)
40 #:use-module ((guix licenses) #:prefix license:)
41 #:use-module (guix packages)
42 #:use-module (guix download)
43 #:use-module (guix utils)
44 #:use-module (guix build-system gnu))
45
46 (define-public mit-krb5
47 (package
48 (name "mit-krb5")
49 (version "1.16")
50 (source (origin
51 (method url-fetch)
52 (uri (list
53 (string-append "https://web.mit.edu/kerberos/dist/krb5/"
54 (version-major+minor version)
55 "/krb5-" version ".tar.gz")
56 (string-append "https://kerberos.org/dist/krb5/"
57 (version-major+minor version)
58 "/krb5-" version ".tar.gz")))
59 (sha256
60 (base32
61 "024yjr15ij0qdnay0bcqfpclgfri0qa8iw4r5zdlryxhhdgi5szs"))))
62 (build-system gnu-build-system)
63 (native-inputs
64 `(("bison" ,bison)
65 ("perl" ,perl)))
66 (arguments
67 `(;; XXX: On 32-bit systems, 'kdb5_util' hangs on an fcntl/F_SETLKW call
68 ;; while running the tests in 'src/tests'.
69 #:tests? ,(string=? (%current-system) "x86_64-linux")
70
71 #:phases
72 (modify-phases %standard-phases
73 (add-after 'unpack 'enter-source-directory
74 (lambda _
75 (chdir "src")
76 #t))
77 (add-before 'check 'pre-check
78 (lambda* (#:key inputs #:allow-other-keys)
79 (let ((perl (assoc-ref inputs "perl")))
80 (substitute* "plugins/kdb/db2/libdb2/test/run.test"
81 (("/bin/cat") (string-append perl "/bin/perl"))
82 (("D/bin/sh") (string-append "D" (which "sh")))
83 (("bindir=/bin/.") (string-append "bindir=" perl "/bin"))))
84
85 ;; avoid service names since /etc/services is unavailable
86 (substitute* "tests/resolve/Makefile"
87 (("-p telnet") "-p 23"))
88 #t)))))
89 (synopsis "MIT Kerberos 5")
90 (description
91 "Massachusetts Institute of Technology implementation of Kerberos.
92 Kerberos is a network authentication protocol designed to provide strong
93 authentication for client/server applications by using secret-key
94 cryptography.")
95 (license (license:non-copyleft "file://NOTICE"
96 "See NOTICE in the distribution."))
97 (home-page "http://web.mit.edu/kerberos/")
98 (properties '((cpe-name . "kerberos")))))
99
100 (define-public shishi
101 (package
102 (name "shishi")
103 (version "1.0.2")
104 (source
105 (origin
106 (method url-fetch)
107 (uri (string-append "mirror://gnu/shishi/shishi-"
108 version ".tar.gz"))
109 (patches (search-patches "shishi-fix-libgcrypt-detection.patch"))
110 (sha256
111 (base32
112 "032qf72cpjdfffq1yq54gz3ahgqf2ijca4vl31sfabmjzq9q370d"))))
113 (build-system gnu-build-system)
114 (arguments
115 '(;; This is required since we patch some of the build scripts.
116 ;; Remove for the next Shishi release after 1.0.2 or when
117 ;; removing 'shishi-fix-libgcrypt-detection.patch'.
118 #:configure-flags '("ac_cv_libgcrypt=yes")))
119 (native-inputs `(("pkg-config" ,pkg-config)))
120 (inputs
121 `(("gnutls" ,gnutls)
122 ("libidn" ,libidn)
123 ("linux-pam" ,linux-pam-1.2)
124 ("zlib" ,zlib)
125 ("libgcrypt" ,libgcrypt)
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 (patches (search-patches "heimdal-CVE-2017-6594.patch"
147 "heimdal-CVE-2017-11103.patch"))
148 (modules '((guix build utils)))
149 (snippet
150 '(begin
151 (substitute* "configure"
152 (("User=.*$") "User=Guix\n")
153 (("Date=.*$") "Date=2017\n"))
154 #t))))
155 (build-system gnu-build-system)
156 (arguments
157 '(#:configure-flags (list
158 ;; Work around a linker error.
159 "CFLAGS=-pthread"
160
161 ;; Avoid 7 MiB of .a files.
162 "--disable-static"
163
164 ;; Do not build libedit.
165 (string-append
166 "--with-readline-lib="
167 (assoc-ref %build-inputs "readline") "/lib")
168 (string-append
169 "--with-readline-include="
170 (assoc-ref %build-inputs "readline") "/include"))
171
172 #:phases (modify-phases %standard-phases
173 (add-before 'check 'skip-tests
174 (lambda _
175 ;; The test simply runs 'ftp --version && ftp --help'
176 ;; but that fails in the chroot because 'ftp' tries to
177 ;; do a service lookup before printing the help/version.
178 (substitute* "appl/ftp/ftp/Makefile.in"
179 (("^CHECK_LOCAL =.*")
180 "CHECK_LOCAL = no-check-local\n"))
181 #t)))))
182 (native-inputs `(("e2fsprogs" ,e2fsprogs))) ;for 'compile_et'
183 (inputs `(("readline" ,readline)
184 ("bdb" ,bdb)
185 ("e2fsprogs" ,e2fsprogs))) ;for libcom_err
186 (home-page "http://www.h5l.org/")
187 (synopsis "Kerberos 5 network authentication")
188 (description
189 "Heimdal is an implementation of Kerberos 5 network authentication
190 service.")
191 (license license:bsd-3)))