Received: (at 55220) by debbugs.gnu.org; 7 May 2022 15:53:42 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Sat May 07 11:53:42 2022 Received: from localhost ([127.0.0.1]:52732 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1nnMkY-0003f7-1Y for submit <at> debbugs.gnu.org; Sat, 07 May 2022 11:53:42 -0400 Received: from eggs.gnu.org ([209.51.188.92]:41956) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <othacehe@HIDDEN>) id 1nnMkW-0003ev-0q for 55220 <at> debbugs.gnu.org; Sat, 07 May 2022 11:53:40 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:40498) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <othacehe@HIDDEN>) id 1nnMkQ-0000VF-A5; Sat, 07 May 2022 11:53:34 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:In-Reply-To:Date:References:Subject:To: From; bh=ZlUeuhEkTXBkOsCN65yvaPEm+YCADILGnBUJQ9fh6nM=; b=jOKHj1D8g+myg8zli2eh VIEWlG7uDkeZaIXVSGuLXHDS0vtOndKjkfazYilcjm+WqfIcK4CjVhwJ1SzNC8PxEy5ByYHPg77C+ cE1I7BcW+6Oe5+9lgycZQnP5AnR/kXdL3ZkGmGSAOLsIkv99/rGwmA+SoNVMkzVTFXcT6Pa0gTFOw RAJZCzOO5AJ+uotsV0mMyiWBCQW8oFl4gMFBgfjM/uLAklnW8EtQl+7/UnEatyvtnqSmx71XDO2pB m4ndZMIKZDGZd/4H9213rF3zxHaSIJeBh8QL9IdN3MpM2SmPo0sK9Ywx6lwx0c8M/M0KVbCPGJPic HDQKA4Kci8Q8jw==; Received: from 71.125.192.77.rev.sfr.net ([77.192.125.71]:40318 helo=meije) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <othacehe@HIDDEN>) id 1nnMkO-0004NC-W0; Sat, 07 May 2022 11:53:33 -0400 From: Mathieu Othacehe <othacehe@HIDDEN> To: Ludovic =?utf-8?Q?Court=C3=A8s?= <ludo@HIDDEN> Subject: Re: bug#55220: [PATCH 0/4] Add --list-systems and --list-targets options. References: <20220502111859.13605-1-othacehe@HIDDEN> <20220502111859.13605-2-othacehe@HIDDEN> <87ilqi3eq9.fsf_-_@HIDDEN> Date: Sat, 07 May 2022 17:53:31 +0200 In-Reply-To: <87ilqi3eq9.fsf_-_@HIDDEN> ("Ludovic =?utf-8?Q?Court=C3=A8s?= =?utf-8?Q?=22's?= message of "Fri, 06 May 2022 16:41:50 +0200") Message-ID: <87o8098hl0.fsf@HIDDEN> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 55220 Cc: 55220 <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: -3.3 (---) > Maybe expose it as a memoizing procedure thunk called =E2=80=98platforms= =E2=80=99, for > consistency with the names =E2=80=98systems=E2=80=99 and =E2=80=98targets= =E2=80=99. Done. > Or =E2=80=98supported-systems=E2=80=99 and =E2=80=98supported-targets=E2= =80=99? That would clash with the supported-systems field of <package>. But by the way, there's already a %supported-systems in (guix packages) that I would like to replace by systems. However importing (gnu platform) from there seems problematic. Thanks, Mathieu
guix-patches@HIDDEN
:bug#55220
; Package guix-patches
.
Full text available.Received: (at 55220) by debbugs.gnu.org; 7 May 2022 15:50:43 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Sat May 07 11:50:43 2022 Received: from localhost ([127.0.0.1]:52711 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1nnMhf-0003ZA-Gw for submit <at> debbugs.gnu.org; Sat, 07 May 2022 11:50:43 -0400 Received: from eggs.gnu.org ([209.51.188.92]:41658) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <othacehe@HIDDEN>) id 1nnMhd-0003Yw-37 for 55220 <at> debbugs.gnu.org; Sat, 07 May 2022 11:50:41 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:40486) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <othacehe@HIDDEN>) id 1nnMhW-0000HN-NB; Sat, 07 May 2022 11:50:35 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:In-Reply-To:Date:References:Subject:To: From; bh=y+38GomPKSkcyu66l6i2s6CiKzMiUqonWNVejJeuD08=; b=UU+3H0kQCshmISVm0WoI aCfipG2nSY8B4n8oOuHfEh+D1Ly2A/Dmf/aPQm90YStumZNdGfqQrmsksNo5PDPELyMImWAwluGZs npMnABdmB80Ob5CynKfW0uKrx7x6J5Y3akRCaAMnk6co0kxC14U5H9ZdHJrG+Na5uYnPB5agw2vck 21L3bmnW5MJeIEGAS1vtQqNA6QZUts2efdo6wQykBEAwAm8r7c09G6Atoz635b/MXE7rs7vFitvre z2Uyr+dAOQZoN4NTy1c+EfurHPFX8ztuFQ5TFQC2/qmBEf4tExepRFd9k52hyVmgFvU/wYMCa4ctm Nw2/Ajdc7A2V9Q==; Received: from 71.125.192.77.rev.sfr.net ([77.192.125.71]:40316 helo=meije) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <othacehe@HIDDEN>) id 1nnMhW-00045Q-9x; Sat, 07 May 2022 11:50:34 -0400 From: Mathieu Othacehe <othacehe@HIDDEN> To: Ludovic =?utf-8?Q?Court=C3=A8s?= <ludo@HIDDEN> Subject: Re: bug#55220: [PATCH 0/4] Add --list-systems and --list-targets options. References: <20220502111715.13500-1-othacehe@HIDDEN> <20220502111859.13605-1-othacehe@HIDDEN> <87mtfu3etd.fsf_-_@HIDDEN> Date: Sat, 07 May 2022 17:50:31 +0200 In-Reply-To: <87mtfu3etd.fsf_-_@HIDDEN> ("Ludovic =?utf-8?Q?Court=C3=A8s?= =?utf-8?Q?=22's?= message of "Fri, 06 May 2022 16:39:58 +0200") Message-ID: <87sfpl8hq0.fsf@HIDDEN> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 55220 Cc: 55220 <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: -3.3 (---) Hey Ludo! Thanks for reviewing :) > How about having a =E2=80=98glibc-dynamic-linker=E2=80=99 field in <platf= orm>? Seems like a great idea, I added them. Thanks, Mathieu
guix-patches@HIDDEN
:bug#55220
; Package guix-patches
.
Full text available.Received: (at 55220) by debbugs.gnu.org; 6 May 2022 14:54:15 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Fri May 06 10:54:15 2022 Received: from localhost ([127.0.0.1]:49412 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1nmzLT-0003g7-EA for submit <at> debbugs.gnu.org; Fri, 06 May 2022 10:54:15 -0400 Received: from eggs.gnu.org ([209.51.188.92]:55510) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <ludo@HIDDEN>) id 1nmzLR-0003fs-MS for 55220 <at> debbugs.gnu.org; Fri, 06 May 2022 10:54:13 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:47068) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <ludo@HIDDEN>) id 1nmzLM-00084r-CY for 55220 <at> debbugs.gnu.org; Fri, 06 May 2022 10:54:08 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:In-Reply-To:Date:References:Subject:To: From; bh=6aTU0ifpLcFLC4cx9lxkFiOJrP5FjaoDOLf5dGXgQVw=; b=rnnebpYIOG6jLXikzJvO riYW0FLD8uRzamCqhX1KESamVigMRccFFKAyqjcotEfW+JiqZUNV+1Kz2x92TRiQhktBtfA55mjfT EBeV3JuYfBOZvezJzS0emPaGDDoStIjjaXyXoT0gCG3AgTC51DJmGes4e9VbG1Glwnxu3OsZ+fmAL veeoL+bRoruNCo3AHImK6uN5TwluhX3Q9IQWtlz3D93SlyOFdUP7Px8mt8fAYVSQLumqhAW5j8bfr uVJ8VT7ZbBfV//GAXi2RdP/pV0sRoAQtlEJoJvGMitBf8KMu/Ul7f9DXamiAOUsGXinjuZL3XXt9m fWmbHA09kkbCKA==; Received: from [193.50.110.244] (port=52674 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <ludo@HIDDEN>) id 1nmzLL-0007Y5-UR; Fri, 06 May 2022 10:54:08 -0400 From: =?utf-8?Q?Ludovic_Court=C3=A8s?= <ludo@HIDDEN> To: Mathieu Othacehe <othacehe@HIDDEN> Subject: Re: bug#55220: [PATCH 0/4] Add --list-systems and --list-targets options. References: <20220502111859.13605-1-othacehe@HIDDEN> <20220502111859.13605-4-othacehe@HIDDEN> Date: Fri, 06 May 2022 16:54:06 +0200 In-Reply-To: <20220502111859.13605-4-othacehe@HIDDEN> (Mathieu Othacehe's message of "Mon, 2 May 2022 13:18:59 +0200") Message-ID: <875ymi3e5t.fsf_-_@HIDDEN> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 55220 Cc: 55220 <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: -3.3 (---) Mathieu Othacehe <othacehe@HIDDEN> skribis: > Also factorize the --system and --target build options. Check that the pa= ssed > system and target arguments are known platforms. > > * doc/guix.texi (Additional Build Options): Document the new --list-syste= ms > and --list-targets options. > * guix/scripts/build.scm (show-cross-build-options-help, > show-emulated-build-options-help, list-systems, list-targets): New proced= ures. > (%standard-cross-build-options, %standard-emulated-build-options): New > variables. > (show-help): Remove --system and --target entries and use > show-cross-build-options-help and show-emulated-build-options-help proced= ures instead. > (%options): Remove --system and --target entries and use > %standard-cross-build-options and %standard-emulated-build-options variab= les instead. > * guix/scripts/archive.scm (show-help, %options): Adapt them. > * guix/scripts/environment.scm: Ditto. > * guix/scripts/graph.scm: Ditto. > * guix/scripts/pack.scm: Ditto. > * guix/scripts/pull.scm: Ditto. > * guix/scripts/size.scm: Ditto. > * guix/scripts/weather.scm: Ditto. > > Signed-off-by: Mathieu Othacehe <othacehe@HIDDEN> [...] > +@item --list-systems > +List all the supported systems, than can be passed as @var{system} > +argument. =E2=80=9Cas an argument to @option{--system}=E2=80=9D maybe? > +@item --list-targets > +List all the supported targets, than can be passed as @var{target} > +argument. Likewise. > +(define %standard-cross-build-options > + ;; Build options related to cross builds. > + (list > + (option '("list-targets") #f #f > + (lambda (opt name arg result) > + (list-targets) > + (exit 0))) > + (option '("target") #t #f > + (lambda (opt name arg result . rest) > + (let ((t (false-if-exception > + (first (member arg (targets)))))) > + (if t > + (apply values (alist-cons 'target t result) rest) > + (leave (G_ "'~a' is not a supported target.~%") > + arg))))))) This is my main issue: should we still accept any triplet, and simply print a nicer error than currently when the glibc dynamic linker name is unknown? Or should be be just as strict as above, at the risk of frustrating developers porting stuff to new or unusual platforms? Or should there be an option to bypass this check? Maybe I=E2=80=99m overrating the usefulness of allowing users to pass in arbitrary triplets, though the manual does suggest that when porting to a new platform (info "(guix) Porting"). Thoughts? > +(define %standard-emulated-build-options > + ;; Build options related to emulated builds. > + (list > + (option '("list-systems") #f #f > + (lambda (opt name arg result) > + (list-systems) > + (exit 0))) > + (option '(#\s "system") #t #f > + (lambda (opt name arg result . rest) > + (let ((s (false-if-exception > + (first (member arg (systems)))))) > + (if s > + (apply values (alist-cons 'system s result) rest) > + (leave (G_ "'~a' is not a supported system.~%") > + arg))))))) Since it has nothing to do with emulation :-), how about calling it =E2=80=98%standard-native-build-options=E2=80=99, =E2=80=98%standard-system= -type-build-options=E2=80=99, or similar? How about replacing: (let ((s (false-if-exception (first (member arg (systems)))))) (if s =E2=80=A6)) with: (if (member arg (systems)) =E2=80=A6) ? Also, please remove final period in the error message passed to =E2=80=98le= ave=E2=80=99. Anyway, overall this patch series is a clear improvement over the status quo, so this is just about fine-tuning the details. Thanks! Ludo=E2=80=99.
guix-patches@HIDDEN
:bug#55220
; Package guix-patches
.
Full text available.Received: (at 55220) by debbugs.gnu.org; 6 May 2022 14:42:11 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Fri May 06 10:42:11 2022 Received: from localhost ([127.0.0.1]:49390 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1nmz9b-0003L2-TO for submit <at> debbugs.gnu.org; Fri, 06 May 2022 10:42:11 -0400 Received: from eggs.gnu.org ([209.51.188.92]:52848) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <ludo@HIDDEN>) id 1nmz9a-0003Km-1y for 55220 <at> debbugs.gnu.org; Fri, 06 May 2022 10:41:58 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:46898) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <ludo@HIDDEN>) id 1nmz9U-00067J-QM for 55220 <at> debbugs.gnu.org; Fri, 06 May 2022 10:41:52 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:In-Reply-To:Date:References:Subject:To: From; bh=1agU0ApDYoLibtp0U3vV1E2rm+Bps60l30rUlkKj5ng=; b=sbpiqkxrmwGt1hcwyzlP KWWHr3TXZViylUrKG3ecobzlXUMtpsxdVTalpF4qYAxACBmlZiFyUNwZfx9MY7N0eUI2lBoigYzBz Z1h1qc0ZlCNdosr23krXPpHDR9hybVjY+OB4/FmwkFDXgUDv1gG0gcEH3ya9Xkwc09q4X2i3zmD7v 3atnM8/j/gqvHIOo8wrCxr3GbzcVNpSapTGNSXS6+v5o+3xY4OSrRZtd2CXQ28y2njl6GLiPQ/vyM BwavCFRt3HPfXOx/ZnvWFzHM2R9ZoseAnI2QgZ9fhxI54iQE04vDnEX/Cftq2KX4ASwEAkkAk2+k+ Wr1K38bNEwM+wQ==; Received: from [193.50.110.244] (port=52672 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <ludo@HIDDEN>) id 1nmz9U-0006LE-BV; Fri, 06 May 2022 10:41:52 -0400 From: =?utf-8?Q?Ludovic_Court=C3=A8s?= <ludo@HIDDEN> To: Mathieu Othacehe <othacehe@HIDDEN> Subject: Re: bug#55220: [PATCH 0/4] Add --list-systems and --list-targets options. References: <20220502111859.13605-1-othacehe@HIDDEN> <20220502111859.13605-2-othacehe@HIDDEN> Date: Fri, 06 May 2022 16:41:50 +0200 In-Reply-To: <20220502111859.13605-2-othacehe@HIDDEN> (Mathieu Othacehe's message of "Mon, 2 May 2022 13:18:57 +0200") Message-ID: <87ilqi3eq9.fsf_-_@HIDDEN> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 55220 Cc: 55220 <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: -3.3 (---) Mathieu Othacehe <othacehe@HIDDEN> skribis: > * gnu/platform.scm (platform-modules, systems, targets): New procedures. > (%platforms): New variable. > > Signed-off-by: Mathieu Othacehe <othacehe@HIDDEN> [...] > +(define %platforms > + ;; The list of publically-known platforms. > + (delay (fold-module-public-variables (lambda (obj result) > + (if (platform? obj) > + (cons obj result) > + result)) > + '() > + (platform-modules)))) Maybe expose it as a memoizing procedure thunk called =E2=80=98platforms=E2= =80=99, for consistency with the names =E2=80=98systems=E2=80=99 and =E2=80=98targets= =E2=80=99. > + > +;;; > +;;; Systems & Targets. > +;;; > + > +(define (systems) > + "Return the list of supported systems." > + (delete-duplicates > + (filter-map platform-system (force %platforms)))) > + > +(define (targets) > + "Return the list of supported targets." > + (map platform-target (force %platforms))) Or =E2=80=98supported-systems=E2=80=99 and =E2=80=98supported-targets=E2=80= =99? Ludo=E2=80=99.
guix-patches@HIDDEN
:bug#55220
; Package guix-patches
.
Full text available.Received: (at 55220) by debbugs.gnu.org; 6 May 2022 14:40:14 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Fri May 06 10:40:14 2022 Received: from localhost ([127.0.0.1]:49380 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1nmz7u-0003I9-7e for submit <at> debbugs.gnu.org; Fri, 06 May 2022 10:40:14 -0400 Received: from eggs.gnu.org ([209.51.188.92]:52416) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <ludo@HIDDEN>) id 1nmz7n-0003Hi-Dk for 55220 <at> debbugs.gnu.org; Fri, 06 May 2022 10:40:13 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:46872) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <ludo@HIDDEN>) id 1nmz7g-0005hj-M6 for 55220 <at> debbugs.gnu.org; Fri, 06 May 2022 10:40:02 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:In-Reply-To:Date:References:Subject:To: From; bh=okQtyiH2TtcXbkvViI61ilGF081Xg6qXEeaD3yHpDmw=; b=eS+8ag4lV8FLMpY5Bq+T k4rs5f4CMVwsXBzcNEiIHnIXg6PC1dZ4Qfyl8kI8Rwp6xUAUjtb6+2tOVK/dgJISKEw2iVXiBYIMo 8Cl6VLZk1TOGwC6SZIdO3Jy8Q+3bGighOIrfRwjPXNhJOG1jSAXt7TILmlXsxww/SNvDi8Mg++dM+ MbCy/1j1CuL22IDa58W/NDrZWG64Nwn0PlE0uAnowhvU1LDfCYe5Kg3j2dpykN0OQN73Ns/719DS6 gebmdnyJWFwAEh3UfGuVbHiiRzxpv/Ty7GIGha7OZj2AU8q4peA5TjzUx85BjzyOXTklz4bLlwDo1 BsVGcRKAXm+Jcw==; Received: from [193.50.110.244] (port=52670 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <ludo@HIDDEN>) id 1nmz7g-000654-8K; Fri, 06 May 2022 10:40:00 -0400 From: =?utf-8?Q?Ludovic_Court=C3=A8s?= <ludo@HIDDEN> To: Mathieu Othacehe <othacehe@HIDDEN> Subject: Re: bug#55220: [PATCH 0/4] Add --list-systems and --list-targets options. References: <20220502111715.13500-1-othacehe@HIDDEN> <20220502111859.13605-1-othacehe@HIDDEN> Date: Fri, 06 May 2022 16:39:58 +0200 In-Reply-To: <20220502111859.13605-1-othacehe@HIDDEN> (Mathieu Othacehe's message of "Mon, 2 May 2022 13:18:56 +0200") Message-ID: <87mtfu3etd.fsf_-_@HIDDEN> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 55220 Cc: 55220 <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: -3.3 (---) Hi, Mathieu Othacehe <othacehe@HIDDEN> skribis: > * gnu/platforms/intel.scm: New file. > * gnu/platforms/mips.scm: Ditto. > * gnu/platforms/powerpc.scm: Ditto. > * gnu/platforms/riscv.scm: Ditto. > * gnu/local.mk (GNU_SYSTEM_MODULES): Add them. > > Signed-off-by: Mathieu Othacehe <othacehe@HIDDEN> Nice. > +(define intel32-linux > + (platform > + (target "i686-linux-gnu") > + (system "i686-linux") > + (linux-architecture "x86"))) How about having a =E2=80=98glibc-dynamic-linker=E2=80=99 field in <platfor= m>? That would be a good way to determine whether a platform is a good candidate for =E2=80=98--target=E2=80=99. (Also, in hindsight, =E2=80=98triplet=E2=80=99 might be more accurate than = =E2=80=98target=E2=80=99 for the first field. No big deal though.) Ludo=E2=80=99.
guix-patches@HIDDEN
:bug#55220
; Package guix-patches
.
Full text available.Received: (at 55220) by debbugs.gnu.org; 6 May 2022 14:37:26 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Fri May 06 10:37:26 2022 Received: from localhost ([127.0.0.1]:49375 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1nmz5B-0003Dv-O2 for submit <at> debbugs.gnu.org; Fri, 06 May 2022 10:37:26 -0400 Received: from eggs.gnu.org ([209.51.188.92]:51866) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <ludo@HIDDEN>) id 1nmz59-0003Dh-KK for 55220 <at> debbugs.gnu.org; Fri, 06 May 2022 10:37:23 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:46810) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <ludo@HIDDEN>) id 1nmz54-0005Q3-50 for 55220 <at> debbugs.gnu.org; Fri, 06 May 2022 10:37:18 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:In-Reply-To:Date:References:Subject:To: From; bh=flqQCoGwecRXp5f+tEI63kXzB6l/2wHRyhZamZOSyv0=; b=eIqcR/GqHWdFpDSyfs0a H08Q72JRbSzH3oEkBpQ37/oH1SBSH+WEkiwxvEnKl2G//nkXUAUhnhES195NcQQRNCb0tQJwA+KUi Vzqm2ufKlIsA+HxKX1Gq0HpDnVD17ikYQudnm/4v+9J6LdypvL/mQ13JVBJbgYtsePVJd9ubRUPaO GlFbEi98Q4+W/EzXWG+KUeC9l/6jvHQn05T5MOXoPxzrRAoZcU6wZCl+nvypBGHh7eoHSgvjc4Y9X VT4x/HD8E0BNZ5IwOLN83SrEyFgXGZpbU70YVo/xGuY3u2gLq3JA6im7ucpxpmN53cEnWRvkbNCJD xPWcCsf+rj8/6w==; Received: from [2001:660:6102:320:e120:2c8f:8909:cdfe] (port=44894 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <ludo@HIDDEN>) id 1nmz53-0005uC-Cm; Fri, 06 May 2022 10:37:17 -0400 From: =?utf-8?Q?Ludovic_Court=C3=A8s?= <ludo@HIDDEN> To: Mathieu Othacehe <othacehe@HIDDEN> Subject: Re: bug#55220: [PATCH 0/4] Add --list-systems and --list-targets options. References: <20220502111715.13500-1-othacehe@HIDDEN> Date: Fri, 06 May 2022 16:37:13 +0200 In-Reply-To: <20220502111715.13500-1-othacehe@HIDDEN> (Mathieu Othacehe's message of "Mon, 2 May 2022 13:17:15 +0200") Message-ID: <87sfpm3exy.fsf@HIDDEN> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 55220 Cc: 55220 <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: -3.3 (---) Hello! Mathieu Othacehe <othacehe@HIDDEN> skribis: > Most build commands support --system and --target options. Those options > suffer from multiple issues: they are never listed and never checked. > > For --system, this is a real issue as aside from reading the (gnu packages > bootstrap) module content the user cannot know what are the supported > arguments. Providing a wrong system also fails badly: > > mathieu@meije ~$ guix build hello --system=3Darm-linux > Backtrace: > In guix/memoization.scm: > 101:0 19 (_ #<hash-table 7f1d5d82a340 0/31> #<package tar@HIDDEN =E2=80= =A6> =E2=80=A6) > > ... > ice-9/boot-9.scm:1685:16: In procedure raise-exception: > dynamic linker name not known for this system "arm-linux" > > For --target, any GNU supported triplet can possibly work but providing a > wrong triplet will also fail badly: > > mathieu@meije ~$ guix build hello --target=3Darm-linux > Backtrace: > In guix/store.scm: > 1385:9 19 (map/accumulate-builds #<store-connection 256.99 7f5bd=E2=80= =A6> =E2=80=A6) >=20=20 > > ... > ice-9/boot-9.scm:1685:16: In procedure raise-exception: > dynamic linker name not known for this system "arm-linux" > > This patchset adds two new options: --list-systems and --list-targets that > list the supported systems and targets. The arguments passed to --system = and > --target options are also checked: > > mathieu@meije ~/guix [env]$ ./pre-inst-env guix build hello --system=3Dar= m-linux > guix build: error: 'arm-linux' is not a supported system. Nice. > mathieu@meije ~/guix [env]$ ./pre-inst-env guix build hello --target=3Dar= m-linux > guix build: error: 'arm-linux' is not a supported target. Nice=E2=80=A6 but it=E2=80=99s a valid triplet (for freestanding binaries o= n 32-bit ARM, I believe). The =E2=80=98--target=E2=80=99 issue is tricky IMO because it=E2=80=99s mos= tly free-form. In (gnu packages =E2=80=A6), there are calls like: (cross-gcc "avr" =E2=80=A6) (cross-gcc "arm-none-eabi" =E2=80=A6) (cross-gcc "propeller-elf" =E2=80=A6) These are unusual but valid triplets. (I=E2=80=99m going to look more closely at the rest to get a more informed opinion=E2=80=A6) Thanks for looking into this loooongstanding issue! Ludo=E2=80=99.
guix-patches@HIDDEN
:bug#55220
; Package guix-patches
.
Full text available.Received: (at 55220) by debbugs.gnu.org; 2 May 2022 11:20:05 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Mon May 02 07:20:05 2022 Received: from localhost ([127.0.0.1]:35024 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1nlU5z-0005ji-TE for submit <at> debbugs.gnu.org; Mon, 02 May 2022 07:20:05 -0400 Received: from eggs.gnu.org ([209.51.188.92]:53134) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <othacehe@HIDDEN>) id 1nlU5x-0005ir-9K for 55220 <at> debbugs.gnu.org; Mon, 02 May 2022 07:20:02 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:54142) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <othacehe@HIDDEN>) id 1nlU5s-0005ZM-3C for 55220 <at> debbugs.gnu.org; Mon, 02 May 2022 07:19:56 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:References:In-Reply-To:Date:Subject:To: From; bh=xNDyzpc95evmgaz/SMlr7TlNAp4rIXXFzEMZ7sFQTjs=; b=c2xF6ZMvqH6xMAhz5KcW N+He1le8vg6B8G2VNLqIcsHOz7UnFjnjrNOhVZsNek7joXq6kX9OjeNebeZslWqO36V5nq/o+UZFG j2sTpvi1KeqAcg+1vtpUncN2pasWQAaiLC6GnuzTUhY3t42oO6beq7DnVceqJFZfmMNGWd3FF+RS9 LW3omkJLa/npeUdQdlsLxvCqrxkbzsguV5ckWofHprCwQap7ZKBITPsXpH+weZ52EpZ6d7hEPu2lo 8yxLTgpTCkhL24SykFbeJHEuhL7tnlILhYFpC0FrUt2whlJwmr/dN67mc19XqUf5urE1R5WqfTpcd P0ec+bqUTi5wTQ==; Received: from 71.125.192.77.rev.sfr.net ([77.192.125.71]:33768 helo=localhost.localdomain) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from <othacehe@HIDDEN>) id 1nlU5f-0004xO-QN; Mon, 02 May 2022 07:19:46 -0400 From: Mathieu Othacehe <othacehe@HIDDEN> To: 55220 <at> debbugs.gnu.org Subject: [PATCH 4/4] scripts: Add --list-systems and --list-targets options. Date: Mon, 2 May 2022 13:18:59 +0200 Message-Id: <20220502111859.13605-4-othacehe@HIDDEN> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220502111859.13605-1-othacehe@HIDDEN> References: <20220502111859.13605-1-othacehe@HIDDEN> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 55220 Cc: Mathieu Othacehe <othacehe@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: -3.3 (---) Also factorize the --system and --target build options. Check that the passed system and target arguments are known platforms. * doc/guix.texi (Additional Build Options): Document the new --list-systems and --list-targets options. * guix/scripts/build.scm (show-cross-build-options-help, show-emulated-build-options-help, list-systems, list-targets): New procedures. (%standard-cross-build-options, %standard-emulated-build-options): New variables. (show-help): Remove --system and --target entries and use show-cross-build-options-help and show-emulated-build-options-help procedures instead. (%options): Remove --system and --target entries and use %standard-cross-build-options and %standard-emulated-build-options variables instead. * guix/scripts/archive.scm (show-help, %options): Adapt them. * guix/scripts/environment.scm: Ditto. * guix/scripts/graph.scm: Ditto. * guix/scripts/pack.scm: Ditto. * guix/scripts/pull.scm: Ditto. * guix/scripts/size.scm: Ditto. * guix/scripts/weather.scm: Ditto. Signed-off-by: Mathieu Othacehe <othacehe@HIDDEN> --- doc/guix.texi | 8 ++++ guix/scripts/archive.scm | 20 +++------ guix/scripts/build.scm | 84 ++++++++++++++++++++++++++++++------ guix/scripts/environment.scm | 11 ++--- guix/scripts/graph.scm | 15 +++---- guix/scripts/pack.scm | 20 +++------ guix/scripts/pull.scm | 12 +++--- guix/scripts/size.scm | 13 +++--- guix/scripts/weather.scm | 11 +++-- 9 files changed, 120 insertions(+), 74 deletions(-) diff --git a/doc/guix.texi b/doc/guix.texi index 5399584cb0..22a8ee7d2d 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -12025,6 +12025,14 @@ Cross-build for @var{triplet}, which must be a valid GNU triplet, such as @code{"aarch64-linux-gnu"} (@pxref{Specifying Target Triplets, GNU configuration triplets,, autoconf, Autoconf}). +@item --list-systems +List all the supported systems, than can be passed as @var{system} +argument. + +@item --list-targets +List all the supported targets, than can be passed as @var{target} +argument. + @anchor{build-check} @item --check @cindex determinism, checking diff --git a/guix/scripts/archive.scm b/guix/scripts/archive.scm index f8678aa5f9..991919773a 100644 --- a/guix/scripts/archive.scm +++ b/guix/scripts/archive.scm @@ -93,14 +93,14 @@ (define (show-help) (display (G_ " -S, --source build the packages' source derivations")) (display (G_ " - -s, --system=SYSTEM attempt to build for SYSTEM--e.g., \"i686-linux\"")) - (display (G_ " - --target=TRIPLET cross-build for TRIPLET--e.g., \"armel-linux-gnu\"")) - (display (G_ " -v, --verbosity=LEVEL use the given verbosity LEVEL")) (newline) (show-build-options-help) + (newline) + (show-cross-build-options-help) + (newline) + (show-emulated-build-options-help) (newline) (display (G_ " @@ -166,14 +166,6 @@ (define %options (option '(#\S "source") #f #f (lambda (opt name arg result) (alist-cons 'source? #t result))) - (option '(#\s "system") #t #f - (lambda (opt name arg result) - (alist-cons 'system arg - (alist-delete 'system result eq?)))) - (option '("target") #t #f - (lambda (opt name arg result) - (alist-cons 'target arg - (alist-delete 'target result eq?)))) (option '(#\e "expression") #t #f (lambda (opt name arg result) (alist-cons 'expression arg result))) @@ -186,7 +178,9 @@ (define %options (lambda (opt name arg result) (alist-cons 'dry-run? #t result))) - %standard-build-options)) + (append %standard-build-options + %standard-cross-build-options + %standard-emulated-build-options))) (define (derivation-from-expression store str package-derivation system source?) diff --git a/guix/scripts/build.scm b/guix/scripts/build.scm index d9cdb6e5e0..9aa0bd2f53 100644 --- a/guix/scripts/build.scm +++ b/guix/scripts/build.scm @@ -47,6 +47,7 @@ (define-module (guix scripts build) #:use-module (srfi srfi-35) #:use-module (srfi srfi-37) #:use-module (gnu packages) + #:use-module (gnu platform) #:use-module ((guix status) #:select (with-status-verbosity)) #:use-module ((guix progress) #:select (current-terminal-columns)) #:use-module ((guix build syscalls) #:select (terminal-columns)) @@ -54,9 +55,15 @@ (define-module (guix scripts build) #:export (log-url %standard-build-options + %standard-cross-build-options + %standard-emulated-build-options + set-build-options-from-command-line set-build-options-from-command-line* + show-build-options-help + show-cross-build-options-help + show-emulated-build-options-help guix-build register-root @@ -184,6 +191,18 @@ (define (show-build-options-help) (display (G_ " --debug=LEVEL produce debugging output at LEVEL"))) +(define (show-cross-build-options-help) + (display (G_ " + --list-targets list available targets")) + (display (G_ " + --target=TRIPLET cross-build for TRIPLET--e.g., \"aarch64-linux-gnu\""))) + +(define (show-emulated-build-options-help) + (display (G_ " + --list-systems list available systems")) + (display (G_ " + -s, --system=SYSTEM attempt to build for SYSTEM--e.g., \"i686-linux\""))) + (define (set-build-options-from-command-line store opts) "Given OPTS, an alist as returned by 'args-fold' given '%standard-build-options', set the corresponding build options on STORE." @@ -319,6 +338,52 @@ (define %standard-build-options (leave (G_ "not a number: '~a' option argument: ~a~%") name arg))))))) +(define (list-systems) + "Print the available systems." + (display (G_ "The available systems are:\n")) + (newline) + (format #t "~{ - ~a ~%~}" + (sort (systems) string<?))) + +(define (list-targets) + "Print the available targets." + (display (G_ "The available targets are:\n")) + (newline) + (format #t "~{ - ~a ~%~}" + (sort (targets) string<?))) + +(define %standard-cross-build-options + ;; Build options related to cross builds. + (list + (option '("list-targets") #f #f + (lambda (opt name arg result) + (list-targets) + (exit 0))) + (option '("target") #t #f + (lambda (opt name arg result . rest) + (let ((t (false-if-exception + (first (member arg (targets)))))) + (if t + (apply values (alist-cons 'target t result) rest) + (leave (G_ "'~a' is not a supported target.~%") + arg))))))) + +(define %standard-emulated-build-options + ;; Build options related to emulated builds. + (list + (option '("list-systems") #f #f + (lambda (opt name arg result) + (list-systems) + (exit 0))) + (option '(#\s "system") #t #f + (lambda (opt name arg result . rest) + (let ((s (false-if-exception + (first (member arg (systems)))))) + (if s + (apply values (alist-cons 'system s result) rest) + (leave (G_ "'~a' is not a supported system.~%") + arg))))))) + ;;; ;;; Command-line options. @@ -353,10 +418,6 @@ (define (show-help) --sources[=TYPE] build source derivations; TYPE may optionally be one of \"package\", \"all\" (default), or \"transitive\"")) (display (G_ " - -s, --system=SYSTEM attempt to build for SYSTEM--e.g., \"i686-linux\"")) - (display (G_ " - --target=TRIPLET cross-build for TRIPLET--e.g., \"armel-linux-gnu\"")) - (display (G_ " -d, --derivations return the derivation paths of the given packages")) (display (G_ " --check rebuild items to check for non-determinism issues")) @@ -374,6 +435,10 @@ (define (show-help) (newline) (show-build-options-help) (newline) + (show-cross-build-options-help) + (newline) + (show-emulated-build-options-help) + (newline) (show-transformation-options-help) (newline) (display (G_ " @@ -420,13 +485,6 @@ (define %options (alist-cons 'build-mode (build-mode repair) result) rest))) - (option '(#\s "system") #t #f - (lambda (opt name arg result) - (alist-cons 'system arg result))) - (option '("target") #t #f - (lambda (opt name arg result) - (alist-cons 'target arg - (alist-delete 'target result eq?)))) (option '(#\d "derivations") #f #f (lambda (opt name arg result) (alist-cons 'derivations-only? #t result))) @@ -459,7 +517,9 @@ (define %options (alist-cons 'log-file? #t result))) (append %transformation-options - %standard-build-options))) + %standard-build-options + %standard-cross-build-options + %standard-emulated-build-options))) (define (options->things-to-build opts) "Read the arguments from OPTS and return a list of high-level objects to diff --git a/guix/scripts/environment.scm b/guix/scripts/environment.scm index 07b54cd89b..51dab27767 100644 --- a/guix/scripts/environment.scm +++ b/guix/scripts/environment.scm @@ -96,8 +96,6 @@ (define (show-environment-options-help) (display (G_ " --search-paths display needed environment variable definitions")) (display (G_ " - -s, --system=SYSTEM attempt to build for SYSTEM--e.g., \"i686-linux\"")) - (display (G_ " -r, --root=FILE make FILE a symlink to the result, and register it as a garbage collector root")) (display (G_ " @@ -145,6 +143,8 @@ (define (show-help) (newline) (show-build-options-help) (newline) + (show-emulated-build-options-help) + (newline) (show-transformation-options-help) (newline) (display (G_ " @@ -226,10 +226,6 @@ (define %options (option '(#\n "dry-run") #f #f (lambda (opt name arg result) (alist-cons 'dry-run? #t result))) - (option '(#\s "system") #t #f - (lambda (opt name arg result) - (alist-cons 'system arg - (alist-delete 'system result eq?)))) (option '(#\C "container") #f #f (lambda (opt name arg result) (alist-cons 'container? #t result))) @@ -273,7 +269,8 @@ (define %options (alist-cons 'bootstrap? #t result))) (append %transformation-options - %standard-build-options))) + %standard-build-options + %standard-emulated-build-options))) (define (pick-all alist key) "Return a list of values in ALIST associated with KEY." diff --git a/guix/scripts/graph.scm b/guix/scripts/graph.scm index 535875c858..c61504ac9d 100644 --- a/guix/scripts/graph.scm +++ b/guix/scripts/graph.scm @@ -39,7 +39,9 @@ (define-module (guix scripts graph) options->transformation %transformation-options)) #:use-module ((guix scripts build) - #:select (%standard-build-options)) + #:select (%standard-build-options + %standard-emulated-build-options + show-emulated-build-options-help)) #:use-module (srfi srfi-1) #:use-module (srfi srfi-26) #:use-module (srfi srfi-34) @@ -504,10 +506,6 @@ (define %options (option '(#\e "expression") #t #f (lambda (opt name arg result) (alist-cons 'expression arg result))) - (option '(#\s "system") #t #f - (lambda (opt name arg result) - (alist-cons 'system arg - (alist-delete 'system result eq?)))) (find (lambda (option) (member "load-path" (option-names option))) %standard-build-options) @@ -519,7 +517,8 @@ (define %options (lambda args (show-version-and-exit "guix graph"))) - %transformation-options)) + (append %transformation-options + %standard-emulated-build-options))) (define (show-help) ;; TRANSLATORS: Here 'dot' is the name of a program; it must not be @@ -540,8 +539,6 @@ (define (show-help) --path display the shortest path between the given nodes")) (display (G_ " -e, --expression=EXPR consider the package EXPR evaluates to")) - (display (G_ " - -s, --system=SYSTEM consider the graph for SYSTEM--e.g., \"i686-linux\"")) (newline) (display (G_ " -L, --load-path=DIR prepend DIR to the package module search path")) @@ -553,6 +550,8 @@ (define (show-help) (display (G_ " -V, --version display version information and exit")) (newline) + (show-emulated-build-options-help) + (newline) (show-bug-report-information)) (define %default-options diff --git a/guix/scripts/pack.scm b/guix/scripts/pack.scm index 32f0d3abb1..ee42c9bf73 100644 --- a/guix/scripts/pack.scm +++ b/guix/scripts/pack.scm @@ -1244,17 +1244,9 @@ (define %options (option '(#\m "manifest") #t #f (lambda (opt name arg result) (alist-cons 'manifest arg result))) - (option '(#\s "system") #t #f - (lambda (opt name arg result) - (alist-cons 'system arg - (alist-delete 'system result eq?)))) (option '("entry-point") #t #f (lambda (opt name arg result) (alist-cons 'entry-point arg result))) - (option '("target") #t #f - (lambda (opt name arg result) - (alist-cons 'target arg - (alist-delete 'target result eq?)))) (option '(#\C "compression") #t #f (lambda (opt name arg result) (alist-cons 'compressor (lookup-compressor arg) @@ -1305,13 +1297,19 @@ (define %options (append %deb-format-options %transformation-options - %standard-build-options))) + %standard-build-options + %standard-cross-build-options + %standard-emulated-build-options))) (define (show-help) (display (G_ "Usage: guix pack [OPTION]... PACKAGE... Create a bundle of PACKAGE.\n")) (show-build-options-help) (newline) + (show-cross-build-options-help) + (newline) + (show-emulated-build-options-help) + (newline) (show-transformation-options-help) (newline) (show-deb-format-options) @@ -1325,10 +1323,6 @@ (define (show-help) (display (G_ " -e, --expression=EXPR consider the package EXPR evaluates to")) (display (G_ " - -s, --system=SYSTEM attempt to build for SYSTEM--e.g., \"i686-linux\"")) - (display (G_ " - --target=TRIPLET cross-build for TRIPLET--e.g., \"armel-linux-gnu\"")) - (display (G_ " -C, --compression=TOOL compress using TOOL--e.g., \"lzip\"")) (display (G_ " -S, --symlink=SPEC create symlinks to the profile according to SPEC")) diff --git a/guix/scripts/pull.scm b/guix/scripts/pull.scm index 7402782ff3..8aba3e1e37 100644 --- a/guix/scripts/pull.scm +++ b/guix/scripts/pull.scm @@ -118,12 +118,13 @@ (define (show-help) -p, --profile=PROFILE use PROFILE instead of ~/.config/guix/current")) (display (G_ " -v, --verbosity=LEVEL use the given verbosity LEVEL")) - (display (G_ " - -s, --system=SYSTEM attempt to build for SYSTEM--e.g., \"i686-linux\"")) (display (G_ " --bootstrap use the bootstrap Guile to build the new Guix")) (newline) (show-build-options-help) + (newline) + (show-emulated-build-options-help) + (newline) (display (G_ " -h, --help display this help and exit")) (display (G_ " @@ -184,10 +185,6 @@ (define %options (lambda (opt name arg result) (alist-cons 'profile (canonicalize-profile arg) result))) - (option '(#\s "system") #t #f - (lambda (opt name arg result) - (alist-cons 'system arg - (alist-delete 'system result eq?)))) (option '(#\n "dry-run") #f #f (lambda (opt name arg result) (alist-cons 'dry-run? #t result))) @@ -208,7 +205,8 @@ (define %options (lambda args (show-version-and-exit "guix pull"))) - %standard-build-options)) + (append %standard-build-options + %standard-emulated-build-options))) (define (warn-about-backward-updates channel start commit relation) "Warn about non-forward updates of CHANNEL from START to COMMIT, without diff --git a/guix/scripts/size.scm b/guix/scripts/size.scm index e46983382a..e3e64b4fcb 100644 --- a/guix/scripts/size.scm +++ b/guix/scripts/size.scm @@ -235,8 +235,6 @@ (define (show-help) (display (G_ " --substitute-urls=URLS fetch substitute from URLS if they are authorized")) - (display (G_ " - -s, --system=SYSTEM consider packages for SYSTEM--e.g., \"i686-linux\"")) ;; TRANSLATORS: "closure" and "self" must not be translated. (display (G_ " --sort=KEY sort according to KEY--\"closure\" or \"self\"")) @@ -251,15 +249,13 @@ (define (show-help) (display (G_ " -V, --version display version information and exit")) (newline) + (show-emulated-build-options-help) + (newline) (show-bug-report-information)) (define %options ;; Specifications of the command-line options. - (list (option '(#\s "system") #t #f - (lambda (opt name arg result) - (alist-cons 'system arg - (alist-delete 'system result eq?)))) - (option '("substitute-urls") #t #f + (cons* (option '("substitute-urls") #t #f (lambda (opt name arg result . rest) (apply values (alist-cons 'substitute-urls @@ -287,7 +283,8 @@ (define %options (exit 0))) (option '(#\V "version") #f #f (lambda args - (show-version-and-exit "guix size"))))) + (show-version-and-exit "guix size"))) + %standard-emulated-build-options)) (define %default-options `((system . ,(%current-system)) diff --git a/guix/scripts/weather.scm b/guix/scripts/weather.scm index adba614b8c..b51bd40a17 100644 --- a/guix/scripts/weather.scm +++ b/guix/scripts/weather.scm @@ -40,6 +40,7 @@ (define-module (guix scripts weather) #:use-module (guix ci) #:use-module (guix sets) #:use-module (guix graph) + #:use-module (guix scripts build) #:autoload (guix scripts graph) (%bag-node-type) #:use-module (gnu packages) #:use-module (web uri) @@ -339,18 +340,18 @@ (define (show-help) COUNT dependents")) (display (G_ " --display-missing display the list of missing substitutes")) - (display (G_ " - -s, --system=SYSTEM consider substitutes for SYSTEM--e.g., \"i686-linux\"")) (newline) (display (G_ " -h, --help display this help and exit")) (display (G_ " -V, --version display version information and exit")) (newline) + (show-emulated-build-options-help) + (newline) (show-bug-report-information)) (define %options - (list (option '(#\h "help") #f #f + (cons* (option '(#\h "help") #f #f (lambda args (show-help) (exit 0))) @@ -380,9 +381,7 @@ (define %options (option '("display-missing") #f #f (lambda (opt name arg result) (alist-cons 'display-missing? #t result))) - (option '(#\s "system") #t #f - (lambda (opt name arg result) - (alist-cons 'system arg result))))) + %standard-emulated-build-options)) (define %default-options `((substitute-urls . ,%default-substitute-urls))) -- 2.35.1
guix-patches@HIDDEN
:bug#55220
; Package guix-patches
.
Full text available.Received: (at 55220) by debbugs.gnu.org; 2 May 2022 11:19:58 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Mon May 02 07:19:58 2022 Received: from localhost ([127.0.0.1]:35018 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1nlU5u-0005j0-HH for submit <at> debbugs.gnu.org; Mon, 02 May 2022 07:19:58 -0400 Received: from eggs.gnu.org ([209.51.188.92]:53120) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <othacehe@HIDDEN>) id 1nlU5t-0005ik-F3 for 55220 <at> debbugs.gnu.org; Mon, 02 May 2022 07:19:57 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:54140) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <othacehe@HIDDEN>) id 1nlU5n-0005Z2-35 for 55220 <at> debbugs.gnu.org; Mon, 02 May 2022 07:19:52 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:References:In-Reply-To:Date:Subject:To: From; bh=wQ7OyDYkad7e/MUysSzkGO6zVsY4n2OvNHNnUnBkXQM=; b=pFosVcFbcvZkTCNGC/ID 3EuYqN4e9GchlWd7yXzoyep4TmLGvme0U/8sCIuH5cy7+2DBNSoXJRtmfhdtNO6DnkAyZIrsRkANq +b26+QxNnHV5d2AikUmn6x0lrTWZrjnGPEt4HA010bRyA9V1ylCrh06QcHdQ1h2X/ud0FZIwgGdkR dB1JFy9HWx6gNq8uFehXKR3VjQdy0wgDApE56NEPRN7ZnfKc3ABNIrxTou26R9xTeUzihwxLrC1oq RO+4Voekdoi7RB79feEfAGQEXXiiNVnt1vn3Fjzx2wXFA4jGRc2dkQt/cbpDddqS1eyBejw6GxPfA RItP61xt4DKRvw==; Received: from 71.125.192.77.rev.sfr.net ([77.192.125.71]:33768 helo=localhost.localdomain) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from <othacehe@HIDDEN>) id 1nlU5Q-0004xO-ET; Mon, 02 May 2022 07:19:32 -0400 From: Mathieu Othacehe <othacehe@HIDDEN> To: 55220 <at> debbugs.gnu.org Subject: [PATCH 3/4] ci: Do not rely on hardcoded cross-targets lists. Date: Mon, 2 May 2022 13:18:58 +0200 Message-Id: <20220502111859.13605-3-othacehe@HIDDEN> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220502111859.13605-1-othacehe@HIDDEN> References: <20220502111859.13605-1-othacehe@HIDDEN> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 55220 Cc: Mathieu Othacehe <othacehe@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: -3.3 (---) * gnu/ci.scm (%cross-targets): Remove it ... (cross-jobs): ... and use the targets procedure instead. * etc/release-manifest.scm: Adapt it. Signed-off-by: Mathieu Othacehe <othacehe@HIDDEN> --- etc/release-manifest.scm | 4 ++-- gnu/ci.scm | 15 ++------------- 2 files changed, 4 insertions(+), 15 deletions(-) diff --git a/etc/release-manifest.scm b/etc/release-manifest.scm index e7e64efda4..1098f491ba 100644 --- a/etc/release-manifest.scm +++ b/etc/release-manifest.scm @@ -23,7 +23,7 @@ (use-modules (gnu packages) (guix packages) (guix profiles) - ((gnu ci) #:select (%cross-targets)) + ((gnu platform) #:select (targets)) ((gnu services xorg) #:select (%default-xorg-modules)) (guix utils) (srfi srfi-1) @@ -144,7 +144,7 @@ (define %cross-manifest %packages-to-cross-build))) ;; XXX: Important bits like libsigsegv and libffi don't support ;; RISCV at the moment, so don't require RISCV support. - (delete "riscv64-linux-gnu" %cross-targets)))) + (delete "riscv64-linux-gnu" (targets))))) (define %cross-bootstrap-manifest (manifest diff --git a/gnu/ci.scm b/gnu/ci.scm index 35fd583f75..9de1b54fc8 100644 --- a/gnu/ci.scm +++ b/gnu/ci.scm @@ -55,6 +55,7 @@ (define-module (gnu ci) #:use-module (gnu packages multiprecision) #:use-module (gnu packages make-bootstrap) #:use-module (gnu packages package-management) + #:use-module (gnu platform) #:use-module (gnu system) #:use-module (gnu system image) #:use-module (gnu system vm) @@ -71,7 +72,6 @@ (define-module (gnu ci) image->job %core-packages - %cross-targets channel-source->package arguments->systems @@ -169,17 +169,6 @@ (define (packages-to-cross-build target) (drop-right %core-packages 6) %core-packages)) -(define %cross-targets - '("mips64el-linux-gnu" - "arm-linux-gnueabihf" - "aarch64-linux-gnu" - "powerpc-linux-gnu" - "powerpc64le-linux-gnu" - "riscv64-linux-gnu" - "i586-pc-gnu" ;aka. GNU/Hurd - "i686-w64-mingw32" - "x86_64-w64-mingw32")) - (define (cross-jobs store system) "Return a list of cross-compilation jobs for SYSTEM." (define (from-32-to-64? target) @@ -221,7 +210,7 @@ (define (either proc1 proc2 proc3) package target system)) (packages-to-cross-build target))) (remove (either from-32-to-64? same? pointless?) - %cross-targets))) + (targets)))) (define* (guix-jobs store systems #:key source commit) "Return a list of jobs for Guix itself." -- 2.35.1
guix-patches@HIDDEN
:bug#55220
; Package guix-patches
.
Full text available.Received: (at 55220) by debbugs.gnu.org; 2 May 2022 11:19:43 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Mon May 02 07:19:43 2022 Received: from localhost ([127.0.0.1]:35014 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1nlU5f-0005iP-5k for submit <at> debbugs.gnu.org; Mon, 02 May 2022 07:19:43 -0400 Received: from eggs.gnu.org ([209.51.188.92]:53106) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <othacehe@HIDDEN>) id 1nlU5d-0005iB-4u for 55220 <at> debbugs.gnu.org; Mon, 02 May 2022 07:19:41 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:54138) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <othacehe@HIDDEN>) id 1nlU5X-0005YR-Uq for 55220 <at> debbugs.gnu.org; Mon, 02 May 2022 07:19:35 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:References:In-Reply-To:Date:Subject:To: From; bh=FZ4gFvIl1e/fnCuOMWnJZYiycebBzWcidNNNtN37/Pc=; b=b5YVHvl2zcS6+jn5/lyR Rgt1jwNdg79w+1PJcfCN5Urac0t1w6HqCKvQWHDuGkMTZ7JWLq5W5bnG0C0SJmgrqytlUHSwqLdbc eS1+BKyuv97XWN1/fUgNurZNvgeo1btnTKe7pCZ0Ga4cL2ojv5a2endPfnI9G+xaNSg7WeHV/PMbp MbiwqDGj7h5CnRW0mHwIMftgwwyBvtR9ExARszFT/rqjoB4WyXdu3Ht2YsaD3cwRP0lqP1Dov+E0k 5sgx5fKf1S3/orApkk+Jps74TL5Mr7RRX5AmFyuCZVSrhhPNnMA+6RkaidvpS97pSy5uUqS4cAc81 Jprg5wVlAwJhNA==; Received: from 71.125.192.77.rev.sfr.net ([77.192.125.71]:33768 helo=localhost.localdomain) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from <othacehe@HIDDEN>) id 1nlU5L-0004xO-0o; Mon, 02 May 2022 07:19:26 -0400 From: Mathieu Othacehe <othacehe@HIDDEN> To: 55220 <at> debbugs.gnu.org Subject: [PATCH 2/4] platform: Add discovery support. Date: Mon, 2 May 2022 13:18:57 +0200 Message-Id: <20220502111859.13605-2-othacehe@HIDDEN> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220502111859.13605-1-othacehe@HIDDEN> References: <20220502111859.13605-1-othacehe@HIDDEN> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 55220 Cc: Mathieu Othacehe <othacehe@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: -3.3 (---) * gnu/platform.scm (platform-modules, systems, targets): New procedures. (%platforms): New variable. Signed-off-by: Mathieu Othacehe <othacehe@HIDDEN> --- gnu/platform.scm | 62 +++++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 59 insertions(+), 3 deletions(-) diff --git a/gnu/platform.scm b/gnu/platform.scm index bb6519c71a..481467086a 100644 --- a/gnu/platform.scm +++ b/gnu/platform.scm @@ -17,22 +17,78 @@ ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>. (define-module (gnu platform) + #:use-module (guix discovery) #:use-module (guix records) + #:use-module (guix ui) + #:use-module (srfi srfi-1) #:export (platform platform? platform-target platform-system - platform-linux-architecture)) + platform-linux-architecture + + platform-modules + %platforms + + systems + targets)) ;;; ;;; Platform record. ;;; -;; Description of a platform supported by the GNU system. +;; Description of a platform supported by GNU Guix. +;; +;; The 'target' field must be a valid GNU triplet as defined here: +;; https://www.gnu.org/software/autoconf/manual/autoconf-2.68/html_node/Specifying-Target-Triplets.html. +;; It is used for cross-compilation purposes. +;; +;; The 'system' field is the name of the corresponding system as defined in +;; the (gnu packages bootstrap) module. It can be for instance +;; "aarch64-linux" or "armhf-linux". It is used to emulate a different host +;; architecture, for instance i686-linux on x86_64-linux-gnu, or armhf-linux +;; on x86_64-linux, using the QEMU binfmt transparent emulation mechanism. +;; +;; The 'linux-architecture' is only relevant if the kernel is Linux. In that +;; case, it corresponds to the ARCH variable used when building Linux. (define-record-type* <platform> platform make-platform platform? (target platform-target) ;"x86_64-linux-gnu" (system platform-system) ;"x86_64-linux" - (linux-architecture platform-linux-architecture ;"amd64" + (linux-architecture platform-linux-architecture ;"x86" (default #f))) + +;;; +;;; Platforms. +;;; + +(define (platform-modules) + "Return the list of platform modules." + (all-modules (map (lambda (entry) + `(,entry . "gnu/platforms")) + %load-path) + #:warn warn-about-load-error)) + +(define %platforms + ;; The list of publically-known platforms. + (delay (fold-module-public-variables (lambda (obj result) + (if (platform? obj) + (cons obj result) + result)) + '() + (platform-modules)))) + + +;;; +;;; Systems & Targets. +;;; + +(define (systems) + "Return the list of supported systems." + (delete-duplicates + (filter-map platform-system (force %platforms)))) + +(define (targets) + "Return the list of supported targets." + (map platform-target (force %platforms))) -- 2.35.1
guix-patches@HIDDEN
:bug#55220
; Package guix-patches
.
Full text available.Received: (at 55220) by debbugs.gnu.org; 2 May 2022 11:19:25 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Mon May 02 07:19:25 2022 Received: from localhost ([127.0.0.1]:35010 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1nlU5M-0005hp-K4 for submit <at> debbugs.gnu.org; Mon, 02 May 2022 07:19:25 -0400 Received: from eggs.gnu.org ([209.51.188.92]:53032) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <othacehe@HIDDEN>) id 1nlU5L-0005hZ-38 for 55220 <at> debbugs.gnu.org; Mon, 02 May 2022 07:19:23 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:54134) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <othacehe@HIDDEN>) id 1nlU5F-0005Vk-Qs for 55220 <at> debbugs.gnu.org; Mon, 02 May 2022 07:19:17 -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:Subject:To:From:in-reply-to: references; bh=atjkmY7MuFCpgH0Drkvy3M+CpV/ku/LfXbH4jGEP9f4=; b=fW325wdVSQlqlv uFTPo2gWWt1S/0QT/+wOtGLA0OdRt8ui4JR/IIAjJxKFFNrlAv3chL8zWdvu8reJsqh5POziojF4r 41XfQWkQOcDQ+btfiisWfEzEXhx8h0dnHQMBt8hQJzKMUU5spLRn2RkiiI7KrsqpTE2/d4Ho9yr6a Mpk3OLJItoMJv1TIkc7LgAu4dWPEeErOnW3IZr5nJMJqjlFEE49GPK1tpbpTq9kfudqx7tNq1QvaF IDRfSrcleewEXsD+IlKBc4nOiIO6m2mFmO5TR6OrgAyzgFMZilnZcTDrFcQkTNKdCss0ycKMtSyqR fRDaXB+uhNLXp45LCQOw==; Received: from 71.125.192.77.rev.sfr.net ([77.192.125.71]:33768 helo=localhost.localdomain) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from <othacehe@HIDDEN>) id 1nlU55-0004xO-MF; Mon, 02 May 2022 07:19:10 -0400 From: Mathieu Othacehe <othacehe@HIDDEN> To: 55220 <at> debbugs.gnu.org Subject: [PATCH 1/4] platform: Introduce new platforms. Date: Mon, 2 May 2022 13:18:56 +0200 Message-Id: <20220502111859.13605-1-othacehe@HIDDEN> X-Mailer: git-send-email 2.35.1 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 55220 Cc: Mathieu Othacehe <othacehe@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: -3.3 (---) * gnu/platforms/intel.scm: New file. * gnu/platforms/mips.scm: Ditto. * gnu/platforms/powerpc.scm: Ditto. * gnu/platforms/riscv.scm: Ditto. * gnu/local.mk (GNU_SYSTEM_MODULES): Add them. Signed-off-by: Mathieu Othacehe <othacehe@HIDDEN> --- gnu/local.mk | 4 ++++ gnu/platforms/intel.scm | 48 +++++++++++++++++++++++++++++++++++++++ gnu/platforms/mips.scm | 29 +++++++++++++++++++++++ gnu/platforms/powerpc.scm | 36 +++++++++++++++++++++++++++++ gnu/platforms/riscv.scm | 29 +++++++++++++++++++++++ 5 files changed, 146 insertions(+) create mode 100644 gnu/platforms/intel.scm create mode 100644 gnu/platforms/mips.scm create mode 100644 gnu/platforms/powerpc.scm create mode 100644 gnu/platforms/riscv.scm diff --git a/gnu/local.mk b/gnu/local.mk index ad7b0a1480..6dcb143647 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -632,6 +632,10 @@ GNU_SYSTEM_MODULES = \ \ %D%/platforms/arm.scm \ %D%/platforms/hurd.scm \ + %D%/platforms/intel.scm \ + %D%/platforms/mips.scm \ + %D%/platforms/powerpc.scm \ + %D%/platforms/riscv.scm \ \ %D%/services.scm \ %D%/services/admin.scm \ diff --git a/gnu/platforms/intel.scm b/gnu/platforms/intel.scm new file mode 100644 index 0000000000..fb1be04cfc --- /dev/null +++ b/gnu/platforms/intel.scm @@ -0,0 +1,48 @@ +;;; GNU Guix --- Functional package management for GNU +;;; Copyright © 2022 Mathieu Othacehe <othacehe@HIDDEN> +;;; +;;; This file is part of GNU Guix. +;;; +;;; GNU Guix is free software; you can redistribute it and/or modify it +;;; under the terms of the GNU General Public License as published by +;;; the Free Software Foundation; either version 3 of the License, or (at +;;; your option) any later version. +;;; +;;; GNU Guix is distributed in the hope that it will be useful, but +;;; WITHOUT ANY WARRANTY; without even the implied warranty of +;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;;; GNU General Public License for more details. +;;; +;;; You should have received a copy of the GNU General Public License +;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>. + +(define-module (gnu platforms intel) + #:use-module (gnu platform) + #:use-module (gnu packages linux) + #:use-module (guix records) + #:export (intel32-linux + intel64-linux + intel32-mingw + intel64-mingw)) + +(define intel32-linux + (platform + (target "i686-linux-gnu") + (system "i686-linux") + (linux-architecture "x86"))) + +(define intel64-linux + (platform + (target "x86_64-linux-gnu") + (system "x86_64-linux") + (linux-architecture "x86"))) + +(define intel32-mingw + (platform + (target "i686-w64-mingw32") + (system #f))) + +(define intel64-mingw + (platform + (target "x86_64-w64-mingw32") + (system #f))) diff --git a/gnu/platforms/mips.scm b/gnu/platforms/mips.scm new file mode 100644 index 0000000000..84a492699d --- /dev/null +++ b/gnu/platforms/mips.scm @@ -0,0 +1,29 @@ +;;; GNU Guix --- Functional package management for GNU +;;; Copyright © 2022 Mathieu Othacehe <othacehe@HIDDEN> +;;; +;;; This file is part of GNU Guix. +;;; +;;; GNU Guix is free software; you can redistribute it and/or modify it +;;; under the terms of the GNU General Public License as published by +;;; the Free Software Foundation; either version 3 of the License, or (at +;;; your option) any later version. +;;; +;;; GNU Guix is distributed in the hope that it will be useful, but +;;; WITHOUT ANY WARRANTY; without even the implied warranty of +;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;;; GNU General Public License for more details. +;;; +;;; You should have received a copy of the GNU General Public License +;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>. + +(define-module (gnu platforms mips) + #:use-module (gnu platform) + #:use-module (gnu packages linux) + #:use-module (guix records) + #:export (mips64-linux)) + +(define mips64-linux + (platform + (target "mips64el-linux-gnu") + (system "mips64el-linux") + (linux-architecture "mips"))) diff --git a/gnu/platforms/powerpc.scm b/gnu/platforms/powerpc.scm new file mode 100644 index 0000000000..8fadfe88de --- /dev/null +++ b/gnu/platforms/powerpc.scm @@ -0,0 +1,36 @@ +;;; GNU Guix --- Functional package management for GNU +;;; Copyright © 2022 Mathieu Othacehe <othacehe@HIDDEN> +;;; +;;; This file is part of GNU Guix. +;;; +;;; GNU Guix is free software; you can redistribute it and/or modify it +;;; under the terms of the GNU General Public License as published by +;;; the Free Software Foundation; either version 3 of the License, or (at +;;; your option) any later version. +;;; +;;; GNU Guix is distributed in the hope that it will be useful, but +;;; WITHOUT ANY WARRANTY; without even the implied warranty of +;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;;; GNU General Public License for more details. +;;; +;;; You should have received a copy of the GNU General Public License +;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>. + +(define-module (gnu platforms powerpc) + #:use-module (gnu platform) + #:use-module (gnu packages linux) + #:use-module (guix records) + #:export (powerpc-linux + powerpc64le-linux)) + +(define powerpc-linux + (platform + (target "powerpc-linux-gnu") + (system "powerpc-linux") + (linux-architecture "powerpc"))) + +(define powerpc64le-linux + (platform + (target "powerpc64le-linux-gnu") + (system "powerpc64le-linux") + (linux-architecture "powerpc"))) diff --git a/gnu/platforms/riscv.scm b/gnu/platforms/riscv.scm new file mode 100644 index 0000000000..29a34402a2 --- /dev/null +++ b/gnu/platforms/riscv.scm @@ -0,0 +1,29 @@ +;;; GNU Guix --- Functional package management for GNU +;;; Copyright © 2022 Mathieu Othacehe <othacehe@HIDDEN> +;;; +;;; This file is part of GNU Guix. +;;; +;;; GNU Guix is free software; you can redistribute it and/or modify it +;;; under the terms of the GNU General Public License as published by +;;; the Free Software Foundation; either version 3 of the License, or (at +;;; your option) any later version. +;;; +;;; GNU Guix is distributed in the hope that it will be useful, but +;;; WITHOUT ANY WARRANTY; without even the implied warranty of +;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;;; GNU General Public License for more details. +;;; +;;; You should have received a copy of the GNU General Public License +;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>. + +(define-module (gnu platforms riscv) + #:use-module (gnu platform) + #:use-module (gnu packages linux) + #:use-module (guix records) + #:export (riscv64-linux)) + +(define riscv64-linux + (platform + (target "riscv64-linux-gnu") + (system "riscv64-linux") + (linux-architecture "riscv"))) -- 2.35.1
guix-patches@HIDDEN
:bug#55220
; Package guix-patches
.
Full text available.Received: (at submit) by debbugs.gnu.org; 2 May 2022 11:17:34 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Mon May 02 07:17:34 2022 Received: from localhost ([127.0.0.1]:34994 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1nlU3a-0005dK-Dk for submit <at> debbugs.gnu.org; Mon, 02 May 2022 07:17:34 -0400 Received: from lists.gnu.org ([209.51.188.17]:53326) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <othacehe@HIDDEN>) id 1nlU3V-0005Ye-6c for submit <at> debbugs.gnu.org; Mon, 02 May 2022 07:17:30 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:46004) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <othacehe@HIDDEN>) id 1nlU3U-0006pG-W5 for guix-patches@HIDDEN; Mon, 02 May 2022 07:17:29 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:54116) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <othacehe@HIDDEN>) id 1nlU3U-0005M3-MU for guix-patches@HIDDEN; Mon, 02 May 2022 07:17:28 -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:Subject:To:From:in-reply-to: references; bh=iQH5HxaJB5BGYHtxdU+qLWqTMZdpS/0ImMp1K1NABGI=; b=ZnwvtIproNRZ+t tvKcQ4s4xB0GsTbM3GuJy/CY6HrJ8MfZ+XoXD6mRhR689/RtS/DuiTXhSDNHSgsbbY/3+SG08shuX FShzl0ig1Czks2NkuImGfGNvTjcm9xYXxCWIeIPMTH/JnDHjDsUGSd3L2qEkeRDke0uFpFTp7S1mS ENYxANMcXX+hbWLTjy4gzzEsgUkZIc6NheBx1+pbOeIULACptaXw+WwRojqHhdLCPNBirRBVQ+GGV tc5PB1YxcDJCf7/ppDuSwlVTGXFw8+j+3Kn+cg98Q0fRMX1lr2s/1/4fBR9eMqh1P7xZeJN9AAJu0 xieB9gPvp+uaHluYc+EQ==; Received: from 71.125.192.77.rev.sfr.net ([77.192.125.71]:33766 helo=localhost.localdomain) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from <othacehe@HIDDEN>) id 1nlU3U-0003Em-6j; Mon, 02 May 2022 07:17:28 -0400 From: Mathieu Othacehe <othacehe@HIDDEN> To: guix-patches@HIDDEN Subject: [PATCH 0/4] Add --list-systems and --list-targets options. Date: Mon, 2 May 2022 13:17:15 +0200 Message-Id: <20220502111715.13500-1-othacehe@HIDDEN> X-Mailer: git-send-email 2.35.1 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: submit Cc: Mathieu Othacehe <othacehe@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: -3.3 (---) Hello, Most build commands support --system and --target options. Those options suffer from multiple issues: they are never listed and never checked. For --system, this is a real issue as aside from reading the (gnu packages bootstrap) module content the user cannot know what are the supported arguments. Providing a wrong system also fails badly: mathieu@meije ~$ guix build hello --system=arm-linux Backtrace: In guix/memoization.scm: 101:0 19 (_ #<hash-table 7f1d5d82a340 0/31> #<package tar@HIDDEN …> …) ... ice-9/boot-9.scm:1685:16: In procedure raise-exception: dynamic linker name not known for this system "arm-linux" For --target, any GNU supported triplet can possibly work but providing a wrong triplet will also fail badly: mathieu@meije ~$ guix build hello --target=arm-linux Backtrace: In guix/store.scm: 1385:9 19 (map/accumulate-builds #<store-connection 256.99 7f5bd…> …) ... ice-9/boot-9.scm:1685:16: In procedure raise-exception: dynamic linker name not known for this system "arm-linux" This patchset adds two new options: --list-systems and --list-targets that list the supported systems and targets. The arguments passed to --system and --target options are also checked: mathieu@meije ~/guix [env]$ ./pre-inst-env guix build hello --system=arm-linux guix build: error: 'arm-linux' is not a supported system. mathieu@meije ~/guix [env]$ ./pre-inst-env guix build hello --target=arm-linux guix build: error: 'arm-linux' is not a supported target. Thanks, Mathieu Mathieu Othacehe (4): platform: Introduce new platforms. platform: Add discovery support. ci: Do not rely on hardcoded cross-targets lists. scripts: Add --list-systems and --list-targets options. doc/guix.texi | 8 ++++ etc/release-manifest.scm | 4 +- gnu/ci.scm | 15 +------ gnu/local.mk | 4 ++ gnu/platform.scm | 62 ++++++++++++++++++++++++-- gnu/platforms/intel.scm | 48 +++++++++++++++++++++ gnu/platforms/mips.scm | 29 +++++++++++++ gnu/platforms/powerpc.scm | 36 ++++++++++++++++ gnu/platforms/riscv.scm | 29 +++++++++++++ guix/scripts/archive.scm | 20 +++------ guix/scripts/build.scm | 84 ++++++++++++++++++++++++++++++------ guix/scripts/environment.scm | 11 ++--- guix/scripts/graph.scm | 15 +++---- guix/scripts/pack.scm | 20 +++------ guix/scripts/pull.scm | 12 +++--- guix/scripts/size.scm | 13 +++--- guix/scripts/weather.scm | 11 +++-- 17 files changed, 329 insertions(+), 92 deletions(-) create mode 100644 gnu/platforms/intel.scm create mode 100644 gnu/platforms/mips.scm create mode 100644 gnu/platforms/powerpc.scm create mode 100644 gnu/platforms/riscv.scm -- 2.35.1
Mathieu Othacehe <othacehe@HIDDEN>
:guix-patches@HIDDEN
.
Full text available.guix-patches@HIDDEN
:bug#55220
; Package guix-patches
.
Full text available.
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997 nCipher Corporation Ltd,
1994-97 Ian Jackson.