From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id QMl9HlOzvGEeKAAAgWs5BA (envelope-from ) for ; Fri, 17 Dec 2021 16:57:07 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id 6KgEGlOzvGGiIAAAbx9fmQ (envelope-from ) for ; Fri, 17 Dec 2021 15:57:07 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 23D91E3CB for ; Fri, 17 Dec 2021 16:57:07 +0100 (CET) Received: from localhost ([::1]:46852 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1myFbW-0007aO-BG for larch@yhetil.org; Fri, 17 Dec 2021 10:57:06 -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 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit 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+larch=yhetil.org@gnu.org Sender: "Guix-patches" X-Migadu-Flow: FLOW_IN X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1639756627; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=mR4He1a2ABNjJwuqwPz7Ql9GQXQXbz9zH0OC5fLwGX4=; b=WJe/f4YRiE5JZo8Kgz1SlbUgdZMjLY2wmrg35ID0jQeyTo2e+gRQKgE5Y8oytX0gU4i5Rq ENNuyjOh31l8Zb8tB3gZWLSSbAGtNQ7d8LdZdtl2TPmJvamCsdx686prSNXkEG/4Z34OSy e3pTPh3+kZDt0umvt8Xsr44YjLuKOCCU/ldywxNz6FNmQJ4x3Sm/8x4MmWIZR+JYRqHRdB 6yz4yFrTVxtrY64NprGZK3AKnqAltrRT1toVaSw0OEEQDO9+taZR5KAom5ZJyNPD54YhtV QKT8gnxcwvm5nLNup61xR0NqAVecSN4n7rhMFhjFRQB3Do003SaIQjpy1Ej0EA== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1639756627; a=rsa-sha256; cv=none; b=U5blpBBOjoPHz7DNY7W4Y4Mdo3qf7zKOVjdsvyRs1D/Kyk3TVijCDF7WZ8LRPKJwXu+PPJ VC2Srf3jqyxyHKcRoUMGBrhHNwrjiKShJcsWMu/Lsk9AKguaQBtG8PfNpKsJtV1iCcl3Di GYBRiU/LwkDRXRyYAqwGyBdckVXu8IzF3UsTLJqQSpsyCtJTtoAgeFLObgY99vtqNgWvdO m9hgPvXSK2BmD6PEMGTQFBOU02S1WCx12+b/ndtm7bUxZM9WuTIARykkYCKKWNcKrehrhG Vd67YdsU3Z25tCd6wIvuvNfvTxJSZVtAujNnRUgvrKg8bmL6Gl3ZNk245qp33Q== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=univ-nantes.fr header.s=mailv2 header.b=nzIlpUpj; dkim=fail ("headers rsa verify failed") header.d=univ-nantes.fr header.s=mailv2 header.b=nzIlpUpj; dmarc=fail reason="SPF not aligned (relaxed)" header.from=univ-nantes.fr (policy=none); spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: -3.10 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=univ-nantes.fr header.s=mailv2 header.b=nzIlpUpj; dkim=fail ("headers rsa verify failed") header.d=univ-nantes.fr header.s=mailv2 header.b=nzIlpUpj; dmarc=fail reason="SPF not aligned (relaxed)" header.from=univ-nantes.fr (policy=none); spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: 23D91E3CB X-Spam-Score: -3.10 X-Migadu-Scanner: scn0.migadu.com X-TUID: G2/FN5pTAbTF * 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 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)) + ) + ) + (description "Run @uref{https://www.openldap.org, Openldap} community developped LDAP software.") + ) +) -- 2.30.2