GNU bug report logs - #52578
[PATCH] updating openldap and adding service definition

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: guix-patches; Reported by: Jean-Francois GUILLAUME <Jean-Francois.Guillaume@HIDDEN>; Keywords: patch; dated Fri, 17 Dec 2021 15:07:01 UTC; Maintainer for guix-patches is guix-patches@HIDDEN.

Message received at 52578 <at> debbugs.gnu.org:


Received: (at 52578) by debbugs.gnu.org; 18 Dec 2021 11:00:09 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Dec 18 06:00:09 2021
Received: from localhost ([127.0.0.1]:41347 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1myXRg-0005Qs-T1
	for submit <at> debbugs.gnu.org; Sat, 18 Dec 2021 06:00:09 -0500
Received: from mail-wm1-f43.google.com ([209.85.128.43]:36817)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <zimon.toutoune@HIDDEN>) id 1myXRe-0005Os-9a
 for 52578 <at> debbugs.gnu.org; Sat, 18 Dec 2021 06:00:06 -0500
Received: by mail-wm1-f43.google.com with SMTP id
 y83-20020a1c7d56000000b003456dfe7c5cso4841776wmc.1
 for <52578 <at> debbugs.gnu.org>; Sat, 18 Dec 2021 03:00:06 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112;
 h=from:to:subject:in-reply-to:references:date:message-id:mime-version
 :content-transfer-encoding;
 bh=tddXBLRpfLolditLwLdDdt4I+Ir3en3EwEcc2OcEdgM=;
 b=RiaR2bRa/wCMBsHoQSqjuYDHeAzsfEUy3lOVQzxJiqza6VaLqntpHWsHvbv0eaMI2B
 HaIOzm+fVmEeZ0EVI5wTJcLWfRJSQpfk5tULarhq8LVqV9vhdYmiFYolhqD0Xv6zx0ms
 0ZA+agux9F9740+0srtdM9/r2Xs0zdGCgnVchDuKYYWKHRV9W7NtYAauIQNi+Dkuvi4i
 +P1xUaN69rDoXn+Is8byJIyx37RW1ZJJTMj2Lt4VMHCyUy6c3WW0NygZcm6gYe5KN1uc
 qa2Yj+HoWyTHMKuFf21cGH3Ep3tuv425OgQwPv2z1EdkLEbrZj2dgsrAiCaWdemr1Aqm
 DKKg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20210112;
 h=x-gm-message-state:from:to:subject:in-reply-to:references:date
 :message-id:mime-version:content-transfer-encoding;
 bh=tddXBLRpfLolditLwLdDdt4I+Ir3en3EwEcc2OcEdgM=;
 b=CwBwobO9PeltxbWgwsJu6+0eEojMH4p7bT2WgIR/k0siak+B9xtZyqmT8d7SktqrBl
 79OBofUofYxybRyarnNXc57Bzp5rrXyf+OxLUTwnAi18qCIzSJwrMcRHJ0lrbO+G1cSl
 fcX1SnL9ewBJEzo5bkbk35R4sDO/ZXssPDOxVYJpSS1nDz7WGv7WUp/z6CHTvzj2afZQ
 pCyUKKcEWMk946InAEBPxYkvf381We6ylARDHKAkw1A5OHKbu6nMdytVyxDnuxZuisgG
 vxF4YLgtIzc6pCJIXZPqMLCRtYMaoubydnEoQcuh25uPQbCP0M3V8OcA/+L9aaIWOQqv
 rSQA==
X-Gm-Message-State: AOAM533f9EyYOk1cprjC0+CaA2k0EYdmdAEQ77X15kwtFWJoWepROc1v
 rRFKMeG8YYu0KLylvI1nEsaNIfhOdXk=
X-Google-Smtp-Source: ABdhPJwezkWQxwSNIAckt90d94pAZ15NYx3R/eXDFpcds3rD3xi2YEXUBg6UjxyLCLk36io8315Drw==
X-Received: by 2002:a05:600c:3489:: with SMTP id
 a9mr13311737wmq.53.1639825200488; 
 Sat, 18 Dec 2021 03:00:00 -0800 (PST)
