mirror of
https://gitlab.univ-nantes.fr/glicid-public/guix-glicid.git
synced 2025-04-30 06:08:37 +02:00
splitting openldap
This commit is contained in:
parent
b64d33ede9
commit
84c60730d1
3 changed files with 174 additions and 166 deletions
|
@ -1,166 +0,0 @@
|
||||||
(use-modules (guix)
|
|
||||||
(guix build-system gnu)
|
|
||||||
((guix licenses) #:select (openldap2.8 lgpl2.1+ gpl3+ psfl expat))
|
|
||||||
(guix packages)
|
|
||||||
(guix utils)
|
|
||||||
(guix download)
|
|
||||||
(guix build-system gnu)
|
|
||||||
(gnu packages base)
|
|
||||||
(gnu packages autotools)
|
|
||||||
(gnu packages check)
|
|
||||||
(gnu packages compression)
|
|
||||||
(gnu packages cyrus-sasl)
|
|
||||||
(gnu packages dbm)
|
|
||||||
(gnu packages documentation)
|
|
||||||
(gnu packages gettext)
|
|
||||||
(gnu packages gnupg)
|
|
||||||
(gnu packages groff)
|
|
||||||
(gnu packages icu4c)
|
|
||||||
(gnu packages kerberos)
|
|
||||||
(gnu packages libevent)
|
|
||||||
(gnu packages linux)
|
|
||||||
(gnu packages networking)
|
|
||||||
(gnu packages nss)
|
|
||||||
(gnu packages password-utils)
|
|
||||||
(gnu packages pcre)
|
|
||||||
(gnu packages perl)
|
|
||||||
(gnu packages pkg-config)
|
|
||||||
(gnu packages python)
|
|
||||||
(gnu packages python-xyz)
|
|
||||||
(gnu packages rsync)
|
|
||||||
(gnu packages selinux)
|
|
||||||
(gnu packages time)
|
|
||||||
(gnu packages tls)
|
|
||||||
(gnu packages web)
|
|
||||||
(gnu packages databases)
|
|
||||||
(gnu packages password-utils)
|
|
||||||
)
|
|
||||||
|
|
||||||
(define-public openldap-glicid
|
|
||||||
(package
|
|
||||||
(name "openldap-glicid")
|
|
||||||
(version "2.5.7")
|
|
||||||
(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/")
|
|
||||||
(source (origin
|
|
||||||
(method url-fetch)
|
|
||||||
(uri (list
|
|
||||||
(string-append "https://www.openldap.org/software/download/OpenLDAP/" "openldap-release/openldap-" version ".tgz")
|
|
||||||
(string-append "http://gpl.savoirfairelinux.net/pub/mirrors/openldap/" "openldap-release/openldap-" version ".tgz")
|
|
||||||
(string-append "http://repository.linagora.org/OpenLDAP/" "openldap-release/openldap-" version ".tgz")
|
|
||||||
(string-append "ftp://ftp.ntua.gr/mirror/OpenLDAP/" "openldap-release/openldap-" version ".tgz")
|
|
||||||
(string-append "https://mirror-hk.koddos.net/OpenLDAP/" "openldap-release/openldap-" version ".tgz")
|
|
||||||
(string-append "ftp://ftp.dti.ad.jp/pub/net/OpenLDAP/" "openldap-release/openldap-" version ".tgz")
|
|
||||||
(string-append "https://mirror.koddos.net/OpenLDAP/" "openldap-release/openldap-" version ".tgz")
|
|
||||||
(string-append "https://mirror.lyrahosting.com/OpenLDAP/" "openldap-release/openldap-" version ".tgz")
|
|
||||||
))
|
|
||||||
(sha256 ( base32 "1ayr76sa5hjwldqzis5v71sbp88hd3hysc00gw1raqn33c05g5za" ))
|
|
||||||
)
|
|
||||||
)
|
|
||||||
(build-system gnu-build-system)
|
|
||||||
(inputs `(
|
|
||||||
("bdb", bdb)
|
|
||||||
("cyrus-sasl", cyrus-sasl)
|
|
||||||
("gnutls", gnutls)
|
|
||||||
("libgcrypt", libgcrypt)
|
|
||||||
("zlib", zlib)
|
|
||||||
("libltdl", libltdl)
|
|
||||||
("pkg-config", pkg-config)
|
|
||||||
("libevent", libevent)
|
|
||||||
("libtool", libtool)
|
|
||||||
("groff", groff)
|
|
||||||
("openssl", openssl)
|
|
||||||
("argon2", argon2)
|
|
||||||
("wiredtiger", wiredtiger)
|
|
||||||
("snappy", snappy)
|
|
||||||
("lz4", lz4)
|
|
||||||
))
|
|
||||||
(arguments '(
|
|
||||||
; this is needed because the make check does not work inside guix
|
|
||||||
#:tests? #f
|
|
||||||
#:configure-flags '(
|
|
||||||
"--enable-debug" "--enable-dynamic" "--enable-syslog" "--enable-ipv6" "--enable-local" "--enable-slapd" "--enable-dynacl"
|
|
||||||
"--enable-aci" "--enable-cleartext" "--enable-crypt" "--enable-spasswd" "--enable-modules" "--enable-rlookups" "--enable-slapi"
|
|
||||||
"--enable-backends=mod" "--enable-overlays=mod" "--enable-argon2" "--enable-balancer" "--disable-static"
|
|
||||||
"--enable-shared" "--with-tls=openssl"
|
|
||||||
)
|
|
||||||
; Disable install stripping as it breaks cross-compiling.
|
|
||||||
#:make-flags '("STRIP=")
|
|
||||||
#:phases (modify-phases %standard-phases
|
|
||||||
(add-before 'build 'make-depend
|
|
||||||
(lambda* (#:key input #:allow-other-keys)
|
|
||||||
(invoke "make" "depend")
|
|
||||||
)
|
|
||||||
)
|
|
||||||
)
|
|
||||||
))
|
|
||||||
)
|
|
||||||
(define-record-type* <openldap-configuration>
|
|
||||||
openldap-configuration make-openldap-configuration
|
|
||||||
openldap-configuration?
|
|
||||||
(openldap openldap-configuration-openldap ;<package>
|
|
||||||
(default openldap-glicid)
|
|
||||||
)
|
|
||||||
(arguments openldap-configuration-arguments ;list of strings
|
|
||||||
(default '())
|
|
||||||
)
|
|
||||||
(logflags openldap-configuration-logflags ;number
|
|
||||||
(default "0")
|
|
||||||
)
|
|
||||||
(log-file openldap-configuration-log-file ; string
|
|
||||||
(default "/var/log/slapd.log")
|
|
||||||
)
|
|
||||||
(pid-file openldap-configuration-pid-file ; string
|
|
||||||
(default "/var/run/openldap/slapd.pid")
|
|
||||||
)
|
|
||||||
(config-file openldap-configuration-config-file ; string
|
|
||||||
(default %default-slapd.conf)
|
|
||||||
)
|
|
||||||
(schema-dir openldap-configuration-schema-dir ; string
|
|
||||||
(default '())
|
|
||||||
)
|
|
||||||
)
|
|
||||||
(define %default-slapd.conf
|
|
||||||
(plain-file "slapd.conf" "
|
|
||||||
# Empty file for test
|
|
||||||
"))
|
|
||||||
(define schema_dir (local-file "ldap_schema" #:recursive? #t))
|
|
||||||
(define openldap-shepherd-service
|
|
||||||
(match-lambda
|
|
||||||
(($ <openldap-configuration> openldap arguments logflags log-file pid-file config-file schema-dir)
|
|
||||||
(list
|
|
||||||
(shepherd-service
|
|
||||||
(provision '(slapd) )
|
|
||||||
(documentation "Run openldap.")
|
|
||||||
(requirement '(user-processes))
|
|
||||||
(respawn? #f)
|
|
||||||
(start #~(make-forkexec-constructor
|
|
||||||
(list
|
|
||||||
#$(file-append openldap-glicid "/libexec/slapd")
|
|
||||||
"-h 'ldap:/// ldaps:///'"
|
|
||||||
"-d" #$logflags
|
|
||||||
"-f" #$config-file
|
|
||||||
)
|
|
||||||
#:pid-file #$pid-file
|
|
||||||
))
|
|
||||||
(stop #~(make-kill-destructor))
|
|
||||||
)
|
|
||||||
)
|
|
||||||
)
|
|
||||||
)
|
|
||||||
)
|
|
||||||
(define openldap-service-type
|
|
||||||
(service-type (name 'slapd)
|
|
||||||
(extensions
|
|
||||||
(list (
|
|
||||||
service-extension
|
|
||||||
shepherd-root-service-type
|
|
||||||
openldap-shepherd-service
|
|
||||||
))
|
|
||||||
)
|
|
||||||
(description "Run @uref{https://www.openldap.org, Openldap} community developped LDAP software.")
|
|
||||||
)
|
|
||||||
)
|
|
||||||
)
|
|
99
glicid/packages/openldap.scm
Normal file
99
glicid/packages/openldap.scm
Normal file
|
@ -0,0 +1,99 @@
|
||||||
|
(define-module (glicid packages openldap)
|
||||||
|
#:use-module (guix build-system gnu)
|
||||||
|
#:use-module ((guix licenses) #:select (openldap2.8 lgpl2.1+ gpl3+ psfl expat))
|
||||||
|
#:use-module (guix packages)
|
||||||
|
#:use-module (guix utils)
|
||||||
|
#:use-module (guix download)
|
||||||
|
#:use-module (guix build-system gnu)
|
||||||
|
#:use-module (gnu packages autotools)
|
||||||
|
#:use-module (gnu packages check)
|
||||||
|
#:use-module (gnu packages compression)
|
||||||
|
#:use-module (gnu packages cyrus-sasl)
|
||||||
|
#:use-module (gnu packages dbm)
|
||||||
|
#:use-module (gnu packages documentation)
|
||||||
|
#:use-module (gnu packages gettext)
|
||||||
|
#:use-module (gnu packages gnupg)
|
||||||
|
#:use-module (gnu packages groff)
|
||||||
|
#:use-module (gnu packages icu4c)
|
||||||
|
#:use-module (gnu packages kerberos)
|
||||||
|
#:use-module (gnu packages libevent)
|
||||||
|
#:use-module (gnu packages linux)
|
||||||
|
#:use-module (gnu packages networking)
|
||||||
|
#:use-module (gnu packages nss)
|
||||||
|
#:use-module (gnu packages password-utils)
|
||||||
|
#:use-module (gnu packages pcre)
|
||||||
|
#:use-module (gnu packages perl)
|
||||||
|
#:use-module (gnu packages pkg-config)
|
||||||
|
#:use-module (gnu packages python)
|
||||||
|
#:use-module (gnu packages python-xyz)
|
||||||
|
#:use-module (gnu packages rsync)
|
||||||
|
#:use-module (gnu packages selinux)
|
||||||
|
#:use-module (gnu packages time)
|
||||||
|
#:use-module (gnu packages tls)
|
||||||
|
#:use-module (gnu packages web)
|
||||||
|
#:use-module (gnu packages databases)
|
||||||
|
#:use-module (gnu packages password-utils)
|
||||||
|
)
|
||||||
|
|
||||||
|
(define-public openldap-glicid
|
||||||
|
(package
|
||||||
|
(name "openldap-glicid")
|
||||||
|
(version "2.5.7")
|
||||||
|
(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/")
|
||||||
|
(source (origin
|
||||||
|
(method url-fetch)
|
||||||
|
(uri (list
|
||||||
|
(string-append "https://www.openldap.org/software/download/OpenLDAP/" "openldap-release/openldap-" version ".tgz")
|
||||||
|
(string-append "http://gpl.savoirfairelinux.net/pub/mirrors/openldap/" "openldap-release/openldap-" version ".tgz")
|
||||||
|
(string-append "http://repository.linagora.org/OpenLDAP/" "openldap-release/openldap-" version ".tgz")
|
||||||
|
(string-append "ftp://ftp.ntua.gr/mirror/OpenLDAP/" "openldap-release/openldap-" version ".tgz")
|
||||||
|
(string-append "https://mirror-hk.koddos.net/OpenLDAP/" "openldap-release/openldap-" version ".tgz")
|
||||||
|
(string-append "ftp://ftp.dti.ad.jp/pub/net/OpenLDAP/" "openldap-release/openldap-" version ".tgz")
|
||||||
|
(string-append "https://mirror.koddos.net/OpenLDAP/" "openldap-release/openldap-" version ".tgz")
|
||||||
|
(string-append "https://mirror.lyrahosting.com/OpenLDAP/" "openldap-release/openldap-" version ".tgz")
|
||||||
|
))
|
||||||
|
(sha256 ( base32 "1ayr76sa5hjwldqzis5v71sbp88hd3hysc00gw1raqn33c05g5za" ))
|
||||||
|
)
|
||||||
|
)
|
||||||
|
(build-system gnu-build-system)
|
||||||
|
(inputs `(
|
||||||
|
("bdb", bdb)
|
||||||
|
("cyrus-sasl", cyrus-sasl)
|
||||||
|
("gnutls", gnutls)
|
||||||
|
("libgcrypt", libgcrypt)
|
||||||
|
("zlib", zlib)
|
||||||
|
("libltdl", libltdl)
|
||||||
|
("pkg-config", pkg-config)
|
||||||
|
("libevent", libevent)
|
||||||
|
("libtool", libtool)
|
||||||
|
("groff", groff)
|
||||||
|
("openssl", openssl)
|
||||||
|
("argon2", argon2)
|
||||||
|
("wiredtiger", wiredtiger)
|
||||||
|
("snappy", snappy)
|
||||||
|
("lz4", lz4)
|
||||||
|
))
|
||||||
|
(arguments '(
|
||||||
|
; this is needed because the make check does not work inside guix
|
||||||
|
#:tests? #f
|
||||||
|
#:configure-flags '(
|
||||||
|
"--enable-debug" "--enable-dynamic" "--enable-syslog" "--enable-ipv6" "--enable-local" "--enable-slapd" "--enable-dynacl"
|
||||||
|
"--enable-aci" "--enable-cleartext" "--enable-crypt" "--enable-spasswd" "--enable-modules" "--enable-rlookups" "--enable-slapi"
|
||||||
|
"--enable-backends=mod" "--enable-overlays=mod" "--enable-argon2" "--enable-balancer" "--disable-static"
|
||||||
|
"--enable-shared" "--with-tls=openssl"
|
||||||
|
)
|
||||||
|
; Disable install stripping as it breaks cross-compiling.
|
||||||
|
#:make-flags '("STRIP=")
|
||||||
|
#:phases (modify-phases %standard-phases
|
||||||
|
(add-before 'build 'make-depend
|
||||||
|
(lambda* (#:key input #:allow-other-keys)
|
||||||
|
(invoke "make" "depend")
|
||||||
|
)
|
||||||
|
)
|
||||||
|
)
|
||||||
|
))
|
||||||
|
)
|
||||||
|
)
|
75
glicid/services/openldap.scm
Normal file
75
glicid/services/openldap.scm
Normal file
|
@ -0,0 +1,75 @@
|
||||||
|
(define-module (glicid services openldap)
|
||||||
|
#:use-module (glicid packages openldap)
|
||||||
|
#: export (
|
||||||
|
openldap-configuration
|
||||||
|
openldap-configuration?
|
||||||
|
%default-slapd.conf
|
||||||
|
)
|
||||||
|
)
|
||||||
|
|
||||||
|
(define-record-type* <openldap-configuration>
|
||||||
|
openldap-configuration make-openldap-configuration
|
||||||
|
openldap-configuration?
|
||||||
|
(openldap openldap-configuration-openldap ;<package>
|
||||||
|
(default openldap-glicid)
|
||||||
|
)
|
||||||
|
(arguments openldap-configuration-arguments ;list of strings
|
||||||
|
(default '())
|
||||||
|
)
|
||||||
|
(logflags openldap-configuration-logflags ;number
|
||||||
|
(default "0")
|
||||||
|
)
|
||||||
|
(log-file openldap-configuration-log-file ; string
|
||||||
|
(default "/var/log/slapd.log")
|
||||||
|
)
|
||||||
|
(pid-file openldap-configuration-pid-file ; string
|
||||||
|
(default "/var/run/openldap/slapd.pid")
|
||||||
|
)
|
||||||
|
(config-file openldap-configuration-config-file ; string
|
||||||
|
(default %default-slapd.conf)
|
||||||
|
)
|
||||||
|
(schema-dir openldap-configuration-schema-dir ; string
|
||||||
|
(default '())
|
||||||
|
)
|
||||||
|
)
|
||||||
|
(define %default-slapd.conf
|
||||||
|
(plain-file "slapd.conf" "
|
||||||
|
# Empty file for test
|
||||||
|
"))
|
||||||
|
(define schema_dir (local-file "ldap_schema" #:recursive? #t))
|
||||||
|
(define openldap-shepherd-service
|
||||||
|
(match-lambda
|
||||||
|
(($ <openldap-configuration> openldap arguments logflags log-file pid-file config-file schema-dir)
|
||||||
|
(list
|
||||||
|
(shepherd-service
|
||||||
|
(provision '(slapd) )
|
||||||
|
(documentation "Run openldap.")
|
||||||
|
(requirement '(user-processes))
|
||||||
|
(respawn? #f)
|
||||||
|
(start #~(make-forkexec-constructor
|
||||||
|
(list
|
||||||
|
#$(file-append openldap-glicid "/libexec/slapd")
|
||||||
|
"-h 'ldap:/// ldaps:///'"
|
||||||
|
"-d" #$logflags
|
||||||
|
"-f" #$config-file
|
||||||
|
)
|
||||||
|
#:pid-file #$pid-file
|
||||||
|
))
|
||||||
|
(stop #~(make-kill-destructor))
|
||||||
|
)
|
||||||
|
)
|
||||||
|
)
|
||||||
|
)
|
||||||
|
)
|
||||||
|
(define openldap-service-type
|
||||||
|
(service-type (name 'slapd)
|
||||||
|
(extensions
|
||||||
|
(list (
|
||||||
|
service-extension
|
||||||
|
shepherd-root-service-type
|
||||||
|
openldap-shepherd-service
|
||||||
|
))
|
||||||
|
)
|
||||||
|
(description "Run @uref{https://www.openldap.org, Openldap} community developped LDAP software.")
|
||||||
|
)
|
||||||
|
)
|
Loading…
Add table
Reference in a new issue