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