gnu: shishi: Build with latest libgcrypt.
[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 ;;; 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.15.1")
50 (source (origin
51 (method url-fetch)
52 (uri (string-append "http://web.mit.edu/kerberos/dist/krb5/"
53 (version-major+minor version)
54 "/krb5-" version ".tar.gz"))
55 (sha256
56 (base32
57 "0igbi5d095c2hgpn2cixpc4q2ij8vgg2bx7yjfly5zfmvlqqhz23"))))
58 (build-system gnu-build-system)
59 (native-inputs
60 `(("bison" ,bison)
61 ("perl" ,perl)))
62 (arguments
63 `(;; XXX: On 32-bit systems, 'kdb5_util' hangs on an fcntl/F_SETLKW call
64 ;; while running the tests in 'src/tests'.
65 #:tests? ,(string=? (%current-system) "x86_64-linux")
66
67 #:phases
68 (modify-phases %standard-phases
69 (add-after 'unpack 'enter-source-directory
70 (lambda _
71 (chdir "src")
72 #t))
73 (add-before 'check 'pre-check
74 (lambda* (#:key inputs #:allow-other-keys)
75 (let ((perl (assoc-ref inputs "perl")))
76 (substitute* "plugins/kdb/db2/libdb2/test/run.test"
77 (("/bin/cat") (string-append perl "/bin/perl"))
78 (("D/bin/sh") (string-append "D" (which "sh")))
79 (("bindir=/bin/.") (string-append "bindir=" perl "/bin"))))
80
81 ;; avoid service names since /etc/services is unavailable
82 (substitute* "tests/resolve/Makefile"
83 (("-p telnet") "-p 23"))
84 #t)))))
85 (synopsis "MIT Kerberos 5")
86 (description
87 "Massachusetts Institute of Technology implementation of Kerberos.
88 Kerberos is a network authentication protocol designed to provide strong
89 authentication for client/server applications by using secret-key
90 cryptography.")
91 (license (license:non-copyleft "file://NOTICE"
92 "See NOTICE in the distribution."))
93 (home-page "http://web.mit.edu/kerberos/")))
94
95 (define-public shishi
96 (package
97 (name "shishi")
98 (version "1.0.2")
99 (source
100 (origin
101 (method url-fetch)
102 (uri (string-append "mirror://gnu/shishi/shishi-"
103 version ".tar.gz"))
104 (patches (search-patches "shishi-fix-libgcrypt-detection.patch"))
105 (sha256
106 (base32
107 "032qf72cpjdfffq1yq54gz3ahgqf2ijca4vl31sfabmjzq9q370d"))))
108 (build-system gnu-build-system)
109 (arguments
110 '(;; This is required since we patch some of the build scripts.
111 ;; Remove for the next Shishi release after 1.0.2 or when
112 ;; removing 'shishi-fix-libgcrypt-detection.patch'.
113 #:configure-flags '("ac_cv_libgcrypt=yes")))
114 (native-inputs `(("pkg-config" ,pkg-config)))
115 (inputs
116 `(("gnutls" ,gnutls)
117 ("libidn" ,libidn)
118 ("linux-pam" ,linux-pam-1.2)
119 ("zlib" ,zlib)
120 ("libgcrypt" ,libgcrypt)
121 ("libtasn1" ,libtasn1)))
122 (home-page "https://www.gnu.org/software/shishi/")
123 (synopsis "Implementation of the Kerberos 5 network security system")
124 (description
125 "GNU Shishi is a free implementation of the Kerberos 5 network security
126 system. It is used to allow non-secure network nodes to communicate in a
127 secure manner through client-server mutual authentication via tickets.")
128 (license license:gpl3+)))
129
130 (define-public heimdal
131 (package
132 (name "heimdal")
133 (version "1.5.3")
134 (source (origin
135 (method url-fetch)
136 (uri (string-append "http://www.h5l.org/dist/src/heimdal-"
137 version ".tar.gz"))
138 (sha256
139 (base32
140 "19gypf9vzfrs2bw231qljfl4cqc1riyg0ai0xmm1nd1wngnpphma"))
141 (modules '((guix build utils)))
142 (snippet
143 '(substitute* "configure"
144 (("User=.*$") "User=Guix\n")
145 (("Date=.*$") "Date=2017\n")))))
146 (build-system gnu-build-system)
147 (arguments
148 '(#:configure-flags (list
149 ;; Work around a linker error.
150 "CFLAGS=-pthread"
151
152 ;; Avoid 7 MiB of .a files.
153 "--disable-static"
154
155 ;; Do not build libedit.
156 (string-append
157 "--with-readline-lib="
158 (assoc-ref %build-inputs "readline") "/lib")
159 (string-append
160 "--with-readline-include="
161 (assoc-ref %build-inputs "readline") "/include"))
162
163 #:phases (modify-phases %standard-phases
164 (add-before 'check 'skip-tests
165 (lambda _
166 ;; The test simply runs 'ftp --version && ftp --help'
167 ;; but that fails in the chroot because 'ftp' tries to
168 ;; do a service lookup before printing the help/version.
169 (substitute* "appl/ftp/ftp/Makefile.in"
170 (("^CHECK_LOCAL =.*")
171 "CHECK_LOCAL = no-check-local\n"))
172 #t)))))
173 (native-inputs `(("e2fsprogs" ,e2fsprogs))) ;for 'compile_et'
174 (inputs `(("readline" ,readline)
175 ("bdb" ,bdb)
176 ("e2fsprogs" ,e2fsprogs))) ;for libcom_err
177 (home-page "http://www.h5l.org/")
178 (synopsis "Kerberos 5 network authentication")
179 (description
180 "Heimdal is an implementation of Kerberos 5 network authentication
181 service.")
182 (license license:bsd-3)))