diff options
Diffstat (limited to 'gnu/packages/openldap.scm')
-rw-r--r-- | gnu/packages/openldap.scm | 143 |
1 files changed, 54 insertions, 89 deletions
diff --git a/gnu/packages/openldap.scm b/gnu/packages/openldap.scm index 3f3015bd80..92480b13f8 100644 --- a/gnu/packages/openldap.scm +++ b/gnu/packages/openldap.scm @@ -1,14 +1,15 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2013, 2014, 2015, 2019, 2020 Ludovic Courtès <ludo@gnu.org> -;;; Copyright © 2013 Andreas Enge <andreas@enge.fr> +;;; Copyright © 2013, 2023 Andreas Enge <andreas@enge.fr> ;;; Copyright © 2016, 2021 Leo Famulari <leo@famulari.name> -;;; Copyright © 2017, 2018, 2019, 2021, 2022 Ricardo Wurmus <rekado@elephly.net> +;;; Copyright © 2017, 2018, 2019, 2021, 2022, 2023 Ricardo Wurmus <rekado@elephly.net> ;;; Copyright © 2018 Tobias Geerinckx-Rice <me@tobias.gr> ;;; Copyright © 2019 Mathieu Othacehe <m.othacehe@gmail.com> ;;; Copyright © 2020 Lars-Dominik Braun <ldb@leibniz-psychology.org> ;;; Copyright © 2020 Efraim Flashner <efraim@flashner.co.il> -;;; Copyright © 2021 Maxim Cournoyer <maxim.cournoyer@gmail.com> +;;; Copyright © 2021, 2023 Maxim Cournoyer <maxim.cournoyer@gmail.com> ;;; Copyright © 2022 Marius Bakke <marius@gnu.org> +;;; Copyright © 2023 Brian Cully <bjc@spork.org> ;;; ;;; This file is part of GNU Guix. ;;; @@ -65,76 +66,14 @@ (define-public openldap (package - (name "openldap") - (version "2.4.57") - (source (origin - (method url-fetch) - ;; See <http://www.openldap.org/software/download/> for a list of - ;; mirrors. - (uri (list (string-append - "ftp://mirror.switch.ch/mirror/OpenLDAP/" - "openldap-release/openldap-" version ".tgz") - (string-append - "https://www.openldap.org/software/download/OpenLDAP/" - "openldap-release/openldap-" version ".tgz") - (string-append - "ftp://ftp.dti.ad.jp/pub/net/OpenLDAP/" - "openldap-release/openldap-" version ".tgz"))) - (sha256 - (base32 - "0nmlyqhc52v24b4awh914sczmvxbazgq2cnlycvb9dgcwvhlgfn7")))) - (build-system gnu-build-system) - (inputs (list bdb-5.3 cyrus-sasl gnutls libgcrypt zlib)) - (native-inputs (list libtool groff bdb-5.3)) - (arguments - `(#:tests? #f - #:configure-flags - '("--disable-static" - ,@(if (%current-target-system) - '("--with-yielding_select=yes" - "ac_cv_func_memcmp_working=yes") - '())) - ;; Disable install stripping as it breaks cross-compiling. - #:make-flags '("STRIP=") - #:phases - (modify-phases %standard-phases - ,@(if (%current-target-system) - '((add-before 'configure 'fix-cross-gcc - (lambda* (#:key target #:allow-other-keys) - (setenv "CC" (string-append target "-gcc")) - #t))) - '()) - (add-after 'install 'patch-sasl-path - ;; Give -L arguments for cyrus-sasl to avoid propagation. - (lambda* (#:key inputs outputs #:allow-other-keys) - (let ((out (assoc-ref outputs "out")) - (krb5 (assoc-ref inputs "mit-krb5"))) ;propagated from cyrus-sasl - - ;; The ancient Libtool bundled with OpenLDAP copies the linker flags - ;; from Cyrus-SASL and embeds them into its own .la files. Add an - ;; absolute reference to Kerberos so it does not have to be propagated. - (substitute* (map (lambda (f) (string-append out "/" f)) - '("lib/libldap.la" "lib/libldap_r.la")) - (("-lkrb5" lib) - (string-append "-L" krb5 "/lib " lib))) - #t)))))) - (synopsis "Implementation of the Lightweight Directory Access Protocol") - (description - "OpenLDAP is a free implementation of the Lightweight Directory Access Protocol.") - (license openldap2.8) - (home-page "https://www.openldap.org/"))) - -;; TODO: Update the main package in the next rebuild cycle. -(define-public openldap-2.6 - (package - (inherit openldap) - (version "2.6.3") + (name "openldap") + (version "2.6.4") (source (origin (method url-fetch) ;; See <http://www.openldap.org/software/download/> for a list of ;; mirrors. (uri (list (string-append - "http://mirror.eu.oneandone.net/software/openldap" + "http://repository.linagora.org/OpenLDAP" "/openldap-release/openldap-" version ".tgz") (string-append "https://www.openldap.org/software/download/OpenLDAP/" @@ -144,27 +83,53 @@ "openldap-release/openldap-" version ".tgz"))) (sha256 (base32 - "0ihddk8c6hg9lkjv0wk0w13g8kb75r8dfsn1n6b77mzk3pbs38nj")))) + "1489li52sjxm1f97v927jxaxzfk6v9sa32ixrw30qhvq07jh85ym")))) + (build-system gnu-build-system) + (inputs (list bdb-5.3 cyrus-sasl gnutls libgcrypt zlib)) + (native-inputs (list libtool groff bdb-5.3)) (arguments - (substitute-keyword-arguments (package-arguments openldap) - ((#:phases phases) - #~(modify-phases #$phases - (replace 'patch-sasl-path - ;; Give -L arguments for cyrus-sasl to avoid propagation. - (lambda* (#:key inputs #:allow-other-keys) - (let ((krb5 (search-input-file inputs "/lib/libkrb5.so"))) - (substitute* (string-append #$output "/lib/libldap.la") - (("-lkrb5" lib) - (string-append "-L" (dirname krb5) "/lib " lib)))))) - (add-after 'install 'provide-ldap_r - (lambda _ - ;; The re-entrant libldap_r no longer exists since 2.6 - ;; as it has become the default: provide a linker alias - ;; for now. - (call-with-output-file (string-append #$output - "/lib/libldap_r.so") - (lambda (port) - (format port "INPUT ( libldap.so )~%"))))))))))) + (list + #:tests? #f + #:configure-flags + #~(list "--disable-static" + #$@(if (%current-target-system) + '("--with-yielding_select=yes" + "ac_cv_func_memcmp_working=yes") + '())) + ;; Disable install stripping as it breaks cross-compiling. + #:make-flags + #~(list "STRIP=") + #:phases + #~(modify-phases %standard-phases + #$@(if (%current-target-system) + '((add-before 'configure 'fix-cross-gcc + (lambda* (#:key target #:allow-other-keys) + (setenv "CC" (string-append target "-gcc")) + (setenv "STRIP" (string-append target "-strip"))))) + '())))) + (synopsis "Implementation of the Lightweight Directory Access Protocol") + (description + "OpenLDAP is a free implementation of the Lightweight Directory Access Protocol.") + (license openldap2.8) + (home-page "https://www.openldap.org/"))) + +;; This is an incompatible fork of openldap that adds types needed for +;; liblinphone. +(define-public openldap-for-linphone + (hidden-package + (package + (inherit openldap) + (name "openldap") + (version "2.6.4") + (source (origin + (method git-fetch) + (uri (git-reference + (url "https://gitlab.linphone.org/BC/public/external/openldap/") + (commit "8a885896a3fb88098d970ab96316c0b7f18367b8"))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "1yd3cnngr5z3nymnml8fynspxgdzap7y7glp601nbkdj67wyg0k8"))))))) (define-public nss-pam-ldapd (package @@ -233,7 +198,7 @@ an LDAP server.") (setenv "SLAPD" slapd) (setenv "SCHEMA" schema))))))) (inputs - (list openldap-2.6 cyrus-sasl mit-krb5)) + (list openldap cyrus-sasl mit-krb5)) (propagated-inputs (list python-pyasn1 python-pyasn1-modules)) (home-page "https://www.python-ldap.org/") |