GNU bug report logs - #62859
[PATCH core-updates] gnu: openldap: core-updates build fixes

Previous Next

Package: guix-patches;

Reported by: Brian Cully <bjc <at> spork.org>

Date: Sat, 15 Apr 2023 13:54:02 UTC

Severity: normal

Tags: patch

Merged with 62863

Done: Andreas Enge <andreas <at> enge.fr>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: help-debbugs <at> gnu.org (GNU bug Tracking System)
To: Andreas Enge <andreas <at> enge.fr>
Cc: tracker <at> debbugs.gnu.org
Subject: bug#62863: closed ([PATCH core-updates] gnu: openldap: Fix build.)
Date: Sun, 16 Apr 2023 12:01:02 +0000
[Message part 1 (text/plain, inline)]
Your message dated Sun, 16 Apr 2023 13:59:55 +0200
with message-id <ZDvjOyAlBI1DQhts <at> jurong>
and subject line Openldap in core-updates
has caused the debbugs.gnu.org bug report #62859,
regarding [PATCH core-updates] gnu: openldap: Fix build.
to be marked as done.

(If you believe you have received this mail in error, please contact
help-debbugs <at> gnu.org.)


-- 
62859: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=62859
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
From: Josselin Poiret <dev <at> jpoiret.xyz>
To: guix-patches <at> gnu.org
Cc: Josselin Poiret <dev <at> jpoiret.xyz>
Subject: [PATCH core-updates] gnu: openldap: Fix build.
Date: Sat, 15 Apr 2023 17:17:11 +0200
* gnu/packages/openldap.scm (openldap): Switch arguments to g-exps.  Also, do
not try to patch libldap_r.la which doesn't exist anymore.
---
 gnu/packages/openldap.scm | 67 +++++++++++++++++++--------------------
 1 file changed, 33 insertions(+), 34 deletions(-)

diff --git a/gnu/packages/openldap.scm b/gnu/packages/openldap.scm
index 7409848795..42fc8269ac 100644
--- a/gnu/packages/openldap.scm
+++ b/gnu/packages/openldap.scm
@@ -84,47 +84,46 @@ (define-public openldap
                (base32
                 "0ihddk8c6hg9lkjv0wk0w13g8kb75r8dfsn1n6b77mzk3pbs38nj"))))
     (build-system gnu-build-system)
-    (inputs (list bdb-5.3 cyrus-sasl gnutls libgcrypt zlib))
+    (inputs (list bdb-5.3 cyrus-sasl gnutls libgcrypt mit-krb5 zlib))
     (native-inputs (list libtool groff bdb-5.3))
     (arguments
-     `(#:tests? #f
-       #:configure-flags
-       '("--disable-static"
+     (list
+      #:tests? #f
+      #:configure-flags
+      `'("--disable-static"
          ,@(if (%current-target-system)
                '("--with-yielding_select=yes"
                  "ac_cv_func_memcmp_working=yes")
                '()))
-       ;; Disable install stripping as it breaks cross-compiling.
-       #:make-flags '("STRIP=")
-       #:phases
-       (modify-phases %standard-phases
-         ,@(if (%current-target-system)
-               '((add-before 'configure 'fix-cross-gcc
-                   (lambda* (#:key target #:allow-other-keys)
-                     (setenv "CC" (string-append target "-gcc"))
-                     (setenv "STRIP" (string-append target "-strip")))))
-               '())
-         (add-after 'install 'patch-sasl-path
-           ;; Give -L arguments for cyrus-sasl to avoid propagation.
-           (lambda* (#:key inputs outputs #:allow-other-keys)
-             (let ((out (assoc-ref outputs "out"))
-                   (krb5 (assoc-ref inputs "mit-krb5"))) ;propagated from cyrus-sasl
+      ;; Disable install stripping as it breaks cross-compiling.
+      #:make-flags ''("STRIP=")
+      #:phases
+      #~(modify-phases %standard-phases
+          #$@(if (%current-target-system)
+                 #~((add-before 'configure 'fix-cross-gcc
+                      (lambda _
+                        (setenv "CC" #$(cc-for-target))
+                        (setenv "STRIP" #$(string-append (%current-target-system) "-strip")))))
+                 #~())
+          (add-after 'install 'patch-sasl-path
+            ;; Give -L arguments for cyrus-sasl to avoid propagation.
+            (lambda* (#:key inputs #:allow-other-keys)
+              (let ((krb5-lib (basename (search-input-file inputs "lib/libkrb5.so"))))
 
-               ;; The ancient Libtool bundled with OpenLDAP copies the linker flags
-               ;; from Cyrus-SASL and embeds them into its own .la files.  Add an
-               ;; absolute reference to Kerberos so it does not have to be propagated.
-               (substitute* (map (lambda (f) (string-append out "/" f))
-                                 '("lib/libldap.la" "lib/libldap_r.la"))
-                 (("-lkrb5" lib)
-                  (string-append "-L" krb5 "/lib " lib))))))
-         (add-after 'install 'provide-libldap_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 )~%"))))))))
+                ;; The ancient Libtool bundled with OpenLDAP copies the linker flags
+                ;; from Cyrus-SASL and embeds them into its own .la files.  Add an
+                ;; absolute reference to Kerberos so it does not have to be propagated.
+                (substitute* (list (string-append #$output "/lib/libldap.la"))
+                  (("-lkrb5" lib)
+                   (string-append "-L" krb5-lib " " lib))))))
+          (add-after 'install 'provide-libldap_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 )~%"))))))))
     (synopsis "Implementation of the Lightweight Directory Access Protocol")
     (description
      "OpenLDAP is a free implementation of the Lightweight Directory Access Protocol.")
-- 
2.39.2



[Message part 3 (message/rfc822, inline)]
From: Andreas Enge <andreas <at> enge.fr>
To: guix-devel <at> gnu.org
Cc: 62859-done <at> debbugs.gnu.org, 62863-done <at> debbugs.gnu.org
Subject: Openldap in core-updates
Date: Sun, 16 Apr 2023 13:59:55 +0200
Am Sun, Apr 16, 2023 at 01:09:02PM +0200 schrieb Andreas Enge:
> A single package holds up a lot (gtk+ and so on): openldap.

It was pointed out to me on IRC that there are already two fixes available
on our issue tracker! I applied one of them and also removed the additional
phase as suggested there.

In a separate commit, I also updated to 2.6.4 and removed the non-hidden
openldap-for-linphone variable, which had the confusing effect that the
command line would refer to this package (so "guix refresh -l openldap"
showed almost no dependents, for instance).

If any of these pose problems, we should selectively revert part of the
commits; but I am rather optimistic, as both versions create a library
with the same soname.

Thanks to all involved!

Andreas



This bug report was last modified 2 years and 39 days ago.

Previous Next


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