From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id yGz2Bt3MAWOB/AAAbAwnHQ (envelope-from ) for ; Sun, 21 Aug 2022 08:12:45 +0200 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id 0GMaB93MAWO+VQEA9RJhRA (envelope-from ) for ; Sun, 21 Aug 2022 08:12:45 +0200 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id C0A711C100 for ; Sun, 21 Aug 2022 08:12:44 +0200 (CEST) Received: from localhost ([::1]:60298 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oPeCR-0003Up-6s for larch@yhetil.org; Sun, 21 Aug 2022 02:12:43 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:58434) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oPeBu-0003TN-Mg for guix-patches@gnu.org; Sun, 21 Aug 2022 02:12:11 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:43946) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oPeBm-0005iX-59 for guix-patches@gnu.org; Sun, 21 Aug 2022 02:12:10 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oPeBl-00081F-Pu for guix-patches@gnu.org; Sun, 21 Aug 2022 02:12:01 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#57314] [PATCH] guix system: Use standard cross and native build options. Resent-From: Thiago Jung Bauermann Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 21 Aug 2022 06:12:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 57314 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 57314@debbugs.gnu.org Cc: Thiago Jung Bauermann X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.166106231930815 (code B ref -1); Sun, 21 Aug 2022 06:12:01 +0000 Received: (at submit) by debbugs.gnu.org; 21 Aug 2022 06:11:59 +0000 Received: from localhost ([127.0.0.1]:33695 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oPeBj-00080x-7m for submit@debbugs.gnu.org; Sun, 21 Aug 2022 02:11:59 -0400 Received: from lists.gnu.org ([209.51.188.17]:60924) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oPeBg-00080p-ML for submit@debbugs.gnu.org; Sun, 21 Aug 2022 02:11:58 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:41432) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oPeBX-0003T6-Hz for guix-patches@gnu.org; Sun, 21 Aug 2022 02:11:49 -0400 Received: from mx.kolabnow.com ([212.103.80.153]:45796) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oPeBR-0005i1-Q6 for guix-patches@gnu.org; Sun, 21 Aug 2022 02:11:46 -0400 Received: from localhost (unknown [127.0.0.1]) by mx.kolabnow.com (Postfix) with ESMTP id F3CBE41883 for ; Sun, 21 Aug 2022 08:11: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 :message-id:date:date:subject:subject:from:from:received :received:received; s=dkim20160331; t=1661062294; x=1662876695; bh=N+HMLU1ZjGuk7PZV86aEjW7sHKOXvoPZBajKpYnZDeM=; b=EbS9iJHijy7n rUuAOD1ymQRqmPuxk+JPtf/cmEajsqFBhymhNItIRR3ffAidcbF8VdZYHKgvoAcM 3eEY2D/q4vDnUGuCU4/7yvxPM591EhL7Z116MrCHSl/FwiEE5f1XmR6qrukqZ7T4 vIYU+1/+WAsy19F55iUnTeStPrQcJ0Oc0VBAEpaJTO6xXjQZrl7C04D0pkEAnXii Qc5a1euUasy8RpgW1ae/PR8RC71iD/5E4FSlO201Ca6K6hLxLG//MZ21gT/N5VD0 gG7vGwJMuYrczUmObUq9iaG/P1VwR2okZTmAa+C/FRZ0Eq2wSCtCC7wuxOhjOPaH Yj4bV8z8Ps1nkvf7iKRhkEe7mIJFg2OOOUz8/6gnXTyUhaGLQZi1lliqVfYWx2c4 wDgajhAUNDhjwHtUfqmNXKgHqfRYrQ74LSU4eDKAQFgljJUNHuhM/vmSh3xVrj5w XzsYticSGq/3z0H3sazhhrXAm9zxyDMfbHBtwoO97PUnC0PuYooQzFxQ58rMieiY PkZytVg7HDZNY+Tr3UZ9Ju7CRAfb1kYuBY0agXmM5V3c8WMddwvV9A+ObbxoYQq7 mXwuX6IYtcHrXWVzhAmvoG56AJO44o8+kmt2D9dlhs1DusrYUjI0fshOPHCctV0U tU28VspcLD9fHJ2lOH7KqMYotIiicK0= X-Virus-Scanned: amavisd-new at mykolab.com Received: from mx.kolabnow.com ([127.0.0.1]) by localhost (ext-mx-out003.mykolab.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id b2BCozpD_Rhc for ; Sun, 21 Aug 2022 08:11:34 +0200 (CEST) Received: from int-mx001.mykolab.com (unknown [10.9.13.1]) by mx.kolabnow.com (Postfix) with ESMTPS id B86A440F97 for ; Sun, 21 Aug 2022 08:11:33 +0200 (CEST) Received: from ext-subm003.mykolab.com (unknown [10.9.6.3]) by int-mx001.mykolab.com (Postfix) with ESMTPS id 80622156; Sun, 21 Aug 2022 08:11:33 +0200 (CEST) Date: Sun, 21 Aug 2022 03:11:24 -0300 Message-Id: <20220821061125.47120-1-bauermann@kolabnow.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=212.103.80.153; envelope-from=bauermann@kolabnow.com; 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, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: "Guix-patches" Reply-to: Thiago Jung Bauermann X-ACL-Warn: , Thiago Jung Bauermann via Guix-patches From: Thiago Jung Bauermann via Guix-patches via X-Migadu-Flow: FLOW_IN X-Migadu-To: larch@yhetil.org X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1661062364; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=N+HMLU1ZjGuk7PZV86aEjW7sHKOXvoPZBajKpYnZDeM=; b=SF/vSoVGqXDjydUmsWDvjMd69ElCZ1lM+YmtMoFDfD0YwhM5RPav5Yu/YxpYpGgRtkKrk3 FbGBCYvqlomTHjSc5SesTSL3ZVSgI03xtx1lXaJETGlHBBaHSo2IaJfXW5+IBTHGLVCDgC u1HV9AtSuiNvNB9daDuqe9ns4oocx0ohe9DHxRVL3hxcor2lVSCNWEu6xnN+4k5hHWpnbX M0Lj5YqfYe84a0sTnSNA3AuGGDmFuBF7pL95muLEwVHUBP9sy0Y3ZRwNKFQOG2I0erHXGk OcgwSbnGdwlq2YhzcKrHJODL7d0JKBpIfSbARN3SyA2O1HaUEMXqrg3t8dVcOQ== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1661062364; a=rsa-sha256; cv=none; b=LZjY0nB/63GZ5x7KoK9btVovJkyy2o6DUhez/263BXSRlkqjMy8+alQxQbQj5rENuc2mBH RHfuR2oWRUzBvIJIGfMQUzq0e0KcsVp0SdakY7Ci16XeMjYx9wA9gE3PUAHgDsjtpGCkBF WIFkO2TX9Gjl0uOcSlpDQskYe2mR9NPglHqsRnjNtvbaqly3eS0RcEVBQz4gV49nS8Wc3B zISRm5QN8yfH/ewp2Tii4CquH0ZlogjNZhW6wU/ovoMiMsSeQzzCpamZxvv1B3jq4VFOhp hwDztj3KFbfEJmEkxfVSk+1fZiV5Uh7FOiQJ+W9Zb7aVXBQ0Bdgw7kxHmPBhsg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=kolabnow.com header.s=dkim20160331 header.b=EbS9iJHi; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: -3.34 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=kolabnow.com header.s=dkim20160331 header.b=EbS9iJHi; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: C0A711C100 X-Spam-Score: -3.34 X-Migadu-Scanner: scn0.migadu.com X-TUID: 7akro6noLMYg This change prevents guix system from erroring out with an ugly backtrace when it's passed an invalid value to the “--system” or “--target” option. It also adds the “--list-systems” and “--list-targets” options. The manual section about guix system doesn't mention the “--target” option, so add it there. * guix/scripts/system (show-help): Call show-cross-build-options-help and show-native-build-options-help. (%options): Remove own implementation of “system” and “target” options and use the ones in %standard-cross-build-options and %standard-native-build-options. * doc/guix.texi (Invoking guix system): Document “--target” option. --- doc/guix.texi | 5 +++++ guix/scripts/system.scm | 16 +++++++--------- 2 files changed, 12 insertions(+), 9 deletions(-) diff --git a/doc/guix.texi b/doc/guix.texi index 023b48ae3507..e8f05ffdeb51 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -37533,6 +37533,11 @@ Installation Image}). Attempt to build for @var{system} instead of the host system type. This works as per @command{guix build} (@pxref{Invoking guix build}). +@item --target=@var{triplet} +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 --derivation @itemx -d Return the derivation file name of the given operating system without diff --git a/guix/scripts/system.scm b/guix/scripts/system.scm index be6e83994100..443e9d3282fc 100644 --- a/guix/scripts/system.scm +++ b/guix/scripts/system.scm @@ -1046,6 +1046,10 @@ (define (show-help) for 'describe' and 'list-generations', list installed packages matching REGEXP")) (newline) + (show-cross-build-options-help) + (newline) + (show-native-build-options-help) + (newline) (display (G_ " -h, --help display this help and exit")) (display (G_ " @@ -1136,14 +1140,6 @@ (define %options (let ((level (string->number* arg))) (alist-cons 'verbosity level (alist-delete 'verbosity 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 '(#\r "root") #t #f (lambda (opt name arg result) (alist-cons 'gc-root arg result))) @@ -1153,7 +1149,9 @@ (define %options (option '(#\I "list-installed") #f #t (lambda (opt name arg result) (alist-cons 'list-installed (or arg "") result))) - %standard-build-options)) + (append %standard-build-options + %standard-cross-build-options + %standard-native-build-options))) (define %default-options ;; Alist of default option values.