linux-container: Do not add %CONTAINER-FILE-SYSTEMS to Docker image OSes.
[guix.git] / gnu / packages / sssd.scm
blob6d6caab0ad7d41ca36896babfc2dca140a871587
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 ;;;
5 ;;; This file is part of GNU Guix.
6 ;;;
7 ;;; GNU Guix is free software; you can redistribute it and/or modify it
8 ;;; under the terms of the GNU General Public License as published by
9 ;;; the Free Software Foundation; either version 3 of the License, or (at
10 ;;; your option) any later version.
11 ;;;
12 ;;; GNU Guix is distributed in the hope that it will be useful, but
13 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
14 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15 ;;; GNU General Public License for more details.
16 ;;;
17 ;;; You should have received a copy of the GNU General Public License
18 ;;; 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))
52 (define-public ding-libs
53   (package
54     (name "ding-libs")
55     (version "0.6.1")
56     (source (origin
57               (method url-fetch)
58               (uri (string-append "https://releases.pagure.org/SSSD/ding-libs/"
59                                   "ding-libs-" version ".tar.gz"))
60               (sha256
61                (base32
62                 "1h97mx2jdv4caiz4r7y8rxfsq78fx0k4jjnfp7x2s7xqvqks66d3"))))
63     (build-system gnu-build-system)
64     (home-page "https://pagure.io/SSSD/ding-libs/")
65     (synopsis "Libraries for SSSD")
66     (description
67      "DING-LIBS (DING Is Not Glib) are a set of small, useful libraries that
68 the @dfn{System Security Services Daemon} (SSSD) uses and makes available to
69 other projects.  They include: libdhash, an implementation of a dynamic hash
70 table which will dynamically resize to achieve optimal storage and access time
71 properties; ini_config, a library for parsing and managing @code{INI} files;
72 path_utils, a library to manage UNIX paths and subsets of paths; collection, a
73 generic, hierarchical grouping mechanism for complex data sets; ref_array, a
74 dynamically-growing, reference-counted array; libbasicobjects, a set of
75 fundamental object types for C.")
76     (license license:lgpl3+)))
78 ;; Note: This package installs modules for ldb and nss.  For the former we
79 ;; need to set LDB_MODULES_PATH.  For the latter LD_PRELOAD or LD_LIBRARY_PATH
80 ;; is needed.
81 (define-public sssd
82   (package
83     (name "sssd")
84     (version "1.16.2")
85     (source (origin
86               (method url-fetch)
87               (uri (string-append "http://releases.pagure.org/SSSD/sssd/"
88                                   "sssd-" version ".tar.gz"))
89               (patches (search-patches "sssd-curl-compat.patch"))
90               (sha256
91                (base32
92                 "032ppk57qs1lnvz7pb7lw9ldwm9i1yagh9fzgqgn6na3bg61ynzy"))))
93     (build-system gnu-build-system)
94     (arguments
95      `(#:make-flags
96        (list (string-append "DOCBOOK_XSLT="
97                             (assoc-ref %build-inputs "docbook-xsl")
98                             "/xml/xsl/docbook-xsl-"
99                             ,(package-version docbook-xsl)
100                             "/manpages/docbook.xsl")
101              ;; Remove "--postvalid" option, because that requires access to
102              ;; online DTDs.
103              "XMLLINT_FLAGS = --catalogs --nonet --noent --xinclude --noout")
104        #:configure-flags
105        (list "--disable-cifs-idmap-plugin"
106              "--without-nfsv4-idmapd-plugin"
107              "--without-python2-bindings"
108              "--without-python3-bindings"
109              (string-append "--with-plugin-path="
110                             (assoc-ref %outputs "out")
111                             "/lib/sssd")
112              (string-append "--with-krb5-plugin-path="
113                             (assoc-ref %outputs "out")
114                             "/lib/krb5/plugins/libkrb5")
115              (string-append "--with-cifs-plugin-path="
116                             (assoc-ref %outputs "out")
117                             "/lib/cifs-utils")
118              (string-append "--with-init-dir="
119                             (assoc-ref %outputs "out")
120                             "/etc/init.d")
121              (string-append "--with-ldb-lib-dir="
122                             (assoc-ref %outputs "out")
123                             "/lib/ldb/modules/ldb")
124              (string-append "--with-xml-catalog-path="
125                             (assoc-ref %build-inputs "docbook-xml")
126                             "/xml/dtd/docbook/catalog.xml"))
127        #:phases
128        (modify-phases %standard-phases
129          (add-after 'unpack 'disable-failing-test
130            (lambda _
131              (substitute* "src/tests/responder_socket_access-tests.c"
132                (("tcase_add_test\\(tc_utils, resp_str_to_array_test\\);") ""))
133              ;; XXX: These tests fail with recent versions of ldb.  See
134              ;; <https://pagure.io/SSSD/sssd/issue/3563>.
135              (substitute* "Makefile.in"
136                (("sysdb-tests\\$\\(EXEEXT\\)") ""))
137              #t)))))
138     (inputs
139      `(("augeas" ,augeas)
140        ("bind" ,isc-bind "utils")
141        ("c-ares" ,c-ares)
142        ("curl" ,curl)
143        ("cyrus-sasl" ,cyrus-sasl)
144        ("dbus" ,dbus)
145        ("ding-libs" ,ding-libs)
146        ("glib" ,glib)
147        ("gnutls" ,gnutls)
148        ("http-parser" ,http-parser)
149        ("jansson" ,jansson)
150        ("ldb" ,ldb)
151        ("libselinux" ,libselinux)
152        ("libsemanage" ,libsemanage)
153        ("libunistring" ,libunistring)
154        ("linux-pam" ,linux-pam)
155        ("mit-krb5" ,mit-krb5)
156        ("nss" ,nss)
157        ("openldap" ,openldap)
158        ("openssl" ,openssl)
159        ("pcre" ,pcre)
160        ("popt" ,popt)
161        ("samba" ,samba)
162        ("talloc" ,talloc)
163        ("tdb" ,tdb)
164        ("tevent" ,tevent)))
165     (native-inputs
166      `(("check" ,check)
167        ("docbook-xsl" ,docbook-xsl)
168        ("docbook-xml" ,docbook-xml)
169        ("libxml2" ,libxml2)             ; for xmllint
170        ("libxslt" ,libxslt)
171        ("pkg-config" ,pkg-config)
172        ("util-linux" ,util-linux)))     ; for uuid.h, reqired for KCM
173     (home-page "https://pagure.io/SSSD/sssd/")
174     (synopsis "System security services daemon")
175     (description "SSSD is a system daemon.  Its primary function is to provide
176 access to identity and authentication remote resource through a common
177 framework that can provide caching and offline support to the system.  It
178 provides PAM and NSS modules, and in the future will support D-BUS based
179 interfaces for extended user information.  It also provides a better database
180 to store local users as well as extended user data.")
181     (license license:gpl3+)))