gnu: guix: Update to 0.10.0.
[jackhill/guix/guix.git] / gnu / packages / mit-krb5.scm
1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2012, 2013 Andreas Enge <andreas@enge.fr>
3 ;;; Copyright © 2015, 2016 Mark H Weaver <mhw@netris.org>
4 ;;;
5 ;;; This file is part of GNU Guix.
6 ;;;
7 ;;; GNU Guix is free software; you can redistribute it and/or modify it
8 ;;; under the terms of the GNU General Public License as published by
9 ;;; the Free Software Foundation; either version 3 of the License, or (at
10 ;;; your option) any later version.
11 ;;;
12 ;;; GNU Guix is distributed in the hope that it will be useful, but
13 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
14 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 ;;; GNU General Public License for more details.
16 ;;;
17 ;;; You should have received a copy of the GNU General Public License
18 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
19
20 (define-module (gnu packages mit-krb5)
21 #:use-module (gnu packages)
22 #:use-module (gnu packages bison)
23 #:use-module (gnu packages perl)
24 #:use-module (guix licenses)
25 #:use-module (guix packages)
26 #:use-module (guix download)
27 #:use-module (guix utils)
28 #:use-module (guix build-system gnu))
29
30 (define-public mit-krb5
31 (package
32 (name "mit-krb5")
33 (version "1.13.3")
34 (source (origin
35 (method url-fetch)
36 (uri (string-append "http://web.mit.edu/kerberos/dist/krb5/"
37 (version-major+minor version)
38 "/krb5-" version ".tar.gz"))
39 (sha256
40 (base32
41 "1gpscn78lv48dxccxq9ncyj53w9l2a15xmngjfa1wylvmn7g0jjx"))
42 (patches
43 (map search-patch '("mit-krb5-init-context-null-spnego.patch"
44 "mit-krb5-CVE-2015-8629.patch"
45 "mit-krb5-CVE-2015-8630.patch"
46 "mit-krb5-CVE-2015-8631.patch")))))
47 (build-system gnu-build-system)
48 (native-inputs
49 `(("bison" ,bison)
50 ("perl" ,perl)))
51 (arguments
52 `(#:phases
53 (modify-phases %standard-phases
54 (add-after 'unpack 'enter-source-directory
55 (lambda _
56 (chdir "src")
57 #t))
58 (add-before 'check 'pre-check
59 (lambda* (#:key inputs #:allow-other-keys)
60 (let ((perl (assoc-ref inputs "perl")))
61 (substitute* "plugins/kdb/db2/libdb2/test/run.test"
62 (("/bin/cat") (string-append perl "/bin/perl"))
63 (("D/bin/sh") (string-append "D" (which "bash")))
64 (("bindir=/bin/.") (string-append "bindir=" perl "/bin"))))
65
66 ;; avoid service names since /etc/services is unavailable
67 (substitute* "tests/resolve/Makefile"
68 (("-p telnet") "-p 23"))
69 #t)))))
70 (synopsis "MIT Kerberos 5")
71 (description
72 "Massachusetts Institute of Technology implementation of Kerberos.
73 Kerberos is a network authentication protocol designed to provide strong
74 authentication for client/server applications by using secret-key
75 cryptography.")
76 (license (non-copyleft "file://NOTICE"
77 "See NOTICE in the distribution."))
78 (home-page "http://web.mit.edu/kerberos/")))