GNU bug report logs - #49672
[PATCH 0/9] Target check fixes and cleanups

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: guix-patches; Reported by: Thiago Jung Bauermann <bauermann@HIDDEN>; Keywords: patch; dated Wed, 21 Jul 2021 00:47:01 UTC; Maintainer for guix-patches is guix-patches@HIDDEN.

Message received at 49672 <at> debbugs.gnu.org:


Received: (at 49672) by debbugs.gnu.org; 28 Mar 2022 12:10:55 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Mar 28 08:10:54 2022
Received: from localhost ([127.0.0.1]:57440 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1nYoD0-0005mO-Nl
	for submit <at> debbugs.gnu.org; Mon, 28 Mar 2022 08:10:54 -0400
Received: from andre.telenet-ops.be ([195.130.132.53]:39312)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <maximedevos@HIDDEN>) id 1nYoCz-0005m5-3l
 for 49672 <at> debbugs.gnu.org; Mon, 28 Mar 2022 08:10:54 -0400
Received: from ptr-bvsjgyhxw7psv60dyze.18120a2.ip6.access.telenet.be
 ([IPv6:2a02:1811:8c09:9d00:3c5f:2eff:feb0:ba5a])
 by andre.telenet-ops.be with bizsmtp
 id BoAr2700E4UW6Th01oArA1; Mon, 28 Mar 2022 14:10:51 +0200
Message-ID: <3176f7feadf478c55a68f76d69bc003ed22c857f.camel@HIDDEN>
Subject: Re: [PATCH v2 0/6] Target check fixes for cross compilation
From: Maxime Devos <maximedevos@HIDDEN>
To: Thiago Jung Bauermann <bauermann@HIDDEN>, 49672 <at> debbugs.gnu.org
Date: Mon, 28 Mar 2022 14:10:46 +0200
In-Reply-To: <20220327214026.102723-1-bauermann@HIDDEN>
References: <20220327214026.102723-1-bauermann@HIDDEN>
Content-Type: multipart/signed; micalg="pgp-sha512";
 protocol="application/pgp-signature"; boundary="=-rUADRXbQgTk/shXqtmKq"
User-Agent: Evolution 3.38.3-1 
MIME-Version: 1.0
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telenet.be; s=r22;
 t=1648469451; bh=iiZ4Kpdw2n4D6Txb7HS/qbgwqRreJUNy4dMXjXUfbZ0=;
 h=Subject:From:Reply-To:To:Date:In-Reply-To:References;
 b=Xede5nlyhgb8fDfrK3RbXSoJ1ABiBDQ59CtRGm6L/KUX+jSDpPrSy1aVXfalSW62m
 56cEWZGyyEoAGbFyI75koJ9LoPx0rMdcDaGIzGA8rLWiLI8RQs4ek7HjWdHKOxs/Cx
 njkcmVsuEcpqYGZXcFbCEV5XCEJ5VkkRqPWZrgBqKWETSQ2eVTFTmc5jOMFxb4KC/5
 5vLBVhfzA8coNJbIqov1F9jWFARjPwHWJrRiTtdL0MmIsUTFHMtcAkFYlv15Wx3vw6
 9CRcRiDRmAwj6deqzogzNrvCRVpbhvf1uy1GIQ3ZYmETbk5PhrNalPv6ciBcI68vSw
 ecywdoJZI5g/A==
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 49672
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Reply-To: 49672 <at> debbugs.gnu.org
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)


--=-rUADRXbQgTk/shXqtmKq
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

user guix
usertag 49672 reviewed looks-good
quit

Thiago Jung Bauermann schreef op zo 27-03-2022 om 18:40 [-0300]:
> Hello,
>=20
> I've been working on and off on this fixes and cleanups series for a long
> time now, but it became a bit unwieldy and overwhelming so in the interes=
t
> of shipping something I decided to split the fixes from the cleanups. Thi=
s
> way I can at least submit the former, and leave the latter for an
> unspecified, uncertain future.
>=20
> I tested that on x86_64-linux the build derivations of all packages modif=
ied
> by these packages are unchanged. They only affect (for the better!) cross
> builds. This means that this patch series can go to master.
>=20
> I don't mind rebasing it if by the time the series is approved, it doesn'=
t
> cleanly apply anymore.

These patches LGTM (untested, only read them).

Greetings,
Maxime.

--=-rUADRXbQgTk/shXqtmKq
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: This is a digitally signed message part
Content-Transfer-Encoding: 7bit

-----BEGIN PGP SIGNATURE-----

iI0EABYKADUWIQTB8z7iDFKP233XAR9J4+4iGRcl7gUCYkGlxhccbWF4aW1lZGV2
b3NAdGVsZW5ldC5iZQAKCRBJ4+4iGRcl7ingAQDeGaoURQ1BPvKcsnfK3BcUt5z2
oWLaPfJtDexPgEY2nQD+KC47Mi7LRcvLqLvJFWzpGVfMNQAqsZjGbVu0r/xPiww=
=Aftu
-----END PGP SIGNATURE-----

--=-rUADRXbQgTk/shXqtmKq--





Information forwarded to guix-patches@HIDDEN:
bug#49672; Package guix-patches. Full text available.

Message received at 49672 <at> debbugs.gnu.org:


Received: (at 49672) by debbugs.gnu.org; 27 Mar 2022 21:50:52 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Mar 27 17:50:52 2022
Received: from localhost ([127.0.0.1]:56708 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1nYamh-0004ng-Oy
	for submit <at> debbugs.gnu.org; Sun, 27 Mar 2022 17:50:52 -0400
Received: from mx.kolabnow.com ([212.103.80.154]:3440)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <bauermann@HIDDEN>) id 1nYamf-0004nT-Jw
 for 49672 <at> debbugs.gnu.org; Sun, 27 Mar 2022 17:50:50 -0400
Received: from localhost (unknown [127.0.0.1])
 by mx.kolabnow.com (Postfix) with ESMTP id E54031A0D;
 Sun, 27 Mar 2022 23:41:00 +0200 (CEST)
Authentication-Results: ext-mx-out001.mykolab.com (amavisd-new);
 dkim=pass (4096-bit key) reason="pass (just generated, assumed good)"
 header.d=kolabnow.com
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=
 1648417260; x=1650231661; bh=UCCO8iMFjJihEEtub0kvSDOnPlu+KT7clTY
 WTK8y2Z8=; b=wa/6iKOSIp7N7yIZgAvGsqY8ZtiPgAJk8XX9uVxErxZw3tbBfxs
 GcBqf+ShFZecMuxsVf8H2M165v1wNUsg/JTGmfX27Dr4SjzTP8jlh2LeA1Hs0YFI
 ybBPbWINmAe2Tx0Z0K+3AqflCKZ3UZwq0IKt9bI6FkXHrJNiKPXIKeHSiGTerRVD
 fBM5NVMFNqQ81HKJmQ1tOp3St0Xw5Zk01NzdyLxeDetnJf/UIP377+WfZgyuRtBQ
 tCciophfHoJdoTPXmzri2PBn9NwhP9ZWLCAjH8sBPXLzuF+X2rjdUr/AwTID5kyw
 bggYFeAOlk3SO3sIrVVmQAAc6BQJ9BXX2wDMmZ9xiwyLup/ebCQr6SycMzS7DqVf
 6lGUeu6CKR2ja3o/mYzkV3/qYAVQGC89kZBGGCbePPNOjNZjA6YSLdE5zN8FfHRJ
 wmvXazJUIAKUW4Lvycc7dt/LOTsoi27VLIhAPhUkhHTzQCIahhTEO7NyBvZanNvp
 srbDsZYJ1VrpQDqpsT0lzGh14qFLB4KHYLgiR89C1c/+0KDzkqk/GddkWalp93cn
 W21ghzIt9ylUQoqp4cG89ZoYgpWG0puEUipUflDnX4AvQf94f+bxu3SgL1Tn0VfR
 YzDnlY1LB7E+kkEoMwFbn99E4mUrCaHB+ufBi6asPnAtHBKgEhpi/YFA=
X-Virus-Scanned: amavisd-new at mykolab.com
X-Spam-Flag: NO
X-Spam-Score: -1.9
X-Spam-Level: 
X-Spam-Status: No, score=-1.9 tagged_above=-10 required=5
 tests=[BAYES_00=-1.9] autolearn=ham autolearn_force=no
Received: from mx.kolabnow.com ([127.0.0.1])
 by localhost (ext-mx-out001.mykolab.com [127.0.0.1]) (amavisd-new, port 10024)
 with ESMTP id 6cTEAJDDo5ia; Sun, 27 Mar 2022 23:41:00 +0200 (CEST)
Received: from int-mx001.mykolab.com (unknown [10.9.13.1])
 by mx.kolabnow.com (Postfix) with ESMTPS id C8A5F14D8;
 Sun, 27 Mar 2022 23:40:50 +0200 (CEST)
Received: from ext-subm001.mykolab.com (unknown [10.9.6.1])
 by int-mx001.mykolab.com (Postfix) with ESMTPS id 496EBBC9;
 Sun, 27 Mar 2022 23:40:50 +0200 (CEST)
From: Thiago Jung Bauermann <bauermann@HIDDEN>
To: 49672 <at> debbugs.gnu.org
Subject: [PATCH v2 3/6] =?UTF-8?q?utils:=20Introduce=20the=20=E2=80=98curr?=
 =?UTF-8?q?ent-target-nix-system=E2=80=99=20procedure?=
Date: Sun, 27 Mar 2022 18:40:23 -0300
Message-Id: <20220327214026.102723-4-bauermann@HIDDEN>
In-Reply-To: <20220327214026.102723-1-bauermann@HIDDEN>
References: <20220327214026.102723-1-bauermann@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-Spam-Score: -0.0 (/)
X-Debbugs-Envelope-To: 49672
Cc: Maxime Devos <maximedevos@HIDDEN>,
 Thiago Jung Bauermann <bauermann@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

Both ‘glibc-dynamic-linker’ and ‘system->llvm-target’ use the same logic
for the default value of their arguments, so factor it out into a separate
procedure.

It turns out that this procedure will be useful in other places as well.

* gnu/packages/bootstrap.scm (glibc-dynamic-linker): Use result of
‘current-target-nix-system’ as default value for ‘system’ argument.
* gnu/packages/llvm.scm (system->llvm-target): Likewise.
* guix/utils.scm (current-target-nix-system): Define.
---
 gnu/packages/bootstrap.scm | 4 +---
 gnu/packages/llvm.scm      | 4 +---
 guix/utils.scm             | 7 +++++++
 3 files changed, 9 insertions(+), 6 deletions(-)

diff --git a/gnu/packages/bootstrap.scm b/gnu/packages/bootstrap.scm
index 8bd0c4eaf3ab..8f444b1ff338 100644
--- a/gnu/packages/bootstrap.scm
+++ b/gnu/packages/bootstrap.scm
@@ -309,9 +309,7 @@ (define rewritten-input
                                  package-with-bootstrap-guile)))))
 
 (define* (glibc-dynamic-linker
-          #:optional (system (or (and=> (%current-target-system)
-                                        gnu-triplet->nix-system)
-                                 (%current-system))))
+          #:optional (system (current-target-nix-system)))
   "Return the name of Glibc's dynamic linker for SYSTEM."
   ;; See the 'SYSDEP_KNOWN_INTERPRETER_NAMES' cpp macro in libc.
   (cond ((string=? system "x86_64-linux") "/lib/ld-linux-x86-64.so.2")
diff --git a/gnu/packages/llvm.scm b/gnu/packages/llvm.scm
index eb949bed1b47..e2bc5398715a 100644
--- a/gnu/packages/llvm.scm
+++ b/gnu/packages/llvm.scm
@@ -77,9 +77,7 @@ (define-module (gnu packages llvm)
             system->llvm-target))
 
 (define* (system->llvm-target #:optional
-                              (system (or (and=> (%current-target-system)
-                                                 gnu-triplet->nix-system)
-                                          (%current-system))))
+                              (system (current-target-nix-system)))
   "Return the LLVM target name that corresponds to SYSTEM, a system type such
 as \"x86_64-linux\"."
   ;; See the 'lib/Target' directory of LLVM for a list of supported targets.