Received: from lili ([2a01:e0a:59b:9120:65d2:2476:f637:db1e])
 by smtp.gmail.com with ESMTPSA id y3sm7609317wrq.12.2021.12.18.02.59.59
 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
 Sat, 18 Dec 2021 03:00:00 -0800 (PST)
From: zimoun <zimon.toutoune@HIDDEN>
To: Maxime Devos <maximedevos@HIDDEN>, 52578 <at> debbugs.gnu.org
Subject: Re: [bug#52578] [PATCH] updating openldap and adding service
 definition
In-Reply-To: <48af7ae3214ca223d7b57c0fd5a72c13a9fcbd85.camel@HIDDEN>
References: <e4b25a81bb9401c74aa5db6c47185efe@HIDDEN>
 <48af7ae3214ca223d7b57c0fd5a72c13a9fcbd85.camel@HIDDEN>
Date: Sat, 18 Dec 2021 11:53:43 +0100
Message-ID: <868rwiqj48.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 52578
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

Hi Maxime,

The package =E2=80=99openldap=E2=80=99 already exists and some of your comm=
ents ask
about the existing recipe. :-)

I think Jean-Fran=C3=A7ois just copy/pasted the current recipe and expand it
for their own requirements: having the service they need, IIUC.


On Fri, 17 Dec 2021 at 22:39, Maxime Devos <maximedevos@HIDDEN> wrote:

>> +        ,@(if (%current-target-system)
>> +          '("--with-yielding_select=3Dyes"
> "ac_cv_func_memcmp_working=3Dyes")
>> +          '()
>> +        )
>
> is this speculation on what's necessary for cross-compilation, or has
> it been determined these flags are necessary?

This bits had been added by Mathieu 1c8b1870a60de12f6c19d809522f5d836221513=
1.


>>+      #:make-flags '("STRIP=3D")
>
> Why?

This one too.

