From patchwork Wed Oct 2 09:58:48 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mathieu Othacehe X-Patchwork-Id: 15568 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 5F17F1749F; Wed, 2 Oct 2019 11:01:42 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM, T_DKIM_INVALID autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTP id 1EF051749D for ; Wed, 2 Oct 2019 11:01:42 +0100 (BST) Received: from localhost ([::1]:53158 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iFbS0-0004q0-Ng for patchwork@mira.cbaines.net; Wed, 02 Oct 2019 06:01:40 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:51063) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iFbQZ-0003kU-JB for guix-patches@gnu.org; Wed, 02 Oct 2019 06:00:12 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iFbQY-0008WP-CB for guix-patches@gnu.org; Wed, 02 Oct 2019 06:00:11 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:54917) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1iFbQY-0008W0-8S for guix-patches@gnu.org; Wed, 02 Oct 2019 06:00:10 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1iFbQY-0000Yx-78 for guix-patches@gnu.org; Wed, 02 Oct 2019 06:00:10 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#36477] [PATCH v4 07/23] gnu: eudev: Fix cross-compilation. Resent-From: Mathieu Othacehe Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Wed, 02 Oct 2019 10:00:10 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 36477 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: To: 36477@debbugs.gnu.org Cc: Mathieu Othacehe Received: via spool by 36477-submit@debbugs.gnu.org id=B36477.15700103841861 (code B ref 36477); Wed, 02 Oct 2019 10:00:10 +0000 Received: (at 36477) by debbugs.gnu.org; 2 Oct 2019 09:59:44 +0000 Received: from localhost ([127.0.0.1]:35455 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iFbQ7-0000Tq-PV for submit@debbugs.gnu.org; Wed, 02 Oct 2019 05:59:44 -0400 Received: from mail-wr1-f44.google.com ([209.85.221.44]:45852) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iFbPv-0000Rg-Vq for 36477@debbugs.gnu.org; Wed, 02 Oct 2019 05:59:32 -0400 Received: by mail-wr1-f44.google.com with SMTP id r5so18857553wrm.12 for <36477@debbugs.gnu.org>; Wed, 02 Oct 2019 02:59:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=vDUqeO/8QkaQqGbd8ampa/50/l6TlAdE2E92whWdgt0=; b=pOVjJhaE+Dc41x3fj/a36mRHXAZTHrpVzS46vTTUZ4tAtWNuhUXymUkAZWQad7Gc3e 5MncNzi/JTvrFOqRh2k6W3hBAfjcu3yofPz3uVjQsvzGvN4dSXj5OEjWu1dI2XaqnxRY gF2fNrWB/V5ADC4RbV3qctO6Nac2EudtgfSBthqZ2LvLChYdHy507CoPGkB/5SVkqax7 brogeRL8IMud4VQ615L7i8H890nvW7lqXquN8z1ORriHyczJaPpZDnL02KHQQsnjUxly qkrMAnUtJufg580WOMhC7sHiq4ULp491xvfJqzA3+dd8g+XgoL1j852DkQkSqNEDM1oO Q/ZA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=vDUqeO/8QkaQqGbd8ampa/50/l6TlAdE2E92whWdgt0=; b=jFoqeYdQniyBcrv98cMhJFRrSVSIuVTQWb7Fe1kM+p8Nf1huejm8N6DG4Fj8INFbqb eGlCCnMVxmvsFTqqWHL49r3W9sNHAZFm4xzVoyao9FJYE4xHldvwOb0INGQWgaIIQg4c yOjSm6A2qpj3085Vy1FinLGyUflOwAIZ6Rvo19v+PJanKdw7PXB9alB0egBUM+cg6Z8f qGL828dCyYznXUlaTMybpXgrfYNoGyF7zAwmA7UWym0DixDHu8LGjdtSPDDmlnLFOJJv He9P/V2QiEHVIdI4LM5WX9mpLgLdvgxf1HSejloTVDXj5nUMcsFWbByzevFAs4ZjJmGn XuUg== X-Gm-Message-State: APjAAAUpOwB46c0QaGiq0HXgmBd1izwZPE4AdpbV5Yo8aNgED3QVSDAK QDI/jS7j482mdF7bmjZb0kbYdTcu X-Google-Smtp-Source: APXvYqzUh/MsLGMipnJQ41+liN/48NMZrA3TXlE2n+cQs+I6FicjX2HakcWF5sOosCcOJc/9d1RdJQ== X-Received: by 2002:adf:f287:: with SMTP id k7mr2095246wro.206.1570010365972; Wed, 02 Oct 2019 02:59:25 -0700 (PDT) Received: from localhost.localdomain ([2a01:e0a:fa:a50:21e:67ff:fe5b:4283]) by smtp.gmail.com with ESMTPSA id w12sm29621318wrg.47.2019.10.02.02.59.24 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 02 Oct 2019 02:59:25 -0700 (PDT) From: Mathieu Othacehe Date: Wed, 2 Oct 2019 11:58:48 +0200 Message-Id: <20191002095904.6325-8-m.othacehe@gmail.com> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20191002095904.6325-1-m.othacehe@gmail.com> References: <20191002095904.6325-1-m.othacehe@gmail.com> MIME-Version: 1.0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.43 X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" X-getmail-retrieved-from-mailbox: Patches * gnu/packages/linux.scm (eudev)[arguments]: Look for xsltproc in both native-inputs and inputs. Also, do not run udevadm when cross-compiling. We need to find another way to generate hwdb.bin file for cross-built systems. --- gnu/packages/linux.scm | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm index 461c019d64..c40072a706 100644 --- a/gnu/packages/linux.scm +++ b/gnu/packages/linux.scm @@ -2576,7 +2576,7 @@ from the module-init-tools project.") (patches (search-patches "eudev-rules-directory.patch")))) (build-system gnu-build-system) (arguments - '(#:phases + `(#:phases (modify-phases %standard-phases (add-after 'unpack 'make-source-writable (lambda _ @@ -2585,19 +2585,25 @@ from the module-init-tools project.") (for-each make-file-writable (find-files ".")) #t)) (add-before 'bootstrap 'patch-file-names - (lambda* (#:key inputs #:allow-other-keys) + (lambda* (#:key inputs native-inputs #:allow-other-keys) (substitute* "man/make.sh" (("/usr/bin/xsltproc") - (string-append (assoc-ref inputs "xsltproc") + (string-append (assoc-ref + (or native-inputs inputs) "xsltproc") "/bin/xsltproc"))) #t)) (add-after 'install 'build-hwdb (lambda* (#:key outputs #:allow-other-keys) ;; Build OUT/etc/udev/hwdb.bin. This allows 'lsusb' and ;; similar tools to display product names. + ;; + ;; XXX: This can't be done when cross-compiling. Find another way + ;; to generate hwdb.bin for cross-built systems. (let ((out (assoc-ref outputs "out"))) - (invoke (string-append out "/bin/udevadm") - "hwdb" "--update"))))) + ,@(if (%current-target-system) + '(#t) + '((invoke (string-append out "/bin/udevadm") + "hwdb" "--update"))))))) #:configure-flags (list "--enable-manpages"))) (native-inputs `(("autoconf" ,autoconf)