summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarius Bakke <marius@gnu.org>2022-01-20 23:12:32 +0100
committerMarius Bakke <marius@gnu.org>2022-01-21 00:35:06 +0100
commit0e8efe061139be8a8ed14711f9ec0937161cf566 (patch)
tree448efe7243e6c2f9b5272af55138ab5448582612
parent3874c9b5b4c7d1a3026213a55e396ca841fe048b (diff)
gnu: OpenLDAP: Add 2.6.1.
* gnu/packages/openldap.scm (openldap-2.6): New variable.
-rw-r--r--gnu/packages/openldap.scm44
1 files changed, 44 insertions, 0 deletions
diff --git a/gnu/packages/openldap.scm b/gnu/packages/openldap.scm
index b0ce899696..54a0571a1b 100644
--- a/gnu/packages/openldap.scm
+++ b/gnu/packages/openldap.scm
@@ -8,6 +8,7 @@
;;; 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 © 2022 Marius Bakke <marius@gnu.org>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -54,6 +55,7 @@
#:use-module (gnu packages)
#:use-module ((guix licenses) #:select (openldap2.8 lgpl2.1+ gpl3+ psfl expat))
#:use-module (guix packages)
+ #:use-module (guix gexp)
#:use-module (guix utils)
#:use-module (guix download)
#:use-module (guix build-system gnu)
@@ -120,6 +122,48 @@
(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.1")
+ (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"
+ "/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
+ "1wz6f3g3bbqgbbxs20zlappmmhapqbl791c0waibhz9djsk6wmwx"))))
+ (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 )~%")))))))))))
+
(define-public nss-pam-ldapd
(package
(name "nss-pam-ldapd")