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 first two items for the next Shishi release after 1.0.2 or
120 ;; when removing 'shishi-fix-libgcrypt-detection.patch'.
122 '("ac_cv_libgcrypt=yes" "--disable-static"
123 "--with-key-dir=/etc/shishi" "--with-db-dir=/var/shishi")
125 (modify-phases %standard-phases
126 (add-after 'configure 'disable-automatic-key-generation
127 (lambda* (#:key outputs #:allow-other-keys)
128 (substitute* "Makefile"
129 (("^install-data-hook:")
130 "install-data-hook:\nx:\n"))
132 (native-inputs `(("pkg-config" ,pkg-config)))
136 ("linux-pam" ,linux-pam-1.2)
138 ("libgcrypt" ,libgcrypt)
139 ("libtasn1" ,libtasn1)))
140 (home-page "https://www.gnu.org/software/shishi/")
141 (synopsis "Implementation of the Kerberos 5 network security system")
143 "GNU Shishi is a free implementation of the Kerberos 5 network security
144 system. It is used to allow non-secure network nodes to communicate in a
145 secure manner through client-server mutual authentication via tickets.
147 After installation, the system administrator should generate keys using
148 @code{shisa -a /etc/shishi/shishi.keys}.")
149 (license license:gpl3+)))
151 (define-public heimdal
158 "https://github.com/heimdal/heimdal/releases/download/"
159 "heimdal-" version "/" "heimdal-" version ".tar.gz"))
162 "1bdc682in55ygrxmhncs7cf4s239apcblci3z8i80wnc1w1s18n5"))
163 (modules '((guix build utils)))
166 (substitute* "configure"
167 (("User=.*$") "User=Guix\n")
168 (("Host=.*$") "Host=GNU")
169 (("Date=.*$") "Date=2017\n"))
171 (build-system gnu-build-system)
173 '(#:configure-flags (list
174 ;; Avoid 7 MiB of .a files.
177 ;; Do not build libedit.
179 "--with-readline-lib="
180 (assoc-ref %build-inputs "readline") "/lib")
182 "--with-readline-include="
183 (assoc-ref %build-inputs "readline") "/include")
185 ;; Do not build sqlite.
188 (assoc-ref %build-inputs "sqlite")))
190 #:phases (modify-phases %standard-phases
191 (add-before 'configure 'pre-configure
193 (substitute* '("appl/afsutil/pagsh.c"
195 (("/bin/sh") (which "sh")))
197 (add-before 'check 'pre-check
199 ;; For 'getxxyyy-test'.
200 (setenv "USER" (passwd:name (getpwuid (getuid))))
202 ;; Skip 'db' and 'kdc' tests for now.
203 ;; FIXME: figure out why 'kdc' tests fail.
204 (with-output-to-file "tests/db/have-db.in"
206 (format #t "#!~a~%exit 1~%" (which "sh"))))
208 ;; Tests fail when run in parallel.
209 #:parallel-tests? #f))
210 (native-inputs `(("e2fsprogs" ,e2fsprogs) ;for 'compile_et'
212 ("unzip" ,unzip))) ;for tests
213 (inputs `(("readline" ,readline)
215 ("e2fsprogs" ,e2fsprogs) ;for libcom_err
217 (home-page "http://www.h5l.org/")
218 (synopsis "Kerberos 5 network authentication")
220 "Heimdal is an implementation of Kerberos 5 network authentication
222 (license license:bsd-3)))