gnu: Move sqlite to separate module.
[jackhill/guix/guix.git] / gnu / packages / kerberos.scm
CommitLineData
233e7676 1;;; GNU Guix --- Functional package management for GNU
079fca3b 2;;; Copyright © 2012, 2013 Andreas Enge <andreas@enge.fr>
89e34644 3;;; Copyright © 2014, 2015, 2016 Mark H Weaver <mhw@netris.org>
719f3534 4;;; Copyright © 2016, 2017 Leo Famulari <leo@famulari.name>
a007d699 5;;; Copyright © 2016 Efraim Flashner <efraim@flashner.co.il>
89e34644 6;;; Copyright © 2012, 2013 Nikita Karetnikov <nikita@karetnikov.org>
67fee545 7;;; Copyright © 2012, 2017 Ludovic Courtès <ludo@gnu.org>
3154e202 8;;; Copyright © 2017 Ricardo Wurmus <rekado@elephly.net>
5ccd6e2b 9;;; Copyright © 2018 Tobias Geerinckx-Rice <me@tobias.gr>
09b21b77 10;;; Copyright © 2017 Alex Vong <alexvong1995@gmail.com>
9dc6f288 11;;;
233e7676 12;;; This file is part of GNU Guix.
9dc6f288 13;;;
233e7676 14;;; GNU Guix is free software; you can redistribute it and/or modify it
9dc6f288
AE
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;;;
233e7676 19;;; GNU Guix is distributed in the hope that it will be useful, but
9dc6f288
AE
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
233e7676 25;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
9dc6f288 26
89e34644 27(define-module (gnu packages kerberos)
59a43334 28 #:use-module (gnu packages)
1abc08a8 29 #:use-module (gnu packages autotools)
1ffa7090 30 #:use-module (gnu packages bison)
cd0322a3 31 #:use-module (gnu packages databases)
1ffa7090 32 #:use-module (gnu packages perl)
1abc08a8 33 #:use-module (gnu packages gettext)
89e34644
LC
34 #:use-module (gnu packages gnupg)
35 #:use-module (gnu packages libidn)
36 #:use-module (gnu packages linux)
37 #:use-module (gnu packages pkg-config)
38 #:use-module (gnu packages compression)
67fee545 39 #:use-module (gnu packages readline)
cd0322a3 40 #:use-module (gnu packages sqlite)
1abc08a8 41 #:use-module (gnu packages texinfo)
89e34644
LC
42 #:use-module (gnu packages tls)
43 #:use-module ((guix licenses) #:prefix license:)
9dc6f288
AE
44 #:use-module (guix packages)
45 #:use-module (guix download)
4d53c29e 46 #:use-module (guix utils)
9dc6f288
AE
47 #:use-module (guix build-system gnu))
48
49(define-public mit-krb5
50 (package
df8a09c7 51 (name "mit-krb5")
5ccd6e2b 52 (version "1.16.1")
df8a09c7
LC
53 (source (origin
54 (method url-fetch)
6ac46bfa
MB
55 (uri (list
56 (string-append "https://web.mit.edu/kerberos/dist/krb5/"
57 (version-major+minor version)
58 "/krb5-" version ".tar.gz")
59 (string-append "https://kerberos.org/dist/krb5/"
60 (version-major+minor version)
61 "/krb5-" version ".tar.gz")))
16114c34
MW
62 (sha256
63 (base32
5ccd6e2b 64 "05qis9l93hhxaknbp0a2v5cr24fsy52fqx20aqqcgl1s9qwzwkr1"))))
df8a09c7
LC
65 (build-system gnu-build-system)
66 (native-inputs
9715df7f 67 `(("bison" ,bison)
16114c34 68 ("perl" ,perl)))
df8a09c7 69 (arguments
9269ce49 70 `(;; XXX: On 32-bit systems, 'kdb5_util' hangs on an fcntl/F_SETLKW call
d2375c43
LC
71 ;; while running the tests in 'src/tests'.
72 #:tests? ,(string=? (%current-system) "x86_64-linux")
d9ecec9b 73
a083b5cb 74 #:phases
4d53c29e 75 (modify-phases %standard-phases
16114c34 76 (add-after 'unpack 'enter-source-directory
4d53c29e
MW
77 (lambda _
78 (chdir "src")
79 #t))
4d53c29e
MW
80 (add-before 'check 'pre-check
81 (lambda* (#:key inputs #:allow-other-keys)
82 (let ((perl (assoc-ref inputs "perl")))
83 (substitute* "plugins/kdb/db2/libdb2/test/run.test"
84 (("/bin/cat") (string-append perl "/bin/perl"))
58ea4d40 85 (("D/bin/sh") (string-append "D" (which "sh")))
4d53c29e
MW
86 (("bindir=/bin/.") (string-append "bindir=" perl "/bin"))))
87
88 ;; avoid service names since /etc/services is unavailable
df8a09c7
LC
89 (substitute* "tests/resolve/Makefile"
90 (("-p telnet") "-p 23"))
4d53c29e 91 #t)))))
df8a09c7
LC
92 (synopsis "MIT Kerberos 5")
93 (description
94 "Massachusetts Institute of Technology implementation of Kerberos.
9dc6f288 95Kerberos is a network authentication protocol designed to provide strong
e881752c
AK
96authentication for client/server applications by using secret-key
97cryptography.")
89e34644
LC
98 (license (license:non-copyleft "file://NOTICE"
99 "See NOTICE in the distribution."))
5e578674
TGR
100 (home-page "http://web.mit.edu/kerberos/")
101 (properties '((cpe-name . "kerberos")))))
89e34644
LC
102
103(define-public shishi
104 (package
105 (name "shishi")
106 (version "1.0.2")
107 (source
108 (origin
109 (method url-fetch)
110 (uri (string-append "mirror://gnu/shishi/shishi-"
111 version ".tar.gz"))
1abc08a8 112 (patches (search-patches "shishi-fix-libgcrypt-detection.patch"))
89e34644
LC
113 (sha256
114 (base32
115 "032qf72cpjdfffq1yq54gz3ahgqf2ijca4vl31sfabmjzq9q370d"))))
116 (build-system gnu-build-system)
1abc08a8
LF
117 (arguments
118 '(;; This is required since we patch some of the build scripts.
119 ;; Remove for the next Shishi release after 1.0.2 or when
120 ;; removing 'shishi-fix-libgcrypt-detection.patch'.
a44426ee 121 #:configure-flags '("ac_cv_libgcrypt=yes" "--disable-static")))
89e34644
LC
122 (native-inputs `(("pkg-config" ,pkg-config)))
123 (inputs
124 `(("gnutls" ,gnutls)
125 ("libidn" ,libidn)
126 ("linux-pam" ,linux-pam-1.2)
127 ("zlib" ,zlib)
1abc08a8 128 ("libgcrypt" ,libgcrypt)
89e34644 129 ("libtasn1" ,libtasn1)))
6fd52309 130 (home-page "https://www.gnu.org/software/shishi/")
89e34644
LC
131 (synopsis "Implementation of the Kerberos 5 network security system")
132 (description
133 "GNU Shishi is a free implementation of the Kerberos 5 network security
134system. It is used to allow non-secure network nodes to communicate in a
135secure manner through client-server mutual authentication via tickets.")
136 (license license:gpl3+)))
67fee545
LC
137
138(define-public heimdal
139 (package
140 (name "heimdal")
09b21b77 141 (version "7.5.0")
67fee545
LC
142 (source (origin
143 (method url-fetch)
09b21b77
AV
144 (uri (string-append
145 "https://github.com/heimdal/heimdal/releases/download/"
146 "heimdal-" version "/" "heimdal-" version ".tar.gz"))
67fee545
LC
147 (sha256
148 (base32
09b21b77 149 "1bdc682in55ygrxmhncs7cf4s239apcblci3z8i80wnc1w1s18n5"))
67fee545
LC
150 (modules '((guix build utils)))
151 (snippet
6cbee49d
MW
152 '(begin
153 (substitute* "configure"
154 (("User=.*$") "User=Guix\n")
09b21b77 155 (("Host=.*$") "Host=GNU")
6cbee49d
MW
156 (("Date=.*$") "Date=2017\n"))
157 #t))))
67fee545
LC
158 (build-system gnu-build-system)
159 (arguments
160 '(#:configure-flags (list
67fee545
LC
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="
09b21b77
AV
170 (assoc-ref %build-inputs "readline") "/include")
171
172 ;; Do not build sqlite.
173 (string-append
174 "--with-sqlite3="
175 (assoc-ref %build-inputs "sqlite")))
67fee545
LC
176
177 #:phases (modify-phases %standard-phases
09b21b77 178 (add-before 'configure 'pre-configure
67fee545 179 (lambda _
09b21b77
AV
180 (substitute* '("appl/afsutil/pagsh.c"
181 "tools/Makefile.in")
182 (("/bin/sh") (which "sh")))
183 #t))
184 (add-before 'check 'pre-check
185 (lambda _
186 ;; For 'getxxyyy-test'.
187 (setenv "USER" (passwd:name (getpwuid (getuid))))
188
189 ;; Skip 'db' and 'kdc' tests for now.
190 ;; FIXME: figure out why 'kdc' tests fail.
191 (with-output-to-file "tests/db/have-db.in"
192 (lambda ()
193 (format #t "#!~a~%exit 1~%" (which "sh"))))
194 #t)))
195 ;; Tests fail when run in parallel.
196 #:parallel-tests? #f))
197 (native-inputs `(("e2fsprogs" ,e2fsprogs) ;for 'compile_et'
198 ("texinfo" ,texinfo)
199 ("unzip" ,unzip))) ;for tests
67fee545
LC
200 (inputs `(("readline" ,readline)
201 ("bdb" ,bdb)
09b21b77
AV
202 ("e2fsprogs" ,e2fsprogs) ;for libcom_err
203 ("sqlite" ,sqlite)))
67fee545
LC
204 (home-page "http://www.h5l.org/")
205 (synopsis "Kerberos 5 network authentication")
206 (description
207 "Heimdal is an implementation of Kerberos 5 network authentication
208service.")
209 (license license:bsd-3)))