>> +        ,@(if (%current-target-system)
>> +            '(
>> +              (add-before 'make-depend 'fix-cross-gcc
>> +                (lambda* (#:key target #:allow-other-keys)
>> +                  (setenv "CC" (string-append target "-gcc"))
>> +                  #t
>> +                )
>> +              )
>> +            )
>> +            '()
>
> You can use ,(cc-for-target) here. Also, CC can be set in #:make-flags.

Again this one.


>> +    (synopsis "Implementation of the Lightweight Directory Access
> Protocol")
>> +    (description "OpenLDAP is a free implementation of the
> Lightweight Directory Access Protocol.")
>
> That's a very terse description --- is it a server, a client
> application, programming APIs for communicating with a server, or all
> of these? Also, no need to mention it's free, everything in Guix is
> free.

This description is from 2013, 2a75d4e664e802d3a3e2ed6455c63f32541559c8. ;-)


Your comments about the package itself make sense but I am not convinced
that they are related to the first Jean-Fran=C3=A7ois submission. :-)


Cheers,
simon




Information forwarded to guix-patches@HIDDEN:
bug#52578; Package guix-patches. Full text available.

Message received at 52578 <at> debbugs.gnu.org:


Received: (at 52578) by debbugs.gnu.org; 18 Dec 2021 10:27:10 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Dec 18 05:27:10 2021
Received: from localhost ([127.0.0.1]:41304 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1myWvl-0004Zq-Tr
	for submit <at> debbugs.gnu.org; Sat, 18 Dec 2021 05:27:10 -0500
Received: from mail-wr1-f42.google.com ([209.85.221.42]:39780)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <zimon.toutoune@HIDDEN>) id 1myWvi-0004ZO-Tz
 for 52578 <at> debbugs.gnu.org; Sat, 18 Dec 2021 05:27:08 -0500
Received: by mail-wr1-f42.google.com with SMTP id s1so3409694wra.6
 for <52578 <at> debbugs.gnu.org>; Sat, 18 Dec 2021 02:27:06 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112;
 h=from:to:subject:in-reply-to:references:date:message-id:mime-version
 :content-transfer-encoding;
 bh=n2XQkFEd6HsNKm9aYfdjdsHwp8HzFzOGw/xFNiTfygo=;
 b=irrqQ1o3v7mjTAhtdq0dbm43eTuscFrubliC2b1uNidkt3ktaqlKsRichmyXtq8o3e
 mn5ZRa3llKvPXGGcadI7orMUUCjjHznLuncOdUJjbfSneBg+XqPpaRgSOaZvzQJd98mL
 bA+py/R0a/2XELNnhFtUnuFGFSQ1zrXn3L/OCLoRN9HEhmfmNfQbmi2ZvUyuo27//LaA
 sFSjwyW2At563UagzmR9d3V9N4oKTSuJ61z44LBTJA7C0V3I6TvueT+Ry8HWZlxaNnfc
 FMhCiCOto1WSSjRWNPsyXQjRt7TpFPWGSOHv0MDEUl1zBP7nXYDb3xBpCf+kBQRswarD
 o8+w==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20210112;
 h=x-gm-message-state:from:to:subject:in-reply-to:references:date
 :message-id:mime-version:content-transfer-encoding;
 bh=n2XQkFEd6HsNKm9aYfdjdsHwp8HzFzOGw/xFNiTfygo=;
 b=FuCdwmEfctnTVtsnQlbfsRRR7YQ4M9cKzvKTpE9OKFjPmtaSUABPhyoLMaYTqzzeHI
 Pf/imoDhIRcZYFOfvvSDTIckQW9vOH6MhcqZXsbx+p86xW2qpNz7RBhqxRRL1cnynbW4
 21zAkjtvd95evs17A7nWOcjRw/K9tgegzoew4Q+9BTFFGXoOFor3WlEXkgVswTPXG715
 21hrt3zPxDUCMAKqm6/VECD7/zMwbpIf0F2ReeeWGZ46/LSzFHAdIZmkiXPhO0WhS4xK
 Epx7B9bm5BALnlO2Dkq1l1mnDa8BVDrQQ6gQLjudMtEQ+bL1wgkBs/G+XdTNvTc2K4vH
 hY8A==
X-Gm-Message-State: AOAM531MDWMsmlJGbP4FTnCkhWxeh4zD4WO58OqEwZDCBXsrNY9YBZgR
 7U1uiAYptUT7u1Rnm6Vez+LWTFAc4mw=
X-Google-Smtp-Source: ABdhPJxmtvQYf4IS9KoI2dqX4h4XCbaKaW4sMelXarIw2tEGB4ul2W3d/BB6CGK9AG0wX5odHEOiPQ==
X-Received: by 2002:adf:ec09:: with SMTP id x9mr5831443wrn.111.1639823220868; 
 Sat, 18 Dec 2021 02:27:00 -0800 (PST)
Received: from lili ([2a01:e0a:59b:9120:65d2:2476:f637:db1e])
 by smtp.gmail.com with ESMTPSA id r5sm5511575wrj.4.2021.12.18.02.27.00
 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
 Sat, 18 Dec 2021 02:27:00 -0800 (PST)
From: zimoun <zimon.toutoune@HIDDEN>
To: Jean-Francois GUILLAUME <Jean-Francois.Guillaume@HIDDEN>,
 52578 <at> debbugs.gnu.org
Subject: Re: [bug#52578] [PATCH] updating openldap and adding service
 definition
In-Reply-To: <e4b25a81bb9401c74aa5db6c47185efe@HIDDEN>
References: <e4b25a81bb9401c74aa5db6c47185efe@HIDDEN>
Date: Sat, 18 Dec 2021 11:22:05 +0100
Message-ID: <86ee6aqkky.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 52578
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

Hi Jean-Fran=C3=A7ois,

Nice to see you here. :-)

Various comments for improving the submission.

On Fri, 17 Dec 2021 at 14:52, Jean-Francois GUILLAUME <Jean-Francois.Guilla=
ume@HIDDEN> wrote:
> * gnu/packages/openldap.scm (openldap): Update to 2.6.0, adding 2.5.7,=20
> 2.5.8, 2.5.9
> * gnu/services/openldap.scm (openldap): Adding slapd service

I would split: one commit for adding a big openldap and another for
adding the service.  WDYT?

(I have not looked yet to the service.)


>   (define-public openldap
> +  (package
> +    (name "openldap")
> +    (version "2.6.0")
> +    (source (origin
> +      (method url-fetch)
> +      (uri (list
> +        (string-append=20
> "https://www.openldap.org/software/download/OpenLDAP/openldap-release/ope=
nldap-"=20
> version ".tgz")

Why the mirror list had been removed?


> +        (string-append=20
> "http://repository.linagora.org/OpenLDAP/openldap-release/openldap-"=20
> version ".tgz")

This is new, right?


> +        (string-append=20
> "ftp://ftp.dti.ad.jp/pub/net/OpenLDAP/openldap-release/openldap-"=20
> version ".tgz")

As it is currently and already done in gnu/packages/openldap.scm, to
ease the reading, this long string could be slip as,

--8<---------------cut here---------------start------------->8---
                        (string-append
                         "ftp://ftp.dti.ad.jp/pub/net/OpenLDAP/"
                         "openldap-release/openldap-" version ".tgz")))
--8<---------------cut here---------------end--------------->8---

(See below for details if many variants are required.)


> +    (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)
> +    ))

Currently, openldap@HIDDEN is built using (reformatted by me to ease the
comparison):

--8<---------------cut here---------------start------------->8---
   (inputs (list bdb-5.3=20
                 cyrus-sasl=20
                 gnutls=20
                 libgcrypt=20
                 zlib))
   (native-inputs (list libtool=20
                        groff=20
                        bdb-5.3))
--8<---------------cut here---------------end--------------->8---

Aside the new style vs the old style which is a detail, are these lists
expanded because the version bump or because more OpenLDAP is built
using more features?


> +    (arguments `(
> +      ; this is needed because the make check does not work inside guix
> +      #:tests? #f

It was already off, but I do not understand the new comment.  Well,
maybe this commentary is not necessary.


> +      #: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=3Dmod"
> +        "--enable-overlays=3Dmod"
> +        "--enable-argon2"
> +        "--enable-balancer"
> +        "--disable-static"
> +        "--enable-shared"
> +        "--with-tls=3Dopenssl"
> +        "--disable-static"

This is a lot more. :-)  Therefore, the question is: is it better=20

 - to have only one BIG openldap package?
 - or to have one minimal openldap and a bigger variant?

Well, =E2=80=9Cguix refresh -l openldap=E2=80=9D answers for us. ;-)

I propose to keep openldap@HIDDEN minimal, as it currently is, and use
=E2=80=99inherit=E2=80=99 to build BIG =E2=80=99openldap@HIDDEN=E2=80=99 an=
d variants.


> +        ,@(if (%current-target-system)
> +          '("--with-yielding_select=3Dyes"=20
> "ac_cv_func_memcmp_working=3Dyes")
> +          '()
> +        )
> +      )
> +      #:make-flags '("STRIP=3D")
> +      #:parallel-build? #t

This is not necessary because it is the default.


> +      #: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
> +                )
> +              )
> +            )
> +            '()
> +        )
> +      )
> +    ))

A minor comment, usually, we do:

--8<---------------cut here---------------start------------->8---
        ,@(if (%current-target-system)
            '((add-before 'make-depend 'fix-cross-gcc
                (lambda* (#:key target #:allow-other-keys)
                  (setenv "CC" (string-append target "-gcc"))
                  #t)))
            '()))))
--8<---------------cut here---------------end--------------->8---

instead of all these closing parens, each on one line.

Using =E2=80=99inherit=E2=80=99, this is even probably not required. :-)


> +(define-public openldap-2.5.9
> +  (package
> +    (inherit openldap)
> +    (name "openldap")
> +    (version "2.5.9")
> +    (source (origin
> +      (method url-fetch)
> +      (uri (list
> +        (string-append=20
> "https://www.openldap.org/software/download/OpenLDAP/openldap-release/ope=
nldap-"=20
> version ".tgz")
> +        (string-append=20
> "http://repository.linagora.org/OpenLDAP/openldap-release/openldap-"=20
> version ".tgz")
> +        (string-append=20
> "ftp://ftp.dti.ad.jp/pub/net/OpenLDAP/openldap-release/openldap-"=20
> version ".tgz")
> +      ))
> +      (sha256 ( base32=20
> "17pvwrj27jybbmjqpv0p7kd2qa4i6jnp134lz7cxa0sqrbs153n0" ))
> +      )

Do you need all these variants?  If yes, it could be nice to have,
instead of copy/paste all, something like:

--8<---------------cut here---------------start------------->8---
(define (openldap-uris version)
  (let ((openldap-release "OpenLDAP/openldap-release/")
        (openldap-version.tgz
         (string-append "openldap-" version ".tgz")))
    (map (lambda (url)
           (string-append url openldap-release openldap-version.tgz))
         (list "https://www.openldap.org/software/download/"
               "http://repository.linagora.org/"
               "ftp://ftp.dti.ad.jp/pub/net/"))))

(define-public openldap-2.5.8
  (package
    (inherit openldap)
    (name "openldap")
    (version "2.5.8")
    (source (origin
      (method url-fetch)
      (uri (openldap-uris version))
      (sha256
       (base32 "1p3jck2kh7rsz6mkrqaailaf9ky050hn72wph52dw0j2nb1s2vin")))))

[=E2=80=A6]
--8<---------------cut here---------------end--------------->8---

(Untested though. :-)))



Cheers,
simon




Information forwarded to guix-patches@HIDDEN:
bug#52578; Package guix-patches. Full text available.

Message received at 52578 <at> debbugs.gnu.org:


Received: (at 52578) by debbugs.gnu.org; 17 Dec 2021 22:46:36 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Dec 17 17:46:36 2021
Received: from localhost ([127.0.0.1]:40823 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1myLzo-0003B9-6g
	for submit <at> debbugs.gnu.org; Fri, 17 Dec 2021 17:46:36 -0500
Received: from xavier.telenet-ops.be ([195.130.132.52]:57360)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <maximedevos@HIDDEN>) id 1myLzm-0003Az-L5
 for 52578 <at> debbugs.gnu.org; Fri, 17 Dec 2021 17:46:35 -0500
Received: from ptr-bvsjgyhxw7psv60dyze.18120a2.ip6.access.telenet.be
 ([IPv6:2a02:1811:8c09:9d00:3c5f:2eff:feb0:ba5a])
 by xavier.telenet-ops.be with bizsmtp
 id XamY260124UW6Th01amZjq; Fri, 17 Dec 2021 23:46:33 +0100
Message-ID: <d9989148b2eecb02bee243f88ee17bdb80aab7a8.camel@HIDDEN>
Subject: Re: [PATCH] updating openldap and adding service definition
From: Maxime Devos <maximedevos@HIDDEN>
To: 52578 <at> debbugs.gnu.org
Date: Fri, 17 Dec 2021 22:46:30 +0000
Content-Type: text/plain; charset="UTF-8"
User-Agent: Evolution 3.38.3-1 
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telenet.be; s=r21;
 t=1639781193; bh=3zT2vvdIZ5xxbeTqjE1OjnHXAUmLtkU6cvHmb+ChQnw=;
 h=Subject:From:To:Date;
 b=KKL0mFnWC91n0kLtBvaEqJiwRZHV/KPI27tR2U6RWgs3xBSIzFM58LKCZZ4rI/tlE
 nJkX4BitkIZSShHQPF+wJvYd+lhEMXXYGQBRRU7S6H95YY7yo1CrR7ESPfVxS/BpEv
 VKkBFp+gtqzf7Jd0uozlH08vawCiRT/7RbO5goJHCMNieyEF6UjwUi/iTMCrStJgkh
 RnWG017HUNDc9zW5haXIP71RrmtZCAZiA1rT59MYTNS3UAyhGY8g9dVGzCloLAQYqP
 LOW1wxu3wX1jvW/UDEUtTqKSarI59+l0Xke7vbK5KusmkbOVx6Dorx/yF5cA6Nllgd
 bY1PRZ5MY1dqA==
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 52578
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

Hi,

> +      ; this is needed because the make check does not work inside
guix
> +      #:tests? #f

What do you mean with ‘does not work inside guix’?
A failing test, a missing test dependency, ...?
If it doesn't work, then it should be fixed if feasible
-- test suites exist for a reason!

And if it is a failing test, that would mean the test suite caught a
bug, so in that case, the test suite is succeeding in its purpose, not
failing.

Greetings,
Maxime





Information forwarded to guix-patches@HIDDEN:
bug#52578; Package guix-patches. Full text available.

Message received at 52578 <at> debbugs.gnu.org:


Received: (at 52578) by debbugs.gnu.org; 17 Dec 2021 22:39:24 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Dec 17 17:39:24 2021
Received: from localhost ([127.0.0.1]:40818 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1myLsq-0002z1-9Q
	for submit <at> debbugs.gnu.org; Fri, 17 Dec 2021 17:39:24 -0500
Received: from baptiste.telenet-ops.be ([195.130.132.51]:49812)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <maximedevos@HIDDEN>) id 1myLso-0002yr-KH
 for 52578 <at> debbugs.gnu.org; Fri, 17 Dec 2021 17:39:23 -0500
Received: from ptr-bvsjgyhxw7psv60dyze.18120a2.ip6.access.telenet.be
 ([IPv6:2a02:1811:8c09:9d00:3c5f:2eff:feb0:ba5a])
 by baptiste.telenet-ops.be with bizsmtp
 id XafL2600F4UW6Th01afLyu; Fri, 17 Dec 2021 23:39:21 +0100
Message-ID: <48af7ae3214ca223d7b57c0fd5a72c13a9fcbd85.camel@HIDDEN>
Subject: [PATCH] updating openldap and adding service definition
From: Maxime Devos <maximedevos@HIDDEN>
To: 52578 <at> debbugs.gnu.org
Date: Fri, 17 Dec 2021 22:39:20 +0000
Content-Type: text/plain; charset="UTF-8"
User-Agent: Evolution 3.38.3-1 
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telenet.be; s=r21;
 t=1639780761; bh=F+XcxPqmbXPjPBw1MvPHx7V7BFUp8qOVada1X2zhRl4=;
 h=Subject:From:To:Date;
 b=ECJ4rWDIfV0SSLizZt/IF+nlZcgrClMqTXLB9dWLhXR0gxiOZfhBEj6ZoG6AjekB6
 0hgV7pHOAxKGq3N5ZXiCgla7SqT1dXzupdrDiOmDf6Y4WHH7EOvKAkAAD1VczCU3u5
 OnLROaLu5MnI+U/ZtS1sV6SEXhRUGXY9V8VukCqZJ4giGW1u+9ZK2o6JxRIVgCVc8A
 7tEKnVvCgDbrs8vW0WPvJz7pKdiCNGhK5uQMvBbvy5roj2VyZMbVfS9z7MD22gEefk
 qDZsKNTyc3TVAdmX+H/7AFjHB2YevXO14QDnmp6ezbfXEqGdbytL57KvEReAnInAu0
 yBFP9xCCBuvrg==
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 52578
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

Hi,

>+        "--disable-static"
>+        "--enable-shared"
>+        "--with-tls=openssl"
>+        "--disable-static"

A single "--disable-static" should be suficient.

> +        ,@(if (%current-target-system)
> +          '("--with-yielding_select=yes"
"ac_cv_func_memcmp_working=yes")
> +          '()
> +        )

is this speculation on what's necessary for cross-compilation, or has
it been determined these flags are necessary?

>+      #:make-flags '("STRIP=")

Why?

>+ #:parallel-build? #t

This is the default, no need to mention it.

> +        ,@(if (%current-target-system)
> +            '(
> +              (add-before 'make-depend 'fix-cross-gcc
> +                (lambda* (#:key target #:allow-other-keys)
> +                  (setenv "CC" (string-append target "-gcc"))
> +                  #t
> +                )
> +              )
> +            )
> +            '()

You can use ,(cc-for-target) here. Also, CC can be set in #:make-flags.

> +    (synopsis "Implementation of the Lightweight Directory Access
Protocol")
> +    (description "OpenLDAP is a free implementation of the
Lightweight Directory Access Protocol.")

That's a very terse description --- is it a server, a client
application, programming APIs for communicating with a server, or all
of these? Also, no need to mention it's free, everything in Guix is
free.

> +(define-public openldap-2.5.9
> + (package
> +   (inherit openldap)

What's the reason for defining multiple versions of openldap?
Usually, it is only necessary to keep the latest version of a package
(with some rare exceptions).

>+(define-module (gnu services openldap)

A copyright + license header is missing, and this file needs to be
added to Makefile.am (or local.mk, I'm not sure about the details).

>+  #: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 (

This seems unlikely to compile, what's the space doing here?

Something I'm missing here, is some documentation. As it is, this
openldap service isn't documented anywhere, so nobody would figure out
it even exists, unless they search in the source code.

> +        (shepherd-service [...])

As-is, this service would be run as root, which is very suboptimal from
a security perspective. Consider running it as a separate user & group,
and if feasible in a container (the latter is optional but would be
great).

> +  (pid-file openldap-configuration-pid-file
> +    (default "/var/run/openldap/slapd.pid"))
> +  (log-file openldap-configuration-log-file
> +    (default "/var/log/slapd.log"))

I don't see the point in making this customisable.
Why would anyone want to change the log locations or location of the
pid file? Unless there's some compelling reason otherwise, I'd prefer
to keep complexity down by not making this configurable.

> +  (config-file openldap-configuration-config-file
> +    (default (file-append openldap "/etc/openldap/slapd.conf"))
> +  )

Allowing writing the configuration with configuration records would be
preferred (with an 'extra-content'-style escape hatch, because it would
probably be infeasible to support every single configuration option of
openldap, but some basic options like ‘which network port to bind to’
should be configurable in Scheme).

> +          (requirement '(user-processes))

This service probably requires a network interface, so loopback might
be required. Also, why is user-processes included? I know many services
include it, but it doesn't appear to be documented anywhere when user-
processes must be added to 'requirement'.

>+    openldap-configuration
>+    openldap-configuration?
>+    openldap-shepherd-service
>+    openldap-service-type
>+  )

These parentheses are lonely, consider moving the parenthese to right
after openldap-service-type, to keep the style consistent in Guix.

Greetings,
Maxime.





Information forwarded to guix-patches@HIDDEN:
bug#52578; Package guix-patches. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 17 Dec 2021 15:06:09 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Dec 17 10:06:09 2021
Received: from localhost ([127.0.0.1]:40386 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1myEoA-0006sm-Qb
	for submit <at> 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 <Jean-Francois.Guillaume@HIDDEN>)
 id 1myDmW-0004ai-7x
 for submit <at> 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 <Jean-Francois.Guillaume@HIDDEN>)
 id 1myDmV-0008Ul-Se
 for guix-patches@HIDDEN; 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 <Jean-Francois.Guillaume@HIDDEN>)
 id 1myDmR-0002Dl-Ps
 for guix-patches@HIDDEN; 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 <guix-patches@HIDDEN>; 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 <guix-patches@HIDDEN>;
 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 <guix-patches@HIDDEN>; 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 <Jean-Francois.Guillaume@HIDDEN>
To: guix-patches@HIDDEN
Subject: [PATCH] updating openldap and adding service definition
Organization: UFR MEDECINE/FED 4203 SFR SANTE
Message-ID: <e4b25a81bb9401c74aa5db6c47185efe@HIDDEN>
X-Sender: Jean-Francois.Guillaume@HIDDEN
User-Agent: Roundcube Webmail/1.1.2
Received-SPF: pass client-ip=193.52.82.18;
 envelope-from=Jean-Francois.Guillaume@HIDDEN;
 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-Spam-Score: -1.7 (-)
X-Debbugs-Envelope-To: submit
X-Mailman-Approved-At: Fri, 17 Dec 2021 10:06:05 -0500
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -2.7 (--)

* 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>
+  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-configuration> 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




Acknowledgement sent to Jean-Francois GUILLAUME <Jean-Francois.Guillaume@HIDDEN>:
New bug report received and forwarded. Copy sent to guix-patches@HIDDEN. Full text available.
Report forwarded to guix-patches@HIDDEN:
bug#52578; Package guix-patches. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Sat, 18 Dec 2021 11:15:02 UTC

GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997 nCipher Corporation Ltd, 1994-97 Ian Jackson.