projects/guix·blob python-team · refs

170 lines · 6.9 KiB

1;;; GNU Guix --- Functional package management for GNU
2;;; Copyright © 2012, 2013, 2025 Andreas Enge <[email protected]>
3;;; Copyright © 2014, 2015, 2016 Mark H Weaver <[email protected]>
4;;; Copyright © 2016, 2017 Leo Famulari <[email protected]>
5;;; Copyright © 2016, 2022 Efraim Flashner <[email protected]>
6;;; Copyright © 2012, 2013 Nikita Karetnikov <[email protected]>
7;;; Copyright © 2012, 2017 Ludovic Courtès <[email protected]>
8;;; Copyright © 2017, 2019 Ricardo Wurmus <[email protected]>
9;;; Copyright © 2018 Tobias Geerinckx-Rice <[email protected]>
10;;; Copyright © 2019 Mathieu Othacehe <[email protected]>
11;;; Copyright © 2020 Jan (janneke) Nieuwenhuizen <[email protected]>
12;;; Copyright © 2020, 2021 Maxim Cournoyer <[email protected]>
13;;; Copyright © 2021 Maxime Devos <[email protected]>
14;;; Copyright © 2022 Marius Bakke <[email protected]>
15;;;
16;;; This file is part of GNU Guix.
17;;;
18;;; GNU Guix is free software; you can redistribute it and/or modify it
19;;; under the terms of the GNU General Public License as published by
20;;; the Free Software Foundation; either version 3 of the License, or (at
21;;; your option) any later version.
22;;;
23;;; GNU Guix is distributed in the hope that it will be useful, but
24;;; WITHOUT ANY WARRANTY; without even the implied warranty of
25;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
26;;; GNU General Public License for more details.
27;;;
28;;; You should have received a copy of the GNU General Public License
29;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
30
31(define-module (gnu packages kerberos)
32 #:use-module (gnu packages)
33 #:use-module (gnu packages admin)
34 #:use-module (gnu packages autotools)
35 #:use-module (gnu packages bash)
36 #:use-module (gnu packages bison)
37 #:use-module (gnu packages crypto)
38 #:use-module (gnu packages dbm)
39 #:use-module (gnu packages compiler-tools)
40 #:use-module (gnu packages perl)
41 #:use-module (gnu packages python)
42 #:use-module (gnu packages gettext)
43 #:use-module (gnu packages gnupg)
44 #:use-module (gnu packages libidn)
45 #:use-module (gnu packages hurd)
46 #:use-module (gnu packages linux)
47 #:use-module (gnu packages openldap)
48 #:use-module (gnu packages pkg-config)
49 #:use-module (gnu packages compression)
50 #:use-module (gnu packages readline)
51 #:use-module (gnu packages sqlite)
52 #:use-module (gnu packages texinfo)
53 #:use-module (gnu packages tls)
54 #:use-module ((guix licenses) #:prefix license:)
55 #:use-module (guix packages)
56 #:use-module (guix download)
57 #:use-module (guix gexp)
58 #:use-module (guix utils)
59 #:use-module (guix build-system gnu))
60
61(define-public mit-krb5
62 (package
63 (name "mit-krb5")
64 (version "1.21")
65 (source (origin
66 (method url-fetch)
67 (uri (list
68 (string-append "https://web.mit.edu/kerberos/dist/krb5/"
69 (version-major+minor version)
70 "/krb5-" version ".tar.gz")
71 (string-append "https://kerberos.org/dist/krb5/"
72 (version-major+minor version)
73 "/krb5-" version ".tar.gz")))
74 (patches (search-patches "mit-krb5-hurd.patch"))
75 (sha256
76 (base32
77 "0fx91rickkb5pvxm3imqmaavsncjkgcsrfx4czgk4j28hpzsmy39"))))
78 (build-system gnu-build-system)
79 (native-inputs
80 (list bison perl)) ;required for some tests
81 (inputs
82 (list openssl))
83 (arguments
84 `(;; XXX: On 32-bit systems, 'kdb5_util' hangs on an fcntl/F_SETLKW call
85 ;; while running the tests in 'src/tests'. Also disable tests when
86 ;; cross-compiling.
87 #:tests? ,(and (not (%current-target-system))
88 (string=? (%current-system) "x86_64-linux"))
89
90 ,@(if (%current-target-system)
91 '(#:configure-flags
92 (list "--localstatedir=/var"
93 "krb5_cv_attr_constructor_destructor=yes"
94 "ac_cv_func_regcomp=yes"
95 "ac_cv_printf_positional=yes"
96 "ac_cv_file__etc_environment=yes"
97 "ac_cv_file__etc_TIMEZONE=no")
98 #:make-flags
99 (list "CFLAGS+=-DDESTRUCTOR_ATTR_WORKS=1"))
100 '(#:configure-flags
101 (list "--localstatedir=/var")))
102 #:phases
103 (modify-phases %standard-phases
104 (add-after 'unpack 'enter-source-directory
105 (lambda _
106 (chdir "src")))
107 (add-before 'check 'pre-check
108 (lambda* (#:key inputs native-inputs #:allow-other-keys)
109 (let ((perl (search-input-file (or native-inputs inputs)
110 "bin/perl")))
111 (substitute* "plugins/kdb/db2/libdb2/test/run.test"
112 (("/bin/cat") perl)
113 (("D/bin/sh") (string-append "D" (which "sh")))
114 (("bindir=/bin/.") (string-append "bindir="
115 (dirname perl))))))))))
116 (synopsis "MIT Kerberos 5")
117 (description
118 "Massachusetts Institute of Technology implementation of Kerberos.
119Kerberos is a network authentication protocol designed to provide strong
120authentication for client/server applications by using secret-key
121cryptography.")
122 (license (license:non-copyleft "file://NOTICE"
123 "See NOTICE in the distribution."))
124 (home-page "https://web.mit.edu/kerberos/")
125 (properties '((cpe-name . "kerberos")))))
126
127(define-public shishi
128 (package
129 (name "shishi")
130 (version "1.0.3")
131 (source
132 (origin
133 (method url-fetch)
134 (uri (string-append "mirror://gnu/shishi/shishi-"
135 version ".tar.gz"))
136 (sha256
137 (base32
138 "14kyj7rdki2g1sj5k42y9v5ya9jar81yw483ivwa80fx2byqyycm"))))
139 (build-system gnu-build-system)
140 (arguments
141 (list
142 #:configure-flags
143 #~(list "--disable-static"
144 "--with-key-dir=/etc/shishi"
145 "--with-db-dir=/var/shishi")
146 #:phases
147 #~(modify-phases %standard-phases
148 (add-after 'configure 'disable-automatic-key-generation
149 (lambda _
150 (substitute* "Makefile"
151 (("^install-data-hook:")
152 "install-data-hook:\nx:\n")))))))
153 (native-inputs (list pkg-config))
154 (inputs
155 (list gnutls
156 libidn
157 linux-pam
158 zlib
159 libgcrypt
160 libtasn1))
161 (home-page "https://www.gnu.org/software/shishi/")
162 (synopsis "Implementation of the Kerberos 5 network security system")
163 (description
164 "GNU Shishi is a free implementation of the Kerberos 5 network security
165system. It is used to allow non-secure network nodes to communicate in a
166secure manner through client-server mutual authentication via tickets.
167
168After installation, the system administrator should generate keys using
169@code{shisa -a /etc/shishi/shishi.keys}.")
170 (license license:gpl3+)))