summary refs log tree commit diff
path: root/gnu/packages/openldap.scm
diff options
context:
space:
mode:
authorRicardo Wurmus <ricardo.wurmus@mdc-berlin.de>2017-04-25 14:23:23 +0200
committerRicardo Wurmus <rekado@elephly.net>2017-04-26 13:09:13 +0200
commit289a89801afaeee0522777078258ce103d0452e8 (patch)
tree3ef1d4d2f87bb64769b16560ad95467bf2590827 /gnu/packages/openldap.scm
parentefba832751f64f25b313cb5f5cbcb2c3b34120a0 (diff)
downloadguix-289a89801afaeee0522777078258ce103d0452e8.tar.gz
gnu: nss-pam-ldapd: Look for nslcd.conf in global /etc/ directory.
* gnu/packages/openldap.scm (nss-pam-ldapd)[arguments]: Set
"--with-ldap-conf-file" to look for global configuration file; add build phase
to install example configuration file in the package output directory.
Diffstat (limited to 'gnu/packages/openldap.scm')
-rw-r--r--gnu/packages/openldap.scm19
1 files changed, 17 insertions, 2 deletions
diff --git a/gnu/packages/openldap.scm b/gnu/packages/openldap.scm
index b67510647d..61f7a9469f 100644
--- a/gnu/packages/openldap.scm
+++ b/gnu/packages/openldap.scm
@@ -94,8 +94,23 @@
      `(#:configure-flags
        (list (string-append "--with-pam-seclib-dir="
                             (assoc-ref %outputs "out") "/lib/security/")
-             (string-append "--with-ldap-conf-file="
-                            (assoc-ref %outputs "out") "/etc/nslcd.conf"))))
+             ;; nslcd cannot be convinced to look at run-time for its
+             ;; configuration file at a location that differs from the
+             ;; configured location.
+             "--with-ldap-conf-file=/etc/nslcd.conf")
+       #:phases
+       (modify-phases %standard-phases
+         ;; This is necessary because we tell nslcd with configure flags that
+         ;; it should look for its configuration file at /etc/nslcd.conf.  The
+         ;; build system tries to install a default configuration to that very
+         ;; location.
+         (add-after 'unpack 'override-nslcd.conf-install-path
+           (lambda* (#:key outputs #:allow-other-keys)
+             (substitute* "Makefile.in"
+               (("\\$\\(DESTDIR\\)\\$\\(NSLCD_CONF_PATH\\)")
+                (string-append (assoc-ref outputs "out")
+                               "/etc/nslcd.conf.example")))
+             #t)))))
     (inputs
      `(("linux-pam" ,linux-pam)
        ("openldap" ,openldap)