From cbc6a28b6781494f458966498517092fba395f94 Mon Sep 17 00:00:00 2001 From: Ricardo Wurmus Date: Tue, 19 Mar 2019 20:01:08 +0100 Subject: gnu: 389-ds-base: Update to 1.4.0.21. * gnu/packages/openldap.scm (389-ds-base): Update to 1.4.0.21. [arguments]: Add phase "fix-includes". [inputs]: Add cracklib. --- gnu/packages/openldap.scm | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) (limited to 'gnu/packages/openldap.scm') diff --git a/gnu/packages/openldap.scm b/gnu/packages/openldap.scm index 368a953cb5..c3075b4d59 100644 --- a/gnu/packages/openldap.scm +++ b/gnu/packages/openldap.scm @@ -2,7 +2,7 @@ ;;; Copyright © 2013, 2014, 2015 Ludovic Courtès ;;; Copyright © 2013 Andreas Enge ;;; Copyright © 2016 Leo Famulari -;;; Copyright © 2017, 2018 Ricardo Wurmus +;;; Copyright © 2017, 2018, 2019 Ricardo Wurmus ;;; Copyright © 2018 Tobias Geerinckx-Rice ;;; ;;; This file is part of GNU Guix. @@ -36,6 +36,7 @@ #:use-module (gnu packages libevent) #:use-module (gnu packages linux) #:use-module (gnu packages networking) + #:use-module (gnu packages password-utils) #:use-module (gnu packages pcre) #:use-module (gnu packages perl) #:use-module (gnu packages pkg-config) @@ -198,14 +199,14 @@ servers from Python programs.") (define-public 389-ds-base (package (name "389-ds-base") - (version "1.4.0.13") + (version "1.4.0.21") (source (origin (method url-fetch) (uri (string-append "https://releases.pagure.org/389-ds-base/" "389-ds-base-" version ".tar.bz2")) (sha256 (base32 - "01dm3zq3w5ami9pwcjbjz8wfbx9krjxybjrgc4wyhrxlzd90ylzj")))) + "1qd1ap5d5nxyiq0d19czfwc3h7iwl9lmr5sy7d7xmpr2by59aysr")))) (build-system gnu-build-system) (arguments `(#:modules ((srfi srfi-1) @@ -228,6 +229,11 @@ servers from Python programs.") "--disable-perl") #:phases (modify-phases %standard-phases + (add-after 'unpack 'fix-includes + (lambda _ + (substitute* "include/ldaputil/certmap.h" + (("nss3/cert.h") "nss/cert.h")) + #t)) (add-after 'unpack 'fix-install-location-of-python-tools (lambda* (#:key inputs outputs #:allow-other-keys) (let* ((out (assoc-ref outputs "out")) @@ -286,6 +292,7 @@ servers from Python programs.") #t))))) (inputs `(("bdb" ,bdb) + ("cracklib" ,cracklib) ("cyrus-sasl" ,cyrus-sasl) ("gnutls" ,gnutls) ("httpd" ,httpd) -- cgit 1.4.1 From 7627bad6a7869b3f12b6659c326924f35a6fb28f Mon Sep 17 00:00:00 2001 From: Ricardo Wurmus Date: Tue, 19 Mar 2019 20:01:43 +0100 Subject: gnu: 389-ds-base: Set localstatedir to /var. * gnu/packages/openldap.scm (389-ds-base)[arguments]: Set localstatedir to /var. --- gnu/packages/openldap.scm | 1 + 1 file changed, 1 insertion(+) (limited to 'gnu/packages/openldap.scm') diff --git a/gnu/packages/openldap.scm b/gnu/packages/openldap.scm index c3075b4d59..878dc0b4b1 100644 --- a/gnu/packages/openldap.scm +++ b/gnu/packages/openldap.scm @@ -223,6 +223,7 @@ servers from Python programs.") (assoc-ref %build-inputs "pcre")) (string-append "--with-selinux=" (assoc-ref %build-inputs "libselinux")) + "--localstatedir=/var" ;; The Perl scripts are being removed in the 1.4.0 release. ;; Building them would require packaging of the outdated Mozilla ;; LDAP SDK (instead of OpenLDAP) and PerLDAP. -- cgit 1.4.1 From 19a0a060d2d9540d0f151821227ba8b2fbbd2ef1 Mon Sep 17 00:00:00 2001 From: Ricardo Wurmus Date: Wed, 20 Mar 2019 11:59:17 +0100 Subject: gnu: 389-ds-base: Fix tool references. * gnu/packages/openldap.scm (389-ds-base)[arguments]: Rename phase "fix-includes" to "fix-references" and fix references to certutil and c_rehash. [inputs]: Add nss:bin. --- gnu/packages/openldap.scm | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'gnu/packages/openldap.scm') diff --git a/gnu/packages/openldap.scm b/gnu/packages/openldap.scm index 878dc0b4b1..6426c3067e 100644 --- a/gnu/packages/openldap.scm +++ b/gnu/packages/openldap.scm @@ -230,10 +230,15 @@ servers from Python programs.") "--disable-perl") #:phases (modify-phases %standard-phases - (add-after 'unpack 'fix-includes + (add-after 'unpack 'fix-references (lambda _ (substitute* "include/ldaputil/certmap.h" (("nss3/cert.h") "nss/cert.h")) + (substitute* "src/lib389/lib389/nss_ssl.py" + (("'/usr/bin/certutil'") + (string-append "'" (which "certutil") "'")) + (("'/usr/bin/c_rehash'") + (string-append "'" (which "perl") "', '" (which "c_rehash") "'"))) #t)) (add-after 'unpack 'fix-install-location-of-python-tools (lambda* (#:key inputs outputs #:allow-other-keys) @@ -305,6 +310,7 @@ servers from Python programs.") ("net-snmp" ,net-snmp) ("nspr" ,nspr) ("nss" ,nss) + ("nss:bin" ,nss "bin") ; for certutil ("openldap" ,openldap) ("openssl" ,openssl) ; #included by net-snmp ("pcre" ,pcre) -- cgit 1.4.1 From af184b68e78aa51b6ff50b7327dfbbdb1d6e6843 Mon Sep 17 00:00:00 2001 From: Ricardo Wurmus Date: Wed, 20 Mar 2019 12:17:27 +0100 Subject: gnu: 389-ds-base: Use more global directories. * gnu/packages/openldap.scm (389-ds-base)[arguments]: Pass "with-instconfigdir"; add phase "overwrite-default-locations" to overwrite defaults for "initconfig_dir", the certificate location, and the location of the defaults file. --- gnu/packages/openldap.scm | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'gnu/packages/openldap.scm') diff --git a/gnu/packages/openldap.scm b/gnu/packages/openldap.scm index 6426c3067e..e0190d2c0e 100644 --- a/gnu/packages/openldap.scm +++ b/gnu/packages/openldap.scm @@ -224,6 +224,7 @@ servers from Python programs.") (string-append "--with-selinux=" (assoc-ref %build-inputs "libselinux")) "--localstatedir=/var" + "--with-instconfigdir=/etc/dirsrv" ;; The Perl scripts are being removed in the 1.4.0 release. ;; Building them would require packaging of the outdated Mozilla ;; LDAP SDK (instead of OpenLDAP) and PerLDAP. @@ -240,6 +241,25 @@ servers from Python programs.") (("'/usr/bin/c_rehash'") (string-append "'" (which "perl") "', '" (which "c_rehash") "'"))) #t)) + (add-after 'unpack 'overwrite-default-locations + (lambda* (#:key outputs #:allow-other-keys) + (let ((out (assoc-ref outputs "out"))) + (substitute* "src/lib389/lib389/paths.py" + (("/usr/share/dirsrv/inf/defaults.inf") + (string-append out "/share/dirsrv/inf/defaults.inf"))) + ;; This directory can only be specified relative to sysconfdir. This + ;; is used to determine where to look for installed directory + ;; servers, so in the absence of a search path it needs to be global. + (substitute* "ldap/admin/src/defaults.inf.in" + (("^initconfig_dir =.*") + "initconfig_dir = /etc/dirsrv/registry\n")) + ;; This is used to determine where to write certificate files + ;; when installing new directory server instances. + (substitute* '("src/lib389/lib389/instance/setup.py" + "src/lib389/lib389/instance/remove.py") + (("etc_dirsrv_path = .*") + "etc_dirsrv_path = '/etc/dirsrv/'\n")) + #t))) (add-after 'unpack 'fix-install-location-of-python-tools (lambda* (#:key inputs outputs #:allow-other-keys) (let* ((out (assoc-ref outputs "out")) -- cgit 1.4.1