From patchwork Mon Sep 2 15:33:01 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mathieu Othacehe X-Patchwork-Id: 15251 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 6779B1734D; Mon, 2 Sep 2019 16:37:29 +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,URIBL_BLOCKED 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 0A73A17348 for ; Mon, 2 Sep 2019 16:37:29 +0100 (BST) Received: from localhost ([::1]:37652 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1i4oOV-0004gP-F8 for patchwork@mira.cbaines.net; Mon, 02 Sep 2019 11:37:27 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:42502) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1i4oMB-00028L-QP for guix-patches@gnu.org; Mon, 02 Sep 2019 11:35:04 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1i4oMA-0004CF-K0 for guix-patches@gnu.org; Mon, 02 Sep 2019 11:35:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:50021) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1i4oMA-0004Bz-Gb for guix-patches@gnu.org; Mon, 02 Sep 2019 11:35:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1i4oMA-0006c9-9z for guix-patches@gnu.org; Mon, 02 Sep 2019 11:35:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#36477] [PATCH v3 16/48] gnu: eudev: Fix cross-compilation. Resent-From: Mathieu Othacehe Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 02 Sep 2019 15:35:02 +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 Received: via spool by 36477-submit@debbugs.gnu.org id=B36477.156743846025004 (code B ref 36477); Mon, 02 Sep 2019 15:35:02 +0000 Received: (at 36477) by debbugs.gnu.org; 2 Sep 2019 15:34:20 +0000 Received: from localhost ([127.0.0.1]:58755 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1i4oLT-0006V1-HZ for submit@debbugs.gnu.org; Mon, 02 Sep 2019 11:34:20 -0400 Received: from mail-wr1-f49.google.com ([209.85.221.49]:36631) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1i4oLE-0006Pg-Oq for 36477@debbugs.gnu.org; Mon, 02 Sep 2019 11:34:05 -0400 Received: by mail-wr1-f49.google.com with SMTP id y19so14465443wrd.3 for <36477@debbugs.gnu.org>; Mon, 02 Sep 2019 08:34:04 -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=aDAa2BlU6B/fitBrTPKqzMNRl1YlSbVrJswXkqmObQE=; b=ETW2HYRsJCFjKviWPLNtCKmwJnax+s2F53qTtJRU5vFWWRUbrBOKACHfO5cnFYIj0H 41qvsxDq5STr/bpLc7cSg7aW9ePpZT9Gj0fwkgX8ZKC4aM6Tbhlc5IZP9Uon7Csup0FS ERBycmYC+ur93u95NwHqsuZxjIwXyccxKI/HOBU79BAW9qkCcMGmOIkPORhdZcVSDm74 ynMxynaeBhHtae6nqRrh1hy6/bQL3ss4kmywPN8xb2GFEz23bSHsr2QQ2bWSXaB8geGh uRsu0Ace7ifiVr6PaFm43QsDEajhrsR96Kv/u7MS8WoiLaYF5aOUZidTJ2jS5Mba+cwz dcxg== 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=aDAa2BlU6B/fitBrTPKqzMNRl1YlSbVrJswXkqmObQE=; b=pF0CwR1MGlP1SDUik+WjQwHIk9J39Q6BbscQtkPimRYuVkBHG4oMls0fmG7iIK/ntr yx8ELTnCC8g5zPaTVAde40GrSz4BOkcpt36jfyyG0G5DIm5gXHhKT9wud76ICx97M7DA eQPsYE/tWykHf0zAXMNZHvOeMfhpxzHHLkRwjW4fy0mSX2VbA3XN2qPog1TY5RqkNyx/ lEwxZtiYF5uH4HykI3hEEuvi8jCQsY818WeIu0F6QhOCNnF5bi4YoqVFl8p+TFIodGZr IA5+pfx8t89w+g/+AsbuCIlqsdsaVvWhXjj85Edy3U4JMJ7Pq5B7lAcaVilH30ok483s biDA== X-Gm-Message-State: APjAAAW1TwTgKILftfcbf7bxnXOoTFXzfrODXtTVR4NdUbIVuMqSpG9l dqRYizFwF6ENpKhAGXr/gPAK9SaU X-Google-Smtp-Source: APXvYqy5X7tzbEosLWV7bBRmfC8oRwhVkRlsWqOitu/Hdn3TLU1Rkc+W7rqB4g/I6xe39U57uVyb+A== X-Received: by 2002:a5d:6588:: with SMTP id q8mr16713900wru.184.1567438438970; Mon, 02 Sep 2019 08:33:58 -0700 (PDT) Received: from localhost.localdomain ([80.12.63.115]) by smtp.gmail.com with ESMTPSA id b26sm17232265wmj.14.2019.09.02.08.33.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 02 Sep 2019 08:33:58 -0700 (PDT) From: Mathieu Othacehe Date: Mon, 2 Sep 2019 17:33:01 +0200 Message-Id: <20190902153333.11190-17-m.othacehe@gmail.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190902153333.11190-1-m.othacehe@gmail.com> References: <20190902153333.11190-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: , Cc: Mathieu Othacehe 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 bf1e00421f..0225f8c376 100644 --- a/gnu/packages/linux.scm +++ b/gnu/packages/linux.scm @@ -2564,7 +2564,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 _ @@ -2573,19 +2573,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)