all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: John Kehayias via Guix-patches via <guix-patches@gnu.org>
To: 62894@debbugs.gnu.org
Subject: [bug#62894] [PATCH core-updates 1/2] gnu: samba: Fix build on i686-linux.
Date: Mon, 17 Apr 2023 04:33:33 +0000	[thread overview]
Message-ID: <87ildvruue.fsf@protonmail.com> (raw)
In-Reply-To: <87jzybrval.fsf@protonmail.com>

[-- Attachment #1: Type: text/plain, Size: 13 bytes --]

Empty Message

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-gnu-samba-Fix-build-on-i686-linux.patch --]
[-- Type: text/x-patch; name=0001-gnu-samba-Fix-build-on-i686-linux.patch, Size: 5616 bytes --]

From 5f0faac057e9706e2c0c5d19895173c50d119434 Mon Sep 17 00:00:00 2001
From: John Kehayias <john.kehayias@protonmail.com>
Date: Mon, 17 Apr 2023 00:09:25 -0400
Subject: [PATCH 1/2] gnu: samba: Fix build on i686-linux.

* gnu/packages/samba.scm (samba)[phases]{configure}: Make "--enable-selftest"
conditional on architectures with rust support, as python-cryptography is
needed.
[native-inputs]: Only include python-cryptography for architectures with rust.
---
 gnu/packages/samba.scm | 70 +++++++++++++++++++++++++-----------------
 1 file changed, 42 insertions(+), 28 deletions(-)

diff --git a/gnu/packages/samba.scm b/gnu/packages/samba.scm
index 8c004a1aac..1621706807 100644
--- a/gnu/packages/samba.scm
+++ b/gnu/packages/samba.scm
@@ -14,6 +14,7 @@
 ;;; Copyright © 2022 Guillaume Le Vaillant <glv@posteo.net>
 ;;; Copyright © 2022 Maxime Devos <maximedevos@telenet.be>
 ;;; Copyright © 2022 Simon Streit <simon@netpanic.org>
+;;; Copyright © 2023 John Kehayias <john.kehayias@protonmail.com>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -208,21 +209,28 @@ (define-public samba/pinned
            (replace 'configure
              ;; Samba uses a custom configuration script that runs WAF.
              (lambda* (#:key inputs #:allow-other-keys)
-               (let* ((libdir (string-append #$output "/lib")))
-                 (invoke "./configure"
-                         "--enable-selftest"
-                         "--enable-fhs"
-                         (string-append "--prefix=" #$output)
-                         "--sysconfdir=/etc"
-                         "--localstatedir=/var"
-                         ;; Install public and private libraries into
-                         ;; a single directory to avoid RPATH issues.
-                         (string-append "--libdir=" libdir)
-                         (string-append "--with-privatelibdir=" libdir)
-                         "--with-system-mitkrb5"
-                         (string-append "--with-system-mitkdc="
-                                        (search-input-file inputs "sbin/krb5kdc"))
-                         "--with-experimental-mit-ad-dc"))))
+               (let* ((libdir (string-append #$output "/lib"))
+                      (system (or #$(%current-target-system)
+                                  #$(%current-system))))
+                 (apply invoke `("./configure"
+                                 ;; The selftest requires python-cryptography, only
+                                 ;; available where we have rust.
+                                 ,@(if (or (string-prefix? "x86_64-" system)
+                                           (string-prefix? "aarch64-" system))
+                                       '("--enable-selftest")
+                                       '())
+                                 "--enable-fhs"
+                                 ,(string-append "--prefix=" #$output)
+                                 "--sysconfdir=/etc"
+                                 "--localstatedir=/var"
+                                 ;; Install public and private libraries into
+                                 ;; a single directory to avoid RPATH issues.
+                                 ,(string-append "--libdir=" libdir)
+                                 ,(string-append "--with-privatelibdir=" libdir)
+                                 "--with-system-mitkrb5"
+                                 ,(string-append "--with-system-mitkdc="
+                                                 (search-input-file inputs "sbin/krb5kdc"))
+                                 "--with-experimental-mit-ad-dc")))))
            (add-before 'install 'disable-etc,var-samba-directories-setup
              (lambda _
                (substitute* "dynconfig/wscript"
@@ -255,19 +263,25 @@ (define-public samba/pinned
       ;; In Requires or Requires.private of pkg-config files.
       (list ldb talloc tevent))
      (native-inputs
-      (list perl-parse-yapp
-            pkg-config
-            python-cryptography         ;for krb5 tests
-            python-dnspython
-            python-iso8601
-            python-markdown
-            rpcsvc-proto                ;for 'rpcgen'
-            python-pyasn1               ;for krb5 tests
-            ;; For generating man pages.
-            docbook-xml-4.2
-            docbook-xsl
-            libxslt
-            libxml2))                   ;for XML_CATALOG_FILES
+      (append (list perl-parse-yapp
+                    pkg-config
+                    python-dnspython
+                    python-iso8601
+                    python-markdown
+                    rpcsvc-proto                ;for 'rpcgen'
+                    python-pyasn1               ;for krb5 tests
+                    ;; For generating man pages.
+                    docbook-xml-4.2
+                    docbook-xsl
+                    libxslt
+                    libxml2)                    ;for XML_CATALOG_FILES
+              ;; For krb5 tests, only where we have rust available.
+              (let ((system (or (%current-target-system)
+                                (%current-system))))
+                (if (or (string-prefix? "x86_64-" system)
+                        (string-prefix? "aarch64-" system))
+                    (list python-cryptography)
+                    '()))))
      (home-page "https://www.samba.org/")
      (synopsis
       "The standard Windows interoperability suite of programs for GNU and Unix")
-- 
2.39.2


  reply	other threads:[~2023-04-17  4:34 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-04-17  4:23 [bug#62894] [PATCH core-updates 0/2] gnu: samba: Fix build on i686-linux John Kehayias via Guix-patches via
2023-04-17  4:33 ` John Kehayias via Guix-patches via [this message]
2023-04-17  4:34 ` [bug#62894] [PATCH core-updates 2/2] gnu: samba: Update to 4.18.1 John Kehayias via Guix-patches via
2023-04-18 16:35   ` [bug#62894] [PATCH core-updates 0/2] gnu: samba: Fix build on i686-linux Maxim Cournoyer
2023-05-12 20:09     ` bug#62894: " John Kehayias via Guix-patches via
2023-04-19 16:14 ` [bug#62894] " Kaelyn via Guix-patches via

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87ildvruue.fsf@protonmail.com \
    --to=guix-patches@gnu.org \
    --cc=62894@debbugs.gnu.org \
    --cc=john.kehayias@protonmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.