sssd.scm 7.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183
  1. ;;; GNU Guix --- Functional package management for GNU
  2. ;;; Copyright © 2016, 2017 Ricardo Wurmus <rekado@elephly.net>
  3. ;;; Copyright © 2017, 2018 Tobias Geerinckx-Rice <me@tobias.gr>
  4. ;;; Copyright © 2020 Efraim Flashner <efraim@flashner.co.il>
  5. ;;;
  6. ;;; This file is part of GNU Guix.
  7. ;;;
  8. ;;; GNU Guix is free software; you can redistribute it and/or modify it
  9. ;;; under the terms of the GNU General Public License as published by
  10. ;;; the Free Software Foundation; either version 3 of the License, or (at
  11. ;;; your option) any later version.
  12. ;;;
  13. ;;; GNU Guix is distributed in the hope that it will be useful, but
  14. ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
  15. ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  16. ;;; GNU General Public License for more details.
  17. ;;;
  18. ;;; You should have received a copy of the GNU General Public License
  19. ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
  20. (define-module (gnu packages sssd)
  21. #:use-module ((guix licenses) #:prefix license:)
  22. #:use-module (guix packages)
  23. #:use-module (guix download)
  24. #:use-module (guix utils)
  25. #:use-module (guix build-system gnu)
  26. #:use-module (gnu packages)
  27. #:use-module (gnu packages)
  28. #:use-module (gnu packages adns)
  29. #:use-module (gnu packages augeas)
  30. #:use-module (gnu packages check)
  31. #:use-module (gnu packages curl)
  32. #:use-module (gnu packages cyrus-sasl)
  33. #:use-module (gnu packages databases)
  34. #:use-module (gnu packages dns)
  35. #:use-module (gnu packages docbook)
  36. #:use-module (gnu packages documentation)
  37. #:use-module (gnu packages glib)
  38. #:use-module (gnu packages kerberos)
  39. #:use-module (gnu packages libunistring)
  40. #:use-module (gnu packages linux)
  41. #:use-module (gnu packages nss)
  42. #:use-module (gnu packages openldap)
  43. #:use-module (gnu packages tls)
  44. #:use-module (gnu packages pcre)
  45. #:use-module (gnu packages popt)
  46. #:use-module (gnu packages pkg-config)
  47. #:use-module (gnu packages samba)
  48. #:use-module (gnu packages selinux)
  49. #:use-module (gnu packages web)
  50. #:use-module (gnu packages xml))
  51. (define-public ding-libs
  52. (package
  53. (name "ding-libs")
  54. (version "0.6.1")
  55. (source (origin
  56. (method url-fetch)
  57. (uri (string-append "https://releases.pagure.org/SSSD/ding-libs/"
  58. "ding-libs-" version ".tar.gz"))
  59. (sha256
  60. (base32
  61. "1h97mx2jdv4caiz4r7y8rxfsq78fx0k4jjnfp7x2s7xqvqks66d3"))))
  62. (build-system gnu-build-system)
  63. (home-page "https://pagure.io/SSSD/ding-libs/")
  64. (synopsis "Libraries for SSSD")
  65. (description
  66. "DING-LIBS (DING Is Not Glib) are a set of small, useful libraries that
  67. the @dfn{System Security Services Daemon} (SSSD) uses and makes available to
  68. other projects. They include: libdhash, an implementation of a dynamic hash
  69. table which will dynamically resize to achieve optimal storage and access time
  70. properties; ini_config, a library for parsing and managing @code{INI} files;
  71. path_utils, a library to manage UNIX paths and subsets of paths; collection, a
  72. generic, hierarchical grouping mechanism for complex data sets; ref_array, a
  73. dynamically-growing, reference-counted array; libbasicobjects, a set of
  74. fundamental object types for C.")
  75. (license license:lgpl3+)))
  76. ;; Note: This package installs modules for ldb and nss. For the former we
  77. ;; need to set LDB_MODULES_PATH. For the latter LD_PRELOAD or LD_LIBRARY_PATH
  78. ;; is needed.
  79. (define-public sssd
  80. (package
  81. (name "sssd")
  82. (version "1.16.5")
  83. (source (origin
  84. (method url-fetch)
  85. (uri (string-append "https://releases.pagure.org/SSSD/sssd/"
  86. "sssd-" version ".tar.gz"))
  87. (sha256
  88. (base32
  89. "1h6hwibaf3xa2w6qpzjiiywmfj6zkgbz4r2isf3gd0xm6vq7n6if"))
  90. (patches (search-patches "sssd-fix-samba.patch"
  91. "sssd-system-directories.patch"))))
  92. (build-system gnu-build-system)
  93. (arguments
  94. `(#:make-flags
  95. (list (string-append "DOCBOOK_XSLT="
  96. (assoc-ref %build-inputs "docbook-xsl")
  97. "/xml/xsl/docbook-xsl-"
  98. ,(package-version docbook-xsl)
  99. "/manpages/docbook.xsl")
  100. ;; Remove "--postvalid" option, because that requires access to
  101. ;; online DTDs.
  102. "XMLLINT_FLAGS = --catalogs --nonet --noent --xinclude --noout")
  103. #:configure-flags
  104. (list "--localstatedir=/var" ;for /var/lib/sss, /var/run/sssd.pid, etc.
  105. "--sysconfdir=/etc" ;/etc/sssd
  106. "--disable-cifs-idmap-plugin"
  107. "--without-nfsv4-idmapd-plugin"
  108. "--without-python2-bindings"
  109. "--without-python3-bindings"
  110. (string-append "--with-plugin-path="
  111. (assoc-ref %outputs "out")
  112. "/lib/sssd")
  113. (string-append "--with-krb5-plugin-path="
  114. (assoc-ref %outputs "out")
  115. "/lib/krb5/plugins/libkrb5")
  116. (string-append "--with-cifs-plugin-path="
  117. (assoc-ref %outputs "out")
  118. "/lib/cifs-utils")
  119. (string-append "--with-init-dir="
  120. (assoc-ref %outputs "out")
  121. "/etc/init.d")
  122. (string-append "--with-ldb-lib-dir="
  123. (assoc-ref %outputs "out")
  124. "/lib/ldb/modules/ldb")
  125. (string-append "--with-xml-catalog-path="
  126. (assoc-ref %build-inputs "docbook-xml")
  127. "/xml/dtd/docbook/catalog.xml"))
  128. #:phases
  129. (modify-phases %standard-phases
  130. (add-after 'unpack 'disable-failing-test
  131. (lambda _
  132. (substitute* "src/tests/responder_socket_access-tests.c"
  133. (("tcase_add_test\\(tc_utils, resp_str_to_array_test\\);") ""))
  134. #t)))))
  135. (inputs
  136. `(("augeas" ,augeas)
  137. ("bind" ,isc-bind "utils")
  138. ("c-ares" ,c-ares)
  139. ("curl" ,curl)
  140. ("cyrus-sasl" ,cyrus-sasl)
  141. ("dbus" ,dbus)
  142. ("ding-libs" ,ding-libs)
  143. ("glib" ,glib)
  144. ("gnutls" ,gnutls)
  145. ("http-parser" ,http-parser)
  146. ("jansson" ,jansson)
  147. ("ldb" ,ldb)
  148. ("libselinux" ,libselinux)
  149. ("libsemanage" ,libsemanage)
  150. ("libunistring" ,libunistring)
  151. ("linux-pam" ,linux-pam)
  152. ("mit-krb5" ,mit-krb5)
  153. ("nss" ,nss)
  154. ("openldap" ,openldap)
  155. ("openssl" ,openssl)
  156. ("pcre" ,pcre)
  157. ("popt" ,popt)
  158. ("samba" ,samba)
  159. ("talloc" ,talloc)
  160. ("tdb" ,tdb)
  161. ("tevent" ,tevent)))
  162. (native-inputs
  163. `(("check" ,check-0.14)
  164. ("docbook-xsl" ,docbook-xsl)
  165. ("docbook-xml" ,docbook-xml)
  166. ("libxml2" ,libxml2) ; for xmllint
  167. ("libxslt" ,libxslt)
  168. ("pkg-config" ,pkg-config)
  169. ("util-linux" ,util-linux "lib"))) ;for uuid.h, reqired for KCM
  170. (home-page "https://pagure.io/SSSD/sssd/")
  171. (synopsis "System security services daemon")
  172. (description "SSSD is a system daemon. Its primary function is to provide
  173. access to identity and authentication remote resource through a common
  174. framework that can provide caching and offline support to the system. It
  175. provides PAM and NSS modules, and in the future will support D-BUS based
  176. interfaces for extended user information. It also provides a better database
  177. to store local users as well as extended user data.")
  178. (license license:gpl3+)))