From unknown Sun Jun 22 07:49:02 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#72136] [PATCH 0/2] Guard against producing derivations for platforms with no system Resent-From: Christopher Baines Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Tue, 16 Jul 2024 08:43:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 72136 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 72136@debbugs.gnu.org X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.172111936215633 (code B ref -1); Tue, 16 Jul 2024 08:43:02 +0000 Received: (at submit) by debbugs.gnu.org; 16 Jul 2024 08:42:42 +0000 Received: from localhost ([127.0.0.1]:60941 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sTdlh-000445-Mp for submit@debbugs.gnu.org; Tue, 16 Jul 2024 04:42:41 -0400 Received: from lists.gnu.org ([209.51.188.17]:37924) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sTdlf-00043w-CQ for submit@debbugs.gnu.org; Tue, 16 Jul 2024 04:42:39 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sTdlc-0005LK-8t for guix-patches@gnu.org; Tue, 16 Jul 2024 04:42:36 -0400 Received: from mira.cbaines.net ([212.71.252.8]) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sTdlX-00052i-C4 for guix-patches@gnu.org; Tue, 16 Jul 2024 04:42:34 -0400 Received: from localhost (host86-141-242-113.range86-141.btcentralplus.com [86.141.242.113]) by mira.cbaines.net (Postfix) with ESMTPSA id 6954227BBE9 for ; Tue, 16 Jul 2024 09:42:26 +0100 (BST) Received: from felis (localhost.lan [127.0.0.1]) by localhost (OpenSMTPD) with ESMTP id 9b1f9da1 for ; Tue, 16 Jul 2024 08:42:25 +0000 (UTC) From: Christopher Baines User-Agent: mu4e 1.12.4; emacs 29.3 Date: Tue, 16 Jul 2024 09:42:23 +0100 Message-ID: <87ed7t7mog.fsf@cbaines.net> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" Received-SPF: pass client-ip=212.71.252.8; envelope-from=mail@cbaines.net; helo=mira.cbaines.net X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.4 (-) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.4 (--) --=-=-= Content-Type: text/plain Christopher Baines (2): gnu: coreutils-minimal: Don't support targets with no system. gnu: bash-minimal: Don't support targets with no system. gnu/packages/base.scm | 15 ++++++++++++++- gnu/packages/bash.scm | 16 +++++++++++++++- 2 files changed, 29 insertions(+), 2 deletions(-) --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQKlBAEBCgCPFiEEPonu50WOcg2XVOCyXiijOwuE9XcFAmaWMm9fFIAAAAAALgAo aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldDNF ODlFRUU3NDU4RTcyMEQ5NzU0RTBCMjVFMjhBMzNCMEI4NEY1NzcRHG1haWxAY2Jh aW5lcy5uZXQACgkQXiijOwuE9Xf+VxAAjD8N8uJmkKHJbHSgO/oL0DH0CIJcy8zo JwkEiICyubpkAX2VnG1b88fdC9ejkrAZl7R4dVijvwbAqYLwHo8HSHDPgOFl7miz VuqyzPETduX8lGmbSp+g3Byw6j/SpLlOtKbZQcJODFP1LJiLkNEruCna2U41zy2G LlQ8U9ebq3NKWRgzQiaSs8cKRM21wvOT+gArAvvi1U9Y3GMNBKCBP6cwhB4a2n4x 0MYKs8vAqP1yreh6X0ooX/jjo0eYsWxRrowIfdHq6OgzdwA4KFm9Dd56AZcHOXmg l3njcMtUwCvAGl4KoVPIxtigxguFzb0diiUbHgcF6LgInL+qtR6HU58Fnqc7uOjk DXtINVoSWqvF1W71oGU2YMwoTJDAOdS4XI1fcZQ1cpnYBr9qqtn0X2fGakp7rbDe lNCArvM+8rvssRNata9vXZR7aJ8/XXRPfe0yZV+UyNA5WaZuq5oOk6bdSUMXPHZ+ YKzOsQ1V0MgR+FG+Uqpkg1YcjLpjVAYftYIeIxUQV40sRAxDJI5E5aZ/OItAfjCv fBqVkJ6UiatuZLWwkxKFj8AAUpJiMQBs1qq8/H/t0zoctCbUn0ACYUiLDCz4U+TV 12aTjhTte3jEnxefoJBGhMxd4nE08tpyhqXnUpGzMnht8iXNNwXx6p4vGepVtHvZ 1OjH5cgl9kw= =TOdG -----END PGP SIGNATURE----- --=-=-=-- From unknown Sun Jun 22 07:49:02 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#72136] [PATCH 1/2] gnu: coreutils-minimal: Don't support targets with no system. References: <87ed7t7mog.fsf@cbaines.net> In-Reply-To: <87ed7t7mog.fsf@cbaines.net> Resent-From: Christopher Baines Original-Sender: "Debbugs-submit" Resent-CC: ludo@gnu.org, guix-patches@gnu.org Resent-Date: Tue, 16 Jul 2024 08:46:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 72136 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 72136@debbugs.gnu.org Cc: Ludovic =?UTF-8?Q?Court=C3=A8s?= X-Debbugs-Original-Xcc: Ludovic =?UTF-8?Q?Court=C3=A8s?= Received: via spool by 72136-submit@debbugs.gnu.org id=B72136.172111951515937 (code B ref 72136); Tue, 16 Jul 2024 08:46:01 +0000 Received: (at 72136) by debbugs.gnu.org; 16 Jul 2024 08:45:15 +0000 Received: from localhost ([127.0.0.1]:60946 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sTdoB-00048z-8k for submit@debbugs.gnu.org; Tue, 16 Jul 2024 04:45:15 -0400 Received: from mira.cbaines.net ([212.71.252.8]:43950) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sTdo9-00048p-DD for 72136@debbugs.gnu.org; Tue, 16 Jul 2024 04:45:13 -0400 Received: from localhost (host86-141-242-113.range86-141.btcentralplus.com [86.141.242.113]) by mira.cbaines.net (Postfix) with ESMTPSA id 4DA2D27BBE2 for <72136@debbugs.gnu.org>; Tue, 16 Jul 2024 09:45:10 +0100 (BST) Received: from localhost (localhost [local]) by localhost (OpenSMTPD) with ESMTPA id fcd156f5 for <72136@debbugs.gnu.org>; Tue, 16 Jul 2024 08:45:09 +0000 (UTC) From: Christopher Baines Date: Tue, 16 Jul 2024 09:45:08 +0100 Message-ID: <7d092a3734bd2f988e03bfb28fb0ca6a0302cc86.1721119509.git.mail@cbaines.net> X-Mailer: git-send-email 2.45.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Score: -0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Since I believe coreutils-minimal will fail to build for these targets, this will catch this early and display a clear message for both this package and packages using it as an input. * gnu/packages/base.scm (coreutils-minimal)[native-inputs]: Check the target if there is one. Change-Id: Id37cf6ac0b63226261a85a00699dfd06188c1475 --- gnu/packages/base.scm | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/gnu/packages/base.scm b/gnu/packages/base.scm index 66c5b7d237..05c3278e2e 100644 --- a/gnu/packages/base.scm +++ b/gnu/packages/base.scm @@ -67,6 +67,7 @@ (define-module (gnu packages base) #:use-module (guix utils) #:use-module (guix gexp) #:use-module (guix packages) + #:use-module (guix platform) #:use-module (guix download) #:use-module (guix git-download) #:use-module (guix build-system gnu) @@ -76,6 +77,8 @@ (define-module (gnu packages base) #:use-module (ice-9 optargs) #:use-module (srfi srfi-1) #:use-module (srfi srfi-26) + #:use-module (srfi srfi-34) + #:use-module (srfi srfi-35) #:export (glibc libc-for-target libc-locales-for-target @@ -537,7 +540,17 @@ (define-public coreutils-minimal (inherit coreutils) (name "coreutils-minimal") (outputs '("out")) - (native-inputs '()) + (native-inputs + (begin + (let ((target (%current-target-system))) + (when target + (unless (platform-system (lookup-platform-by-target target)) + (raise + (condition + (&package-unsupported-target-error + (package this-package) + (target target))))))) + '())) (inputs '()))) (define-public coreutils-8.30 base-commit: bf6ab0e0f5066d999e027a7eb8ecf05db71123ce -- 2.45.2 From unknown Sun Jun 22 07:49:02 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#72136] [PATCH 2/2] gnu: bash-minimal: Don't support targets with no system. Resent-From: Christopher Baines Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Tue, 16 Jul 2024 08:46:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 72136 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 72136@debbugs.gnu.org Received: via spool by 72136-submit@debbugs.gnu.org id=B72136.172111954615988 (code B ref 72136); Tue, 16 Jul 2024 08:46:02 +0000 Received: (at 72136) by debbugs.gnu.org; 16 Jul 2024 08:45:46 +0000 Received: from localhost ([127.0.0.1]:60949 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sTdof-00049o-MB for submit@debbugs.gnu.org; Tue, 16 Jul 2024 04:45:45 -0400 Received: from mira.cbaines.net ([212.71.252.8]:43952) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sTdod-00049f-HV for 72136@debbugs.gnu.org; Tue, 16 Jul 2024 04:45:43 -0400 Received: from localhost (host86-141-242-113.range86-141.btcentralplus.com [86.141.242.113]) by mira.cbaines.net (Postfix) with ESMTPSA id 7563027BBE9 for <72136@debbugs.gnu.org>; Tue, 16 Jul 2024 09:45:10 +0100 (BST) Received: from localhost (localhost [local]) by localhost (OpenSMTPD) with ESMTPA id f320d012 for <72136@debbugs.gnu.org>; Tue, 16 Jul 2024 08:45:09 +0000 (UTC) From: Christopher Baines Date: Tue, 16 Jul 2024 09:45:09 +0100 Message-ID: X-Mailer: git-send-email 2.45.2 In-Reply-To: <7d092a3734bd2f988e03bfb28fb0ca6a0302cc86.1721119509.git.mail@cbaines.net> References: <7d092a3734bd2f988e03bfb28fb0ca6a0302cc86.1721119509.git.mail@cbaines.net> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Score: -0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Since I believe bash-minimal will fail to build for these targets, this will catch this early and display a clear message for both this package and packages using it as an input. * gnu/packages/base.scm (bash-minimal)[inputs]: Check the target if there is one. Change-Id: I3768c7fa05f5375a1227551e2b7ae66a741ef93d --- gnu/packages/bash.scm | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/gnu/packages/bash.scm b/gnu/packages/bash.scm index 9ecec0a484..c29400c1e4 100644 --- a/gnu/packages/bash.scm +++ b/gnu/packages/bash.scm @@ -41,6 +41,7 @@ (define-module (gnu packages bash) #:use-module (gnu packages version-control) #:use-module (gnu packages less) #:use-module (guix packages) + #:use-module (guix platform) #:use-module (guix download) #:use-module (guix git-download) #:use-module (guix utils) @@ -57,6 +58,8 @@ (define-module (gnu packages bash) #:use-module (srfi srfi-1) #:use-module (srfi srfi-26) + #:use-module (srfi srfi-34) + #:use-module (srfi srfi-35) #:use-module (ice-9 format)) (define (patch-url seqno) @@ -226,7 +229,18 @@ (define-public bash-minimal ;; A stripped-down Bash for non-interactive use. (package (inherit bash) (name "bash-minimal") - (inputs '()) ; no readline, no curses + (inputs + (begin + (let ((target (%current-target-system))) + (when target + (unless (platform-system (lookup-platform-by-target target)) + (raise + (condition + (&package-unsupported-target-error + (package this-package) + (target target))))))) + + '())) ; no readline, no curses ;; No "include" output because there's no support for loadable modules. (outputs (delete "include" (package-outputs bash))) -- 2.45.2 From unknown Sun Jun 22 07:49:02 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#72136] [PATCH 1/2] gnu: coreutils-minimal: Don't support targets with no system. Resent-From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Thu, 18 Jul 2024 09:37:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 72136 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Christopher Baines Cc: 72136@debbugs.gnu.org Received: via spool by 72136-submit@debbugs.gnu.org id=B72136.17212953747574 (code B ref 72136); Thu, 18 Jul 2024 09:37:02 +0000 Received: (at 72136) by debbugs.gnu.org; 18 Jul 2024 09:36:14 +0000 Received: from localhost ([127.0.0.1]:36940 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sUNYb-0001y4-Tn for submit@debbugs.gnu.org; Thu, 18 Jul 2024 05:36:14 -0400 Received: from eggs.gnu.org ([209.51.188.92]:57756) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sUNYa-0001xr-C4 for 72136@debbugs.gnu.org; Thu, 18 Jul 2024 05:36:12 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sUNWJ-0004OE-It; Thu, 18 Jul 2024 05:33:51 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:Date:References:In-Reply-To:Subject:To: From; bh=ZEe9dQNW/+9RLI0y31jwMvI9yvrjdva4aVcYz1o1kIs=; b=a0bUXhwxiolxQB3w1Q1d pyFy15+TnzcMXjqB17cIluw2y5y0WiIizdFF9QOxylPXixymbtl+SETH7AQrTDHYYXXAkyguQ7N57 5XtNgjTn1X55B9fB2kA+1jHvhBgLCnr6gn6be5szqzwvVc/0veYfi8nL4ffh0cXQvmTisa2b8hVr2 YMbAkqEbBiT+DdXGS/LGQXvwTgEYodqatPVaGEVA0c1NZLdNHK3W85GNyGWfplOxAPY1jCtqKQZII IuhOVqIChIIXrK2YrEyyzk4ZdDrMuL1qXKQxKRyMvKGTqkvFpCMdkUP31plcOK5K0wuphU6bHm55n 54MiV/YVSx9U1g==; From: Ludovic =?UTF-8?Q?Court=C3=A8s?= In-Reply-To: <7d092a3734bd2f988e03bfb28fb0ca6a0302cc86.1721119509.git.mail@cbaines.net> (Christopher Baines's message of "Tue, 16 Jul 2024 09:45:08 +0100") References: <87ed7t7mog.fsf@cbaines.net> <7d092a3734bd2f988e03bfb28fb0ca6a0302cc86.1721119509.git.mail@cbaines.net> X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: Primidi 1 Thermidor an 232 de la =?UTF-8?Q?R=C3=A9volution,?= jour de =?UTF-8?Q?l'=C3=89pautre?= X-PGP-Key-ID: 0x090B11993D9AEBB5 X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc X-PGP-Fingerprint: 3CE4 6455 8A84 FDC6 9DB4 0CFB 090B 1199 3D9A EBB5 X-OS: x86_64-pc-linux-gnu Date: Thu, 18 Jul 2024 11:33:49 +0200 Message-ID: <87ikx3vybm.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Hello, Christopher Baines skribis: > Since I believe coreutils-minimal will fail to build for these targets, t= his > will catch this early and display a clear message for both this package a= nd > packages using it as an input. > > * gnu/packages/base.scm (coreutils-minimal)[native-inputs]: Check the tar= get > if there is one. > > Change-Id: Id37cf6ac0b63226261a85a00699dfd06188c1475 [...] > + (native-inputs > + (begin > + (let ((target (%current-target-system))) > + (when target > + (unless (platform-system (lookup-platform-by-target target)) > + (raise > + (condition > + (&package-unsupported-target-error > + (package this-package) > + (target target))))))) > + '())) I understand the rationale, but this raises a few issues IMO: 1. This is abusing the =E2=80=98native-inputs=E2=80=99 field. 2. It=E2=80=99s the kind of thing that should be purely declarative, much= like =E2=80=98supported-systems=E2=80=99. 3. So far, we do not keep track of the supported cross-compilation targets of each package, and I think it=E2=80=99s probably better that= way: the set of cross-compilation targets is pretty much open-ended and we only check them on a best-effort basis, for select packages (typically those listed in =E2=80=98packages-to-cross-build=E2=80=99 i= n (gnu ci) and/or =E2=80=98etc/release-manifest.scm=E2=80=99). I think we=E2=80= =99d rather not start annotating packages for supported cross-compilation target. That said, the initial problem remains: how can we ensure that the Data Service does not attempt to compute cross-build derivations that don=E2=80= =99t make sense, such as Coreutils on bare-metal targets like =E2=80=98avr=E2=80= =99? My take is that we should bake knowledge about what makes sense to be tested somewhere. It could be either arranging so (gnu ci) can be used by the Data Service (it=E2=80=99s currently used by Cuirass), or =E2=80=98etc/release-manifest.scm=E2=80=99, or even just a hard-coded liste= d of supported targets=E2=80=94we=E2=80=99re talking about a list of ten triplet= s or so, that=E2=80=99s okay. Or perhaps there=E2=80=99s room for something nicer in (guix platforms), bu= t I don=E2=80=99t see how we could determine whether a given package is eligibl= e for a bare-metal target. Thoughts? Ludo=E2=80=99.