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 © 2018 Tobias Geerinckx-Rice <me@tobias.gr>
10 ;;; Copyright © 2017 Alex Vong <alexvong1995@gmail.com>
12 ;;; This file is part of GNU Guix.
14 ;;; GNU Guix is free software; you can redistribute it and/or modify it
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.
19 ;;; GNU Guix is distributed in the hope that it will be useful, but
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.
24 ;;; You should have received a copy of the GNU General Public License
25 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
27 (define-module (gnu packages kerberos)
28 #:use-module (gnu packages)
29 #:use-module (gnu packages autotools)
30 #:use-module (gnu packages bison)
31 #:use-module (gnu packages perl)
32 #:use-module (gnu packages gettext)
33 #:use-module (gnu packages gnupg)
34 #:use-module (gnu packages libidn)
35 #:use-module (gnu packages linux)
36 #:use-module (gnu packages pkg-config)
37 #:use-module (gnu packages compression)
38 #:use-module (gnu packages databases)
39 #:use-module (gnu packages readline)
40 #:use-module (gnu packages texinfo)
41 #:use-module (gnu packages tls)
42 #:use-module ((guix licenses) #:prefix license:)
43 #:use-module (guix packages)
44 #:use-module (guix download)
45 #:use-module (guix utils)
46 #:use-module (guix build-system gnu))
48 (define-public mit-krb5
55 (string-append "https://web.mit.edu/kerberos/dist/krb5/"
56 (version-major+minor version)
57 "/krb5-" version ".tar.gz")
58 (string-append "https://kerberos.org/dist/krb5/"
59 (version-major+minor version)
60 "/krb5-" version ".tar.gz")))
63 "09zhhzj19bmjjxsvxdrysabql8n72kjivis08wbikhlkwlgiwwlz"))))
64 (build-system gnu-build-system)
69 `(;; XXX: On 32-bit systems, 'kdb5_util' hangs on an fcntl/F_SETLKW call
70 ;; while running the tests in 'src/tests'.
71 #:tests? ,(string=? (%current-system) "x86_64-linux")
74 (modify-phases %standard-phases
75 (add-after 'unpack 'enter-source-directory
79 (add-before 'check 'pre-check
80 (lambda* (#:key inputs #:allow-other-keys)
81 (let ((perl (assoc-ref inputs "perl")))
82 (substitute* "plugins/kdb/db2/libdb2/test/run.test"
83 (("/bin/cat") (string-append perl "/bin/perl"))
84 (("D/bin/sh") (string-append "D" (which "sh")))
85 (("bindir=/bin/.") (string-append "bindir=" perl "/bin"))))
87 ;; avoid service names since /etc/services is unavailable
88 (substitute* "tests/resolve/Makefile"
89 (("-p telnet") "-p 23"))
91 (synopsis "MIT Kerberos 5")
93 "Massachusetts Institute of Technology implementation of Kerberos.
94 Kerberos is a network authentication protocol designed to provide strong
95 authentication for client/server applications by using secret-key
97 (license (license:non-copyleft "file://NOTICE"
98 "See NOTICE in the distribution."))
99 (home-page "http://web.mit.edu/kerberos/")
100 (properties '((cpe-name . "kerberos")))))
102 (define-public shishi
109 (uri (string-append "mirror://gnu/shishi/shishi-"
111 (patches (search-patches "shishi-fix-libgcrypt-detection.patch"))
114 "032qf72cpjdfffq1yq54gz3ahgqf2ijca4vl31sfabmjzq9q370d"))))
115 (build-system gnu-build-system)
117 '(;; This is required since we patch some of the build scripts.
118 ;; Remove for the next Shishi release after 1.0.2 or when
119 ;; removing 'shishi-fix-libgcrypt-detection.patch'.
120 #:configure-flags '("ac_cv_libgcrypt=yes" "--disable-static")))
121 (native-inputs `(("pkg-config" ,pkg-config)))
125 ("linux-pam" ,linux-pam-1.2)
127 ("libgcrypt" ,libgcrypt)
128 ("libtasn1" ,libtasn1)))
129 (home-page "https://www.gnu.org/software/shishi/")
130 (synopsis "Implementation of the Kerberos 5 network security system")
132 "GNU Shishi is a free implementation of the Kerberos 5 network security
133 system. It is used to allow non-secure network nodes to communicate in a
134 secure manner through client-server mutual authentication via tickets.")
135 (license license:gpl3+)))
137 (define-public heimdal
144 "https://github.com/heimdal/heimdal/releases/download/"
145 "heimdal-" version "/" "heimdal-" version ".tar.gz"))
148 "1bdc682in55ygrxmhncs7cf4s239apcblci3z8i80wnc1w1s18n5"))
149 (modules '((guix build utils)))
152 (substitute* "configure"
153 (("User=.*$") "User=Guix\n")
154 (("Host=.*$") "Host=GNU")
155 (("Date=.*$") "Date=2017\n"))
157 (build-system gnu-build-system)
159 '(#:configure-flags (list
160 ;; Avoid 7 MiB of .a files.
163 ;; Do not build libedit.
165 "--with-readline-lib="
166 (assoc-ref %build-inputs "readline") "/lib")
168 "--with-readline-include="
169 (assoc-ref %build-inputs "readline") "/include")
171 ;; Do not build sqlite.
174 (assoc-ref %build-inputs "sqlite")))
176 #:phases (modify-phases %standard-phases
177 (add-before 'configure 'pre-configure
179 (substitute* '("appl/afsutil/pagsh.c"
181 (("/bin/sh") (which "sh")))
183 (add-before 'check 'pre-check
185 ;; For 'getxxyyy-test'.
186 (setenv "USER" (passwd:name (getpwuid (getuid))))
188 ;; Skip 'db' and 'kdc' tests for now.
189 ;; FIXME: figure out why 'kdc' tests fail.
190 (with-output-to-file "tests/db/have-db.in"
192 (format #t "#!~a~%exit 1~%" (which "sh"))))
194 ;; Tests fail when run in parallel.
195 #:parallel-tests? #f))
196 (native-inputs `(("e2fsprogs" ,e2fsprogs) ;for 'compile_et'
198 ("unzip" ,unzip))) ;for tests
199 (inputs `(("readline" ,readline)
201 ("e2fsprogs" ,e2fsprogs) ;for libcom_err
203 (home-page "http://www.h5l.org/")
204 (synopsis "Kerberos 5 network authentication")
206 "Heimdal is an implementation of Kerberos 5 network authentication
208 (license license:bsd-3)))