From patchwork Mon Apr 17 04:33:33 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: John Kehayias X-Patchwork-Id: 49199 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 C24D517848; Mon, 17 Apr 2023 05:34:23 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-3.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_MSPIKE_H2, 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 8195B17803 for ; Mon, 17 Apr 2023 05:34:21 +0100 (BST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1poGZ3-00049O-It; Mon, 17 Apr 2023 00:34:05 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1poGZ1-000498-Lu for guix-patches@gnu.org; Mon, 17 Apr 2023 00:34:04 -0400 Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1poGZ1-0000ZF-0c for guix-patches@gnu.org; Mon, 17 Apr 2023 00:34:03 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1poGZ0-00083s-Dx for guix-patches@gnu.org; Mon, 17 Apr 2023 00:34:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#62894] [PATCH core-updates 1/2] gnu: samba: Fix build on i686-linux. References: <87jzybrval.fsf@protonmail.com> In-Reply-To: <87jzybrval.fsf@protonmail.com> Resent-From: John Kehayias Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 17 Apr 2023 04:34:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 62894 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 62894@debbugs.gnu.org Received: via spool by 62894-submit@debbugs.gnu.org id=B62894.168170603430972 (code B ref 62894); Mon, 17 Apr 2023 04:34:02 +0000 Received: (at 62894) by debbugs.gnu.org; 17 Apr 2023 04:33:54 +0000 Received: from localhost ([127.0.0.1]:52872 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1poGYs-00083S-0I for submit@debbugs.gnu.org; Mon, 17 Apr 2023 00:33:54 -0400 Received: from mail-40131.protonmail.ch ([185.70.40.131]:15695) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1poGYp-00083D-PM for 62894@debbugs.gnu.org; Mon, 17 Apr 2023 00:33:53 -0400 Date: Mon, 17 Apr 2023 04:33:33 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com; s=protonmail3; t=1681706025; x=1681965225; bh=DrOCRq0DyW/vmWb5C/EqUda8D3PINI82zxlbnqlz6KY=; h=Date:To:From:Subject:Message-ID:Feedback-ID:From:To:Cc:Date: Subject:Reply-To:Feedback-ID:Message-ID:BIMI-Selector; b=aiQU4RBpiJXrC/NzCvnH3sk2rWt1YQ2Uug8W5ZjMKHM/mWjFzbRBJFuVO0rUkdM15 Sx720m0mif/tOifgGUZUTdYS0xkKj99tuWWMvaP9w8tRVcIo/oPCqhyjZyyoKlqTI3 dGKmp9a3PodfP93jeSULzEyCv4/5sR24oWEepuXTFQPlHVEBhJu+I25OAfIUq9KDuD to5jWt4QV6BE5qiXS9+1uBo4zuuqMppoLU7S69jE+wKu642OYkJQRmGolqzVHWR+Ag qvmtEyzy2h5E3yLCQVO0nzdmmU83X6/M2VT7GmRQnrdnNz7JQcQgBo1mB0WCJ5KLYJ 7EqXXohpeKx1w== Message-ID: <87ildvruue.fsf@protonmail.com> Feedback-ID: 7805494:user:proton MIME-Version: 1.0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-to: John Kehayias X-ACL-Warn: , John Kehayias via Guix-patches X-Patchwork-Original-From: John Kehayias via Guix-patches via From: John Kehayias Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches Empty Message From 5f0faac057e9706e2c0c5d19895173c50d119434 Mon Sep 17 00:00:00 2001 From: John Kehayias 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 ;;; Copyright © 2022 Maxime Devos ;;; Copyright © 2022 Simon Streit +;;; Copyright © 2023 John Kehayias ;;; ;;; 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