kerberos.scm 8.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210
  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>
  11. ;;;
  12. ;;; This file is part of GNU Guix.
  13. ;;;
  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.
  18. ;;;
  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.
  23. ;;;
  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/>.
  26. (define-module (gnu packages kerberos)
  27. #:use-module (gnu packages)
  28. #:use-module (gnu packages autotools)
  29. #:use-module (gnu packages bison)
  30. #:use-module (gnu packages dbm)
  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 readline)
  39. #:use-module (gnu packages sqlite)
  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))
  47. (define-public mit-krb5
  48. (package
  49. (name "mit-krb5")
  50. (version "1.16.2")
  51. (source (origin
  52. (method url-fetch)
  53. (uri (list
  54. (string-append "https://web.mit.edu/kerberos/dist/krb5/"
  55. (version-major+minor version)
  56. "/krb5-" version ".tar.gz")
  57. (string-append "https://kerberos.org/dist/krb5/"
  58. (version-major+minor version)
  59. "/krb5-" version ".tar.gz")))
  60. (sha256
  61. (base32
  62. "09zhhzj19bmjjxsvxdrysabql8n72kjivis08wbikhlkwlgiwwlz"))))
  63. (build-system gnu-build-system)
  64. (native-inputs
  65. `(("bison" ,bison)
  66. ("perl" ,perl)))
  67. (arguments
  68. `(;; XXX: On 32-bit systems, 'kdb5_util' hangs on an fcntl/F_SETLKW call
  69. ;; while running the tests in 'src/tests'.
  70. #:tests? ,(string=? (%current-system) "x86_64-linux")
  71. #:phases
  72. (modify-phases %standard-phases
  73. (add-after 'unpack 'enter-source-directory
  74. (lambda _
  75. (chdir "src")
  76. #t))
  77. (add-before 'check 'pre-check
  78. (lambda* (#:key inputs #:allow-other-keys)
  79. (let ((perl (assoc-ref inputs "perl")))
  80. (substitute* "plugins/kdb/db2/libdb2/test/run.test"
  81. (("/bin/cat") (string-append perl "/bin/perl"))
  82. (("D/bin/sh") (string-append "D" (which "sh")))
  83. (("bindir=/bin/.") (string-append "bindir=" perl "/bin"))))
  84. ;; avoid service names since /etc/services is unavailable
  85. (substitute* "tests/resolve/Makefile"
  86. (("-p telnet") "-p 23"))
  87. #t)))))
  88. (synopsis "MIT Kerberos 5")
  89. (description
  90. "Massachusetts Institute of Technology implementation of Kerberos.
  91. Kerberos is a network authentication protocol designed to provide strong
  92. authentication for client/server applications by using secret-key
  93. cryptography.")
  94. (license (license:non-copyleft "file://NOTICE"
  95. "See NOTICE in the distribution."))
  96. (home-page "http://web.mit.edu/kerberos/")
  97. (properties '((cpe-name . "kerberos")))))
  98. (define-public shishi
  99. (package
  100. (name "shishi")
  101. (version "1.0.2")
  102. (source
  103. (origin
  104. (method url-fetch)
  105. (uri (string-append "mirror://gnu/shishi/shishi-"
  106. version ".tar.gz"))
  107. (patches (search-patches "shishi-fix-libgcrypt-detection.patch"))
  108. (sha256
  109. (base32
  110. "032qf72cpjdfffq1yq54gz3ahgqf2ijca4vl31sfabmjzq9q370d"))))
  111. (build-system gnu-build-system)
  112. (arguments
  113. '(;; This is required since we patch some of the build scripts.
  114. ;; Remove for the next Shishi release after 1.0.2 or when
  115. ;; removing 'shishi-fix-libgcrypt-detection.patch'.
  116. #:configure-flags '("ac_cv_libgcrypt=yes" "--disable-static")))
  117. (native-inputs `(("pkg-config" ,pkg-config)))
  118. (inputs
  119. `(("gnutls" ,gnutls)
  120. ("libidn" ,libidn)
  121. ("linux-pam" ,linux-pam-1.2)
  122. ("zlib" ,zlib)
  123. ("libgcrypt" ,libgcrypt)
  124. ("libtasn1" ,libtasn1)))
  125. (home-page "https://www.gnu.org/software/shishi/")
  126. (synopsis "Implementation of the Kerberos 5 network security system")
  127. (description
  128. "GNU Shishi is a free implementation of the Kerberos 5 network security
  129. system. It is used to allow non-secure network nodes to communicate in a
  130. secure manner through client-server mutual authentication via tickets.")
  131. (license license:gpl3+)))
  132. (define-public heimdal
  133. (package
  134. (name "heimdal")
  135. (version "7.5.0")
  136. (source (origin
  137. (method url-fetch)
  138. (uri (string-append
  139. "https://github.com/heimdal/heimdal/releases/download/"
  140. "heimdal-" version "/" "heimdal-" version ".tar.gz"))
  141. (sha256
  142. (base32
  143. "1bdc682in55ygrxmhncs7cf4s239apcblci3z8i80wnc1w1s18n5"))
  144. (modules '((guix build utils)))
  145. (snippet
  146. '(begin
  147. (substitute* "configure"
  148. (("User=.*$") "User=Guix\n")
  149. (("Host=.*$") "Host=GNU")
  150. (("Date=.*$") "Date=2017\n"))
  151. #t))))
  152. (build-system gnu-build-system)
  153. (arguments
  154. '(#:configure-flags (list
  155. ;; Avoid 7 MiB of .a files.
  156. "--disable-static"
  157. ;; Do not build libedit.
  158. (string-append
  159. "--with-readline-lib="
  160. (assoc-ref %build-inputs "readline") "/lib")
  161. (string-append
  162. "--with-readline-include="
  163. (assoc-ref %build-inputs "readline") "/include")
  164. ;; Do not build sqlite.
  165. (string-append
  166. "--with-sqlite3="
  167. (assoc-ref %build-inputs "sqlite")))
  168. #:phases (modify-phases %standard-phases
  169. (add-before 'configure 'pre-configure
  170. (lambda _
  171. (substitute* '("appl/afsutil/pagsh.c"
  172. "tools/Makefile.in")
  173. (("/bin/sh") (which "sh")))
  174. #t))
  175. (add-before 'check 'pre-check
  176. (lambda _
  177. ;; For 'getxxyyy-test'.
  178. (setenv "USER" (passwd:name (getpwuid (getuid))))
  179. ;; Skip 'db' and 'kdc' tests for now.
  180. ;; FIXME: figure out why 'kdc' tests fail.
  181. (with-output-to-file "tests/db/have-db.in"
  182. (lambda ()
  183. (format #t "#!~a~%exit 1~%" (which "sh"))))
  184. #t)))
  185. ;; Tests fail when run in parallel.
  186. #:parallel-tests? #f))
  187. (native-inputs `(("e2fsprogs" ,e2fsprogs) ;for 'compile_et'
  188. ("texinfo" ,texinfo)
  189. ("unzip" ,unzip))) ;for tests
  190. (inputs `(("readline" ,readline)
  191. ("bdb" ,bdb)
  192. ("e2fsprogs" ,e2fsprogs) ;for libcom_err
  193. ("sqlite" ,sqlite)))
  194. (home-page "http://www.h5l.org/")
  195. (synopsis "Kerberos 5 network authentication")
  196. (description
  197. "Heimdal is an implementation of Kerberos 5 network authentication
  198. service.")
  199. (license license:bsd-3)))