From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id oJkiNRxy92B/AQEAgWs5BA (envelope-from ) for ; Wed, 21 Jul 2021 03:02:20 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id mOfMMBxy92BoAwAA1q6Kng (envelope-from ) for ; Wed, 21 Jul 2021 01:02:20 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 4546117D28 for ; Wed, 21 Jul 2021 03:02:20 +0200 (CEST) Received: from localhost ([::1]:39406 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m60ct-0007xb-BQ for larch@yhetil.org; Tue, 20 Jul 2021 21:02:19 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:57416) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m60ce-0007QT-5j for guix-patches@gnu.org; Tue, 20 Jul 2021 21:02:04 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:52468) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1m60cd-0007iZ-Um for guix-patches@gnu.org; Tue, 20 Jul 2021 21:02:03 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1m60cd-00009P-Tr for guix-patches@gnu.org; Tue, 20 Jul 2021 21:02:03 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#49672] [PATCH 5/9] gnu: Use =?UTF-8?Q?=E2=80=98current-target-nix-system=E2=80=99?= in prefix checks Resent-From: Thiago Jung Bauermann Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Wed, 21 Jul 2021 01:02:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 49672 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 49672@debbugs.gnu.org Cc: Thiago Jung Bauermann Received: via spool by 49672-submit@debbugs.gnu.org id=B49672.1626829299467 (code B ref 49672); Wed, 21 Jul 2021 01:02:03 +0000 Received: (at 49672) by debbugs.gnu.org; 21 Jul 2021 01:01:39 +0000 Received: from localhost ([127.0.0.1]:35761 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m60cE-00007S-Hl for submit@debbugs.gnu.org; Tue, 20 Jul 2021 21:01:38 -0400 Received: from mx.kolabnow.com ([95.128.36.40]:59510) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m60cC-00006u-L5 for 49672@debbugs.gnu.org; Tue, 20 Jul 2021 21:01:37 -0400 Received: from localhost (unknown [127.0.0.1]) by ext-mx-out003.mykolab.com (Postfix) with ESMTP id 361E6405B8 for <49672@debbugs.gnu.org>; Wed, 21 Jul 2021 03:01:31 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kolabnow.com; h= content-transfer-encoding:content-type:content-type:mime-version :references:in-reply-to:message-id:date:date:subject:subject :from:from:received:received:received; s=dkim20160331; t= 1626829290; x=1628643691; bh=XrmxZqmNUpnGukASMWNqBWXJRs3Lk9u47HL FL29WnwU=; b=hT6zPLN54WuOr4Y+6aex+8tNwEJVjgO4j/2E+ayoweNZEklZSTw fcb+5UU2hCsX9RksU9R9m9RitSA87ZTnArK+UvMO/61JsLvvvYmPdLxGzLxP93Ku 1G2XujmTvroGLSW5Ime8EFrePuzjXo4NNimJBwpCdbsVfqUt8FaxRE+qjDdzKUI3 ZzI0I5kyityWciY/r26fG7kOWXHWpbP2BzTnJItoMLUgwaJiw6kdRbVYKahAwdaZ 7d5JLgu6mGIFfWKHonWFvKsnaxa/HKbbZMa83i0jtp82797KHCZ7+B8u6GowZljy vS4wolPvnfr8SPVWZZgwtcOtM190NT2j+E1LKezUyLjVbIId8YYGkZpYykrWNyzr xbA8TIlILDgZYOZIH1RTDrPD/4cLg6r0DiKsNnI2FSk0skDNMdkKX1Nh5zZBQDkc 7+v/pNzMfsFOBgHuBebd4yCP+OfQbeo49Zk8MQBIzMdLP4ShsTpzoAWj6fMPzzV6 4RWp0Q+e2hYZEIZKk3Dd74sbmzJS53tr9YCZNWZhf8FYl7k6tOwdq61PtYxsap06 at+MtBys+bsyp5f7/hjIY8oNYULYPe6mhaZWmRd6jRPZPQGkHjPNfreWOO+o1r27 J3YKxyBJw0uCh7AaMl6hfk28H2t4zu487kYdGmoQkmUWkZD4Z13sv+48= X-Virus-Scanned: amavisd-new at mykolab.com Received: from mx.kolabnow.com ([127.0.0.1]) by localhost (ext-mx-out003.mykolab.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id heebkTqB4AT1 for <49672@debbugs.gnu.org>; Wed, 21 Jul 2021 03:01:30 +0200 (CEST) Received: from int-mx001.mykolab.com (unknown [10.9.13.1]) by ext-mx-out003.mykolab.com (Postfix) with ESMTPS id 52C6F403CB for <49672@debbugs.gnu.org>; Wed, 21 Jul 2021 03:01:29 +0200 (CEST) Received: from ext-subm003.mykolab.com (unknown [10.9.6.3]) by int-mx001.mykolab.com (Postfix) with ESMTPS id 3EDA9323; Wed, 21 Jul 2021 03:01:27 +0200 (CEST) Date: Tue, 20 Jul 2021 22:00:39 -0300 Message-Id: <20210721010043.632012-5-bauermann@kolabnow.com> In-Reply-To: <20210721010043.632012-1-bauermann@kolabnow.com> References: <20210721010043.632012-1-bauermann@kolabnow.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: "Guix-patches" Reply-to: Thiago Jung Bauermann X-ACL-Warn: , Thiago Jung Bauermann via Guix-patches From: Thiago Jung Bauermann via Guix-patches via X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1626829340; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=XrmxZqmNUpnGukASMWNqBWXJRs3Lk9u47HLFL29WnwU=; b=a38ehJrAEyGzLFhIEZJjzqg1WpLJujiEmKhgoTbEKSWF9zXFQxPSzehq9M5AdkOSCmLnBm O9JXMkgQ5MZGRhjuAMrMDWalfEanL6E0SOKbsxAVTsZg9wt3cOTRqONqb41sy7p+PEzE7U K7pl1BHyOmBRQTVZvq1fkmeVMapUCCePcg5ayb1PyJ59rUU7U0mjyxCQrSDHYIQeSvevaC PzDfWYh6K+AeOFJo1H4QLMukzPrG3aTt41WTmYkYUPeMR6RVp08YmbIyyTJWPRKSOeNiD+ khFR40QdIVa8pevg3vIJqbw9FMzphFlQ2IGJpKhx2HcQaWVsTtuGi7yLURtL+Q== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1626829340; a=rsa-sha256; cv=none; b=iU+1hCggUiQR3uN+yUhmSVl3Og9muoPsA21U8oqVe2WwPMF5t/E84poWJK0t06FTWsNBaF SH0visOe37HgGtv2VWccan6k450S2mNx9Z+HjWT6HVxofSkOnFQZ2r0OfSlnC8GChOdLIq eSas6fO+l4LHIQgbO0bYykjZACOHpBDakjyKB9Q/hSUlt3YHrY4B/z8xQ/Pbp8JZn+DJGR kONcNG1AIxMl2bxpgCJ4P5jrJQQPc81MMM/TTzOUxQmVjVQ2n4ZvWj18Kkal0YI4GOM5K3 c1zLNKqZIdPg/kbR4QQzBOok6AOmr55zjTgQBQewGI6WfRKGEg5J8tQhqvZUpg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=kolabnow.com header.s=dkim20160331 header.b=hT6zPLN5; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Migadu-Spam-Score: -2.92 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=kolabnow.com header.s=dkim20160331 header.b=hT6zPLN5; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Migadu-Queue-Id: 4546117D28 X-Spam-Score: -2.92 X-Migadu-Scanner: scn0.migadu.com X-TUID: ouEolXwShnxo Some places check whether the system identifier starts with “-linux”, which is a Nix system identifier. The GNU triplet identifier stored in ‘%current-target-system’ may not match the pattern if it includes a vendor field. Fix the problem by checking against ‘current-target-nix-system’, which always returns a Nix system identifier. * gnu/packages/bootloaders.scm (u-boot-tools)[arguments]<#:phases>: Use ‘current-target-nix-system’. * gnu/packages/c.scm (tcc)[arguments]<#:configure-flags>: Likewise. * gnu/packages/databases.scm (rocksdb)[arguments]<#:tests>: Likewise. * gnu/packages/debug.scm (american-fuzzy-lop): Likewise. (qemu-for-american-fuzzy-lop): Likewise. * gnu/packages/golang.scm (go-1.4)[arguments]<#:system>: Likewise. (go-1.14)[arguments]<#:system>: Likewise. * gnu/packages/lisp.scm (clisp)[arguments]<#:configure-flags>: Likewise. * gnu/packages/mes.scm (mes-0.19)[native-inputs]: Likewise. --- gnu/packages/bootloaders.scm | 4 +--- gnu/packages/c.scm | 3 +-- gnu/packages/databases.scm | 3 +-- gnu/packages/debug.scm | 6 ++---- gnu/packages/golang.scm | 6 ++---- gnu/packages/lisp.scm | 3 +-- gnu/packages/mes.scm | 3 +-- 7 files changed, 9 insertions(+), 19 deletions(-) diff --git a/gnu/packages/bootloaders.scm b/gnu/packages/bootloaders.scm index be51fb0c3de4..669574468bd2 100644 --- a/gnu/packages/bootloaders.scm +++ b/gnu/packages/bootloaders.scm @@ -622,9 +622,7 @@ def test_ctrl_c")) (invoke "test/image/test-imagetools.sh"))) ;; Only run full test suite on x86_64 systems, as many tests ;; assume x86_64. - ,@(if (string-match "^x86_64-linux" - (or (%current-target-system) - (%current-system))) + ,@(if (string-match "^x86_64-linux" (current-target-nix-system)) '((add-after 'check 'check-x86 (lambda* (#:key make-flags test-target #:allow-other-keys) (apply invoke "make" "mrproper" make-flags) diff --git a/gnu/packages/c.scm b/gnu/packages/c.scm index 1b9003ce09dd..f85bc2f4b6c9 100644 --- a/gnu/packages/c.scm +++ b/gnu/packages/c.scm @@ -88,8 +88,7 @@ (assoc-ref %build-inputs "libc") "/lib") ,@(if (string-prefix? "armhf-linux" - (or (%current-target-system) - (%current-system))) + (current-target-nix-system)) `("--triplet=arm-linux-gnueabihf") '())) #:test-target "test")) diff --git a/gnu/packages/databases.scm b/gnu/packages/databases.scm index 7de85d10c148..14367bde82b5 100644 --- a/gnu/packages/databases.scm +++ b/gnu/packages/databases.scm @@ -1379,8 +1379,7 @@ including field and record folding."))) #:test-target "check_some" ;; Many tests fail on 32-bit platforms. There are multiple reports about ;; this upstream, but it's not going to be supported any time soon. - #:tests? (let ((system ,(or (%current-target-system) - (%current-system)))) + #:tests? (let ((system ,(current-target-nix-system))) (or (string-prefix? "x86_64-linux" system) (string-prefix? "aarch64-linux" system))) #:phases diff --git a/gnu/packages/debug.scm b/gnu/packages/debug.scm index 3a29886b0e40..c5fad64692ae 100644 --- a/gnu/packages/debug.scm +++ b/gnu/packages/debug.scm @@ -172,8 +172,7 @@ tools that process C/C++ code.") (license license:ncsa))) (define-public american-fuzzy-lop - (let ((machine (match (or (%current-target-system) - (%current-system)) + (let ((machine (match (current-target-nix-system) ("x86_64-linux" "x86_64") ("i686-linux" "i386") ("aarch64-linux" "aarch64") @@ -248,8 +247,7 @@ down the road.") (define-public qemu-for-american-fuzzy-lop ;; afl only supports using a single afl-qemu-trace executable, so ;; we only build qemu for the native target. - (let ((machine (match (or (%current-target-system) - (%current-system)) + (let ((machine (match (current-target-nix-system) ("x86_64-linux" "x86_64") ("i686-linux" "i386") ("aarch64-linux" "aarch64") diff --git a/gnu/packages/golang.scm b/gnu/packages/golang.scm index 58688687bba3..939dbc83ce71 100644 --- a/gnu/packages/golang.scm +++ b/gnu/packages/golang.scm @@ -1046,8 +1046,7 @@ your Go binary to be later served from an http.FileSystem.") (guix build utils) (srfi srfi-1)) #:tests? #f ; Tests are run by the all.bash script. - ,@(if (string-prefix? "aarch64-linux" (or (%current-target-system) - (%current-system))) + ,@(if (string-prefix? "aarch64-linux" (current-target-nix-system)) '(#:system "armhf-linux") '()) #:phases @@ -1199,8 +1198,7 @@ in the style of communicating sequential processes (@dfn{CSP}).") (arguments (substitute-keyword-arguments (package-arguments go-1.4) ((#:system system) - (if (string-prefix? "aarch64-linux" (or (%current-target-system) - (%current-system))) + (if (string-prefix? "aarch64-linux" (current-target-nix-system)) "aarch64-linux" system)) ((#:phases phases) diff --git a/gnu/packages/lisp.scm b/gnu/packages/lisp.scm index ee43226ff091..6fd1cd55e009 100644 --- a/gnu/packages/lisp.scm +++ b/gnu/packages/lisp.scm @@ -347,8 +347,7 @@ supporting ASDF, Sockets, Gray streams, MOP, and other useful components.") ("libsigsegv" ,libsigsegv))) (arguments `(#:configure-flags '(,@(if (string-prefix? "armhf-linux" - (or (%current-target-system) - (%current-system))) + (current-target-nix-system)) '("CFLAGS=-falign-functions=4") '()) "--with-dynamic-ffi" diff --git a/gnu/packages/mes.scm b/gnu/packages/mes.scm index c66751bc7c74..d4a8278697ca 100644 --- a/gnu/packages/mes.scm +++ b/gnu/packages/mes.scm @@ -174,8 +174,7 @@ parsers to allow execution with Guile as extension languages."))) ("nyacc" ,nyacc-0.86))) (native-inputs `(("guile" ,guile-2.2) - ,@(let ((target-system (or (%current-target-system) - (%current-system)))) + ,@(let ((target-system (current-target-nix-system))) (cond ((string-prefix? "x86_64-linux" target-system) ;; Use cross-compiler rather than #:system "i686-linux" to get