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 dbm)
32 #:use-module (gnu packages perl)
33 #:use-module (gnu packages gettext)
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)
39 #:use-module (gnu packages readline)
40 #:use-module (gnu packages sqlite)
41 #:use-module (gnu packages texinfo)
42 #:use-module (gnu packages tls)
43 #:use-module ((guix licenses) #:prefix license:)
44 #:use-module (guix packages)
45 #:use-module (guix download)
46 #:use-module (guix utils)
47 #:use-module (guix build-system gnu))
49 (define-public mit-krb5
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")))
64 "1xc1ly09697b7g2vngvx76szjqy9769kpgn27lnp1r9xln224vjs"))))
65 (build-system gnu-build-system)
70 `(;; XXX: On 32-bit systems, 'kdb5_util' hangs on an fcntl/F_SETLKW call
71 ;; while running the tests in 'src/tests'.
72 #:tests? ,(string=? (%current-system) "x86_64-linux")
75 (modify-phases %standard-phases
76 (add-after 'unpack 'enter-source-directory
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"))
85 (("D/bin/sh") (string-append "D" (which "sh")))
86 (("bindir=/bin/.") (string-append "bindir=" perl "/bin"))))
88 ;; avoid service names since /etc/services is unavailable
89 (substitute* "tests/resolve/Makefile"
90 (("-p telnet") "-p 23"))
92 (synopsis "MIT Kerberos 5")
94 "Massachusetts Institute of Technology implementation of Kerberos.
95 Kerberos is a network authentication protocol designed to provide strong
96 authentication for client/server applications by using secret-key
98 (license (license:non-copyleft "file://NOTICE"
99 "See NOTICE in the distribution."))
100 (home-page "http://web.mit.edu/kerberos/")
101 (properties '((cpe-name . "kerberos")))))
103 (define-public shishi
110 (uri (string-append "mirror://gnu/shishi/shishi-"
112 (patches (search-patches "shishi-fix-libgcrypt-detection.patch"))
115 "032qf72cpjdfffq1yq54gz3ahgqf2ijca4vl31sfabmjzq9q370d"))))
116 (build-system gnu-build-system)
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'.
121 #:configure-flags '("ac_cv_libgcrypt=yes" "--disable-static")))
122 (native-inputs `(("pkg-config" ,pkg-config)))
126 ("linux-pam" ,linux-pam-1.2)
128 ("libgcrypt" ,libgcrypt)
129 ("libtasn1" ,libtasn1)))
130 (home-page "https://www.gnu.org/software/shishi/")
131 (synopsis "Implementation of the Kerberos 5 network security system")
133 "GNU Shishi is a free implementation of the Kerberos 5 network security
134 system. It is used to allow non-secure network nodes to communicate in a
135 secure manner through client-server mutual authentication via tickets.")
136 (license license:gpl3+)))
138 (define-public heimdal
145 "https://github.com/heimdal/heimdal/releases/download/"
146 "heimdal-" version "/" "heimdal-" version ".tar.gz"))
149 "1bdc682in55ygrxmhncs7cf4s239apcblci3z8i80wnc1w1s18n5"))
150 (modules '((guix build utils)))
153 (substitute* "configure"
154 (("User=.*$") "User=Guix\n")
155 (("Host=.*$") "Host=GNU")
156 (("Date=.*$") "Date=2017\n"))
158 (build-system gnu-build-system)
160 '(#:configure-flags (list
161 ;; Avoid 7 MiB of .a files.
164 ;; Do not build libedit.
166 "--with-readline-lib="
167 (assoc-ref %build-inputs "readline") "/lib")
169 "--with-readline-include="
170 (assoc-ref %build-inputs "readline") "/include")
172 ;; Do not build sqlite.
175 (assoc-ref %build-inputs "sqlite")))
177 #:phases (modify-phases %standard-phases
178 (add-before 'configure 'pre-configure
180 (substitute* '("appl/afsutil/pagsh.c"
182 (("/bin/sh") (which "sh")))
184 (add-before 'check 'pre-check
186 ;; For 'getxxyyy-test'.
187 (setenv "USER" (passwd:name (getpwuid (getuid))))
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"
193 (format #t "#!~a~%exit 1~%" (which "sh"))))
195 ;; Tests fail when run in parallel.
196 #:parallel-tests? #f))
197 (native-inputs `(("e2fsprogs" ,e2fsprogs) ;for 'compile_et'
199 ("unzip" ,unzip))) ;for tests
200 (inputs `(("readline" ,readline)
202 ("e2fsprogs" ,e2fsprogs) ;for libcom_err
204 (home-page "http://www.h5l.org/")
205 (synopsis "Kerberos 5 network authentication")
207 "Heimdal is an implementation of Kerberos 5 network authentication
209 (license license:bsd-3)))