diff --git a/guix/utils.scm b/guix/utils.scm
index 44c46cb4a96c..d5e15581acea 100644
--- a/guix/utils.scm
+++ b/guix/utils.scm
@@ -85,6 +85,7 @@ (define-module (guix utils)
             gnu-triplet->nix-system
             %current-system
             %current-target-system
+            current-target-nix-system
             package-name->name+version
             target-linux?
             target-hurd?
@@ -635,6 +636,12 @@ (define %current-target-system
   ;; cross-building to.
   (make-parameter #f))
 
+(define (current-target-nix-system)
+  "Return the Nix system identifier for the current target, whether we are
+cross-building or not."
+  (or (and=> (%current-target-system) gnu-triplet->nix-system)
+      (%current-system)))
+
 (define* (package-name->name+version spec
                                      #:optional (delimiter #\@))
   "Given SPEC, a package name like \"foo@HIDDEN\", return two values: \"foo\"




Information forwarded to guix-patches@HIDDEN:
bug#49672; Package guix-patches. Full text available.

Message received at 49672 <at> debbugs.gnu.org:


Received: (at 49672) by debbugs.gnu.org; 27 Mar 2022 21:41:19 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Mar 27 17:41:19 2022
Received: from localhost ([127.0.0.1]:56697 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1nYadT-0004WU-8R
	for submit <at> debbugs.gnu.org; Sun, 27 Mar 2022 17:41:19 -0400
Received: from mx.kolabnow.com ([212.103.80.154]:3316)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <bauermann@HIDDEN>) id 1nYadS-0004W9-3f
 for 49672 <at> debbugs.gnu.org; Sun, 27 Mar 2022 17:41:18 -0400
Received: from localhost (unknown [127.0.0.1])
 by mx.kolabnow.com (Postfix) with ESMTP id A9C641AC1;
 Sun, 27 Mar 2022 23:41:12 +0200 (CEST)
Authentication-Results: ext-mx-out001.mykolab.com (amavisd-new);
 dkim=pass (4096-bit key) reason="pass (just generated, assumed good)"
 header.d=kolabnow.com
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=
 1648417272; x=1650231673; bh=mZaIo0Szcjukf01ZRhCVfZyUiIS9VO8PnzR
 suaRQw2Y=; b=cFfPIG3vMhwvXAEMFZvzJ37ZDYZFEamKS1Aa2RiyI2ejZzZcvwT
 VH+jVY5niOZXTbZhVYgGPRd7ilJM65YIKZN//sc536cbNtULsdzBJVLGyCqOBKz5
 T8+yNRK23PWK21ELHQKE6p//3brVmA12yiP/Y6iCytktukevz22C6rxRMEfUzT/k
 tHj+R4pukgjZRzR/zYDgovmwqT+od3YR9KNiwL2QfvDfKHHujEMwl0e9IA3eilFV
 3yrcx2NcNtG3MUcYWpwhWbiQ5wvGlE9bx53l6AMf1ggUQoAfHend/fkxiFA6R4xb
 B0xTxR3o0NZFtFvV9rNDa+jKm/BgQhU8esx23dA4kGPQF/6EWXVBt6bl23ukmCUo
 EBwjW56AMhApPepMqb4TmDHkA2ScYzxPyTIWsnLP4CGpwo40lZamnBd0qtAFT/tA
 5YJx0siGkTqgJvGtK3rpvTHqlH7Mb5ROtPay0Y74dEw5pfcUNArCmekaxcsY1bhM
 OIRi11cVxEOs0NiEKeg7P0ueUm0qyQyfIe61t4VzEY+obHYtfdtZ8z8k18xqljqF
 RMwbfFzAfAtRFqy5LekaSfPsk2MYtzanfGVVvnxsZJLSaGUr0Xo2iRjDM4LvyvYy
 wycyyKNAYe4AYx1RrE5KYnZxWFFiPJ9VvhJyrJbESynHPzXWiJ4dbuxA=
X-Virus-Scanned: amavisd-new at mykolab.com
X-Spam-Flag: NO
X-Spam-Score: -1.9
X-Spam-Level: 
X-Spam-Status: No, score=-1.9 tagged_above=-10 required=5
 tests=[BAYES_00=-1.9] autolearn=ham autolearn_force=no
Received: from mx.kolabnow.com ([127.0.0.1])
 by localhost (ext-mx-out001.mykolab.com [127.0.0.1]) (amavisd-new, port 10024)
 with ESMTP id ZyN-o9NaEyYj; Sun, 27 Mar 2022 23:41:12 +0200 (CEST)
Received: from int-mx001.mykolab.com (unknown [10.9.13.1])
 by mx.kolabnow.com (Postfix) with ESMTPS id EACB2FDB;
 Sun, 27 Mar 2022 23:41:11 +0200 (CEST)
Received: from ext-subm001.mykolab.com (unknown [10.9.6.1])
 by int-mx001.mykolab.com (Postfix) with ESMTPS id 33BC6BB1;
 Sun, 27 Mar 2022 23:41:11 +0200 (CEST)
From: Thiago Jung Bauermann <bauermann@HIDDEN>
To: 49672 <at> debbugs.gnu.org
Subject: [PATCH v2 6/6] =?UTF-8?q?gnu:=20Fix=20check=20of=20=E2=80=98%curr?=
 =?UTF-8?q?ent-system=E2=80=99=20and=20=E2=80=98%current-target-system?=
 =?UTF-8?q?=E2=80=99?=
Date: Sun, 27 Mar 2022 18:40:26 -0300
Message-Id: <20220327214026.102723-7-bauermann@HIDDEN>
In-Reply-To: <20220327214026.102723-1-bauermann@HIDDEN>
References: <20220327214026.102723-1-bauermann@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-Spam-Score: -0.0 (/)
X-Debbugs-Envelope-To: 49672
Cc: Maxime Devos <maximedevos@HIDDEN>,
 Thiago Jung Bauermann <bauermann@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

The order of the check is important because ‘%current-system’ is always
defined, while ‘%current-target-system’ is only defined when
cross-building.

Therefore, it’s important to check ‘%current-target-system’ first,
otherwise the cross target is never considered.

* gnu/packages/crypto.scm (libb2)[arguments]<#:configure-flags>: Check
‘%current-target-system’ first.
* gnu/packages/java.scm (jamvm-1-bootstrap)[arguments]<#:phases>: Likewise.
[native-inputs]: Likewise.
(ant-bootstrap)[arguments]<#:phases>: Likewise.
(classpath-jamvm-wrappers)[arguments]<#:builder>: Likewise.
* gnu/packages/photo.scm (lensfun)[arguments]<#:configure-flags>: Likewise.
* gnu/packages/php.scm (php)[arguments]<#:phases>: Likewise.
* gnu/packages/sdl.scm (sdl-gfx)[arguments]<#:configure-flags>: Likewise.
* gnu/packages/telephony.scm (pjproject)[arguments]<#:configure-flags>: Likewise.
---
 gnu/packages/crypto.scm    |  4 ++--
 gnu/packages/java.scm      | 16 ++++++++--------
 gnu/packages/photo.scm     |  4 ++--
 gnu/packages/php.scm       |  4 ++--
 gnu/packages/sdl.scm       |  4 ++--
 gnu/packages/telephony.scm |  4 ++--
 6 files changed, 18 insertions(+), 18 deletions(-)

diff --git a/gnu/packages/crypto.scm b/gnu/packages/crypto.scm
index 63be51f86a21..89694f111e17 100644
--- a/gnu/packages/crypto.scm
+++ b/gnu/packages/crypto.scm
@@ -826,8 +826,8 @@ (define-public libb2
     (arguments
      `(#:configure-flags
        (list
-        ,@(if (any (cute string-prefix? <> (or (%current-system)
-                                               (%current-target-system)))
+        ,@(if (any (cute string-prefix? <> (or (%current-target-system)
+                                               (%current-system)))
                    '("x86_64" "i686"))
               ;; fat only checks for Intel optimisations
               '("--enable-fat")
diff --git a/gnu/packages/java.scm b/gnu/packages/java.scm
index aead02d93c31..77f9f7e8fb86 100644
--- a/gnu/packages/java.scm
+++ b/gnu/packages/java.scm
@@ -207,8 +207,8 @@ (define jamvm-1-bootstrap
              "--enable-runtime-reloc-checks"
              "--enable-ffi")
        #:phases
-       ,(if (string-prefix? "aarch64" (or (%current-system)
-                                          (%current-target-system)))
+       ,(if (string-prefix? "aarch64" (or (%current-target-system)
+                                          (%current-system)))
             ;; Makefiles and the configure script need to be regenerated to
             ;; incorporate support for AArch64.
             '(modify-phases %standard-phases
@@ -218,8 +218,8 @@ (define jamvm-1-bootstrap
     (inputs
      (list classpath-bootstrap jikes libffi zip zlib))
     (native-inputs
-     (if (string-prefix? "aarch64" (or (%current-system)
-                                       (%current-target-system)))
+     (if (string-prefix? "aarch64" (or (%current-target-system)
+                                       (%current-system)))
          ;; Additional packages needed for autoreconf.
          `(("autoconf" ,autoconf)
            ("automake" ,automake)
@@ -285,8 +285,8 @@ (define ant-bootstrap
              ;; Without these JamVM options the build may freeze.
              (substitute* "bootstrap.sh"
                (("^\"\\$\\{JAVACMD\\}\" " m)
-                ,@(if (string-prefix? "armhf" (or (%current-system)
-                                                  (%current-target-system)))
+                ,@(if (string-prefix? "armhf" (or (%current-target-system)
+                                                  (%current-system)))
                       `((string-append m "-Xnocompact "))
                       `((string-append m "-Xnocompact -Xnoinlining ")))))
 
@@ -535,8 +535,8 @@ (define classpath-jamvm-wrappers
             (for-each (lambda (tool)
                         (with-output-to-file (string-append bin tool)
                           (lambda _
-                            #$@(if (string-prefix? "armhf" (or (%current-system)
-                                                               (%current-target-system)))
+                            #$@(if (string-prefix? "armhf" (or (%current-target-system)
+                                                               (%current-system)))
                                    `((format #t "#!~a/bin/sh
 ~a/bin/jamvm -Xnocompact -classpath ~a/share/classpath/tools.zip \
 gnu.classpath.tools.~a.~a $@"
diff --git a/gnu/packages/photo.scm b/gnu/packages/photo.scm
index 2f561abc2f31..eaa905dd3b8c 100644
--- a/gnu/packages/photo.scm
+++ b/gnu/packages/photo.scm
@@ -426,8 +426,8 @@ (define-public lensfun
                 "0cfk8jjhs9nbfjfdy98plrj9ayi59aph0nx6ppslgjhlcvacm2xf"))))
     (build-system cmake-build-system)
     (arguments
-     `(,@(if (any (cute string-prefix? <> (or (%current-system)
-                                              (%current-target-system)))
+     `(,@(if (any (cute string-prefix? <> (or (%current-target-system)
+                                              (%current-system)))
                   '("x86_64" "i686"))
         ;; SSE and SSE2 are supported only on Intel processors.
         '()
diff --git a/gnu/packages/php.scm b/gnu/packages/php.scm
index 191dcafb4ae4..e2489d2435a6 100644
--- a/gnu/packages/php.scm
+++ b/gnu/packages/php.scm
@@ -177,8 +177,8 @@ (define-public php
              (substitute* "ext/standard/tests/streams/bug60602.phpt"
                (("'ls'") (string-append "'" (which "ls") "'")))
 
-             ,@(if (string-prefix? "arm" (or (%current-system)
-                                             (%current-target-system)))
+             ,@(if (string-prefix? "arm" (or (%current-target-system)
+                                             (%current-system)))
                    ;; Drop tests known to fail on armhf.
                    '((for-each delete-file
                               (list
diff --git a/gnu/packages/sdl.scm b/gnu/packages/sdl.scm
index 4c38e2f05507..a5892934d824 100644
--- a/gnu/packages/sdl.scm
+++ b/gnu/packages/sdl.scm
@@ -198,8 +198,8 @@ (define-public sdl-gfx
     (build-system gnu-build-system)
     (outputs '("out" "debug"))
     (arguments
-     `(,@(if (any (cute string-prefix? <> (or (%current-system)
-                                              (%current-target-system)))
+     `(,@(if (any (cute string-prefix? <> (or (%current-target-system)
+                                              (%current-system)))
                   '("x86_64" "i686"))
         ;; mmx is supported only on Intel processors.
         '()
diff --git a/gnu/packages/telephony.scm b/gnu/packages/telephony.scm
index e3071d9b75a7..c694a906f1d0 100644
--- a/gnu/packages/telephony.scm
+++ b/gnu/packages/telephony.scm
@@ -755,8 +755,8 @@ (define-public pjproject
              "--with-external-srtp"
              "--with-external-pa"
              ;; The following flag is Linux specific.
-             ,@(if (string-contains (or (%current-system)
-                                        (%current-target-system)) "linux")
+             ,@(if (string-contains (or (%current-target-system)
+                                        (%current-system)) "linux")
                    '("--enable-epoll")
                    '())
              "--with-gnutls"            ;disable OpenSSL checks




Information forwarded to guix-patches@HIDDEN:
bug#49672; Package guix-patches. Full text available.

Message received at 49672 <at> debbugs.gnu.org:


Received: (at 49672) by debbugs.gnu.org; 27 Mar 2022 21:41:15 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Mar 27 17:41:15 2022
Received: from localhost ([127.0.0.1]:56693 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1nYadP-0004WC-0Y
	for submit <at> debbugs.gnu.org; Sun, 27 Mar 2022 17:41:15 -0400
Received: from mx.kolabnow.com ([212.103.80.153]:17940)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <bauermann@HIDDEN>) id 1nYadM-0004Vl-4w
 for 49672 <at> debbugs.gnu.org; Sun, 27 Mar 2022 17:41:12 -0400
Received: from localhost (unknown [127.0.0.1])
 by mx.kolabnow.com (Postfix) with ESMTP id AFDA940D4E;
 Sun, 27 Mar 2022 23:41:06 +0200 (CEST)
Authentication-Results: ext-mx-out003.mykolab.com (amavisd-new);
 dkim=pass (4096-bit key) reason="pass (just generated, assumed good)"
 header.d=kolabnow.com
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=
 1648417266; x=1650231667; bh=ee/BH3KlfPSwyA77LPO8RpXondjoJNkN9c9
 0OKSsP/U=; b=2eTL498tllzRLV47D2ek0ynjIKgrVqQ81Yq1ASmJLN2nVAzpKwe
 M3Opzmf39MdlyGFJsPYkHU5lsl3NwoXbQG+vVn2zsDRCerO1BoP6SUri9bc9vTZ9
 dTTfzrS4kjr335Z0d8EtqMcSmP6rifk5SzoLGM+e545R3uHNlrPo9Hq2NkfR3nKv
 ffRhUoDoibS/fQOzsm9Rim5zRl8p206vOCIpLjlNkZh1R6Y+iDEMEfQId1a9dj8G
 QiOBlY8+XqFh4tQeLEoOcRKHVKjctL2Q5zvqOwWBt/37BwU/fns07X6bbrA+L6TH
 j9TYkuAfZBYsvKfDJPJ2Mqks50waoDWp8gi5EanJtjzd8hvQVYrDNVMJCcrsiTSH
 VQi5sk2YulCrcPFEy7O2IVla4tccUXy/9QASmSMfOwH4sSeg/hfm4mUH+LGBXWQB
 JSXHoV01WpuvVIGFG9h1y2icavCFEC35hwX9bHlv1+WTdpXxynmHOg5PMmz20TD6
 9iFaQv8PPowMaBvDF6drQZ+VYGeFbLCYPhs175EswdvYdCh3Kj7uTerE4x+7NeCZ
 AuUid8jzCPcZV4mYtE4NEkUdvbRyC8vAWcDLXXskY7L4mF1aJsYS2YPgAX/Dn5gp
 aq0JpgiwipdWNcmgVr4lkcH2G3bKqtmR/V0qDeLKfffSnKb4O5zVy0po=
X-Virus-Scanned: amavisd-new at mykolab.com
X-Spam-Flag: NO
X-Spam-Score: -1.9
X-Spam-Level: 
X-Spam-Status: No, score=-1.9 tagged_above=-10 required=5
 tests=[BAYES_00=-1.9] autolearn=ham autolearn_force=no
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 XMKkrEGiAY0W; Sun, 27 Mar 2022 23:41:06 +0200 (CEST)
Received: from int-mx003.mykolab.com (unknown [10.9.13.3])
 by mx.kolabnow.com (Postfix) with ESMTPS id 3E5294084C;
 Sun, 27 Mar 2022 23:41:06 +0200 (CEST)
Received: from ext-subm001.mykolab.com (unknown [10.9.6.1])
 by int-mx003.mykolab.com (Postfix) with ESMTPS id B3DD2A86;
 Sun, 27 Mar 2022 23:41:05 +0200 (CEST)
From: Thiago Jung Bauermann <bauermann@HIDDEN>
To: 49672 <at> debbugs.gnu.org
Subject: [PATCH v2 5/6] =?UTF-8?q?gnu:=20Query=20membership=20in=20?=
 =?UTF-8?q?=E2=80=98supported-systems=E2=80=99=20list=20with=20Nix=20ident?=
 =?UTF-8?q?ifier?=
Date: Sun, 27 Mar 2022 18:40:25 -0300
Message-Id: <20220327214026.102723-6-bauermann@HIDDEN>
In-Reply-To: <20220327214026.102723-1-bauermann@HIDDEN>
References: <20220327214026.102723-1-bauermann@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-Spam-Score: -0.0 (/)
X-Debbugs-Envelope-To: 49672
Cc: Maxime Devos <maximedevos@HIDDEN>,
 Thiago Jung Bauermann <bauermann@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

Packages’ ‘supported-systems’ list contains Nix system identifiers, while
‘%current-target-system’ contains a GNU triplet. We need to use
‘current-target-nix-system’ to query the list, which always returns a Nix
system identifier.

* gnu/packages/bootloaders.scm (grub)[inputs]: Use ‘current-target-nix-system’
to query membership in (package-supported-systems).
---
 gnu/packages/bootloaders.scm | 9 +++------
 1 file changed, 3 insertions(+), 6 deletions(-)

diff --git a/gnu/packages/bootloaders.scm b/gnu/packages/bootloaders.scm
index 40dd38fdd28a..98970450900e 100644
--- a/gnu/packages/bootloaders.scm
+++ b/gnu/packages/bootloaders.scm
@@ -185,16 +185,14 @@ (define-public grub
 
        ;; Depend on LVM2 for libdevmapper, used by 'grub-probe' and
        ;; 'grub-install' to recognize mapped devices (LUKS, etc.)
-       ,@(if (member (or (%current-target-system)
-                         (%current-system))
+       ,@(if (member (current-target-nix-system)
                      (package-supported-systems lvm2))
              `(("lvm2" ,lvm2))
              '())
 
        ;; Depend on mdadm, which is invoked by 'grub-probe' and 'grub-install'
        ;; to determine whether the root file system is RAID.
-       ,@(if (member (or (%current-target-system)
-                         (%current-system))
+       ,@(if (member (current-target-nix-system)
                      (package-supported-systems mdadm))
              `(("mdadm" ,mdadm))
              '())
@@ -205,8 +203,7 @@ (define-public grub
 
        ;; Needed for ‘grub-mount’, the only reliable way to tell whether a given
        ;; file system will be readable by GRUB without rebooting.
-       ,@(if (member (or (%current-target-system)
-                         (%current-system))
+       ,@(if (member (current-target-nix-system)
                      (package-supported-systems fuse))
              `(("fuse" ,fuse))
              '())




Information forwarded to guix-patches@HIDDEN:
bug#49672; Package guix-patches. Full text available.

Message received at 49672 <at> debbugs.gnu.org:


Received: (at 49672) by debbugs.gnu.org; 27 Mar 2022 21:41:12 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Mar 27 17:41:12 2022
Received: from localhost ([127.0.0.1]:56689 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1nYadL-0004Vv-98
	for submit <at> debbugs.gnu.org; Sun, 27 Mar 2022 17:41:11 -0400
Received: from mx.kolabnow.com ([212.103.80.155]:18460)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <bauermann@HIDDEN>) id 1nYadJ-0004Vh-8O
 for 49672 <at> debbugs.gnu.org; Sun, 27 Mar 2022 17:41:10 -0400
Received: from localhost (unknown [127.0.0.1])
 by mx.kolabnow.com (Postfix) with ESMTP id 21697141B;
 Sun, 27 Mar 2022 23:41:03 +0200 (CEST)
Authentication-Results: ext-mx-out002.mykolab.com (amavisd-new);
 dkim=pass (4096-bit key) reason="pass (just generated, assumed good)"
 header.d=kolabnow.com
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=
 1648417262; x=1650231663; bh=iAhegk3fIkKjwuEGb3aeeoPW9sUL9vpibhc
 0UxkN2Gw=; b=uphtYJYnqIjjBFXOG/R0LMlthTWFzwK1/+3m+kcXZgcNE5WMZyx
 46McF4TMk5sdnZxF8VFpc7qbU7PNmtWXvKBQf3ldB1vSkbcV4Qht1hjvhVh0MRqo
 2pDnFZ/LVSrCpv2Rrma74aDajV3OkKS1EgN3MNIyXaXxtMMeSrQyfCyC26xoWCCa
 gQsIpre1qEP5IcC84tvmfBaieORA2XPcn0mZ3LopISyY0g6Ba3lKU1ZHoGs4v92o
 FiEndJmsfe2Dd2xvU7AonSvzj9lG75xhx5pp25s6MYjIGKaCIbqfx27sgQhPjvJu
 ZdBNr+IgF58MOxufGLp1MCyfxupuo6X3epP64kyIDCWYCH1e4DpiusNLspdHYExH
 RfUBY9gEmp3E2AOKhR+5fUFlWds8HmWVa9BBIktlxsbGXNv+z1oybp/PKHFrk2Hn
 SsjG8U4Ko5ABxPv4mX0A65VWSmQB7q6tW5PHaL6tQn6vD3tKRu4StfYXdXMUBbuo
 3P1h4HDfL6o/I/rL5rD7CeOSFMdrrn5SZgzZOKdckv7Vfi+4Jk4ELD8R8plsXf/g
 1JRZkJSnh+5/UoRmG/YgDM4o+55+dC0tIHO/tJu96YOhA5gOC5VDEWkc2SFLSVE3
 XstWyrxgob87ay0bNBRbN4BABQAoOM/EZcB1OG+e7flkSD4a6/cCWksk=
X-Virus-Scanned: amavisd-new at mykolab.com
X-Spam-Flag: NO
X-Spam-Score: -1.9
X-Spam-Level: 
X-Spam-Status: No, score=-1.9 tagged_above=-10 required=5
 tests=[BAYES_00=-1.9] autolearn=ham autolearn_force=no
Received: from mx.kolabnow.com ([127.0.0.1])
 by localhost (ext-mx-out002.mykolab.com [127.0.0.1]) (amavisd-new, port 10024)
 with ESMTP id TdL-oFG60kr9; Sun, 27 Mar 2022 23:41:02 +0200 (CEST)
Received: from int-mx003.mykolab.com (unknown [10.9.13.3])
 by mx.kolabnow.com (Postfix) with ESMTPS id 7957A1419;
 Sun, 27 Mar 2022 23:41:01 +0200 (CEST)
Received: from ext-subm001.mykolab.com (unknown [10.9.6.1])
 by int-mx003.mykolab.com (Postfix) with ESMTPS id CCE9AA86;
 Sun, 27 Mar 2022 23:41:00 +0200 (CEST)
From: Thiago Jung Bauermann <bauermann@HIDDEN>
To: 49672 <at> debbugs.gnu.org
Subject: [PATCH v2 4/6] =?UTF-8?q?gnu:=20Use=20=E2=80=98current-target-nix?=
 =?UTF-8?q?-system=E2=80=99=20for=20matches?=
Date: Sun, 27 Mar 2022 18:40:24 -0300
Message-Id: <20220327214026.102723-5-bauermann@HIDDEN>
In-Reply-To: <20220327214026.102723-1-bauermann@HIDDEN>
References: <20220327214026.102723-1-bauermann@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-Spam-Score: -0.0 (/)
X-Debbugs-Envelope-To: 49672
Cc: Maxime Devos <maximedevos@HIDDEN>,
 Thiago Jung Bauermann <bauermann@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

Several packages try to match both ‘%current-target-system’ and
‘%current-system’ against lists of Nix system identifiers.

This is a bug because while ‘%current-system’ does contain a Nix system
identifier, ‘%current-target-system’ contains a GNU triplet, which is
different.

Some places also check whether the system identifier starts with
“<arch>-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 (e.g., “x86_64-unknown-linux-gnu”, or "i586-pc-gnu”).

To fix these problems make these places use the function
‘current-target-nix-system’, which always returns a Nix system identifier.

In the case of the “go” and “clisp” packages, this also fixes a bug where
‘%current-system’ and ‘%current-target-system’ were being checked in the
wrong order.

* gnu/packages/astronomy.scm (libpasastro)[arguments]<#:make-flags>: Use
‘current-target-nix-system’ to match list of Nix system identifiers.
* gnu/packages/bootloaders.scm (u-boot-tools)[arguments]<#:phases>: Likewise.
* gnu/packages/c.scm (tcc)[arguments]<#:configure-flags>: Likewise.
* gnu/packages/compression.scm (zpaq)[arguments]<#:make-flags>: Likewise.
* gnu/packages/debug.scm (american-fuzzy-lop): Likewise.
(qemu-for-american-fuzzy-lop): Likewise.
* gnu/packages/digest.scm (xxhash)[arguments]<#:make-flags>: Likewise.
* gnu/packages/golang.scm (go-1.4)[arguments]<#:system>: Likewise.
(go-1.14)[arguments]<#:system>: Likewise.
* gnu/packages/java.scm (java-swt)[source]: Likewise.
(java-jansi)[arguments]<#:phases>: Likewise.
* gnu/packages/julia.scm (julia)[arguments]<#:make-flags>: Likewise.
* gnu/packages/lisp.scm (clisp)[arguments]<#:configure-flags>: Likewise.
* gnu/packages/make-bootstrap.scm (%bootstrap-tarballs)[arguments]
<#:builder>: Likewise
* gnu/packages/mes.scm (mes)[native-inputs]: Likewise.
* gnu/packages/pascal.scm (fpc)[native-inputs]: Likewise.
[arguments]<#:phases>: Likewise.
* gnu/packages/video.scm (mplayer)[arguments]<#:phases>: Likewise.
* gnu/packages/web.scm (nginx)[arguments]<#:phases>: Likewise.
* gnu/packages/web.scm (nginx-accept-language-module)[arguments]
<#:phases>: Likewise.
---
 gnu/packages/astronomy.scm      | 4 ++--
 gnu/packages/bootloaders.scm    | 4 +---
 gnu/packages/c.scm              | 3 +--
 gnu/packages/compression.scm    | 6 ++----
 gnu/packages/debug.scm          | 6 ++----
 gnu/packages/digest.scm         | 3 +--
 gnu/packages/golang.scm         | 6 ++----
 gnu/packages/java.scm           | 4 ++--
 gnu/packages/julia.scm          | 3 +--
 gnu/packages/lisp.scm           | 3 +--
 gnu/packages/make-bootstrap.scm | 2 +-
 gnu/packages/mes.scm            | 3 +--
 gnu/packages/pascal.scm         | 6 ++----
 gnu/packages/video.scm          | 3 +--
 gnu/packages/web.scm            | 6 ++----
 15 files changed, 22 insertions(+), 40 deletions(-)

diff --git a/gnu/packages/astronomy.scm b/gnu/packages/astronomy.scm
index c209b1538f72..baa48e382ba4 100644
--- a/gnu/packages/astronomy.scm
+++ b/gnu/packages/astronomy.scm
@@ -1021,11 +1021,11 @@ (define-public libpasastro
        `(#:tests? #f
          #:make-flags
          (list
-          ,(match (or (%current-target-system) (%current-system))
+          ,(match (current-target-nix-system)
              ((or "aarch64-linux" "armhf-linux" "i686-linux" "x86_64-linux")
               "OS_TARGET=linux")
              (_ #f))
-          ,(match (or (%current-target-system) (%current-system))
+          ,(match (current-target-nix-system)
              ("i686-linux" "CPU_TARGET=i386")
              ("x86_64-linux" "CPU_TARGET=x86_64")
              ((or "armhf-linux" "aarch64-linux") "CPU_TARGET=armv7l")
diff --git a/gnu/packages/bootloaders.scm b/gnu/packages/bootloaders.scm
index 798764103117..40dd38fdd28a 100644
--- a/gnu/packages/bootloaders.scm
+++ b/gnu/packages/bootloaders.scm
@@ -640,9 +640,7 @@ (define-public u-boot-tools
                (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 d545d98938b0..f9e4c497de6a 100644
--- a/gnu/packages/c.scm
+++ b/gnu/packages/c.scm
@@ -90,8 +90,7 @@ (define-public tcc
                                               (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/compression.scm b/gnu/packages/compression.scm
index 3edaecd9518f..7e906eceda52 100644
--- a/gnu/packages/compression.scm
+++ b/gnu/packages/compression.scm
@@ -1449,16 +1449,14 @@ (define-public zpaq
        #:make-flags
        (list
         (string-append "CPPFLAGS=-Dunix"
-                       ,(match (or (%current-target-system)
-                                   (%current-system))
+                       ,(match (current-target-nix-system)
                                ("x86_64-linux"  "")
                                ("i686-linux"    "")
                                (_               " -DNOJIT")))
         ;; These should be safe, lowest-common-denominator instruction sets,
         ;; allowing for some optimisation while remaining reproducible.
         (string-append "CXXFLAGS=-O3 -DNDEBUG"
-                       ,(match (or (%current-target-system)
-                                   (%current-system))
+                       ,(match (current-target-nix-system)
                                ("x86_64-linux"  " -march=nocona -mtune=generic")
                                ("i686-linux"    " -march=i686 -mtune=generic")
                                ("armhf-linux"   " -mtune=generic-armv7-a")
diff --git a/gnu/packages/debug.scm b/gnu/packages/debug.scm
index 80685900ebb6..d96217c95b76 100644
--- a/gnu/packages/debug.scm
+++ b/gnu/packages/debug.scm
@@ -228,8 +228,7 @@ (define-public c-vise
     (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")
@@ -304,8 +303,7 @@ (define-public american-fuzzy-lop
 (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/digest.scm b/gnu/packages/digest.scm
index 4211848fdb61..31e9d315cd07 100644
--- a/gnu/packages/digest.scm
+++ b/gnu/packages/digest.scm
@@ -82,8 +82,7 @@ (define-public xxhash
     (arguments
      (list #:make-flags
            #~(list #$(string-append "CC=" (cc-for-target))
-                   #$(match (or (%current-target-system)
-                                (%current-system))
+                   #$(match (current-target-nix-system)
                        ;; Detect vector instruction set at run time.
                        ((or "i686-linux" "x86_64-linux") "DISPATCH=1")
                        (_ "DISPATCH=0"))
diff --git a/gnu/packages/golang.scm b/gnu/packages/golang.scm
index a8b845e3012a..e7ebf09f1c46 100644
--- a/gnu/packages/golang.scm
+++ b/gnu/packages/golang.scm
@@ -114,8 +114,7 @@ (define-public go-1.4
                   (guix build utils)
                   (srfi srfi-1))
        #:tests? #f ; Tests are run by the all.bash script.
-       ,@(if (string-prefix? "aarch64-linux" (or (%current-system)
-                                                 (%current-target-system)))
+       ,@(if (string-prefix? "aarch64-linux" (current-target-nix-system))
              '(#:system "armhf-linux")
              '())
        #:phases
@@ -264,8 +263,7 @@ (define-public go-1.14
     (arguments
      (substitute-keyword-arguments (package-arguments go-1.4)
        ((#:system system)
-        (if (string-prefix? "aarch64-linux" (or (%current-system)
-                                                (%current-target-system)))
+        (if (string-prefix? "aarch64-linux" (current-target-nix-system))
           "aarch64-linux"
           system))
        ((#:phases phases)
diff --git a/gnu/packages/java.scm b/gnu/packages/java.scm
index b27892841ec6..aead02d93c31 100644
--- a/gnu/packages/java.scm
+++ b/gnu/packages/java.scm
@@ -3483,7 +3483,7 @@ (define-public java-swt
            (file32 "x86")
            (file64 "x86_64"))
        (let-values (((hash file)
-                     (match (or (%current-target-system) (%current-system))
+                     (match (current-target-nix-system)
                        ("x86_64-linux" (values hash64 file64))
                        (_              (values hash32 file32)))))
          (origin
@@ -12092,7 +12092,7 @@ (define-public java-jansi
            (lambda _
              (let ((dir (string-append "build/classes/org/fusesource/"
                                        "jansi/internal/native/"
-                                       ,(match (or (%current-target-system) (%current-system))
+                                       ,(match (current-target-nix-system)
                                           ("i686-linux" "Linux/x86")
                                           ("x86_64-linux" "Linux/x86_64")
                                           ("armhf-linux" "Linux/armv7")
diff --git a/gnu/packages/julia.scm b/gnu/packages/julia.scm
index 0bdac6617508..c1a1d185d544 100644
--- a/gnu/packages/julia.scm
+++ b/gnu/packages/julia.scm
@@ -452,8 +452,7 @@ (define-public julia
          ;; Passing the MARCH or JULIA_CPU_TARGET flag is necessary to build
          ;; binary substitutes for the supported architectures.  See also
          ;; https://docs.julialang.org/en/v1/devdocs/sysimg/#Specifying-multiple-system-image-targets
-         ,(match (or (%current-target-system)
-                     (%current-system))
+         ,(match (current-target-nix-system)
                  ("x86_64-linux"
                   ;; These are the flags that upstream uses for their binaries.
                   "JULIA_CPU_TARGET=generic;generic,-cx16,clone_all;sandybridge,-xsaveopt,clone_all;haswell,-rdrnd,base(1)")
diff --git a/gnu/packages/lisp.scm b/gnu/packages/lisp.scm
index 361d6409d43a..e6e1aada5b1c 100644
--- a/gnu/packages/lisp.scm
+++ b/gnu/packages/lisp.scm
@@ -356,8 +356,7 @@ (define-public clisp
     (inputs (list libffcall ncurses readline libsigsegv))
     (arguments
      `(#:configure-flags '(,@(if (string-prefix? "armhf-linux"
-                                                 (or (%current-system)
-                                                     (%current-target-system)))
+                                                 (current-target-nix-system))
                                  '("CFLAGS=-falign-functions=4")
                                  '())
                             "--with-dynamic-ffi"
diff --git a/gnu/packages/make-bootstrap.scm b/gnu/packages/make-bootstrap.scm
index 4ea97368a99e..595630d22b58 100644
--- a/gnu/packages/make-bootstrap.scm
+++ b/gnu/packages/make-bootstrap.scm
@@ -897,7 +897,7 @@ (define out #$output)
                          %build-inputs))))
     (inputs
      (append (list %guile-bootstrap-tarball)
-         (match (or (%current-target-system) (%current-system))
+         (match (current-target-nix-system)
            ((or "i686-linux" "x86_64-linux")
             (list %mescc-tools-bootstrap-tarball
                   %mes-bootstrap-tarball
diff --git a/gnu/packages/mes.scm b/gnu/packages/mes.scm
index a862d84fc8ce..e5e947cb4df9 100644
--- a/gnu/packages/mes.scm
+++ b/gnu/packages/mes.scm
@@ -179,8 +179,7 @@ (define-public mes
     (propagated-inputs (list mescc-tools nyacc-1.00.2))
     (native-inputs
      (append (list guile-3.0)
-         (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
diff --git a/gnu/packages/pascal.scm b/gnu/packages/pascal.scm
index af7857f08495..7a3260ccbbaf 100644
--- a/gnu/packages/pascal.scm
+++ b/gnu/packages/pascal.scm
@@ -89,8 +89,7 @@ (define-public fpc
      (list expat glibc ld-wrapper ncurses zlib))
     (native-inputs
      ;; FPC is built with FPC, so we need bootstrap binaries.
-     `(("fpc-binary" ,(match (or (%current-target-system)
-                                 (%current-system))
+     `(("fpc-binary" ,(match (current-target-nix-system)
                        ("i686-linux" fpc-bootstrap-i386)
                        ;;("powerpc64le-linux" fpc-bootstrap-ppc64le)
                        ;;("powerpc-linux" fpc-bootstrap-ppc)
@@ -103,8 +102,7 @@ (define-public fpc
        #:phases
        (let ((fpc-bootstrap-path
               (string-append (getcwd) "/" ,name "-" ,version "/fpc-bin"))
-             (arch ,(match (or (%current-target-system)
-                               (%current-system))
+             (arch ,(match (current-target-nix-system)
                      ("i686-linux" "i386")
                      ("x86_64-linux" "x86_64")
                      (_ "unknown"))))
diff --git a/gnu/packages/video.scm b/gnu/packages/video.scm
index dc05c0a22265..3684421ecaa7 100644
--- a/gnu/packages/video.scm
+++ b/gnu/packages/video.scm
@@ -2089,8 +2089,7 @@ (define-public mplayer
                       (string-append "--prefix=" out)
                       ;; Enable runtime cpu detection where supported,
                       ;; and choose a suitable target.
-                      ,@(match (or (%current-target-system)
-                                   (%current-system))
+                      ,@(match (current-target-nix-system)
                           ("x86_64-linux"
                            '("--enable-runtime-cpudetection"
                              "--target=x86_64-linux"))
diff --git a/gnu/packages/web.scm b/gnu/packages/web.scm
index 75aa5ce9078b..24535226ec20 100644
--- a/gnu/packages/web.scm
+++ b/gnu/packages/web.scm
@@ -413,8 +413,7 @@ (define-public nginx
                                   ,(let ((system "Linux")    ; uname -s
                                          (release "3.2.0")   ; uname -r
                                          ;; uname -m
-                                         (machine (match (or (%current-target-system)
-                                                             (%current-system))
+                                         (machine (match (current-target-nix-system)
                                                     ("x86_64-linux"   "x86_64")
                                                     ("i686-linux"     "i686")
                                                     ("mips64el-linux" "mips64")
@@ -603,8 +602,7 @@ (define-public nginx-accept-language-module
                        ,(let ((system "Linux")    ; uname -s
                               (release "3.2.0")   ; uname -r
                               ;; uname -m
-                              (machine (match (or (%current-target-system)
-                                                  (%current-system))
+                              (machine (match (current-target-nix-system)
                                          ("x86_64-linux"   "x86_64")
                                          ("i686-linux"     "i686")
                                          ("mips64el-linux" "mips64")




Information forwarded to guix-patches@HIDDEN:
bug#49672; Package guix-patches. Full text available.

Message received at 49672 <at> debbugs.gnu.org:


Received: (at 49672) by debbugs.gnu.org; 27 Mar 2022 21:40:55 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Mar 27 17:40:55 2022
Received: from localhost ([127.0.0.1]:56681 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1nYad5-0004Ue-14
	for submit <at> debbugs.gnu.org; Sun, 27 Mar 2022 17:40:55 -0400
Received: from mx.kolabnow.com ([212.103.80.153]:17930)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <bauermann@HIDDEN>) id 1nYad2-0004UE-MI
 for 49672 <at> debbugs.gnu.org; Sun, 27 Mar 2022 17:40:53 -0400
Received: from localhost (unknown [127.0.0.1])
 by mx.kolabnow.com (Postfix) with ESMTP id 16DA340D4E;
 Sun, 27 Mar 2022 23:40:47 +0200 (CEST)
Authentication-Results: ext-mx-out003.mykolab.com (amavisd-new);
 dkim=pass (4096-bit key) reason="pass (just generated, assumed good)"
 header.d=kolabnow.com
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=
 1648417246; x=1650231647; bh=eGxRZPeoGBPgaY9ZIulrFL0iq5PjMaJfLuq
 Z2pVLZ/Q=; b=kEu3dAwwTR/pRHCxk0rzN0AM2p/7V9aKkq2e0g/j/ZwsZ2HyfV1
 9s0rI0Pp67HUJferE9MILaO4gZ9+V+Agit9citIouXnEXLacbBn43uqRoCLiXHLS
 +GAxBJZZBoJpsx5s42UFP0iOJSiYPRJxwQr0yxYSsA7IQbCPB0/2MKyqnDfpFjvA
 qKlnJAEApk4DGxkjxBH1CVhYgEVAj2QVa3Y5xIDlsO+F17mfUWsASyfQlPw0SMVa
 N4ZmFj6rBJqJwp2eqj/ddA95DXa9nqjZHQINbRlKY+6t4QFo1tCGWe0FTDayK2q0
 4fVFZPHZL7Vki3N0TF2DUKk271+/lFfEoqaERUFVC3MqcAy8W0afNyh4Qmh9gusO
 +PUkB1xBxbxxYfFLxeGUFy0JUVfKfvJLt47n4t55Kuo7ejQxedxzP6OD5veBv5nW
 Hn4pFwNJV9OydStOhu3WW8weJXt77Fnw+pawW7+7JB2KrZu/UhHNR+uFXWB2QJIo
 DFLBCAKP60B0tY1twZusb2d6Z6JacwuzH8je5Azjo+XdUm3C9ValYTmcctlLPv5n
 usWUh41AkzagJtACNrDofPZU2zPjN8xIDcISRuWOWAggU8Faa1Rhjqrc9dzHgnz+
 lSfRONtQ/HnsJC3YfWuG4mMFQ/1TLa+dKzmaO0MJc6xg9zfQGNrtX60I=
X-Virus-Scanned: amavisd-new at mykolab.com
X-Spam-Flag: NO
X-Spam-Score: -1.9
X-Spam-Level: 
X-Spam-Status: No, score=-1.9 tagged_above=-10 required=5
 tests=[BAYES_00=-1.9] autolearn=ham autolearn_force=no
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 fyh5gmvpaIxT; Sun, 27 Mar 2022 23:40:46 +0200 (CEST)
Received: from int-mx003.mykolab.com (unknown [10.9.13.3])
 by mx.kolabnow.com (Postfix) with ESMTPS id ACED24084C;
 Sun, 27 Mar 2022 23:40:45 +0200 (CEST)
Received: from ext-subm001.mykolab.com (unknown [10.9.6.1])
 by int-mx003.mykolab.com (Postfix) with ESMTPS id E9D14A86;
 Sun, 27 Mar 2022 23:40:44 +0200 (CEST)
From: Thiago Jung Bauermann <bauermann@HIDDEN>
To: 49672 <at> debbugs.gnu.org
Subject: [PATCH v2 2/6] =?UTF-8?q?gnu:=20libgc:=20Use=20default=20argument?=
 =?UTF-8?q?=20in=20=E2=80=98target-hurd=3F=E2=80=99=20call?=
Date: Sun, 27 Mar 2022 18:40:22 -0300
Message-Id: <20220327214026.102723-3-bauermann@HIDDEN>
In-Reply-To: <20220327214026.102723-1-bauermann@HIDDEN>
References: <20220327214026.102723-1-bauermann@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-Spam-Score: -0.0 (/)
X-Debbugs-Envelope-To: 49672
Cc: Maxime Devos <maximedevos@HIDDEN>,
 Thiago Jung Bauermann <bauermann@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

‘%current-system’ is always defined, so the expression
“(or (%current-system) (%current-target-system))” is equivalent to
“(%current-system)”, which is unlikely to be the intent of the code.

The default argument for ‘target-hurd?’ has the ‘or’ expression in the
correct order, so just use that.

* gnu/packages/bdw-gc.scm (libgc)[arguments]<#:configure-flags>: Omit
argument in call to ‘target-hurd?’.
---
 gnu/packages/bdw-gc.scm | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/gnu/packages/bdw-gc.scm b/gnu/packages/bdw-gc.scm
index 2698d56da00b..13a6691db4b2 100644
--- a/gnu/packages/bdw-gc.scm
+++ b/gnu/packages/bdw-gc.scm
@@ -56,8 +56,7 @@ (define-public libgc
        ;; to configure script. See bug report and discussion:
        ;; <https://lists.opendylan.org/pipermail/bdwgc/2017-April/006275.html>
        ;; <https://lists.gnu.org/archive/html/bug-hurd/2017-01/msg00008.html>
-       ,@(if (target-hurd? (or (%current-system)
-                               (%current-target-system)))
+       ,@(if (target-hurd?)
              '("--disable-gcj-support")
              '()))))
    (native-inputs (list pkg-config))




Information forwarded to guix-patches@HIDDEN:
bug#49672; Package guix-patches. Full text available.

Message received at 49672 <at> debbugs.gnu.org:


Received: (at 49672) by debbugs.gnu.org; 27 Mar 2022 21:40:51 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Mar 27 17:40:51 2022
Received: from localhost ([127.0.0.1]:56677 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1nYad0-0004UN-Q8
	for submit <at> debbugs.gnu.org; Sun, 27 Mar 2022 17:40:50 -0400
Received: from mx.kolabnow.com ([212.103.80.155]:18424)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <bauermann@HIDDEN>) id 1nYacx-0004Tv-6V
 for 49672 <at> debbugs.gnu.org; Sun, 27 Mar 2022 17:40:47 -0400
Received: from localhost (unknown [127.0.0.1])
 by mx.kolabnow.com (Postfix) with ESMTP id 7AC6F141B;
 Sun, 27 Mar 2022 23:40:40 +0200 (CEST)
Authentication-Results: ext-mx-out002.mykolab.com (amavisd-new);
 dkim=pass (4096-bit key) reason="pass (just generated, assumed good)"
 header.d=kolabnow.com
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=
 1648417240; x=1650231641; bh=GV+j+K6th9jDA4oAyYqDrvJE3b1Amy8Zx1c
 1aM4jfYo=; b=kbfe92cVPzSq5LtPMo1lE/tgWIetmWAofbv6R3fkPp23K6gEizB
 5W91zPKt1JUlmWOgOxV69kY+zTXnrwmyu4v7V3DvErlJ27dx7WjjC/GozZzSNEfZ
 ETteFj2fHj5oN5+79NUL0JZbPBheniotYCEZz5iZ+haRlZlY4qUJmOcKBh6lqFrb
 CEcn6qZCRp8yWiqvR5K6AyIPXBYCD/wDb1WpNhPFJWst9yoR5rEammvJzwjNtX97
 m2Gx5C9h0s875Ojo1iQHtzTfP6cj6R1wET7vMMhUDBfl6Zgnw8yBzjnGc6RsdsV0
 afF4xHzSbk5F6ig6i4fcQgAv1MoHvIj+YIRNO0bVWne2Q3lr01WmMHSqOgg0vtb0
 4G4PvXk7cugHS2zJx1/C5McS6/Qzc3r06Zn2z3CnlBmVd5hNRSPF4Y4mgQK3U+pR
 d4Tmf5MoV79a/HEK9C6ADcVL2eQNWCybZkPbASrZH5yaCD4VPj5JmGpKcqbf6D2F
 LC3f8ZMSzWJ3rxNWPmcTWinOnS5iYHnQ5Zg7He4Hy0jSiS/6O9qzYYZmFs5baF+5
 G0cofjVMJ86nrPG3iwyCXQ1oHyp9muHOYy38LVqLG050mAc0O8uKDm3yfMQ8qdjm
 E22xos+oNJvI3txPmwL6Yp80S3z3A/ClcWNhTdXJZ5tmZ1FYbBQjnx7o=
X-Virus-Scanned: amavisd-new at mykolab.com
X-Spam-Flag: NO
X-Spam-Score: -1.9
X-Spam-Level: 
X-Spam-Status: No, score=-1.9 tagged_above=-10 required=5
 tests=[BAYES_00=-1.9] autolearn=ham autolearn_force=no
Received: from mx.kolabnow.com ([127.0.0.1])
 by localhost (ext-mx-out002.mykolab.com [127.0.0.1]) (amavisd-new, port 10024)
 with ESMTP id xtfrv3kqQS_9; Sun, 27 Mar 2022 23:40:40 +0200 (CEST)
Received: from int-mx001.mykolab.com (unknown [10.9.13.1])
 by mx.kolabnow.com (Postfix) with ESMTPS id DF0C71419;
 Sun, 27 Mar 2022 23:40:39 +0200 (CEST)
Received: from ext-subm001.mykolab.com (unknown [10.9.6.1])
 by int-mx001.mykolab.com (Postfix) with ESMTPS id BFEF0BC9;
 Sun, 27 Mar 2022 23:40:38 +0200 (CEST)
From: Thiago Jung Bauermann <bauermann@HIDDEN>
To: 49672 <at> debbugs.gnu.org
Subject: [PATCH v2 1/6] gnu: Fix GNU/Linux system detection
Date: Sun, 27 Mar 2022 18:40:21 -0300
Message-Id: <20220327214026.102723-2-bauermann@HIDDEN>
In-Reply-To: <20220327214026.102723-1-bauermann@HIDDEN>
References: <20220327214026.102723-1-bauermann@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-Spam-Score: -0.0 (/)
X-Debbugs-Envelope-To: 49672
Cc: Maxime Devos <maximedevos@HIDDEN>,
 Thiago Jung Bauermann <bauermann@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

The current code isn’t strictly correct because the GNU triplet in
‘%current-target-system’ could end in “linux-gnu”. The helper works in all
cases.

* gnu/packages/messaging.scm (ngircd)[inputs]: Use ‘target-linux?’.
[arguments]<#:configure-flags>: Likewise.
* gnu/packages/ntp.scm (ntp)[inputs]: Likewise
---
 gnu/packages/messaging.scm | 8 ++------
 gnu/packages/ntp.scm       | 3 +--
 2 files changed, 3 insertions(+), 8 deletions(-)

diff --git a/gnu/packages/messaging.scm b/gnu/packages/messaging.scm
index f40c3a7e2ccb..44809754212a 100644
--- a/gnu/packages/messaging.scm
+++ b/gnu/packages/messaging.scm
@@ -899,17 +899,13 @@ (define-public ngircd
     (inputs `(("zlib" ,zlib)
               ("libwrap" ,tcp-wrappers)
               ("gnutls" ,gnutls)
-              ,@(if (string-suffix? "-linux"
-                                    (or (%current-target-system)
-                                        (%current-system)))
+              ,@(if (target-linux?)
                     `(("linux-pam" ,linux-pam))
                     '())))
     (arguments
      `(#:configure-flags
        '("--with-gnutls" "--with-iconv" "--enable-ipv6" "--with-tcp-wrappers"
-         ,@(if (string-suffix? "-linux"
-                               (or (%current-target-system)
-                                   (%current-system)))
+         ,@(if (target-linux?)
                '("--with-pam")
                '()))
        #:phases
diff --git a/gnu/packages/ntp.scm b/gnu/packages/ntp.scm
index 7a3c033b2e12..d7f99c614ed8 100644
--- a/gnu/packages/ntp.scm
+++ b/gnu/packages/ntp.scm
@@ -148,8 +148,7 @@ (define-public ntp
       ("libevent" ,libevent)
       ;; Build with POSIX capabilities support on GNU/Linux.  This allows 'ntpd'
       ;; to run as non-root (when invoked with '-u'.)
-      ,@(if (string-suffix? "-linux"
-                            (or (%current-target-system) (%current-system)))
+      ,@(if (target-linux?)
             `(("libcap" ,libcap))
             '())))
    (arguments




Information forwarded to guix-patches@HIDDEN:
bug#49672; Package guix-patches. Full text available.

Message received at 49672 <at> debbugs.gnu.org:


Received: (at 49672) by debbugs.gnu.org; 27 Mar 2022 21:40:46 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Mar 27 17:40:46 2022
Received: from localhost ([127.0.0.1]:56673 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1nYacw-0004U7-GC
	for submit <at> debbugs.gnu.org; Sun, 27 Mar 2022 17:40:46 -0400
Received: from mx.kolabnow.com ([212.103.80.154]:3282)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <bauermann@HIDDEN>) id 1nYacq-0004To-Pc
 for 49672 <at> debbugs.gnu.org; Sun, 27 Mar 2022 17:40:45 -0400
Received: from localhost (unknown [127.0.0.1])
 by mx.kolabnow.com (Postfix) with ESMTP id 5BF221A0D;
 Sun, 27 Mar 2022 23:40:34 +0200 (CEST)
Authentication-Results: ext-mx-out001.mykolab.com (amavisd-new);
 dkim=pass (4096-bit key) reason="pass (just generated, assumed good)"
 header.d=kolabnow.com
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kolabnow.com; h=
 content-transfer-encoding:content-type:content-type:mime-version
 :message-id:date:date:subject:subject:from:from:received
 :received:received; s=dkim20160331; t=1648417233; x=1650231634;
 bh=/vQje9faqL1nFkWb0NayOjOCGmsBlKE6aD87W0Rq0Cs=; b=v8FiRKQY3ThX
 mZFxjX4FUmuH941dQO2WPFKktyGG8e+jFKuhdi6p9QmXVRxa3okV50gh1OeMED05
 Nctg0uJbR7je9JpAxJeVm7d+dq0CPkZ6xpVC57Or8VJchcKmi1rKN3nQi+zfuKbN
 LuIoPgnrJxzYDIp4MTNtHsoRWoI91S/1+FhwLEBsOyJcOMOPFtj3sl07kheVjV63
 hkhrPw76Z76kf90uW1VDcl1RYMD5J2StS2xT6LvNyQ3tQcZnhZcKSY464VVZy+El
 Jw/YgrnQyCnDI5EtcoDDkuyjB9WW8ZPfeslPR5ihUKdrHPRaLjCxMVZHhesM/+hC
 5Md1pAD9wR09xRuO3eceIFK4KhDDz6L2LJ0vzd1prl0nDQ+ZOIa1xVdbYoh84gcg
 R6rkVXWiM7yfG/juILKeukgf1QxpixhZmLFLfVz36d5rVP5KvPtcOBYAR/Ibfox7
 g0+bTLVD4KTXXeOE2AQl55pObCd0F2edZlwYYOR/z+8EeV+4Qkhy9DkFI5Fu2z8/
 xdCoZL8JlCwkTWXAFSuX84eKXClkANUOxg88EHtOEQTxdZir0Y+Rmv13JVWQiYuO
 oftXBSdxS8SwyFy4Otr/pjC2Oh77y+R0Y3w1n5yy4XeYQpL41xJ1hqXIZxxB55l0
 EPMbp1klGLf6rmeEYZePUjQhE138xr8=
X-Virus-Scanned: amavisd-new at mykolab.com
X-Spam-Flag: NO
X-Spam-Score: -1.9
X-Spam-Level: 
X-Spam-Status: No, score=-1.9 tagged_above=-10 required=5
 tests=[BAYES_00=-1.9] autolearn=ham autolearn_force=no
Received: from mx.kolabnow.com ([127.0.0.1])
 by localhost (ext-mx-out001.mykolab.com [127.0.0.1]) (amavisd-new, port 10024)
 with ESMTP id jiod7CfuC8aT; Sun, 27 Mar 2022 23:40:33 +0200 (CEST)
Received: from int-mx002.mykolab.com (unknown [10.9.13.2])
 by mx.kolabnow.com (Postfix) with ESMTPS id 332DC14D8;
 Sun, 27 Mar 2022 23:40:33 +0200 (CEST)
Received: from ext-subm001.mykolab.com (unknown [10.9.6.1])
 by int-mx002.mykolab.com (Postfix) with ESMTPS id 85EC523D4;
 Sun, 27 Mar 2022 23:40:32 +0200 (CEST)
From: Thiago Jung Bauermann <bauermann@HIDDEN>
To: 49672 <at> debbugs.gnu.org
Subject: [PATCH v2 0/6] Target check fixes for cross compilation
Date: Sun, 27 Mar 2022 18:40:20 -0300
Message-Id: <20220327214026.102723-1-bauermann@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 49672
Cc: Maxime Devos <maximedevos@HIDDEN>,
 Thiago Jung Bauermann <bauermann@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

Hello,

I've been working on and off on this fixes and cleanups series for a long
time now, but it became a bit unwieldy and overwhelming so in the interest
of shipping something I decided to split the fixes from the cleanups. This
way I can at least submit the former, and leave the latter for an
unspecified, uncertain future.

I tested that on x86_64-linux the build derivations of all packages modified
by these packages are unchanged. They only affect (for the better!) cross
builds. This means that this patch series can go to master.

I don't mind rebasing it if by the time the series is approved, it doesn't
cleanly apply anymore.

Changes since v1:

- Patch “gnu: Fix GNU/Linux system detection”
  - Use ‘target-linux?’ helper rather than ‘string-contains’.

- Patch “gnu: libgc: Use default argument in ‘target-hurd?’ call”
  - New patch.

- Patch “utils: Introduce the ‘current-target-nix-system’ procedure”
  - Reworded commit message.

- Patch “gnu: Use ‘current-target-nix-system’ for matches”
  - Reworded commit message.
  - Squashed with patch “gnu: Use ‘current-target-nix-system’ in prefix checks”
  - Found more packages where these changes were needed.

- Patch “bootloader: grub: Fix mix of GNU triplet and Nix system identifier”
  - Patch dropped. It was a cleanup, not a bug fix.

- Patch “gnu: ustr: Don’t pass default argument”
  - Patch dropped. It was a cleanup, not a bug fix.

- Patch “gnu: Use existing target helpers from ‘(guix utils)’”
  - Patch dropped. It was a cleanup, not a bug fix.

Thiago Jung Bauermann (6):
  gnu: Fix GNU/Linux system detection
  gnu: libgc: Use default argument in ‘target-hurd?’ call
  utils: Introduce the ‘current-target-nix-system’ procedure
  gnu: Use ‘current-target-nix-system’ for matches
  gnu: Query membership in ‘supported-systems’ list with Nix identifier
  gnu: Fix check of ‘%current-system’ and ‘%current-target-system’

 gnu/packages/astronomy.scm      |  4 ++--
 gnu/packages/bdw-gc.scm         |  3 +--
 gnu/packages/bootloaders.scm    | 13 ++++---------
 gnu/packages/bootstrap.scm      |  4 +---
 gnu/packages/c.scm              |  3 +--
 gnu/packages/compression.scm    |  6 ++----
 gnu/packages/crypto.scm         |  4 ++--
 gnu/packages/debug.scm          |  6 ++----
 gnu/packages/digest.scm         |  3 +--
 gnu/packages/golang.scm         |  6 ++----
 gnu/packages/java.scm           | 20 ++++++++++----------
 gnu/packages/julia.scm          |  3 +--
 gnu/packages/lisp.scm           |  3 +--
 gnu/packages/llvm.scm           |  4 +---
 gnu/packages/make-bootstrap.scm |  2 +-
 gnu/packages/mes.scm            |  3 +--
 gnu/packages/messaging.scm      |  8 ++------
 gnu/packages/ntp.scm            |  3 +--
 gnu/packages/pascal.scm         |  6 ++----
 gnu/packages/photo.scm          |  4 ++--
 gnu/packages/php.scm            |  4 ++--
 gnu/packages/sdl.scm            |  4 ++--
 gnu/packages/telephony.scm      |  4 ++--
 gnu/packages/video.scm          |  3 +--
 gnu/packages/web.scm            |  6 ++----
 guix/utils.scm                  |  7 +++++++
 26 files changed, 56 insertions(+), 80 deletions(-)


base-commit: ff4585d147ef3bb55c6cbbd86ca8fc582ad6b561




Information forwarded to guix-patches@HIDDEN:
bug#49672; Package guix-patches. Full text available.

Message received at 49672 <at> debbugs.gnu.org:


Received: (at 49672) by debbugs.gnu.org; 12 Nov 2021 00:56:29 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Nov 11 19:56:29 2021
Received: from localhost ([127.0.0.1]:42639 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1mlKrl-0001gU-4i
	for submit <at> debbugs.gnu.org; Thu, 11 Nov 2021 19:56:29 -0500
Received: from mx.kolabnow.com ([212.103.80.153]:52264)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <bauermann@HIDDEN>) id 1mlKrj-0001gG-OT
 for 49672 <at> debbugs.gnu.org; Thu, 11 Nov 2021 19:56:28 -0500
Received: from localhost (unknown [127.0.0.1])
 by mx.kolabnow.com (Postfix) with ESMTP id 6127940D66;
 Fri, 12 Nov 2021 01:56:21 +0100 (CET)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kolabnow.com; h=
 content-type:content-type:content-transfer-encoding:mime-version
 :references:in-reply-to:message-id:date:date:subject:subject
 :from:from:received:received:received; s=dkim20160331; t=
 1636678580; x=1638492981; bh=cJxKj3QT171JqnE0qVrRFtKlngsCKNefook
 cOJF0HaA=; b=QYR+t1lMAi5Qqq0CH+PFKGKMUKyDSAlpt8X7E1MC5Aee4WgArMB
 3nRAq4ufnqH4fN46x+CE5yhMe+yhLA+GHdYlAp6vRFd6z0tIz3DOkdUm2epx5Wm3
 tTYX5XVkLr+fh9SKEbbAwERZqcVEIcRp+gQfauTy/c2wiVW828c4pi2Mekk7NF92
 W5bjHw/pzsJoCu6TMZudnu9ZbuZjLcbiEz28JPQFOxdF0RJi9tdKRUvj7lkcAmLr
 4f7VmIDD+qJ5twL2W8HEopu+5nnCKuHRhaBmrFNsymrTu7gGOEUTUvWd+MclcUgx
 OojKl4CyGH+Dsuk9fAmPxJER81bF+RCdNIfqT99fIG/2wrft2U7+DYo5knEPdF/q
 Eo8agTYdxwb8auZYL8AXGwUJVYR6oW+yx2g+/yyiGjCOFQFMDCl9ZHPihO4UZuIB
 KXTF+RLAHeDMqoRb1agvDwfstcY8Op6SbPEdCLVfvuSz24T5Pb8IJ0Cvoz/QFpgP
 sVgZgKERyLNmw3vP5QcjHqNbZTVop7raBg08BWhoVGmu2+QOtXbz3M7OUS2MSsVr
 0ua3aGL3yAvUt2HGz5gMKqJgQKGZoWufQdhKX4V8Z3ST4eJuiLjrMv/dezhQDAvc
 V4NyGKedUFKwZc+LqNsQ05sUb9wS8333DYUTrAFU/0W63x4jthTXOvVo=
X-Virus-Scanned: amavisd-new at mykolab.com
X-Spam-Flag: NO
X-Spam-Score: -1.9
X-Spam-Level: 
X-Spam-Status: No, score=-1.9 tagged_above=-10 required=5
 tests=[BAYES_00=-1.9] autolearn=ham autolearn_force=no
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 QdkLQvTiHHLu; Fri, 12 Nov 2021 01:56:20 +0100 (CET)
Received: from int-mx001.mykolab.com (unknown [10.9.13.1])
 by mx.kolabnow.com (Postfix) with ESMTPS id B76FD403E1;
 Fri, 12 Nov 2021 01:56:20 +0100 (CET)
Received: from ext-subm001.mykolab.com (unknown [10.9.6.1])
 by int-mx001.mykolab.com (Postfix) with ESMTPS id D8A99881;
 Fri, 12 Nov 2021 01:56:19 +0100 (CET)
From: Thiago Jung Bauermann <bauermann@HIDDEN>
To: Maxime Devos <maximedevos@HIDDEN>
Subject: Re: [bug#49672] [PATCH 0/9] Target check fixes and cleanups
Date: Thu, 11 Nov 2021 21:56:14 -0300
Message-ID: <2451084.S0jLYT9aXA@popigai>
In-Reply-To: <ad520bfa130edb60767b90cc7cd58f819a00d234.camel@HIDDEN>
References: <20210721004615.631777-1-bauermann@HIDDEN>
 <ad520bfa130edb60767b90cc7cd58f819a00d234.camel@HIDDEN>
MIME-Version: 1.0
Content-Transfer-Encoding: quoted-printable
Content-Type: text/plain; charset="UTF-8"
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 49672
Cc: 49672 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

Hello Maxime,

Em domingo, 7 de novembro de 2021, =C3=A0s 08:23:37 -03, Maxime Devos escre=
veu:
> I looked over the patch series, and almost all seems reasonable to me.

Thank you for reviewing the patches! I will work on a second version=20
addressing your comments.

> though I would split patch 7/9 into a patch defining
> current-target-gnu-triplet and into a patch using current-target-gnu-
> triplet,

Ok, I will do this.

> and possibly a rebase might be neccesary.

I will do this as well.

> Warning: I only looked at the patches, I didn't apply them for testing.

I don=E2=80=99t recall how thoroughly I tested these patches. I=E2=80=99ll =
try to do more=20
extensive testing on v2.

> I don't think the following change is necessary though:
>=20
> -           ,@(if (string-match "^x86_64-linux"
> -                               (or (%current-target-system)
> -                                   (%current-system)))
> +           ,@(if (string-match "^x86_64-linux" (current-target-nix-
> system))
>=20
> because the regex ^x86_64-linux would match both the nix system and GNU
> triplet
> IIUC.

Maybe in the way Guix uses GNU triplets the regex would match (I don=E2=80=
=99t=20
actually know) but in theory at least it wouldn=E2=80=99t, because =E2=80=
=9Cx86_64-linux=E2=80=9D=20
isn=E2=80=99t a complete GNU triplet: it=E2=80=99s missing the vendor field=
=2E A complete=20
triplet would be =E2=80=9Cx86_64-unknown-linux-gnu=E2=80=9D, or =E2=80=9Cx8=
6_64-pc-linux-gnu=E2=80=9D.

There=E2=80=99s a bit more information here: https://wiki.osdev.org/Target_=
Triplet

This is actually one of the main reasons why I decided to clean up the=20
handling of Nix system identifiers and GNU triplet identifiers.

=2D-=20
Thanks,
Thiago






Information forwarded to guix-patches@HIDDEN:
bug#49672; Package guix-patches. Full text available.

Message received at 49672 <at> debbugs.gnu.org:


Received: (at 49672) by debbugs.gnu.org; 7 Nov 2021 11:23:43 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Nov 07 06:23:43 2021
Received: from localhost ([127.0.0.1]:51919 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1mjgH0-00041a-Vm
	for submit <at> debbugs.gnu.org; Sun, 07 Nov 2021 06:23:43 -0500
Received: from baptiste.telenet-ops.be ([195.130.132.51]:42156)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <maximedevos@HIDDEN>) id 1mjgGx-00041Q-Ap
 for 49672 <at> debbugs.gnu.org; Sun, 07 Nov 2021 06:23:41 -0500
Received: from ptr-bvsjgyhxw7psv60dyze.18120a2.ip6.access.telenet.be
 ([IPv6:2a02:1811:8c09:9d00:3c5f:2eff:feb0:ba5a])
 by baptiste.telenet-ops.be with bizsmtp
 id FPPd2600D4UW6Th01PPdPQ; Sun, 07 Nov 2021 12:23:37 +0100
Message-ID: <ad520bfa130edb60767b90cc7cd58f819a00d234.camel@HIDDEN>
Subject: Re: [PATCH 0/9] Target check fixes and cleanups
From: Maxime Devos <maximedevos@HIDDEN>
To: 49672 <at> debbugs.gnu.org
Date: Sun, 07 Nov 2021 11:23:37 +0000
Content-Type: text/plain; charset="UTF-8"
User-Agent: Evolution 3.38.3-1 
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telenet.be; s=r21;
 t=1636284217; bh=ryj+L4IuB7qePFEHABe9Q280nxYvAcFUAhteeOvfWes=;
 h=Subject:From:To:Date;
 b=pzJDkWQI6CCHWAh/oaF6MmvTJ8LyI51R0pPqJINKkI3PHpZ4GsGCrnQTEMfNGdySv
 VFnOfUk+PWjhyrF3Qsma/KUr5ORJuRAARlwyyafXPx+4UlJABufwFbJtqhJThIdR3Z
 6WM8q+39uIaORbgkE6bKLhJRqH221C0JGNhIIqKMZYeCqc1sxb+DX/s1hMX3Oc9Egq
 aGW3e3CRtQ5Xgl4KqkNfiuP2LVLn8W7isGn+KatkDd+rtGmHjC2Rheu3LylaIvhOea
 ohAie42rhNnRsNWj02DtULj5X8kA2yT5ww+xbdO/mxraDeVXOsE08Pa8K8rGFVMK8m
 qifmu6Z/lKi8g==
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 49672
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

Hi,

I looked over the patch series, and almost all seems reasonable to me.
though I would split patch 7/9 into a patch defining
current-target-gnu-triplet and into a patch using current-target-gnu-
triplet,
and possibly a rebase might be neccesary.

Warning: I only looked at the patches, I didn't apply them for testing.

I don't think the following change is necessary though:

-           ,@(if (string-match "^x86_64-linux"
-                               (or (%current-target-system)
-                                   (%current-system)))
+           ,@(if (string-match "^x86_64-linux" (current-target-nix-
system))

because the regex ^x86_64-linux would match both the nix system and GNU
triplet
IIUC.

Greetings,
Maxime.







Information forwarded to guix-patches@HIDDEN:
bug#49672; Package guix-patches. Full text available.

Message received at 49672 <at> debbugs.gnu.org:


Received: (at 49672) by debbugs.gnu.org; 21 Jul 2021 01:01:55 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Jul 20 21:01:55 2021
Received: from localhost ([127.0.0.1]:35777 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1m60cU-00008Z-Vm
	for submit <at> debbugs.gnu.org; Tue, 20 Jul 2021 21:01:55 -0400
Received: from mx.kolabnow.com ([95.128.36.42]:46664)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <bauermann@HIDDEN>) id 1m60cR-00007x-QO
 for 49672 <at> debbugs.gnu.org; Tue, 20 Jul 2021 21:01:52 -0400
Received: from localhost (unknown [127.0.0.1])
 by ext-mx-out002.mykolab.com (Postfix) with ESMTP id 5C7BC998
 for <49672 <at> debbugs.gnu.org>; Wed, 21 Jul 2021 03:01:46 +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=
 1626829305; x=1628643706; bh=eC5eZl9IdkPU1qDnGNrLPqkeO2Alpq8gTMk
 bdFlmIAw=; b=M8sbISj+gyoSYzMoIaDLPzTEy1DkV5r7sM5rIaCGlcRyi3cOA5q
 gZHAEGGfZo5KAlmfUYO9i61C21uNoVJq7OFEiLrXUNWSA4r2GJi+PiM7Y2I020BJ
 ooN30iXWkSOIfXofqm1hs2HLvj+1EL2/NDR+XcZX1NcoQFxBftwsKIe52qDgqbw3
 tpL3BFg0I36oPBWQwISr7J5L55uJkla0NzOtiKhJIKkbYhqb3mnMi3kFRZOycptU
 oh6p69soBzDchaxSchltBc/tzkpz4JcvuQS5dHZl/6iG8R2EDgNHPQKZtUCSnZlO
 Far25KIepalej2snsehUofzLNaEYDAxVnthCgeNwTsIkJXMVyLrv0Duwfnt+lzKW
 KrkAfAHjQTbktbDfnI7zOIl1Y+OUuUrI6qBbKdssr2nnStbho9RDNjUhcgjgEmpa
 JrDuvR2/dNFgRoayF4ZjeR2K7oxPRFWXOsvbAh+MhbNp/UcPU4YNXwddkJ2wSs/2
 OxnMf5sp/ZcTrcLyRDJpTw1YUFYiiWN4OYP4nnJCQTD1HExvSbjqcJqs2wSUIjWU
 Mu657CeNq6ql81gOVB3pj1k42yo12lt1Hyo2YUyukwdkJkVke1AGeBlct0QGW9KF
 frX5GjNYbK5z+8BOabST8N4m+QMtJsUFeRb6owc9qZkN7X+XEvJdlxHc=
X-Virus-Scanned: amavisd-new at mykolab.com
X-Spam-Flag: NO
X-Spam-Score: -1.899
X-Spam-Level: 
X-Spam-Status: No, score=-1.899 tagged_above=-10 required=5
 tests=[BAYES_00=-1.9, URIBL_BLOCKED=0.001]
 autolearn=ham autolearn_force=no
Received: from mx.kolabnow.com ([127.0.0.1])
 by localhost (ext-mx-out002.mykolab.com [127.0.0.1]) (amavisd-new, port 10024)
 with ESMTP id DiDFKFs0uybc for <49672 <at> debbugs.gnu.org>;
 Wed, 21 Jul 2021 03:01:45 +0200 (CEST)
Received: from int-mx001.mykolab.com (unknown [10.9.13.1])
 by ext-mx-out002.mykolab.com (Postfix) with ESMTPS id 1C9D5D3
 for <49672 <at> debbugs.gnu.org>; Wed, 21 Jul 2021 03:01:44 +0200 (CEST)
Received: from ext-subm003.mykolab.com (unknown [10.9.6.3])
 by int-mx001.mykolab.com (Postfix) with ESMTPS id 973D3323;
 Wed, 21 Jul 2021 03:01:44 +0200 (CEST)
From: Thiago Jung Bauermann <bauermann@HIDDEN>
To: 49672 <at> debbugs.gnu.org
Subject: [PATCH 9/9] =?UTF-8?q?gnu:=20Use=20existing=20target=20helpers=20?=
 =?UTF-8?q?from=20=E2=80=98(guix=20utils)=E2=80=99?=
Date: Tue, 20 Jul 2021 22:00:43 -0300
Message-Id: <20210721010043.632012-9-bauermann@HIDDEN>
In-Reply-To: <20210721010043.632012-1-bauermann@HIDDEN>
References: <20210721010043.632012-1-bauermann@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 49672
Cc: Thiago Jung Bauermann <bauermann@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

These are equivalent to existing code and shouldn't lead to any behaviour
change. The objective of the change is to make the code easier to read.

* gnu/packages/algebra.scm (fftwf)[arguments]<#:configure-flags>: Use
‘target-arm32?’.
* gnu/packages/boost.scm (boost)[arguments]<#:make-flags>: Use
‘target-arm32?’ and ‘target-aarch64?’.
* gnu/packages/bootloaders.scm (grub)[arguments]<#:tests>: Use
‘target-arm?’.
(vboot-utils)[arguments]<#:make-flags>: Use ‘target-arm32?’.
* gnu/packages/ci.scm (cuirass)[arguments]<#:tests>: Use ‘target-aarch64?’.
* gnu/packages/firmware.scm (ovmf-aarch64)[native-inputs]: Use ‘target-aarch64?’.
[arguments]<#:phases>: Likewise.
* gnu/packages/gstreamer.scm (gst-plugins-base)[propagated-inputs]: Use
‘target-arm32?’.
(gst-plugins-bad)[arguments]<#:phases>: Likewise.
* gnu/packages/java.scm (jamvm-1-bootstrap)[arguments]<#:phases>: Use
‘target-aarch64?’.
[native-inputs]: Likewise.
* gnu/packages/linux.scm (proot)[arguments]<#:tests>: Use ‘target-arm?’.
* gnu/packages/multiprecision.scm (qd)[arguments]<#:configure-flags>: Use
‘target-aarch64?’.
* gnu/packages/php.scm (php)[arguments]<#:phases>: Use ‘target-arm32?’.
* gnu/packages/python.scm (python-3.8)[arguments]<#:phases>: Use ‘target-arm?’.
[native-inputs]: Likewise.
* gnu/packages/syncthing.scm (go-github-com-rcrowley-go-metrics)[arguments]
<#:tests>: Use ‘target-aarch64?’.
* gnu/packages/valgrind.scm (valgrind)[arguments]<#:make-flags>: Use
‘target-powerpc?’.
* gnu/packages/web.scm (rapidjson)[arguments]<#:phases>: Use ‘target-aarch64?’.
---
 gnu/packages/algebra.scm        |  3 +--
 gnu/packages/boost.scm          |  4 ++--
 gnu/packages/bootloaders.scm    |  9 ++-------
 gnu/packages/ci.scm             |  6 ++----
 gnu/packages/firmware.scm       |  4 ++--
 gnu/packages/gstreamer.scm      |  6 ++----
 gnu/packages/java.scm           |  6 ++----
 gnu/packages/linux.scm          |  4 +---
 gnu/packages/multiprecision.scm |  4 +---
 gnu/packages/php.scm            |  3 +--
 gnu/packages/python.scm         | 26 ++++++++++----------------
 gnu/packages/syncthing.scm      |  4 ++--
 gnu/packages/valgrind.scm       |  4 ++--
 gnu/packages/web.scm            |  3 +--
 14 files changed, 31 insertions(+), 55 deletions(-)

diff --git a/gnu/packages/algebra.scm b/gnu/packages/algebra.scm
index 533b1f09e023..f51bd69a4230 100644
--- a/gnu/packages/algebra.scm
+++ b/gnu/packages/algebra.scm
@@ -802,8 +802,7 @@ cosine/ sine transforms or DCT/DST).")
      (substitute-keyword-arguments (package-arguments fftw)
        ((#:configure-flags fftw-configure-flags)
         `(cons* "--enable-single"
-                ,@(if (string-prefix? "arm" (or (%current-target-system)
-                                                (%current-system)))
+                ,@(if (target-arm32?)
                       ;; fftw supports NEON on 32-bit ARM only when compiled
                       ;; for single-precision, so add it here.
                       '("--enable-neon")
diff --git a/gnu/packages/boost.scm b/gnu/packages/boost.scm
index e05a3c32fe11..67d452e925e1 100644
--- a/gnu/packages/boost.scm
+++ b/gnu/packages/boost.scm
@@ -108,11 +108,11 @@
                      "binary-format=elf"
                      "target-os=linux"
                      ,@(cond
-                        ((string-prefix? "arm" (%current-target-system))
+                        ((target-arm32?)
                          '("abi=aapcs"
                            "address-model=32"
                            "architecture=arm"))
-                        ((string-prefix? "aarch64" (%current-target-system))
+                        ((target-aarch64?)
                          '("abi=aapcs"
                            "address-model=64"
                            "architecture=arm"))
diff --git a/gnu/packages/bootloaders.scm b/gnu/packages/bootloaders.scm
index 669574468bd2..6912cffa38be 100644
--- a/gnu/packages/bootloaders.scm
+++ b/gnu/packages/bootloaders.scm
@@ -173,10 +173,7 @@
                           "test_unset"))
                       #t)))
        ;; Disable tests on ARM and AARCH64 platforms or when cross-compiling.
-       #:tests? ,(not (or (any (cute string-prefix? <> (or (%current-target-system)
-                                                           (%current-system)))
-                               '("arm" "aarch64"))
-                          (%current-target-system)))))
+       #:tests? ,(not (or (target-arm?) (%current-target-system)))))
     (inputs
      `(("gettext" ,gettext-minimal)
 
@@ -988,9 +985,7 @@ to Novena upstream, does not load u-boot.img from the first partition.")
                           ;; "armv7l", the value of `uname -m`, and will not
                           ;; match ${ARCH}, which will make the tests require
                           ;; QEMU for testing.
-                          ,@(if (string-prefix? "arm"
-                                                (or (%current-target-system)
-                                                    (%current-system)))
+                          ,@(if (target-arm32?)
                                 '("HOST_ARCH=arm")
                                 '())
                           (string-append "DESTDIR=" (assoc-ref %outputs "out")))
diff --git a/gnu/packages/ci.scm b/gnu/packages/ci.scm
index 0bcde0fad515..bddc1e8386c2 100644
--- a/gnu/packages/ci.scm
+++ b/gnu/packages/ci.scm
@@ -27,7 +27,7 @@
   #:use-module (guix packages)
   #:use-module (guix download)
   #:use-module (guix git-download)
-  #:use-module (guix download)
+  #:use-module (guix utils)
   #:use-module (gnu packages autotools)
   #:use-module (gnu packages base)
   #:use-module (gnu packages boost)
@@ -97,9 +97,7 @@
          #:configure-flags '("--localstatedir=/var") ;for /var/log/cuirass
          ;; XXX: HTTP tests fail on aarch64 due to Fibers errors, disable them
          ;; on that architecture for now.
-         #:tests? ,(let ((s (or (%current-target-system)
-                                (%current-system))))
-                     (not (string-prefix? "aarch64" s)))
+         #:tests? ,(not (target-aarch64?))
          #:parallel-tests? #f
          #:phases
          (modify-phases %standard-phases
diff --git a/gnu/packages/firmware.scm b/gnu/packages/firmware.scm
index ebcb89923cee..b569bc288949 100644
--- a/gnu/packages/firmware.scm
+++ b/gnu/packages/firmware.scm
@@ -398,7 +398,7 @@ Virtual Machines.  OVMF contains a sample UEFI firmware for QEMU and KVM.")
     (name "ovmf-aarch64")
     (native-inputs
      `(,@(package-native-inputs ovmf)
-       ,@(if (not (string-prefix? "aarch64" (%current-system)))
+       ,@(if (not (target-aarch64? (%current-system)))
            `(("cross-gcc" ,(cross-gcc "aarch64-linux-gnu"))
              ("cross-binutils" ,(cross-binutils "aarch64-linux-gnu")))
            '())))
@@ -408,7 +408,7 @@ Virtual Machines.  OVMF contains a sample UEFI firmware for QEMU and KVM.")
         `(modify-phases ,phases
            (add-before 'configure 'set-env
              (lambda _
-               ,@(if (not (string-prefix? "aarch64" (%current-system)))
+               ,@(if (not (target-aarch64? (%current-system)))
                      `((setenv "GCC49_AARCH64_PREFIX" "aarch64-linux-gnu-"))
                      '())
                #t))
diff --git a/gnu/packages/gstreamer.scm b/gnu/packages/gstreamer.scm
index 3047773e0f07..488417c39773 100644
--- a/gnu/packages/gstreamer.scm
+++ b/gnu/packages/gstreamer.scm
@@ -539,8 +539,7 @@ This package provides the core library and elements.")
        ;; XXX: Do not enable Orc optimizations on ARM systems because
        ;; it leads to two test failures.
        ;; https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/issues/683
-       ,@(if (string-prefix? "arm" (or (%current-target-system)
-                                       (%current-system)))
+       ,@(if (target-arm32?)
              '()
              `(("orc" ,orc)))))         ;required by gstreamer-audio-1.0.pc
     (inputs
@@ -691,8 +690,7 @@ model to base your own plug-in on, here it is.")
      `(#:phases
        (modify-phases %standard-phases
          ,@%common-gstreamer-phases
-         ,@(if (string-prefix? "arm" (or (%current-target-system)
-                                         (%current-system)))
+         ,@(if (target-arm32?)
                ;; Disable test that fails on ARMv7.
                ;; https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/issues/1188
                `((add-after 'unpack 'disable-asfmux-test
diff --git a/gnu/packages/java.scm b/gnu/packages/java.scm
index 1c62f5d358e2..5b5d5afed945 100644
--- a/gnu/packages/java.scm
+++ b/gnu/packages/java.scm
@@ -315,8 +315,7 @@ language.")
              "--enable-runtime-reloc-checks"
              "--enable-ffi")
        #:phases
-       ,(if (string-prefix? "aarch64" (or (%current-target-system)
-                                          (%current-system)))
+       ,(if (target-aarch64?)
             ;; Makefiles and the configure script need to be regenerated to
             ;; incorporate support for AArch64.
             '(modify-phases %standard-phases
@@ -330,8 +329,7 @@ language.")
        ("zip" ,zip)
        ("zlib" ,zlib)))
     (native-inputs
-     (if (string-prefix? "aarch64" (or (%current-target-system)
-                                       (%current-system)))
+     (if (target-aarch64?)
          ;; Additional packages needed for autoreconf.
          `(("autoconf" ,autoconf)
            ("automake" ,automake)
diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm
index 0d695950d101..c6b7c0a403ef 100644
--- a/gnu/packages/linux.scm
+++ b/gnu/packages/linux.scm
@@ -6890,9 +6890,7 @@ userspace queueing component and the logging subsystem.")
      ;; Disable the test suite on ARM platforms, as there are too many
      ;; failures to keep track of (see for example:
      ;; https://github.com/proot-me/proot/issues/263).
-     `(#:tests? ,(not (string-match "^(arm|aarch64)"
-                                    (or (%current-target-system)
-                                        (%current-system))))
+     `(#:tests? ,(not (target-arm?))
        #:make-flags '("-C" "src")
        #:phases (modify-phases %standard-phases
                   (add-after 'unpack 'patch-sources
diff --git a/gnu/packages/multiprecision.scm b/gnu/packages/multiprecision.scm
index 733e6548b992..53b1e3c55ca7 100644
--- a/gnu/packages/multiprecision.scm
+++ b/gnu/packages/multiprecision.scm
@@ -235,9 +235,7 @@ error.  Additionally, iRRAM uses the concept of multi-valued functions.")
     (arguments
      `(#:configure-flags `("--disable-enable_fma" ;weird :/
                            "--enable-shared"
-                           ,,@(if (string-prefix? "aarch64"
-                                                  (or (%current-target-system)
-                                                      (%current-system)))
+                           ,,@(if (target-aarch64?)
                                   ;; XXX: The qd_test test fails numerical
                                   ;; accuracy checks for 'dd_real::exp()' on
                                   ;; aarch64 with GCC 5.4 at -O2.  Disabling
diff --git a/gnu/packages/php.scm b/gnu/packages/php.scm
index 597494e8a94f..36a4527aad67 100644
--- a/gnu/packages/php.scm
+++ b/gnu/packages/php.scm
@@ -177,8 +177,7 @@
              (substitute* "ext/standard/tests/streams/bug60602.phpt"
                (("'ls'") (string-append "'" (which "ls") "'")))
 
-             ,@(if (string-prefix? "arm" (or (%current-target-system)
-                                             (%current-system)))
+             ,@(if (target-arm32?)
                    ;; Drop tests known to fail on armhf.
                    '((for-each delete-file
                               (list
diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm
index e694321e173e..c1a486b9f21f 100644
--- a/gnu/packages/python.scm
+++ b/gnu/packages/python.scm
@@ -488,16 +488,13 @@ data types.")
                  #t)))
            ;; XXX: Apply patch on ARM platforms only to avoid a full rebuild.
            ;; Remove this phase in the next rebuild cycle.
-           ,@(let ((system (or (%current-target-system)
-                               (%current-system))))
-               (if (any (cute string-prefix? <> system)
-                        '("arm" "aarch64"))
-                   '((add-after 'unpack 'apply-alignment-patch
-                       (lambda* (#:key native-inputs inputs #:allow-other-keys)
-                        (invoke "patch" "-p1" "--force" "--input"
-                                (assoc-ref (or native-inputs inputs)
-                                           "arm-alignment.patch")))))
-                   '()))))))
+           ,@(if (target-arm?)
+                 '((add-after 'unpack 'apply-alignment-patch
+                     (lambda* (#:key native-inputs inputs #:allow-other-keys)
+                       (invoke "patch" "-p1" "--force" "--input"
+                               (assoc-ref (or native-inputs inputs)
+                                          "arm-alignment.patch")))))
+                 '())))))
     (native-inputs
      `(("tzdata" ,tzdata-for-tests)
 
@@ -505,12 +502,9 @@ data types.")
        ;; it causes a test failure when building 32-bit Python on a
        ;; 64-bit kernel.  See <https://bugs.python.org/issue36515>.
        ;; TODO: make this a regular patch in the next rebuild cycle.
-       ,@(let ((system (or (%current-target-system)
-                           (%current-system))))
-           (if (any (cute string-prefix? <> system)
-                    '("arm" "aarch64"))
-               `(("arm-alignment.patch" ,(search-patch "python-3-arm-alignment.patch")))
-               '()))
+       ,@(if (target-arm?)
+             `(("arm-alignment.patch" ,(search-patch "python-3-arm-alignment.patch")))
+             '())
 
        ,@(if (%current-target-system)
              `(("python3" ,this-package))
diff --git a/gnu/packages/syncthing.scm b/gnu/packages/syncthing.scm
index 5cb8449e448e..b23fcea24096 100644
--- a/gnu/packages/syncthing.scm
+++ b/gnu/packages/syncthing.scm
@@ -30,6 +30,7 @@
   #:use-module (guix download)
   #:use-module (guix git-download)
   #:use-module (guix licenses)
+  #:use-module (guix utils)
   #:use-module (gnu packages)
   #:use-module (gnu packages freedesktop)
   #:use-module (gnu packages glib)
@@ -568,8 +569,7 @@ higher-level API for doing so.")
       (arguments
        ;; Arbitrary precision tests are known to be broken on aarch64, ppc64le
        ;; and s390x. See: https://github.com/rcrowley/go-metrics/issues/249
-       `(#:tests? ,(not (string-prefix? "aarch64" (or (%current-target-system)
-                                                      (%current-system))))
+       `(#:tests? ,(not (target-aarch64?))
          #:import-path "github.com/rcrowley/go-metrics"))
       (propagated-inputs
        `(("go-github-com-stathat-go" ,go-github-com-stathat-go)))
diff --git a/gnu/packages/valgrind.scm b/gnu/packages/valgrind.scm
index 4036bd461bc5..24b422c2c52c 100644
--- a/gnu/packages/valgrind.scm
+++ b/gnu/packages/valgrind.scm
@@ -26,6 +26,7 @@
   #:use-module (guix download)
   #:use-module (guix build-system gnu)
   #:use-module (guix licenses)
+  #:use-module (guix utils)
   #:use-module (gnu packages gdb)
   #:use-module (gnu packages perl)
   #:use-module (gnu packages))
@@ -50,8 +51,7 @@
     (outputs '("doc"                              ;16 MB
                "out"))
     (arguments
-     `(,@(if (string-prefix? "powerpc" (or (%current-target-system)
-                                           (%current-system)))
+     `(,@(if (target-powerpc?)
            `(#:make-flags '("CFLAGS+=-maltivec"))
            '())
        #:phases
diff --git a/gnu/packages/web.scm b/gnu/packages/web.scm
index b00c9aa3db5b..a6812699d77b 100644
--- a/gnu/packages/web.scm
+++ b/gnu/packages/web.scm
@@ -1322,8 +1322,7 @@ current version of any major web browser.")
                   #t))))
     (build-system cmake-build-system)
     (arguments
-     (if (string-prefix? "aarch64" (or (%current-target-system)
-                                       (%current-system)))
+     (if (target-aarch64?)
          '(#:phases
            (modify-phases %standard-phases
              (add-after 'unpack 'patch-aarch-march-detection




Information forwarded to guix-patches@HIDDEN:
bug#49672; Package guix-patches. Full text available.

Message received at 49672 <at> debbugs.gnu.org:


Received: (at 49672) by debbugs.gnu.org; 21 Jul 2021 01:01:51 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Jul 20 21:01:51 2021
Received: from localhost ([127.0.0.1]:35773 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1m60cQ-00008I-PJ
	for submit <at> debbugs.gnu.org; Tue, 20 Jul 2021 21:01:50 -0400
Received: from mx.kolabnow.com ([95.128.36.40]:59520)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <bauermann@HIDDEN>) id 1m60cP-00007s-2f
 for 49672 <at> debbugs.gnu.org; Tue, 20 Jul 2021 21:01:49 -0400
Received: from localhost (unknown [127.0.0.1])
 by ext-mx-out003.mykolab.com (Postfix) with ESMTP id A0B6B405B8
 for <49672 <at> debbugs.gnu.org>; Wed, 21 Jul 2021 03:01:43 +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=
 1626829303; x=1628643704; bh=GOWuafueRWJ+4OPeoy+XimnxjOQxgX0NkcD
 Zw2am1Qk=; b=yG2GYdIrB4YWPfAbg/cYM2rO/LVTqaBnVMdcC3c2pVEf2JXr8Ae
 c5yPZsM7lMSJ4L4WlOz5yqB5HFpzcCNhQUWTypn78zt4r5ljiQFJC9bzRRMX/8CY
 R7u9Vey/wGZZxJkWooEaAhbeOqB7yWD8HFizMyP+39t2ggY8lkcOKV7g4TnPL/vo
 U/HCZ1gbGJ29ph5j6YvAG9JJ6hq7H2NSfDcvGdhUifC/orVKU4iswm8vVKuurNbS
 N6pvGNeMclejAwyNbDmDYlrmu9rw7WDLkNnhNUzp1j0Xs9DMIPnEbQSCDpeTxBVs
 y2W8630FbYmMw61GjoEtWmxnqXiI4yy5BKWJgOBjtefWNxSkSw1aNJrP0XRV/QRj
 9zRtnZt7NUK9ZrmyTXrLNVWG2EY/iL9vRUXEy0pH4csgwSlsALSyBwdocXrbQw/l
 xHXUpEyCnYzA/QeV4JHKaGH+ya+Syf+WGSITh21u3pqPiL1TTpCa5lh4/RXfDFQT
 w2ViCAbdC62vOFnsX+dqPZ2HCylCWcZ43Ysj5AAyHuFzpuGE0p9oDxlh3fGh22K1
 KMDNB7rUQo5XcwUMWnzuAnOI1iMZnK/Pn9WlawxrChDGq814xCd1Xz0eESsbCMrX
 cOm8Tud6PFJPWYgNGyaoWOg0Vu6zSla2+C9Fb8/nDP1kUcR4PFvI7BQE=
X-Virus-Scanned: amavisd-new at mykolab.com
X-Spam-Flag: NO
X-Spam-Score: -1.9
X-Spam-Level: 
X-Spam-Status: No, score=-1.9 tagged_above=-10 required=5
 tests=[BAYES_00=-1.9] autolearn=ham autolearn_force=no
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 0jiIPOQbnFjs for <49672 <at> debbugs.gnu.org>;
 Wed, 21 Jul 2021 03:01:43 +0200 (CEST)
Received: from int-mx003.mykolab.com (unknown [10.9.13.3])
 by ext-mx-out003.mykolab.com (Postfix) with ESMTPS id 1B5C6403CB
 for <49672 <at> debbugs.gnu.org>; Wed, 21 Jul 2021 03:01:41 +0200 (CEST)
Received: from ext-subm003.mykolab.com (unknown [10.9.6.3])
 by int-mx003.mykolab.com (Postfix) with ESMTPS id E76B532BA;
 Wed, 21 Jul 2021 03:01:40 +0200 (CEST)
From: Thiago Jung Bauermann <bauermann@HIDDEN>
To: 49672 <at> debbugs.gnu.org
Subject: [PATCH 8/9] =?UTF-8?q?gnu:=20ustr:=20Don=E2=80=99t=20pass=20defau?=
 =?UTF-8?q?lt=20argument?=
Date: Tue, 20 Jul 2021 22:00:42 -0300
Message-Id: <20210721010043.632012-8-bauermann@HIDDEN>
In-Reply-To: <20210721010043.632012-1-bauermann@HIDDEN>
References: <20210721010043.632012-1-bauermann@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 49672
Cc: Thiago Jung Bauermann <bauermann@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

The default argument to ‘target-64bit?’ already is
`(or (%current-target-system) (%current-system))`, so there’s no need to
duplicate code.

* gnu/packages/textutils.scm (ustr)[arguments]<#:phases>: Don’t pass default
argument to ‘target-64bit?’.
---
 gnu/packages/textutils.scm | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/gnu/packages/textutils.scm b/gnu/packages/textutils.scm
index c3f4580a47c7..0f23a166e7c0 100644
--- a/gnu/packages/textutils.scm
+++ b/gnu/packages/textutils.scm
@@ -331,8 +331,7 @@ input bits thoroughly but are not suitable for cryptography.")
            (lambda _
              (substitute* "Makefile"
                (("\\./autoconf_64b")
-                ,(if (target-64bit? (or (%current-target-system)
-                                        (%current-system)))
+                ,(if (target-64bit?)
                      "echo 1"
                      "echo 0"))
                (("\\./autoconf_vsnprintf") "echo 0"))))




Information forwarded to guix-patches@HIDDEN:
bug#49672; Package guix-patches. Full text available.

Message received at 49672 <at> debbugs.gnu.org:


Received: (at 49672) by debbugs.gnu.org; 21 Jul 2021 01:01:47 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Jul 20 21:01:47 2021
Received: from localhost ([127.0.0.1]:35769 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1m60cN-000082-9r
	for submit <at> debbugs.gnu.org; Tue, 20 Jul 2021 21:01:47 -0400
Received: from mx.kolabnow.com ([95.128.36.41]:49216)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <bauermann@HIDDEN>) id 1m60cL-00007g-Nf
 for 49672 <at> debbugs.gnu.org; Tue, 20 Jul 2021 21:01:46 -0400
Received: from localhost (unknown [127.0.0.1])
 by ext-mx-out001.mykolab.com (Postfix) with ESMTP id 46518AF6
 for <49672 <at> debbugs.gnu.org>; Wed, 21 Jul 2021 03:01:40 +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=
 1626829297; x=1628643698; bh=Vlj4F3reKETdde84MigstZ0dzVqKIDtClIB
 xGUO8mv8=; b=entsooVP29i7zsnDU6yfk7hn53mzt7D9tqMOH6I14y1F3+Ohh0Q
 c6HvqcZQO2/xAq2ZFYRzULewaLBcFcJNdliEf1kIPtd3eJV2a1ndEfj3w6miBRG8
 jcVwGG7uG2J4t029AdwL5UkWH23TdN5jTZMY/6v/zUV06CJiIYhCOxOIot5m8WOo
 xqEOxdmEt/2SSY6aDGxDHFyfs7BZVKu8DImiznBkA5vIzWrQpea8Zu+l/vDGl7XX
 ygj7bzdE53B2bZd6VGe/CETMv92pIi+8aPxo4uenQlDqZhPoQb78u18ffSYTQkKc
 9+4KCiJgVjEqe8hk+9Qhe3qB//TN80sk2JQfGSgeQIJFpO+2l3KZEGDlt7M8T2NM
 tBjrnDpyobpCDrxVbU9VhlTsk/bJ+pCk14yfSuHHQCNzxDya6M1vwfSKiSUed+CO
 k5SehsrvXP8N/vv1dQb/bgL3a2D77tGCvtJQ9zdST3hM6Pn1z0ZtbJ71MkGeQ/Wb
 4DrpJSG6m6ShFtsw0E6kv26TsuwanMh42ZTTd6nQswnds/p2yHor4pZzNGaCJNeI
 WgTW25w1u6VBsipvRRtybCUBRAH0FkupO4zHfQIP/BU20Z5Zpc72XaDofsrzgIXr
 kCwJzVD4JiI78KCuZz17wDBzIfSmV5NOZQNNisguvRgYnXe4S+Rsn/Hw=
X-Virus-Scanned: amavisd-new at mykolab.com
X-Spam-Flag: NO
X-Spam-Score: -1.899
X-Spam-Level: 
X-Spam-Status: No, score=-1.899 tagged_above=-10 required=5
 tests=[BAYES_00=-1.9, URIBL_BLOCKED=0.001]
 autolearn=ham autolearn_force=no
Received: from mx.kolabnow.com ([127.0.0.1])
 by localhost (ext-mx-out001.mykolab.com [127.0.0.1]) (amavisd-new, port 10024)
 with ESMTP id P0Zg-1L48HuQ for <49672 <at> debbugs.gnu.org>;
 Wed, 21 Jul 2021 03:01:37 +0200 (CEST)
Received: from int-mx001.mykolab.com (unknown [10.9.13.1])
 by ext-mx-out001.mykolab.com (Postfix) with ESMTPS id 6D0EDAB6
 for <49672 <at> debbugs.gnu.org>; Wed, 21 Jul 2021 03:01:37 +0200 (CEST)
Received: from ext-subm003.mykolab.com (unknown [10.9.6.3])
 by int-mx001.mykolab.com (Postfix) with ESMTPS id 95AE7323;
 Wed, 21 Jul 2021 03:01:36 +0200 (CEST)
From: Thiago Jung Bauermann <bauermann@HIDDEN>
To: 49672 <at> debbugs.gnu.org
Subject: [PATCH 7/9] bootloader: grub: Fix mix of GNU triplet and Nix system
 identifier
Date: Tue, 20 Jul 2021 22:00:41 -0300
Message-Id: <20210721010043.632012-7-bauermann@HIDDEN>
In-Reply-To: <20210721010043.632012-1-bauermann@HIDDEN>
References: <20210721010043.632012-1-bauermann@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 49672
Cc: Thiago Jung Bauermann <bauermann@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

‘install-grub-efi-netboot’ calls ‘nix-system->gnu-triplet’ on
‘%current-target-system’, but that parameter already contains a GNU triplet
identifier.

There’s no bug in practice because ‘install-grub-efi-netboot’ only uses the
arch part of the identifier, which is the same for both. Nevertheless, it’s
best to fix the confusion.

Therefore, define a ‘current-target-gnu-triplet’ procedure which returns
the GNU triplet identifier for the current target – whether we are
cross-building or not – and use it in ‘install-grub-efi-netboot’.

Also take the opportunity to use the new procedure in packages ‘gcc-4.7’,
‘rust-1.19’ and ‘mplayer’, which have the same logic as the new procedure.

* gnu/bootloader/grub.scm (install-grub-efi-netboot): Use
‘current-target-gnu-triplet’.
* gnu/packages/gcc.scm (gcc-4.7)[configure-flags]: Likewise.
* gnu/packages/rust.scm (rust-1.19)[arguments]<#:phases>: Likewise.
* gnu/packages/video.scm (mplayer)[arguments]<#:phases>: Likewise.
* guix/utils.scm (current-target-gnu-triplet): Define new procedure.
---
 gnu/bootloader/grub.scm | 5 +----
 gnu/packages/gcc.scm    | 5 +----
 gnu/packages/rust.scm   | 4 +---
 gnu/packages/video.scm  | 4 +---
 guix/utils.scm          | 7 +++++++
 5 files changed, 11 insertions(+), 14 deletions(-)

diff --git a/gnu/bootloader/grub.scm b/gnu/bootloader/grub.scm
index ce146aba3c60..fe82a3c1e9ed 100644
--- a/gnu/bootloader/grub.scm
+++ b/gnu/bootloader/grub.scm
@@ -610,10 +610,7 @@ fi~%"))))
 (define (install-grub-efi-netboot subdir)
   "Define a grub-efi-netboot bootloader installer for installation in SUBDIR,
 which is usually efi/Guix or efi/boot."
-  (let* ((system (string-split (nix-system->gnu-triplet
-                                (or (%current-target-system)
-                                    (%current-system)))
-                               #\-))
+  (let* ((system (string-split (current-target-gnu-triplet) #\-))
          (arch (first system))
          (boot-efi-link (match system
                           ;; These are the supportend systems and the names
diff --git a/gnu/packages/gcc.scm b/gnu/packages/gcc.scm
index 2fe30b13210e..4adcb5fc0d69 100644
--- a/gnu/packages/gcc.scm
+++ b/gnu/packages/gcc.scm
@@ -138,10 +138,7 @@ where the OS part is overloaded to denote a specific ABI---into GCC
                             "--without-headers")))
 
                    ;; Pass the right options for the target triplet.
-                   (let ((triplet
-                          (or (%current-target-system)
-                              (nix-system->gnu-triplet (%current-system)))))
-                     (gcc-configure-flags-for-triplet triplet))
+                   (gcc-configure-flags-for-triplet (current-target-gnu-triplet))
 
                    (maybe-target-tools))))))
     (hidden-package
diff --git a/gnu/packages/rust.scm b/gnu/packages/rust.scm
index 73f94a3929bd..c8bb4d158711 100644
--- a/gnu/packages/rust.scm
+++ b/gnu/packages/rust.scm
@@ -402,9 +402,7 @@ test = { path = \"../libtest\" }
          (replace 'install
            (lambda* (#:key inputs outputs #:allow-other-keys)
              (let* ((out (assoc-ref outputs "out"))
-                    (target-system ,(or (%current-target-system)
-                                        (nix-system->gnu-triplet
-                                         (%current-system))))
+                    (target-system ,(current-target-gnu-triplet))
                     (out-libs (string-append out "/lib/rustlib/"
                                              target-system "/lib")))
                                         ;(setenv "CFG_PREFIX" out)
diff --git a/gnu/packages/video.scm b/gnu/packages/video.scm
index 6cf8b90ffa95..375e2297b889 100644
--- a/gnu/packages/video.scm
+++ b/gnu/packages/video.scm
@@ -2032,9 +2032,7 @@ streaming protocols.")
                            '("--target=mips3-linux"))
                           (_ (list (string-append
                                     "--target="
-                                    (or (%current-target-system)
-                                        (nix-system->gnu-triplet
-                                         (%current-system)))))))
+                                    (current-target-gnu-triplet)))))
                       "--disable-iwmmxt")))))))
     (home-page "https://www.mplayerhq.hu")
     (synopsis "Audio and video player")
diff --git a/guix/utils.scm b/guix/utils.scm
index 4072dea89051..61da05137186 100644
--- a/guix/utils.scm
+++ b/guix/utils.scm
@@ -78,6 +78,7 @@
             %current-system
             %current-target-system
             current-target-nix-system
+            current-target-gnu-triplet
             package-name->name+version
             target-mingw?
             target-arm32?
@@ -527,6 +528,12 @@ cross-building or not."
   (or (and=> (%current-target-system) gnu-triplet->nix-system)
       (%current-system)))
 
+(define (current-target-gnu-triplet)
+  "Return the GNU triplet identifier for the current target, whether we are
+cross-building or not."
+  (or (%current-target-system)
+      (nix-system->gnu-triplet (%current-system))))
+
 (define* (package-name->name+version spec
                                      #:optional (delimiter #\@))
   "Given SPEC, a package name like \"foo@HIDDEN\", return two values: \"foo\"




Information forwarded to guix-patches@HIDDEN:
bug#49672; Package guix-patches. Full text available.

Message received at 49672 <at> debbugs.gnu.org:


Received: (at 49672) by debbugs.gnu.org; 21 Jul 2021 01:01:41 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Jul 20 21:01:41 2021
Received: from localhost ([127.0.0.1]:35765 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1m60cH-00007j-00
	for submit <at> debbugs.gnu.org; Tue, 20 Jul 2021 21:01:41 -0400
Received: from mx.kolabnow.com ([95.128.36.42]:46654)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <bauermann@HIDDEN>) id 1m60cF-00007A-Qs
 for 49672 <at> debbugs.gnu.org; Tue, 20 Jul 2021 21:01:40 -0400
Received: from localhost (unknown [127.0.0.1])
 by ext-mx-out002.mykolab.com (Postfix) with ESMTP id 489B8998
 for <49672 <at> debbugs.gnu.org>; Wed, 21 Jul 2021 03:01:34 +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=
 1626829293; x=1628643694; bh=Eon/idi5y3gj5ZKZmx/KKYPfEF2gcOTgCg+
 5H0aBNQA=; b=0K7QI+CeNCULGsv7cn86mdH0T7Jj9GKr6Yc2hmZ0GdPTjtt7StV
 aCPw/EFui6cKcSvbygFVBeQNwHDlWgniodw2osbPnc4kG9pB3rrC6cTP1qRsh2TX
 XQtvj1kyXshmV4nSzF/VtbmV44T5w0lFA4RBEdXv1MZFCWIaE1kyPrRlwy0tFt9K
 ZVaLlIPQuD7OTxvMimhUQQFkw+D5mcY466HWvuW0ZaOxF9N9DLNW2rHcB0GMksgp
 ONw26J/iq9SsbRCuiF7GmppcbTjHBjryPjZdXRXahQHJSStBr+4oxxAPnf6RMVSa
 g/1LD+ze14coDgiL40G9vn+2LyBFD7L00XXzQ/Q3FdSFban+OFrTOIbdb7slLAMk
 F6AnuWCeIQ3pmc7CsCPA8OPRg0+TXKOiBrL+isjx3D/6/QDha98gDcdtz9lF8i0H
 k00GVH3BZMnWKzu7RIsdfNbxDMoT8REs1oZRXL5qaDbEvJjChIygUxfsA2ujyaJm
 a92m8+OTlFlC5ceiQuvFbEt6pem9v7qLak9S7oSwh0XIU+uolN5G4Xa5Nl89WIB6
 rh/ZCmc7W+hgrLa/xTh6dx7OBtYY/bTbO0QCareChCS7FDKeRA38vDCXD6xUaEIs
 14dKAunZZhpAZIJEGi4Ub3NsbMyxZpZ1f3mqRfEUPjBRArNHz1qxF+C4=
X-Virus-Scanned: amavisd-new at mykolab.com
X-Spam-Flag: NO
X-Spam-Score: -1.9
X-Spam-Level: 
X-Spam-Status: No, score=-1.9 tagged_above=-10 required=5
 tests=[BAYES_00=-1.9] autolearn=ham autolearn_force=no
Received: from mx.kolabnow.com ([127.0.0.1])
 by localhost (ext-mx-out002.mykolab.com [127.0.0.1]) (amavisd-new, port 10024)
 with ESMTP id RzWlPdRIhTAS for <49672 <at> debbugs.gnu.org>;
 Wed, 21 Jul 2021 03:01:33 +0200 (CEST)
Received: from int-mx002.mykolab.com (unknown [10.9.13.2])
 by ext-mx-out002.mykolab.com (Postfix) with ESMTPS id A657FD3
 for <49672 <at> debbugs.gnu.org>; Wed, 21 Jul 2021 03:01:33 +0200 (CEST)
Received: from ext-subm003.mykolab.com (unknown [10.9.6.3])
 by int-mx002.mykolab.com (Postfix) with ESMTPS id BB40E4337;
 Wed, 21 Jul 2021 03:01:32 +0200 (CEST)
From: Thiago Jung Bauermann <bauermann@HIDDEN>
To: 49672 <at> debbugs.gnu.org
Subject: [PATCH 6/9] gnu: Fix GNU/Linux system detection
Date: Tue, 20 Jul 2021 22:00:40 -0300
Message-Id: <20210721010043.632012-6-bauermann@HIDDEN>
In-Reply-To: <20210721010043.632012-1-bauermann@HIDDEN>
References: <20210721010043.632012-1-bauermann@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 49672
Cc: Thiago Jung Bauermann <bauermann@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

The current code isn’t strictly correct because the GNU triplet in
‘%current-target-system’ could end in “linux-gnu”. Instead, check whether
either of the system identifiers contain the string “-linux”.

* gnu/packages/messaging.scm (ngircd)[inputs]: Use ‘string-contains’.
[arguments]<#:configure-flags>: Likewise.
* gnu/packages/ntp.scm (ntp)[inputs]: Likewise
---
 gnu/packages/messaging.scm | 12 ++++++------
 gnu/packages/ntp.scm       |  4 ++--
 2 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/gnu/packages/messaging.scm b/gnu/packages/messaging.scm
index e5ecdb889441..f18de2a1295d 100644
--- a/gnu/packages/messaging.scm
+++ b/gnu/packages/messaging.scm
@@ -781,17 +781,17 @@ dictionaries.  HexChat can be extended with multiple addons.")
     (inputs `(("zlib" ,zlib)
               ("libwrap" ,tcp-wrappers)
               ("gnutls" ,gnutls)
-              ,@(if (string-suffix? "-linux"
-                                    (or (%current-target-system)
-                                        (%current-system)))
+              ,@(if (string-contains (or (%current-target-system)
+                                         (%current-system))
+                                     "-linux")
                     `(("linux-pam" ,linux-pam))
                     '())))
     (arguments
      `(#:configure-flags
        '("--with-gnutls" "--with-iconv" "--enable-ipv6" "--with-tcp-wrappers"
-         ,@(if (string-suffix? "-linux"
-                               (or (%current-target-system)
-                                   (%current-system)))
+         ,@(if (string-contains (or (%current-target-system)
+                                    (%current-system))
+                                "-linux")
                '("--with-pam")
                '()))
        #:phases
diff --git a/gnu/packages/ntp.scm b/gnu/packages/ntp.scm
index 191eedd15875..de501199596c 100644
--- a/gnu/packages/ntp.scm
+++ b/gnu/packages/ntp.scm
@@ -154,8 +154,8 @@ time-stamping or reference clock, sub-microsecond accuracy is possible.")
       ("libevent" ,libevent)
       ;; Build with POSIX capabilities support on GNU/Linux.  This allows 'ntpd'
       ;; to run as non-root (when invoked with '-u'.)
-      ,@(if (string-suffix? "-linux"
-                            (or (%current-target-system) (%current-system)))
+      ,@(if (string-contains (or (%current-target-system) (%current-system))
+                             "-linux")
             `(("libcap" ,libcap))
             '())))
    (arguments




Information forwarded to guix-patches@HIDDEN:
bug#49672; Package guix-patches. Full text available.

Message received at 49672 <at> debbugs.gnu.org:


Received: (at 49672) by debbugs.gnu.org; 21 Jul 2021 01:01:39 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Jul 20 21:01:39 2021
Received: from localhost ([127.0.0.1]:35761 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1m60cE-00007S-Hl
	for submit <at> 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 <bauermann@HIDDEN>) id 1m60cC-00006u-L5
 for 49672 <at> 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 <at> 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
X-Spam-Flag: NO
X-Spam-Score: -1.899
X-Spam-Level: 
X-Spam-Status: No, score=-1.899 tagged_above=-10 required=5
 tests=[BAYES_00=-1.9, URIBL_BLOCKED=0.001]
 autolearn=ham autolearn_force=no
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 <at> 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 <at> 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)
From: Thiago Jung Bauermann <bauermann@HIDDEN>
To: 49672 <at> debbugs.gnu.org
Subject: [PATCH 5/9] =?UTF-8?q?gnu:=20Use=20=E2=80=98current-target-nix-sy?=
 =?UTF-8?q?stem=E2=80=99=20in=20prefix=20checks?=
Date: Tue, 20 Jul 2021 22:00:39 -0300
Message-Id: <20210721010043.632012-5-bauermann@HIDDEN>
In-Reply-To: <20210721010043.632012-1-bauermann@HIDDEN>
References: <20210721010043.632012-1-bauermann@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 49672
Cc: Thiago Jung Bauermann <bauermann@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

Some places check whether the system identifier starts with “<arch>-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




Information forwarded to guix-patches@HIDDEN:
bug#49672; Package guix-patches. Full text available.

Message received at 49672 <at> debbugs.gnu.org:


Received: (at 49672) by debbugs.gnu.org; 21 Jul 2021 01:01:35 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Jul 20 21:01:35 2021
Received: from localhost ([127.0.0.1]:35757 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1m60cB-00007B-1Q
	for submit <at> debbugs.gnu.org; Tue, 20 Jul 2021 21:01:35 -0400
Received: from mx.kolabnow.com ([95.128.36.41]:49208)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <bauermann@HIDDEN>) id 1m60c8-00006d-TO
 for 49672 <at> debbugs.gnu.org; Tue, 20 Jul 2021 21:01:33 -0400
Received: from localhost (unknown [127.0.0.1])
 by ext-mx-out001.mykolab.com (Postfix) with ESMTP id 6F504AF6
 for <49672 <at> debbugs.gnu.org>; Wed, 21 Jul 2021 03:01:27 +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=
 1626829286; x=1628643687; bh=bChMfSZ/8qlUGDxjrBTrzsOYKIbhmuWq/Sd
 hd47sUI4=; b=T7BjvtctpOZEJi/PP9GxzD8VqAwPmXCTOqKeonIuhnhsqsbtX1m
 1NlqVrMYOsY1Pfw4CICu2stLwn2+CASZLkCXbUUNFndAFZnDuCxpAKBHPSPNDEqo
 vGhguXJ4TggOJtAeF3Bw6SUQOQjZu6zpAEFpvFgFUwLpwxmb0h4o8u0HcbtCGX3A
 X7k6wYcYTe5a9QQtUcmxAOp82N1s0h82jeNKex9DtYiX08rVFm+0XX5iwK+bCDEe
 oloiNR5xHlWPijidyRarEigkaELxgmr4d3jwA3PSiJxe/OgsiLCNgaBQ228HRC/K
 zW0YpfgoVabdRKkAMD3nbzt1KeoV4tMBX8bcBip83n9Cp21w8MJxbSQWV2fcKKYH
 2KZcuENdMCBCpNlc/rtADj1FOtSPq1x6GtEqpRgHr/G7N+SCkt5/UHC4kUMdYwHQ
 hDTLjF0fqz1mUJI203wfZ/TkHL1RHRViujFFIP4Jt+sHC5JQQlyVOLwgH3Z9s4LO
 F7i5Dqyz0EVvamNtARXU2XQQ4IFxtAT6TyeWaHjFj0jWlTTeGsFvRSH2phE9JOzA
 CTYC4gNjDhvbcxzd/h8EjFs0nnWfzV+cuS3yzuwHsLhVv/1KOWsC0iGpDgZIilcI
 c4t61Y8QRz8zSS81PNeoNK3XhOKnxwdABs9/wM+Qx9zy8cjLuuZKlIRk=
X-Virus-Scanned: amavisd-new at mykolab.com
X-Spam-Flag: NO
X-Spam-Score: -1.9
X-Spam-Level: 
X-Spam-Status: No, score=-1.9 tagged_above=-10 required=5
 tests=[BAYES_00=-1.9] autolearn=ham autolearn_force=no
Received: from mx.kolabnow.com ([127.0.0.1])
 by localhost (ext-mx-out001.mykolab.com [127.0.0.1]) (amavisd-new, port 10024)
 with ESMTP id kP5IwSDsQ-d3 for <49672 <at> debbugs.gnu.org>;
 Wed, 21 Jul 2021 03:01:26 +0200 (CEST)
Received: from int-mx002.mykolab.com (unknown [10.9.13.2])
 by ext-mx-out001.mykolab.com (Postfix) with ESMTPS id 862D9AB6
 for <49672 <at> debbugs.gnu.org>; Wed, 21 Jul 2021 03:01:25 +0200 (CEST)
Received: from ext-subm003.mykolab.com (unknown [10.9.6.3])
 by int-mx002.mykolab.com (Postfix) with ESMTPS id 65AEA4337;
 Wed, 21 Jul 2021 03:01:24 +0200 (CEST)
From: Thiago Jung Bauermann <bauermann@HIDDEN>
To: 49672 <at> debbugs.gnu.org
Subject: [PATCH 4/9] =?UTF-8?q?gnu:=20Use=20=E2=80=98current-target-nix-sy?=
 =?UTF-8?q?stem=E2=80=99=20in=20pattern=20matches?=
Date: Tue, 20 Jul 2021 22:00:38 -0300
Message-Id: <20210721010043.632012-4-bauermann@HIDDEN>
In-Reply-To: <20210721010043.632012-1-bauermann@HIDDEN>
References: <20210721010043.632012-1-bauermann@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 49672
Cc: Thiago Jung Bauermann <bauermann@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

Parts of the code try to match a Nix system identifier to either
‘%current-target-system’ or ‘%current-system’, but this won’t work for
cross-compiling because the former parameter contains a GNU triplet
identifier.

Fix the problem by matching against ‘current-target-nix-system’, which
always returns a Nix system identifier.

* gnu/packages/astronomy.scm (libpasastro)[arguments]<#:make-flags>: Use
‘current-target-nix-system’.
* gnu/packages/compression.scm (zpaq)[arguments]<#:make-flags>: Likewise.
* gnu/packages/digest.scm (xxhash)[arguments]<#:make-flags>: Likewise.
* gnu/packages/java.scm (java-swt)[source]: Likewise.
* gnu/packages/julia.scm (julia)[arguments]<#:make-flags>: Likewise.
* gnu/packages/make-bootstrap.scm (%bootstrap-tarballs)[inputs]: Likewise.
* gnu/packages/pascal.scm (fpc)[native-inputs]: Likewise.
[arguments]<#:phases>: Likewise.
* gnu/packages/video.scm (mplayer)[arguments]<#:phases>: Likewise.
* gnu/packages/web.scm (nginx)[arguments]<#:phases>: Likewise.
(nginx-accept-language-module)[arguments]<#:phases>: Likewise.
---
 gnu/packages/astronomy.scm      | 4 ++--
 gnu/packages/compression.scm    | 6 ++----
 gnu/packages/digest.scm         | 3 +--
 gnu/packages/java.scm           | 2 +-
 gnu/packages/julia.scm          | 3 +--
 gnu/packages/make-bootstrap.scm | 2 +-
 gnu/packages/pascal.scm         | 6 ++----
 gnu/packages/video.scm          | 3 +--
 gnu/packages/web.scm            | 6 ++----
 9 files changed, 13 insertions(+), 22 deletions(-)

diff --git a/gnu/packages/astronomy.scm b/gnu/packages/astronomy.scm
index a3f7d5cbf456..8c4a759718e7 100644
--- a/gnu/packages/astronomy.scm
+++ b/gnu/packages/astronomy.scm
@@ -645,11 +645,11 @@ low quality ones")
        `(#:tests? #f
          #:make-flags
          (list
-          ,(match (or (%current-target-system) (%current-system))
+          ,(match (current-target-nix-system)
              ((or "aarch64-linux" "armhf-linux" "i686-linux" "x86_64-linux")
               "OS_TARGET=linux")
              (_ #f))
-          ,(match (or (%current-target-system) (%current-system))
+          ,(match (current-target-nix-system)
              ("i686-linux" "CPU_TARGET=i386")
              ("x86_64-linux" "CPU_TARGET=x86_64")
              ((or "armhf-linux" "aarch64-linux") "CPU_TARGET=armv7l")
diff --git a/gnu/packages/compression.scm b/gnu/packages/compression.scm
index cf4ec4e644a3..ac217e663f4c 100644
--- a/gnu/packages/compression.scm
+++ b/gnu/packages/compression.scm
@@ -1434,16 +1434,14 @@ functionality in a C++ iostream.")
        #:make-flags
        (list
         (string-append "CPPFLAGS=-Dunix"
-                       ,(match (or (%current-target-system)
-                                   (%current-system))
+                       ,(match (current-target-nix-system)
                                ("x86_64-linux"  "")
                                ("i686-linux"    "")
                                (_               " -DNOJIT")))
         ;; These should be safe, lowest-common-denominator instruction sets,
         ;; allowing for some optimisation while remaining reproducible.
         (string-append "CXXFLAGS=-O3 -DNDEBUG"
-                       ,(match (or (%current-target-system)
-                                   (%current-system))
+                       ,(match (current-target-nix-system)
                                ("x86_64-linux"  " -march=nocona -mtune=generic")
                                ("i686-linux"    " -march=i686 -mtune=generic")
                                ("armhf-linux"   " -mtune=generic-armv7-a")
diff --git a/gnu/packages/digest.scm b/gnu/packages/digest.scm
index 986e33586133..b1954221f261 100644
--- a/gnu/packages/digest.scm
+++ b/gnu/packages/digest.scm
@@ -77,8 +77,7 @@ Zig, V, and Nim programming language standard libraries.")
     (arguments
      `(#:make-flags
        (list ,(string-append "CC=" (cc-for-target))
-             ,(match (or (%current-target-system)
-                         (%current-system))
+             ,(match (current-target-nix-system)
                 ;; Detect vector instruction set at run time.
                 ((or "i686-linux" "x86_64-linux") "DISPATCH=1")
                 (_ "DISPATCH=0"))
diff --git a/gnu/packages/java.scm b/gnu/packages/java.scm
index e69d62be0802..1c62f5d358e2 100644
--- a/gnu/packages/java.scm
+++ b/gnu/packages/java.scm
@@ -3715,7 +3715,7 @@ specification.")
            (file32 "x86")
            (file64 "x86_64"))
        (let-values (((hash file)
-                     (match (or (%current-target-system) (%current-system))
+                     (match (current-target-nix-system)
                        ("x86_64-linux" (values hash64 file64))
                        (_              (values hash32 file32)))))
          (origin
diff --git a/gnu/packages/julia.scm b/gnu/packages/julia.scm
index abefc388bc6e..b5e29c394532 100644
--- a/gnu/packages/julia.scm
+++ b/gnu/packages/julia.scm
@@ -373,8 +373,7 @@ libraries.  It is also a bit like @code{ldd} and @code{otool -L}.")
 
          ;; Passing the MARCH flag is necessary to build binary substitutes for
          ;; the supported architectures.
-         ,(match (or (%current-target-system)
-                     (%current-system))
+         ,(match (current-target-nix-system)
                  ("x86_64-linux" "MARCH=x86-64")
                  ("i686-linux" "MARCH=pentium4")
                  ("armhf-linux" "JULIA_CPU_TARGET=armv7-a,neon")
diff --git a/gnu/packages/make-bootstrap.scm b/gnu/packages/make-bootstrap.scm
index cdcb1dcaa295..fd656f9b8bfd 100644
--- a/gnu/packages/make-bootstrap.scm
+++ b/gnu/packages/make-bootstrap.scm
@@ -902,7 +902,7 @@ for `sh' in $PATH, and without nscd, and with static NSS modules."
                    %build-inputs)
          #t)))
     (inputs `(("guile-tarball" ,%guile-bootstrap-tarball)
-              ,@(match (or (%current-target-system) (%current-system))
+              ,@(match (current-target-nix-system)
                   ((or "i686-linux" "x86_64-linux")
                    `(("bootstrap-mescc-tools" ,%mescc-tools-bootstrap-tarball)
                      ("bootstrap-mes" ,%mes-bootstrap-tarball)
diff --git a/gnu/packages/pascal.scm b/gnu/packages/pascal.scm
index 0fdbecf05c20..9169584558b0 100644
--- a/gnu/packages/pascal.scm
+++ b/gnu/packages/pascal.scm
@@ -89,8 +89,7 @@
     (native-inputs
      ;; FPC is built with FPC, so we need bootstrap binaries.
      `(("fpc-binary"
-        ,(match (or (%current-target-system)
-                    (%current-system))
+        ,(match (current-target-nix-system)
           ("i686-linux" fpc-bootstrap-i386-3.0.4)
           ;("powerpc64le-linux" fpc-bootstrap-ppc64le-3.0.4)
           ;("powerpc-linux" fpc-bootstrap-ppc-3.0.4)
@@ -101,8 +100,7 @@
        #:phases
        (let ((fpc-bootstrap-path
               (string-append (getcwd) "/" ,name "-" ,version "/fpc-bin"))
-             (arch ,(match (or (%current-target-system)
-                               (%current-system))
+             (arch ,(match (current-target-nix-system)
                      ("i686-linux" "i386")
                      ("x86_64-linux" "x86_64")
                      (_ "unknown"))))
diff --git a/gnu/packages/video.scm b/gnu/packages/video.scm
index 399327741f6b..6cf8b90ffa95 100644
--- a/gnu/packages/video.scm
+++ b/gnu/packages/video.scm
@@ -2021,8 +2021,7 @@ streaming protocols.")
                       (string-append "--prefix=" out)
                       ;; Enable runtime cpu detection where supported,
                       ;; and choose a suitable target.
-                      ,@(match (or (%current-target-system)
-                                   (%current-system))
+                      ,@(match (current-target-nix-system)
                           ("x86_64-linux"
                            '("--enable-runtime-cpudetection"
                              "--target=x86_64-linux"))
diff --git a/gnu/packages/web.scm b/gnu/packages/web.scm
index 2cc8619b19d9..b00c9aa3db5b 100644
--- a/gnu/packages/web.scm
+++ b/gnu/packages/web.scm
@@ -413,8 +413,7 @@ the same, being completely separated from the Internet.")
                                   ,(let ((system "Linux")    ; uname -s
                                          (release "3.2.0")   ; uname -r
                                          ;; uname -m
-                                         (machine (match (or (%current-target-system)
-                                                             (%current-system))
+                                         (machine (match (current-target-nix-system)
                                                     ("x86_64-linux"   "x86_64")
                                                     ("i686-linux"     "i686")
                                                     ("mips64el-linux" "mips64")
@@ -605,8 +604,7 @@ ngx_http_accept_language_module~%")
                        ,(let ((system "Linux")    ; uname -s
                               (release "3.2.0")   ; uname -r
                               ;; uname -m
-                              (machine (match (or (%current-target-system)
-                                                  (%current-system))
+                              (machine (match (current-target-nix-system)
                                          ("x86_64-linux"   "x86_64")
                                          ("i686-linux"     "i686")
                                          ("mips64el-linux" "mips64")




Information forwarded to guix-patches@HIDDEN:
bug#49672; Package guix-patches. Full text available.

Message received at 49672 <at> debbugs.gnu.org:


Received: (at 49672) by debbugs.gnu.org; 21 Jul 2021 01:01:32 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Jul 20 21:01:32 2021
Received: from localhost ([127.0.0.1]:35753 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1m60c7-00006v-PA
	for submit <at> debbugs.gnu.org; Tue, 20 Jul 2021 21:01:31 -0400
Received: from mx.kolabnow.com ([95.128.36.42]:46640)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <bauermann@HIDDEN>) id 1m60c4-00006F-JZ
 for 49672 <at> debbugs.gnu.org; Tue, 20 Jul 2021 21:01:29 -0400
Received: from localhost (unknown [127.0.0.1])
 by ext-mx-out002.mykolab.com (Postfix) with ESMTP id C565B998
 for <49672 <at> debbugs.gnu.org>; Wed, 21 Jul 2021 03:01:22 +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=
 1626829282; x=1628643683; bh=SAJtHvbCdwm8Ckgjtm0X+08E70CEVR79+6Q
 /3J1R6Pc=; b=MfnJNYk0Fy1pn6POnnE1wZ5stnWhEvZ2qtp13VTQ2h9eV5kZN0z
 EyIMks/sH5ME20pi6cB5Qw8iG21LpaqTKUAkMJQd7La3OZpk4pMksl+/QYcCmq3h
 3O7DNXuLxqmFI/1q3vLkFdOxsU8/UdRQqlKMFwUsTP4untkr2XaiYysFqGC92Ud5
 KNZxH1jH7bSyFTGatiMXosI9qNR+d5OrMysFltBwlZuBfj/uxEbf/PzggYi8dCRg
 VhCAxrNyf4PRuDofn+das2S4u77NryQyOR/dl4RVstOnWzz7DrWdkDUDUOSARCn4
 XwegdQLgvgQOL98scdGDAJ+iUvUVh+sYV7SJNWF0Idyls5KZlrsk+4Ysxef6FCsJ
 dnVKhY0QVOsGzu3sLuMiS8FacaTJVdhc1D2YNLncy/xG/xJz3AuXwg/U5WdWhOsx
 p+HaAydgc/TZQr7YKD9WayaAdeqartwI1cKq5ONyx2QJFgOiFhvVYStbrp1uJZpv
 1CwUuNmtTbV0hXFwCGQag8e2BQbM5HoP08WqT1H8a+zd+QG4bW4pbMCBFXgbr3ir
 BgitvTGrVhqa67jOyCnq0kUnONJbDJubvRcZk0d7pe0YuDvbNsTS4D3Bzsi3Nxw6
 znrLPr22Zg4RAd/gIoGfIfC97TnjpN/Oet05AzlfTlwhvXZKRHFLncNc=
X-Virus-Scanned: amavisd-new at mykolab.com
X-Spam-Flag: NO
X-Spam-Score: -1.9
X-Spam-Level: 
X-Spam-Status: No, score=-1.9 tagged_above=-10 required=5
 tests=[BAYES_00=-1.9] autolearn=ham autolearn_force=no
Received: from mx.kolabnow.com ([127.0.0.1])
 by localhost (ext-mx-out002.mykolab.com [127.0.0.1]) (amavisd-new, port 10024)
 with ESMTP id chUqjvn8JpyW for <49672 <at> debbugs.gnu.org>;
 Wed, 21 Jul 2021 03:01:22 +0200 (CEST)
Received: from int-mx001.mykolab.com (unknown [10.9.13.1])
 by ext-mx-out002.mykolab.com (Postfix) with ESMTPS id 35BD5D3
 for <49672 <at> debbugs.gnu.org>; Wed, 21 Jul 2021 03:01:20 +0200 (CEST)
Received: from ext-subm003.mykolab.com (unknown [10.9.6.3])
 by int-mx001.mykolab.com (Postfix) with ESMTPS id 5E3CD323;
 Wed, 21 Jul 2021 03:01:20 +0200 (CEST)
From: Thiago Jung Bauermann <bauermann@HIDDEN>
To: 49672 <at> debbugs.gnu.org
Subject: [PATCH 3/9] =?UTF-8?q?gnu:=20Query=20membership=20in=20=E2=80=98s?=
 =?UTF-8?q?upported-systems=E2=80=99=20list=20with=20Nix=20identifier?=
Date: Tue, 20 Jul 2021 22:00:37 -0300
Message-Id: <20210721010043.632012-3-bauermann@HIDDEN>
In-Reply-To: <20210721010043.632012-1-bauermann@HIDDEN>
References: <20210721010043.632012-1-bauermann@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 49672
Cc: Thiago Jung Bauermann <bauermann@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

Packages’ ‘supported-systems’ list contains Nix system identifiers, while
‘%current-target-system’ contains a GNU triplet. We need to use
‘current-target-nix-system’ to query the list, which always returns a Nix
system identifier.

* gnu/packages/bootloaders.scm (grub)[inputs]: Use ‘current-target-nix-system’
to query membership in (package-supported-systems).
* gnu/packages/pciutils.scm (pciutils): Likewise.
---
 gnu/packages/bootloaders.scm | 9 +++------
 gnu/packages/pciutils.scm    | 3 +--
 2 files changed, 4 insertions(+), 8 deletions(-)

diff --git a/gnu/packages/bootloaders.scm b/gnu/packages/bootloaders.scm
index 742992a119b2..be51fb0c3de4 100644
--- a/gnu/packages/bootloaders.scm
+++ b/gnu/packages/bootloaders.scm
@@ -182,16 +182,14 @@
 
        ;; Depend on LVM2 for libdevmapper, used by 'grub-probe' and
        ;; 'grub-install' to recognize mapped devices (LUKS, etc.)
-       ,@(if (member (or (%current-target-system)
-                         (%current-system))
+       ,@(if (member (current-target-nix-system)
                      (package-supported-systems lvm2))
              `(("lvm2" ,lvm2))
              '())
 
        ;; Depend on mdadm, which is invoked by 'grub-probe' and 'grub-install'
        ;; to determine whether the root file system is RAID.
-       ,@(if (member (or (%current-target-system)
-                         (%current-system))
+       ,@(if (member (current-target-nix-system)
                      (package-supported-systems mdadm))
              `(("mdadm" ,mdadm))
              '())
@@ -202,8 +200,7 @@
 
        ;; Needed for ‘grub-mount’, the only reliable way to tell whether a given
        ;; file system will be readable by GRUB without rebooting.
-       ,@(if (member (or (%current-target-system)
-                         (%current-system))
+       ,@(if (member (current-target-nix-system)
                      (package-supported-systems fuse))
              `(("fuse" ,fuse))
              '())
diff --git a/gnu/packages/pciutils.scm b/gnu/packages/pciutils.scm
index d7d224b292f2..f2196c4e53ae 100644
--- a/gnu/packages/pciutils.scm
+++ b/gnu/packages/pciutils.scm
@@ -112,8 +112,7 @@
      `(("which" ,which)
        ("pkg-config" ,pkg-config)))
     (inputs
-     `(,@(if (member (or (%current-target-system)
-                         (%current-system))
+     `(,@(if (member (current-target-nix-system)
                      (package-supported-systems kmod))
              `(("kmod" ,kmod))
              '())




Information forwarded to guix-patches@HIDDEN:
bug#49672; Package guix-patches. Full text available.

Message received at 49672 <at> debbugs.gnu.org:


Received: (at 49672) by debbugs.gnu.org; 21 Jul 2021 01:01:29 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Jul 20 21:01:29 2021
Received: from localhost ([127.0.0.1]:35751 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1m60c5-00006l-DX
	for submit <at> debbugs.gnu.org; Tue, 20 Jul 2021 21:01:29 -0400
Received: from mx.kolabnow.com ([95.128.36.40]:59496)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <bauermann@HIDDEN>) id 1m60c1-00006B-B4
 for 49672 <at> debbugs.gnu.org; Tue, 20 Jul 2021 21:01:25 -0400
Received: from localhost (unknown [127.0.0.1])
 by ext-mx-out003.mykolab.com (Postfix) with ESMTP id A2FD0405B8
 for <49672 <at> debbugs.gnu.org>; Wed, 21 Jul 2021 03:01:19 +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=
 1626829279; x=1628643680; bh=GFRSO9hwK9Ix1U2vSpPPEERhAc0ECXwS5jo
 cGimT+Cw=; b=ohrHIfcTTh8PR6D4QkR/uSL0vv1SHBXl0DM0uWrQlirdSS5oqNr
 4Jp2ACvLqfujSuifP5mOrH7k/02T4UcxRRPF/7gfyBv+lAxAk2WsJPNd0VkeenEY
 eN4OhkbTocXFhjNZ+Hg2pzQzHjAQCBEPttrF6h56kMGAEtP+D6IOMyXEcaSq9ihf
 wSienpbBxnUQpXJjYmAg0AwkqlCm1I3pEUgpa7g5AjVdCuKCA2/0cMDBaE6BOtEG
 HIpdbd0Yamx4zROa+W/Y5SIEqq2aCdiQ+IhNnVxeBgdfSOs9hb1Y3VBxyqdPJ3PO
 mMQVedduyGWb1g6P4+hDMuASWyDPST2SAf6gVRhCEukpUGhSYcNW5nrJn4J7OsOP
 p1hFV6LamlQv7PzVc8OziATGcIEhIPXYOvdBa+yiD4aiTS8EDBMT3UO+jzDSYxaX
 GGKpZjA1dIsMhfoALFn3/08jY0vrtmvuFskcckgHe9VkjRYEpVXdtvYcEyQq4Uke
 YqWN1+PWHIRHf1WXfsLF6BQJAeAO9BhiKuLKandnHK27rvVfLV+R35a68O+vilVp
 uxhHOKujOC6Aci8yivDQS2U+gDqaqSfhlWpgRQLYIXlKtlDGtGpkfcVwmqFGxPB0
 ifEcSNIZa0r+VN8cXqmxKoDyV+aowxnlS9gserZb6uow5Ny+6ig8+95w=
X-Virus-Scanned: amavisd-new at mykolab.com
X-Spam-Flag: NO
X-Spam-Score: -1.9
X-Spam-Level: 
X-Spam-Status: No, score=-1.9 tagged_above=-10 required=5
 tests=[BAYES_00=-1.9] autolearn=ham autolearn_force=no
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 st6Qh1x9Aou1 for <49672 <at> debbugs.gnu.org>;
 Wed, 21 Jul 2021 03:01:19 +0200 (CEST)
Received: from int-mx001.mykolab.com (unknown [10.9.13.1])
 by ext-mx-out003.mykolab.com (Postfix) with ESMTPS id 06063403CB
 for <49672 <at> debbugs.gnu.org>; Wed, 21 Jul 2021 03:01:17 +0200 (CEST)
Received: from ext-subm003.mykolab.com (unknown [10.9.6.3])
 by int-mx001.mykolab.com (Postfix) with ESMTPS id 12B0F323;
 Wed, 21 Jul 2021 03:01:16 +0200 (CEST)
From: Thiago Jung Bauermann <bauermann@HIDDEN>
To: 49672 <at> debbugs.gnu.org
Subject: [PATCH 2/9] =?UTF-8?q?utils:=20Add=20=E2=80=98current-target-nix-?=
 =?UTF-8?q?system=E2=80=99=20helper?=
Date: Tue, 20 Jul 2021 22:00:36 -0300
Message-Id: <20210721010043.632012-2-bauermann@HIDDEN>
In-Reply-To: <20210721010043.632012-1-bauermann@HIDDEN>
References: <20210721010043.632012-1-bauermann@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 49672
Cc: Thiago Jung Bauermann <bauermann@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

Many places check a Nix system identifier string against
‘%current-target-system’ and ‘%current-target’. This is problematic because
these parameters hold different kinds of identifiers. The former holds a
GNU triplet (or #f if not cross-compiling), while the latter holds a Nix
system identifier.

As a first step to solve the confusion, introduce the
‘current-target-nix-system’ procedure which looks at both parameters and
always returns a Nix system identifier. The code is factored out from
‘glibc-dynamic-linker’ and ‘system->llvm-target’.

* gnu/packages/bootstrap.scm (glibc-dynamic-linker): Use result of
‘current-target-nix-system’ as default value for ‘system’ argument.
* gnu/packages/llvm.scm (system->llvm-target): Likewise.
* guix/utils.scm (current-target-nix-system): Define new procedure.
---
 gnu/packages/bootstrap.scm | 6 ++----
 gnu/packages/llvm.scm      | 4 +---
 guix/utils.scm             | 7 +++++++
 3 files changed, 10 insertions(+), 7 deletions(-)

diff --git a/gnu/packages/bootstrap.scm b/gnu/packages/bootstrap.scm
index c598cedc0ae2..b7134653cfc4 100644
--- a/gnu/packages/bootstrap.scm
+++ b/gnu/packages/bootstrap.scm
@@ -35,7 +35,7 @@
                 #:select (run-with-store add-to-store add-text-to-store))
   #:use-module ((guix derivations)
                 #:select (derivation derivation-input derivation->output-path))
-  #:use-module ((guix utils) #:select (gnu-triplet->nix-system))
+  #:use-module (guix utils)
   #:use-module ((guix gexp) #:select (lower-object))
   #:use-module (guix memoization)
   #:use-module (guix i18n)
@@ -286,9 +286,7 @@ or false to signal an error."
                                  package-with-bootstrap-guile)))))
 
 (define* (glibc-dynamic-linker
-          #:optional (system (or (and=> (%current-target-system)
-                                        gnu-triplet->nix-system)
-                                 (%current-system))))
+          #:optional (system (current-target-nix-system)))
   "Return the name of Glibc's dynamic linker for SYSTEM."
   ;; See the 'SYSDEP_KNOWN_INTERPRETER_NAMES' cpp macro in libc.
   (cond ((string=? system "x86_64-linux") "/lib/ld-linux-x86-64.so.2")
diff --git a/gnu/packages/llvm.scm b/gnu/packages/llvm.scm
index 575c63c713e9..3c4e5930d044 100644
--- a/gnu/packages/llvm.scm
+++ b/gnu/packages/llvm.scm
@@ -66,9 +66,7 @@
   #:export (system->llvm-target))
 
 (define* (system->llvm-target #:optional
-                              (system (or (and=> (%current-target-system)
-                                                 gnu-triplet->nix-system)
-                                          (%current-system))))
+                              (system (current-target-nix-system)))
   "Return the LLVM target name that corresponds to SYSTEM, a system type such
 as \"x86_64-linux\"."
   ;; See the 'lib/Target' directory of LLVM for a list of supported targets.
diff --git a/guix/utils.scm b/guix/utils.scm
index 2c56c8b2e08b..4072dea89051 100644
--- a/guix/utils.scm
+++ b/guix/utils.scm
@@ -77,6 +77,7 @@
             gnu-triplet->nix-system
             %current-system
             %current-target-system
+            current-target-nix-system
             package-name->name+version
             target-mingw?
             target-arm32?
@@ -520,6 +521,12 @@ returned by `config.guess'."
   ;; cross-building to.
   (make-parameter #f))
 
+(define (current-target-nix-system)
+  "Return the Nix system identifier for the current target, whether we are
+cross-building or not."
+  (or (and=> (%current-target-system) gnu-triplet->nix-system)
+      (%current-system)))
+
 (define* (package-name->name+version spec
                                      #:optional (delimiter #\@))
   "Given SPEC, a package name like \"foo@HIDDEN\", return two values: \"foo\"




Information forwarded to guix-patches@HIDDEN:
bug#49672; Package guix-patches. Full text available.

Message received at 49672 <at> debbugs.gnu.org:


Received: (at 49672) by debbugs.gnu.org; 21 Jul 2021 01:01:26 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Jul 20 21:01:26 2021
Received: from localhost ([127.0.0.1]:35745 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1m60c1-00006N-GY
	for submit <at> debbugs.gnu.org; Tue, 20 Jul 2021 21:01:26 -0400
Received: from mx.kolabnow.com ([95.128.36.41]:49194)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <bauermann@HIDDEN>) id 1m60bz-000067-1g
 for 49672 <at> debbugs.gnu.org; Tue, 20 Jul 2021 21:01:24 -0400
Received: from localhost (unknown [127.0.0.1])
 by ext-mx-out001.mykolab.com (Postfix) with ESMTP id 8D3A4AF6
 for <49672 <at> debbugs.gnu.org>; Wed, 21 Jul 2021 03:01:16 +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
 :message-id:date:date:subject:subject:from:from:received
 :received:received; s=dkim20160331; t=1626829275; x=1628643676;
 bh=HGmAUd3j4pQ5uuAEtM2fr+XRrUB4L71iWQgWk7qUi2Q=; b=Yhba2MpXWMDc
 8AIBVWUmf5vtO2vHvv2xykyXhnB1Gss+3kLq6tRr0EaHwxb3s0+cFYX1D1Ec0/i8
 RXet6o/+h9dNMvyfq9I1ce1LXCtsPbFGqtgmXcRJsXxssTVEeAy1oaW0pBCU0qvx
 XQvKnDhDahDO2TV7Ogc+luhk4yqYhZIgBjquUx9XZZfPf0xhAgrTP8x46O1PVssy
 TKkJnvz+wDQUnlukXzl65HjUZ8j5U6THEYd07bZxki7uvHfVKzJIvbowWRIuGjym
 rfa56zLaAVjXb/2eHNeSiF30VYY/RNLBFmCDJXte0H3VisK2xpd2eE1yYGDMWIBH
 oCct1nAkekp15rBbjNY+HWf0PpWXJ4Ux3sPulIth6Xmwwj+4IZrlsDgHretmHsDH
 /cCN8sb17Lk9jL7EUEPV02JbIf8d1c05AmrYCsBEYbroVHq+5qs6VT2m1aEsVK9U
 l4AtZVOlVRZjW4RAQbo/cWlK6odNGZ+7cXSCW2tGZZoOlVMO6rhFLpKZ9Tvgsta6
 UsT7a1isDb1Jxeov3T8uqOnR1NmbfkHEYTXhC1PHhTSGXuzc5ufh9+mg1TLPFVWQ
 eDUA6TUkYJEtFgaUFvgDQ4NfcCRrBPgkWfiicxbOxDi7aR+hBlrdhaRCSC7uTH8P
 pf3THZX25Is8wOynbAlCJKcM6HBVH3E=
X-Virus-Scanned: amavisd-new at mykolab.com
X-Spam-Flag: NO
X-Spam-Score: -1.899
X-Spam-Level: 
X-Spam-Status: No, score=-1.899 tagged_above=-10 required=5
 tests=[BAYES_00=-1.9, URIBL_BLOCKED=0.001]
 autolearn=ham autolearn_force=no
Received: from mx.kolabnow.com ([127.0.0.1])
 by localhost (ext-mx-out001.mykolab.com [127.0.0.1]) (amavisd-new, port 10024)
 with ESMTP id u09TimJDBscP for <49672 <at> debbugs.gnu.org>;
 Wed, 21 Jul 2021 03:01:15 +0200 (CEST)
Received: from int-mx002.mykolab.com (unknown [10.9.13.2])
 by ext-mx-out001.mykolab.com (Postfix) with ESMTPS id 23F75AB6
 for <49672 <at> debbugs.gnu.org>; Wed, 21 Jul 2021 03:01:13 +0200 (CEST)
Received: from ext-subm003.mykolab.com (unknown [10.9.6.3])
 by int-mx002.mykolab.com (Postfix) with ESMTPS id DA9AB4337;
 Wed, 21 Jul 2021 03:01:12 +0200 (CEST)
From: Thiago Jung Bauermann <bauermann@HIDDEN>
To: 49672 <at> debbugs.gnu.org
Subject: [PATCH 1/9] =?UTF-8?q?gnu:=20Fix=20check=20of=20=E2=80=98%current?=
 =?UTF-8?q?-system=E2=80=99=20and=20=E2=80=98%current-target-system?=
 =?UTF-8?q?=E2=80=99?=
Date: Tue, 20 Jul 2021 22:00:35 -0300
Message-Id: <20210721010043.632012-1-bauermann@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 49672
Cc: Thiago Jung Bauermann <bauermann@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

The order of the check is important because ‘%current-system’ is always
defined, while ‘%current-target-system’ is only defined when
cross-building.

Therefore, it’s important to check ‘%current-target-system’ first,
otherwise the cross-build target is never considered.

* gnu/packages/bdw-gc.scm (libgc)[arguments]<#:configure-flags>: Check
‘%current-target-system’ first.
* gnu/packages/crypto.scm (libb2)[arguments]<#:configure-flags>: Likewise.
* gnu/packages/golang.scm (go-1.4)[arguments]<#:system>: Likewise.
(go-1.14)[arguments]<#:system>: Likewise.
* gnu/packages/java.scm (jamvm-1-bootstrap)[arguments]<#:phases>: Likewise.
[native-inputs]: Likewise.
(ant-bootstrap)[arguments]<#:phases>: Likewise.
(classpath-jamvm-wrappers)[arguments]<#:builder>: Likewise.
* gnu/packages/lisp.scm (clisp)[arguments]<#:configure-flags>: Likewise.
* gnu/packages/photo.scm (lensfun)[arguments]<#:configure-flags>: Likewise.
* gnu/packages/php.scm (php)[arguments]<#:phases>: Likewise.
* gnu/packages/sdl.scm (sdl-gfx)[arguments]<#:configure-flags>: Likewise.
* gnu/packages/telephony.scm (pjproject)[arguments]<#:configure-flags>: Likewise.
---
 gnu/packages/bdw-gc.scm    |  4 ++--
 gnu/packages/crypto.scm    |  4 ++--
 gnu/packages/golang.scm    |  8 ++++----
 gnu/packages/java.scm      | 16 ++++++++--------
 gnu/packages/lisp.scm      |  4 ++--
 gnu/packages/photo.scm     |  4 ++--
 gnu/packages/php.scm       |  4 ++--
 gnu/packages/sdl.scm       |  4 ++--
 gnu/packages/telephony.scm |  4 ++--
 9 files changed, 26 insertions(+), 26 deletions(-)

diff --git a/gnu/packages/bdw-gc.scm b/gnu/packages/bdw-gc.scm
index ecac5b93687e..cd834ff11031 100644
--- a/gnu/packages/bdw-gc.scm
+++ b/gnu/packages/bdw-gc.scm
@@ -52,8 +52,8 @@
        ;; to configure script. See bug report and discussion:
        ;; <https://lists.opendylan.org/pipermail/bdwgc/2017-April/006275.html>
        ;; <https://lists.gnu.org/archive/html/bug-hurd/2017-01/msg00008.html>
-       ,@(if (hurd-triplet? (or (%current-system)
-                                (%current-target-system)))
+       ,@(if (hurd-triplet? (or (%current-target-system)
+                                (%current-system)))
              '("--disable-gcj-support")
              '()))))
    (native-inputs `(("pkg-config" ,pkg-config)))
diff --git a/gnu/packages/crypto.scm b/gnu/packages/crypto.scm
index fe2cec045d6c..dff9584e07b3 100644
--- a/gnu/packages/crypto.scm
+++ b/gnu/packages/crypto.scm
@@ -867,8 +867,8 @@ data on your platform, so the seed itself will be as random as possible.
     (arguments
      `(#:configure-flags
        (list
-        ,@(if (any (cute string-prefix? <> (or (%current-system)
-                                               (%current-target-system)))
+        ,@(if (any (cute string-prefix? <> (or (%current-target-system)
+                                               (%current-system)))
                    '("x86_64" "i686"))
               ;; fat only checks for Intel optimisations
               '("--enable-fat")
diff --git a/gnu/packages/golang.scm b/gnu/packages/golang.scm
index a830afa022a6..58688687bba3 100644
--- a/gnu/packages/golang.scm
+++ b/gnu/packages/golang.scm
@@ -1046,8 +1046,8 @@ 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-system)
-                                                 (%current-target-system)))
+       ,@(if (string-prefix? "aarch64-linux" (or (%current-target-system)
+                                                 (%current-system)))
              '(#:system "armhf-linux")
              '())
        #:phases
@@ -1199,8 +1199,8 @@ 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-system)
-                                                (%current-target-system)))
+        (if (string-prefix? "aarch64-linux" (or (%current-target-system)
+                                                (%current-system)))
           "aarch64-linux"
           system))
        ((#:phases phases)
diff --git a/gnu/packages/java.scm b/gnu/packages/java.scm
index 64df5a2e24a2..e69d62be0802 100644
--- a/gnu/packages/java.scm
+++ b/gnu/packages/java.scm
@@ -315,8 +315,8 @@ language.")
              "--enable-runtime-reloc-checks"
              "--enable-ffi")
        #:phases
-       ,(if (string-prefix? "aarch64" (or (%current-system)
-                                          (%current-target-system)))
+       ,(if (string-prefix? "aarch64" (or (%current-target-system)
+                                          (%current-system)))
             ;; Makefiles and the configure script need to be regenerated to
             ;; incorporate support for AArch64.
             '(modify-phases %standard-phases
@@ -330,8 +330,8 @@ language.")
        ("zip" ,zip)
        ("zlib" ,zlib)))
     (native-inputs
-     (if (string-prefix? "aarch64" (or (%current-system)
-                                       (%current-target-system)))
+     (if (string-prefix? "aarch64" (or (%current-target-system)
+                                       (%current-system)))
          ;; Additional packages needed for autoreconf.
          `(("autoconf" ,autoconf)
            ("automake" ,automake)
@@ -401,8 +401,8 @@ JNI.")
              ;; Without these JamVM options the build may freeze.
              (substitute* "bootstrap.sh"
                (("^\"\\$\\{JAVACMD\\}\" " m)
-                ,@(if (string-prefix? "armhf" (or (%current-system)
-                                                  (%current-target-system)))
+                ,@(if (string-prefix? "armhf" (or (%current-target-system)
+                                                  (%current-system)))
                       `((string-append m "-Xnocompact "))
                       `((string-append m "-Xnocompact -Xnoinlining ")))))
 
@@ -674,8 +674,8 @@ the standard javac executable.")))
            (for-each (lambda (tool)
                        (with-output-to-file (string-append bin tool)
                          (lambda _
-                           ,@(if (string-prefix? "armhf" (or (%current-system)
-                                                             (%current-target-system)))
+                           ,@(if (string-prefix? "armhf" (or (%current-target-system)
+                                                             (%current-system)))
                                  `((format #t "#!~a/bin/sh
 ~a/bin/jamvm -Xnocompact -classpath ~a/share/classpath/tools.zip \
 gnu.classpath.tools.~a.~a $@"
diff --git a/gnu/packages/lisp.scm b/gnu/packages/lisp.scm
index d8d7a7394c44..ee43226ff091 100644
--- a/gnu/packages/lisp.scm
+++ b/gnu/packages/lisp.scm
@@ -347,8 +347,8 @@ supporting ASDF, Sockets, Gray streams, MOP, and other useful components.")
               ("libsigsegv" ,libsigsegv)))
     (arguments
      `(#:configure-flags '(,@(if (string-prefix? "armhf-linux"
-                                                 (or (%current-system)
-                                                     (%current-target-system)))
+                                                 (or (%current-target-system)
+                                                     (%current-system)))
                                  '("CFLAGS=-falign-functions=4")
                                  '())
                             "--with-dynamic-ffi"
diff --git a/gnu/packages/photo.scm b/gnu/packages/photo.scm
index 673989e06b09..1b646497c91e 100644
--- a/gnu/packages/photo.scm
+++ b/gnu/packages/photo.scm
@@ -440,8 +440,8 @@ scene to produce an image that looks much like a tone-mapped image.")
                 "0cfk8jjhs9nbfjfdy98plrj9ayi59aph0nx6ppslgjhlcvacm2xf"))))
     (build-system cmake-build-system)
     (arguments
-     `(,@(if (any (cute string-prefix? <> (or (%current-system)
-                                              (%current-target-system)))
+     `(,@(if (any (cute string-prefix? <> (or (%current-target-system)
+                                              (%current-system)))
                   '("x86_64" "i686"))
         ;; SSE and SSE2 are supported only on Intel processors.
         '()
diff --git a/gnu/packages/php.scm b/gnu/packages/php.scm
index 4edff2cfd886..597494e8a94f 100644
--- a/gnu/packages/php.scm
+++ b/gnu/packages/php.scm
@@ -177,8 +177,8 @@
              (substitute* "ext/standard/tests/streams/bug60602.phpt"
                (("'ls'") (string-append "'" (which "ls") "'")))
 
-             ,@(if (string-prefix? "arm" (or (%current-system)
-                                             (%current-target-system)))
+             ,@(if (string-prefix? "arm" (or (%current-target-system)
+                                             (%current-system)))
                    ;; Drop tests known to fail on armhf.
                    '((for-each delete-file
                               (list
diff --git a/gnu/packages/sdl.scm b/gnu/packages/sdl.scm
index 128bd95af881..bddc0bdbe990 100644
--- a/gnu/packages/sdl.scm
+++ b/gnu/packages/sdl.scm
@@ -200,8 +200,8 @@ system, such as sound redirection over the network.")
     (build-system gnu-build-system)
     (outputs '("out" "debug"))
     (arguments
-     `(,@(if (any (cute string-prefix? <> (or (%current-system)
-                                              (%current-target-system)))
+     `(,@(if (any (cute string-prefix? <> (or (%current-target-system)
+                                              (%current-system)))
                   '("x86_64" "i686"))
         ;; mmx is supported only on Intel processors.
         '()
diff --git a/gnu/packages/telephony.scm b/gnu/packages/telephony.scm
index f75a168948bb..4957ecca13a0 100644
--- a/gnu/packages/telephony.scm
+++ b/gnu/packages/telephony.scm
@@ -755,8 +755,8 @@ your calls and messages.")
              "--with-external-srtp"
              "--with-external-pa"
              ;; The following flag is Linux specific.
-             ,@(if (string-contains (or (%current-system)
-                                        (%current-target-system)) "linux")
+             ,@(if (string-contains (or (%current-target-system)
+                                        (%current-system)) "linux")
                    '("--enable-epoll")
                    '())
              "--with-gnutls"            ;disable OpenSSL checks




Information forwarded to guix-patches@HIDDEN:
bug#49672; Package guix-patches. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 21 Jul 2021 00:46:55 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Jul 20 20:46:55 2021
Received: from localhost ([127.0.0.1]:35721 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1m60Nz-00088z-EN
	for submit <at> debbugs.gnu.org; Tue, 20 Jul 2021 20:46:55 -0400
Received: from lists.gnu.org ([209.51.188.17]:52750)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <bauermann@HIDDEN>) id 1m60Nx-00088r-CF
 for submit <at> debbugs.gnu.org; Tue, 20 Jul 2021 20:46:54 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10]:50720)
 by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <bauermann@HIDDEN>)
 id 1m60Nx-0005Lz-1d
 for guix-patches@HIDDEN; Tue, 20 Jul 2021 20:46:53 -0400
Received: from mx.kolabnow.com ([95.128.36.41]:13236)
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <bauermann@HIDDEN>)
 id 1m60Nt-0006cB-A9
 for guix-patches@HIDDEN; Tue, 20 Jul 2021 20:46:51 -0400
Received: from localhost (unknown [127.0.0.1])
 by ext-mx-out002.mykolab.com (Postfix) with ESMTP id 79334998
 for <guix-patches@HIDDEN>; Wed, 21 Jul 2021 02:46:44 +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
 :message-id:date:date:subject:subject:from:from:received
 :received:received; s=dkim20160331; t=1626828403; x=1628642804;
 bh=/oPGhUio9jwoiBRjloTxjhLcHnERMaMT/3nI+LPaZWM=; b=i2doz/Mkbh7Y
 4ex0/L46GYtcSlPMA/vIxdRoucuF4Zg4YAbIlw0KM6BSu+Zq9pffU8Kpt3CL5hKt
 pgnwpVpmVcj3blw4uD98QoRvhgtxjBW8/ju7ZQ5n1Y4eyZLNrfhhvaGYYzYW4H1V
 1w3ISDvu+RawTDPZBXCFcdk16faANI0XnZ5YctT8uVjAsNZByOSXumFEe6PVO9HB
 0L+dnSo3jmAm3nUKVz2xDAcQFaA6wZwFoIV0r08QPXz+VUsNxJrAG0NGm5r16/Du
 bvH8EnrFQ5IAwRKg1ubC7nyg8tPlFKmYiR+G0Krtzt/EbjmVRBUV/ZBBBYUQN3kY
 I0ezE777/9LrfLMfmGuXltsIR41kvIbq7tD2Yt/0JpGhxA7SaV+Jd1ENrWX6brBp
 pHk8SO6ucxHBqC2gSAXfb9aR+sIgkw/JVcYooSJFM2IaZddk+Rm61pj2OvE3Re9O
 CbV/hj6fLjeZ2ubsg6dWZT0eCfLUcAhL/ImI9cUxkFeCB2jGPlmaiBsA+g1ctoeb
 CPULnVf0YYNhEEFkF6gVJ/7y1pbE1eeaGsZYt8xUi8FMtUocYE+TDp3u7EJRVaPm
 L/XjtfSV5ktTItU/zbNWcVZXGeazLp7OrHZe40VD8escZSVtd3pTEr8kmXb1ISHo
 oY0v/vrKHWlG3h2QAfBa4CbkEIWYu4U=
X-Virus-Scanned: amavisd-new at mykolab.com
X-Spam-Flag: NO
X-Spam-Score: -1.9
X-Spam-Level: 
X-Spam-Status: No, score=-1.9 tagged_above=-10 required=5
 tests=[BAYES_00=-1.9] autolearn=ham autolearn_force=no
Received: from mx.kolabnow.com ([127.0.0.1])
 by localhost (ext-mx-out002.mykolab.com [127.0.0.1]) (amavisd-new, port 10024)
 with ESMTP id EyXnqPfb4CoL for <guix-patches@HIDDEN>;
 Wed, 21 Jul 2021 02:46:43 +0200 (CEST)
Received: from int-mx001.mykolab.com (unknown [10.9.13.1])
 by ext-mx-out002.mykolab.com (Postfix) with ESMTPS id AEBD7841
 for <guix-patches@HIDDEN>; Wed, 21 Jul 2021 02:46:42 +0200 (CEST)
Received: from ext-subm002.mykolab.com (unknown [10.9.6.2])
 by int-mx001.mykolab.com (Postfix) with ESMTPS id 78DF243C;
 Wed, 21 Jul 2021 02:46:41 +0200 (CEST)
From: Thiago Jung Bauermann <bauermann@HIDDEN>
To: guix-patches@HIDDEN
Subject: [PATCH 0/9] Target check fixes and cleanups
Date: Tue, 20 Jul 2021 21:46:15 -0300
Message-Id: <20210721004615.631777-1-bauermann@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Received-SPF: pass client-ip=95.128.36.41; envelope-from=bauermann@HIDDEN;
 helo=mx.kolabnow.com
X-Spam_score_int: -20
X-Spam_score: -2.1
X-Spam_bar: --
X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1,
 DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, SPF_HELO_NONE=0.001,
 SPF_PASS=-0.001 autolearn=ham autolearn_force=no
X-Spam_action: no action
X-Spam-Score: -1.4 (-)
X-Debbugs-Envelope-To: submit
Cc: Thiago Jung Bauermann <bauermann@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -2.4 (--)

Hello,

I recently had a closer look at uses of ‘%current-target-system’ and
‘%current-system’ and noticed a few bugs to fix and also cleanups that can
be done.

They mostly stem from the fact that ‘%current-system’ holds a Nix system
identifier, while ‘%current-target-system’ holds a GNU triplet identifier.
A few parts of the code are confused about that and make the wrong check.
The individual patch descriptions have the details.

The last two patches are just cleanups and not bug fixes. I’m on the fence
about the merits of the last patch. It can reasonably be seen as either a
worthwhile cleanup or needless code churn. I’m sending it anyway, and I’m
fine with either dropping or applying it.

The series applies on today’s master branch, as of commit:

e644e45aec26 gnu: pipe-viewer: Correct references to youtube-dl program.

The only testing I did was running `make` on each patch in the series and
checking if there’s  any new Guile warnings or errors (there isn’t), and
running `make check`. The testsuite results are:

============================================================================
Testsuite summary for GNU Guix UNKNOWN
============================================================================
# TOTAL: 1935
# PASS:  1903
# SKIP:  27
# XFAIL: 2
# FAIL:  3
# XPASS: 0
# ERROR: 0
============================================================================
See ./test-suite.log
Please report to bug-guix@HIDDEN
============================================================================

The failures are in tests/publish.scm, tests/guix-describe.sh and
tests/guix-package.sh. Compared to the master branch,
tests/guix-describe.sh is the only new failure. The test is skipped in the
master branch. This is because I ran the master branch tests on a git
worktree, where ‘.git’ is a file rather than a directory, causing the test
to be skipped. If I change the `if [ -d "…/.git" ]` line to
`if [ -e "…/.git" ]`, then the test also fails on master and I have the same
testsuite results with and without the patches.

Thiago Jung Bauermann (9):
  gnu: Fix check of ‘%current-system’ and ‘%current-target-system’
  utils: Add ‘current-target-nix-system’ helper
  gnu: Query membership in ‘supported-systems’ list with Nix identifier
  gnu: Use ‘current-target-nix-system’ in pattern matches
  gnu: Use ‘current-target-nix-system’ in prefix checks
  gnu: Fix GNU/Linux system detection
  bootloader: grub: Fix mix of GNU triplet and Nix system identifier
  gnu: ustr: Don’t pass default argument
  gnu: Use existing target helpers from ‘(guix utils)’

 gnu/bootloader/grub.scm         |  5 +----
 gnu/packages/algebra.scm        |  3 +--
 gnu/packages/astronomy.scm      |  4 ++--
 gnu/packages/bdw-gc.scm         |  4 ++--
 gnu/packages/boost.scm          |  4 ++--
 gnu/packages/bootloaders.scm    | 22 ++++++----------------
 gnu/packages/bootstrap.scm      |  6 ++----
 gnu/packages/c.scm              |  3 +--
 gnu/packages/ci.scm             |  6 ++----
 gnu/packages/compression.scm    |  6 ++----
 gnu/packages/crypto.scm         |  4 ++--
 gnu/packages/databases.scm      |  3 +--
 gnu/packages/debug.scm          |  6 ++----
 gnu/packages/digest.scm         |  3 +--
 gnu/packages/firmware.scm       |  4 ++--
 gnu/packages/gcc.scm            |  5 +----
 gnu/packages/golang.scm         |  6 ++----
 gnu/packages/gstreamer.scm      |  6 ++----
 gnu/packages/java.scm           | 16 +++++++---------
 gnu/packages/julia.scm          |  3 +--
 gnu/packages/linux.scm          |  4 +---
 gnu/packages/lisp.scm           |  3 +--
 gnu/packages/llvm.scm           |  4 +---
 gnu/packages/make-bootstrap.scm |  2 +-
 gnu/packages/mes.scm            |  3 +--
 gnu/packages/messaging.scm      | 12 ++++++------
 gnu/packages/multiprecision.scm |  4 +---
 gnu/packages/ntp.scm            |  4 ++--
 gnu/packages/pascal.scm         |  6 ++----
 gnu/packages/pciutils.scm       |  3 +--
 gnu/packages/photo.scm          |  4 ++--
 gnu/packages/php.scm            |  3 +--
 gnu/packages/python.scm         | 26 ++++++++++----------------
 gnu/packages/rust.scm           |  4 +---
 gnu/packages/sdl.scm            |  4 ++--
 gnu/packages/syncthing.scm      |  4 ++--
 gnu/packages/telephony.scm      |  4 ++--
 gnu/packages/textutils.scm      |  3 +--
 gnu/packages/valgrind.scm       |  4 ++--
 gnu/packages/video.scm          |  7 ++-----
 gnu/packages/web.scm            |  9 +++------
 guix/utils.scm                  | 14 ++++++++++++++
 42 files changed, 101 insertions(+), 149 deletions(-)





Acknowledgement sent to Thiago Jung Bauermann <bauermann@HIDDEN>:
New bug report received and forwarded. Copy sent to guix-patches@HIDDEN. Full text available.
Report forwarded to guix-patches@HIDDEN:
bug#49672; Package guix-patches. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Mon, 28 Mar 2022 12:15:02 UTC

GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997 nCipher Corporation Ltd, 1994-97 Ian Jackson.