From patchwork Fri Dec 17 13:52:46 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jean-Francois GUILLAUME X-Patchwork-Id: 35353 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 92F0D27BBEA; Fri, 17 Dec 2021 15:57:06 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL, SPF_HELO_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id D5E4F27BBE9 for ; Fri, 17 Dec 2021 15:57:05 +0000 (GMT) Received: from localhost ([::1]:46852 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1myFbV-0007aO-32 for patchwork@mira.cbaines.net; Fri, 17 Dec 2021 10:57:05 -0500 Received: from eggs.gnu.org ([209.51.188.92]:49398) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1myEp4-000182-Eu for guix-patches@gnu.org; Fri, 17 Dec 2021 10:07:03 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:57075) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1myEp4-00027E-6b for guix-patches@gnu.org; Fri, 17 Dec 2021 10:07:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1myEp3-0006uG-Qh for guix-patches@gnu.org; Fri, 17 Dec 2021 10:07:01 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#52578] [PATCH] updating openldap and adding service definition Resent-From: Jean-Francois GUILLAUME Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Fri, 17 Dec 2021 15:07:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 52578 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 52578@debbugs.gnu.org X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.163975356926467 (code B ref -1); Fri, 17 Dec 2021 15:07:01 +0000 Received: (at submit) by debbugs.gnu.org; 17 Dec 2021 15:06:09 +0000 Received: from localhost ([127.0.0.1]:40386 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1myEoA-0006sm-Qb for submit@debbugs.gnu.org; Fri, 17 Dec 2021 10:06:09 -0500 Received: from lists.gnu.org ([209.51.188.17]:39818) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1myDmW-0004ai-7x for submit@debbugs.gnu.org; Fri, 17 Dec 2021 09:00:20 -0500 Received: from eggs.gnu.org ([209.51.188.92]:57058) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1myDmV-0008Ul-Se for guix-patches@gnu.org; Fri, 17 Dec 2021 09:00:19 -0500 Received: from smtp1.univ-nantes.fr ([193.52.82.18]:36142 helo=smtp-prv.univ-nantes.fr) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1myDmR-0002Dl-Ps for guix-patches@gnu.org; Fri, 17 Dec 2021 09:00:19 -0500 Received: from localhost (localhost [127.0.0.1]) by smtp-prv.univ-nantes.fr (Postfix) with ESMTP id 9B8B6B6F0F for ; Fri, 17 Dec 2021 14:52:46 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=univ-nantes.fr; s=mailv2; t=1639749166; bh=mR4He1a2ABNjJwuqwPz7Ql9GQXQXbz9zH0OC5fLwGX4=; h=Date:From:To:Subject:From; b=nzIlpUpjpkgO23qJm0XcvHCZLkwTOo2p0WntS45b1CMyB3uHhs9OgmysvXzfGn+sR PiX8haEgbmM/+C8jrN/VFpJvS2cxi1TYopy+BUMNJUJQggIoybnzVi19b5w9x43W4t Kw3ByOkQq8wIXWYt7c2iZUm9GRxTrEuvdIbE48y5tlnVMmBBQk9VI0NII8oLEFx35R yA+8N4CMGQra5fsyjKdkXzhGkxmIrqsek6UtlWEc8R/xKrJM5lUiT024nsYYViYnbL c6Rk7rKW2uFfe+v/g+vGbXx57/VgBCfXIuQ/rzKxFwrXsoaOnUkNh3/dwDD0OdqrYs fWgAzhMRaA2mg== X-Virus-Scanned: Debian amavisd-new at smtp2 Received: from smtp-prv.univ-nantes.fr ([127.0.0.1]) by localhost (smtp1.u12.univ-nantes.prive [127.0.0.1]) (amavisd-new, port 10024) with LMTP id FN6nO0VcAbwS for ; Fri, 17 Dec 2021 14:52:46 +0100 (CET) Received: from webmail.univ-nantes.fr (webmail1-loi.cprv.univ-nantes.prive [172.26.0.62]) by smtp-prv.univ-nantes.fr (Postfix) with ESMTP id 792CBB6F0E for ; Fri, 17 Dec 2021 14:52:46 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=univ-nantes.fr; s=mailv2; t=1639749166; bh=mR4He1a2ABNjJwuqwPz7Ql9GQXQXbz9zH0OC5fLwGX4=; h=Date:From:To:Subject:From; b=nzIlpUpjpkgO23qJm0XcvHCZLkwTOo2p0WntS45b1CMyB3uHhs9OgmysvXzfGn+sR PiX8haEgbmM/+C8jrN/VFpJvS2cxi1TYopy+BUMNJUJQggIoybnzVi19b5w9x43W4t Kw3ByOkQq8wIXWYt7c2iZUm9GRxTrEuvdIbE48y5tlnVMmBBQk9VI0NII8oLEFx35R yA+8N4CMGQra5fsyjKdkXzhGkxmIrqsek6UtlWEc8R/xKrJM5lUiT024nsYYViYnbL c6Rk7rKW2uFfe+v/g+vGbXx57/VgBCfXIuQ/rzKxFwrXsoaOnUkNh3/dwDD0OdqrYs fWgAzhMRaA2mg== MIME-Version: 1.0 Date: Fri, 17 Dec 2021 14:52:46 +0100 From: Jean-Francois GUILLAUME Organization: UFR MEDECINE/FED 4203 SFR SANTE Message-ID: X-Sender: Jean-Francois.Guillaume@univ-nantes.fr User-Agent: Roundcube Webmail/1.1.2 Received-SPF: pass client-ip=193.52.82.18; envelope-from=Jean-Francois.Guillaume@univ-nantes.fr; helo=smtp-prv.univ-nantes.fr X-Spam_score_int: -43 X-Spam_score: -4.4 X-Spam_bar: ---- X-Spam_report: (-4.4 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Mailman-Approved-At: Fri, 17 Dec 2021 10:06:05 -0500 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-Mailman-Approved-At: Fri, 17 Dec 2021 10:56:43 -0500 X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" X-getmail-retrieved-from-mailbox: Patches * gnu/packages/openldap.scm (openldap): Update to 2.6.0, adding 2.5.7, 2.5.8, 2.5.9 * gnu/services/openldap.scm (openldap): Adding slapd service --- gnu/packages/openldap.scm | 148 ++++++++++++++++++++++++++++++++++++++ gnu/services/openldap.scm | 87 ++++++++++++++++++++++ 2 files changed, 235 insertions(+) create mode 100644 gnu/services/openldap.scm + (description "Run @uref{https://www.openldap.org, Openldap} community developped LDAP software.") + ) +) -- 2.30.2 diff --git a/gnu/packages/openldap.scm b/gnu/packages/openldap.scm index b0ce899696..61f99dea7a 100644 --- a/gnu/packages/openldap.scm +++ b/gnu/packages/openldap.scm @@ -60,6 +60,154 @@ #:use-module (guix build-system python)) (define-public openldap + (package + (name "openldap") + (version "2.6.0") + (source (origin + (method url-fetch) + (uri (list + (string-append "https://www.openldap.org/software/download/OpenLDAP/openldap-release/openldap-" version ".tgz") + (string-append "http://repository.linagora.org/OpenLDAP/openldap-release/openldap-" version ".tgz") + (string-append "ftp://ftp.dti.ad.jp/pub/net/OpenLDAP/openldap-release/openldap-" version ".tgz") + )) + (sha256 ( base32 "0kqswk8pxgnlibh0kz6py3a2x3yh9pfk6pyr2nx9lgjpmh75h75p" )) + ) + ) + (build-system gnu-build-system) + (inputs `( + ("argon2", argon2) + ("cyrus-sasl", cyrus-sasl) + ("libevent", libevent) + ("libgcrypt", libgcrypt) + ("libltdl", libltdl) + ("lz4", lz4) + ("openssl", openssl) + ("perl", perl) + ("snappy", snappy) + ("unixodbc", unixodbc) + ("wiredtiger", wiredtiger) + ("zlib", zlib) + )) + (native-inputs `( + ("bdb", bdb) + ("groff", groff) + ("libtool", libtool) + ("pkg-config", pkg-config) + )) + (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-static" + ,@(if (%current-target-system) + '("--with-yielding_select=yes" "ac_cv_func_memcmp_working=yes") + '() + ) + ) + #:make-flags '("STRIP=") + #:parallel-build? #t + #:phases (modify-phases %standard-phases + (add-before 'build 'make-depend + (lambda* (#:key input #:allow-other-keys) + (invoke "make" "depend") + ) + ) + ,@(if (%current-target-system) + '( + (add-before 'make-depend 'fix-cross-gcc + (lambda* (#:key target #:allow-other-keys) + (setenv "CC" (string-append target "-gcc")) + #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/") + ) +) + +(define-public openldap-2.5.9 + (package + (inherit openldap) + (name "openldap") + (version "2.5.9") + (source (origin + (method url-fetch) + (uri (list + (string-append "https://www.openldap.org/software/download/OpenLDAP/openldap-release/openldap-" version ".tgz") + (string-append "http://repository.linagora.org/OpenLDAP/openldap-release/openldap-" version ".tgz") + (string-append "ftp://ftp.dti.ad.jp/pub/net/OpenLDAP/openldap-release/openldap-" version ".tgz") + )) + (sha256 ( base32 "17pvwrj27jybbmjqpv0p7kd2qa4i6jnp134lz7cxa0sqrbs153n0" )) + ) + ) + ) +) + +(define-public openldap-2.5.8 + (package + (inherit openldap) + (name "openldap") + (version "2.5.8") + (source (origin + (method url-fetch) + (uri (list + (string-append "https://www.openldap.org/software/download/OpenLDAP/openldap-release/openldap-" version ".tgz") + (string-append "http://repository.linagora.org/OpenLDAP/openldap-release/openldap-" version ".tgz") + (string-append "ftp://ftp.dti.ad.jp/pub/net/OpenLDAP/openldap-release/openldap-" version ".tgz") + )) + (sha256 ( base32 "1p3jck2kh7rsz6mkrqaailaf9ky050hn72wph52dw0j2nb1s2vin" )) + ) + ) + ) +) + +(define-public openldap-2.5.7 + (package + (inherit openldap) + (name "openldap") + (version "2.5.7") + (source (origin + (method url-fetch) + (uri (list + (string-append "https://www.openldap.org/software/download/OpenLDAP/openldap-release/openldap-" version ".tgz") + (string-append "http://repository.linagora.org/OpenLDAP/openldap-release/openldap-" version ".tgz") + (string-append "ftp://ftp.dti.ad.jp/pub/net/OpenLDAP/openldap-release/openldap-" version ".tgz") + )) + (sha256 ( base32 "1ayr76sa5hjwldqzis5v71sbp88hd3hysc00gw1raqn33c05g5za" )) + ) + ) + ) +) + +(define-public openldap-2.4.57 (package (name "openldap") (version "2.4.57") diff --git a/gnu/services/openldap.scm b/gnu/services/openldap.scm new file mode 100644 index 0000000000..0fd329d611 --- /dev/null +++ b/gnu/services/openldap.scm @@ -0,0 +1,87 @@ +(define-module (gnu services openldap) + #:use-module (gnu packages openldap) + #:use-module (gnu services) + #:use-module (gnu services shepherd) + #:use-module (guix) + #:use-module (guix records) + #:use-module (ice-9 match) + #: export ( + openldap-configuration + openldap-configuration? + openldap-shepherd-service + openldap-service-type + ) +) + +(define-record-type* + openldap-configuration make-openldap-configuration + openldap-configuration? + (openldap openldap-configuration-openldap + (default openldap) + ) + (uri openldap-configuration-uri + (default "ldapi:// ldap://") + ) + (logflags openldap-configuration-logflags + (default "0") + ) + (pid-file openldap-configuration-pid-file + (default "/var/run/openldap/slapd.pid") + ) + (config-file openldap-configuration-config-file + (default (file-append openldap "/etc/openldap/slapd.conf")) + ) + (log-file openldap-configuration-log-file + (default "/var/log/slapd.log") + ) +) + +(define openldap-shepherd-service + (match-lambda + (($ openldap uri logflags pid-file config-file log-file) + (list + (shepherd-service + (provision '(slapd) ) + (documentation "Run openldap.") + (requirement '(user-processes)) + (respawn? #t) + (start #~(make-forkexec-constructor + (list + #$(file-append openldap "/libexec/slapd") + "-h" #$uri + "-d" #$logflags + "-f" #$config-file + ) + #:pid-file #$pid-file + #:log-file #$log-file + )) + (stop #~(make-kill-destructor)) + ) + ) + ) + ) +) + + +(define %openldap-activation + (with-imported-modules '((guix build utils)) + #~(begin + (use-modules (guix build utils)) + (mkdir-p "/var/run/openldap") + (mkdir-p "/var/lib/ldap") + #t + ) + ) +) + +(define openldap-service-type + (service-type (name 'slapd) + (extensions + (list + (service-extension shepherd-root-service-type openldap-shepherd-service) + (service-extension activation-service-type (const %openldap-activation)) + ) + )