Commit | Line | Data |
---|---|---|
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) |
255d1bbe | 31 | #:use-module (gnu packages dbm) |
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") |
596c54c9 | 52 | (version "1.17") |
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 | |
596c54c9 | 64 | "1xc1ly09697b7g2vngvx76szjqy9769kpgn27lnp1r9xln224vjs")))) |
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 | 95 | Kerberos is a network authentication protocol designed to provide strong |
e881752c AK |
96 | authentication for client/server applications by using secret-key |
97 | cryptography.") | |
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. | |
2ca3fdc2 DM |
119 | ;; Remove first two items for the next Shishi release after 1.0.2 or |
120 | ;; when removing 'shishi-fix-libgcrypt-detection.patch'. | |
121 | #:configure-flags | |
122 | '("ac_cv_libgcrypt=yes" "--disable-static" | |
123 | "--with-key-dir=/etc/shishi" "--with-db-dir=/var/shishi") | |
124 | #:phases | |
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")) | |
131 | #t))))) | |
89e34644 LC |
132 | (native-inputs `(("pkg-config" ,pkg-config))) |
133 | (inputs | |
134 | `(("gnutls" ,gnutls) | |
135 | ("libidn" ,libidn) | |
136 | ("linux-pam" ,linux-pam-1.2) | |
137 | ("zlib" ,zlib) | |
1abc08a8 | 138 | ("libgcrypt" ,libgcrypt) |
89e34644 | 139 | ("libtasn1" ,libtasn1))) |
6fd52309 | 140 | (home-page "https://www.gnu.org/software/shishi/") |
89e34644 LC |
141 | (synopsis "Implementation of the Kerberos 5 network security system") |
142 | (description | |
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 | |
2ca3fdc2 DM |
145 | secure manner through client-server mutual authentication via tickets. |
146 | ||
147 | After installation, the system administrator should generate keys using | |
148 | @code{shisa -a /etc/shishi/shishi.keys}.") | |
89e34644 | 149 | (license license:gpl3+))) |
67fee545 LC |
150 | |
151 | (define-public heimdal | |
152 | (package | |
153 | (name "heimdal") | |
09b21b77 | 154 | (version "7.5.0") |
67fee545 LC |
155 | (source (origin |
156 | (method url-fetch) | |
09b21b77 AV |
157 | (uri (string-append |
158 | "https://github.com/heimdal/heimdal/releases/download/" | |
159 | "heimdal-" version "/" "heimdal-" version ".tar.gz")) | |
67fee545 LC |
160 | (sha256 |
161 | (base32 | |
09b21b77 | 162 | "1bdc682in55ygrxmhncs7cf4s239apcblci3z8i80wnc1w1s18n5")) |
67fee545 LC |
163 | (modules '((guix build utils))) |
164 | (snippet | |
6cbee49d MW |
165 | '(begin |
166 | (substitute* "configure" | |
167 | (("User=.*$") "User=Guix\n") | |
09b21b77 | 168 | (("Host=.*$") "Host=GNU") |
6cbee49d MW |
169 | (("Date=.*$") "Date=2017\n")) |
170 | #t)))) | |
67fee545 LC |
171 | (build-system gnu-build-system) |
172 | (arguments | |
173 | '(#:configure-flags (list | |
67fee545 LC |
174 | ;; Avoid 7 MiB of .a files. |
175 | "--disable-static" | |
176 | ||
177 | ;; Do not build libedit. | |
178 | (string-append | |
179 | "--with-readline-lib=" | |
180 | (assoc-ref %build-inputs "readline") "/lib") | |
181 | (string-append | |
182 | "--with-readline-include=" | |
09b21b77 AV |
183 | (assoc-ref %build-inputs "readline") "/include") |
184 | ||
185 | ;; Do not build sqlite. | |
186 | (string-append | |
187 | "--with-sqlite3=" | |
188 | (assoc-ref %build-inputs "sqlite"))) | |
67fee545 LC |
189 | |
190 | #:phases (modify-phases %standard-phases | |
09b21b77 | 191 | (add-before 'configure 'pre-configure |
67fee545 | 192 | (lambda _ |
09b21b77 AV |
193 | (substitute* '("appl/afsutil/pagsh.c" |
194 | "tools/Makefile.in") | |
195 | (("/bin/sh") (which "sh"))) | |
196 | #t)) | |
197 | (add-before 'check 'pre-check | |
198 | (lambda _ | |
199 | ;; For 'getxxyyy-test'. | |
200 | (setenv "USER" (passwd:name (getpwuid (getuid)))) | |
201 | ||
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" | |
205 | (lambda () | |
206 | (format #t "#!~a~%exit 1~%" (which "sh")))) | |
207 | #t))) | |
208 | ;; Tests fail when run in parallel. | |
209 | #:parallel-tests? #f)) | |
210 | (native-inputs `(("e2fsprogs" ,e2fsprogs) ;for 'compile_et' | |
211 | ("texinfo" ,texinfo) | |
212 | ("unzip" ,unzip))) ;for tests | |
67fee545 LC |
213 | (inputs `(("readline" ,readline) |
214 | ("bdb" ,bdb) | |
09b21b77 AV |
215 | ("e2fsprogs" ,e2fsprogs) ;for libcom_err |
216 | ("sqlite" ,sqlite))) | |
67fee545 LC |
217 | (home-page "http://www.h5l.org/") |
218 | (synopsis "Kerberos 5 network authentication") | |
219 | (description | |
220 | "Heimdal is an implementation of Kerberos 5 network authentication | |
221 | service.") | |
222 | (license license:bsd-3))) |