From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id sG2gCiPur14NZwAA0tVLHw (envelope-from ) for ; Mon, 04 May 2020 10:27:47 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id iPF7Dy7ur16fAgAAbx9fmQ (envelope-from ) for ; Mon, 04 May 2020 10:27:58 +0000 Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:470:142::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 2708E941F78 for ; Mon, 4 May 2020 10:27:56 +0000 (UTC) Received: from localhost ([::1]:49084 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jVYKJ-0006lb-FZ for larch@yhetil.org; Mon, 04 May 2020 06:27:55 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:41080) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jVYJS-0005gY-H3 for guix-patches@gnu.org; Mon, 04 May 2020 06:27:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:47511) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jVYJS-0001Ub-5c for guix-patches@gnu.org; Mon, 04 May 2020 06:27:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1jVYJS-00054v-2H for guix-patches@gnu.org; Mon, 04 May 2020 06:27:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#41074] [PATCH] gnu: qemu-minimal: Only build for the host's architecture. Resent-From: Efraim Flashner Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 04 May 2020 10:27:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 41074 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 41074@debbugs.gnu.org Cc: Efraim Flashner X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.158858799019479 (code B ref -1); Mon, 04 May 2020 10:27:01 +0000 Received: (at submit) by debbugs.gnu.org; 4 May 2020 10:26:30 +0000 Received: from localhost ([127.0.0.1]:59057 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jVYIr-000542-K8 for submit@debbugs.gnu.org; Mon, 04 May 2020 06:26:30 -0400 Received: from lists.gnu.org ([209.51.188.17]:50384) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jVYIp-00053v-SH for submit@debbugs.gnu.org; Mon, 04 May 2020 06:26:24 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:41008) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jVYIp-00054f-MM for guix-patches@gnu.org; Mon, 04 May 2020 06:26:23 -0400 Received: from flashner.co.il ([178.62.234.194]:50410) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jVYIo-00085J-Jw for guix-patches@gnu.org; Mon, 04 May 2020 06:26:23 -0400 Received: from localhost (unknown [188.120.128.132]) by flashner.co.il (Postfix) with ESMTPSA id C644540281; Mon, 4 May 2020 10:25:49 +0000 (UTC) From: Efraim Flashner Date: Mon, 4 May 2020 13:25:15 +0300 Message-Id: <20200504102515.18650-1-efraim@flashner.co.il> X-Mailer: git-send-email 2.26.2 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=178.62.234.194; envelope-from=efraim@flashner.co.il; helo=flashner.co.il X-detected-operating-system: by eggs.gnu.org: First seen = 2020/05/04 06:25:50 X-ACL-Warn: Detected OS = ??? 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, URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-Spam-Score: -1.3 (-) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-Spam-Score: -2.3 (--) 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" X-Scanner: scn0 X-Spam-Score: 3.29 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 2001:470:142::17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Scan-Result: default: False [3.29 / 13.00]; RCVD_VIA_SMTP_AUTH(0.00)[]; GENERIC_REPUTATION(0.00)[-0.49437531282824]; TO_DN_SOME(0.00)[]; R_SPF_ALLOW(0.00)[+ip6:2001:470:142::/48:c]; IP_REPUTATION_HAM(0.00)[asn: 22989(0.14), country: US(-0.00), ip: 2001:470:142::17(-0.49)]; DWL_DNSWL_FAIL(0.00)[2001:470:142::17:server fail]; MX_GOOD(-0.50)[cached: eggs.gnu.org]; RCPT_COUNT_TWO(0.00)[2]; MAILLIST(-0.20)[mailman]; FORGED_RECIPIENTS_MAILLIST(0.00)[]; RCVD_IN_DNSWL_FAIL(0.00)[2001:470:142::17:server fail]; RCVD_TLS_LAST(0.00)[]; R_DKIM_NA(0.00)[]; ASN(0.00)[asn:22989, ipnet:2001:470:142::/48, country:US]; MIME_TRACE(0.00)[0:+]; TAGGED_FROM(0.00)[larch=yhetil.org]; ARC_NA(0.00)[]; RECEIVED_SPAMHAUS_XBL(3.00)[188.120.128.132:received]; FROM_NEQ_ENVFROM(0.00)[efraim@flashner.co.il,guix-patches-bounces@gnu.org]; FROM_HAS_DN(0.00)[]; URIBL_BLOCKED(0.00)[elephly.net:email,uwaterloo.ca:email,flashner.co.il:email,netris.org:email,gnu.org:email]; MIME_GOOD(-0.10)[text/plain]; DMARC_NA(0.00)[flashner.co.il]; HAS_LIST_UNSUB(-0.01)[]; BAD_REP_POLICIES(0.10)[]; RECEIVED_SPAMHAUS_PBL(0.00)[188.120.128.132:received]; MID_CONTAINS_FROM(1.00)[]; RCVD_COUNT_SEVEN(0.00)[10]; FORGED_SENDER_MAILLIST(0.00)[] X-TUID: 9PFlwtVhEtzq * gnu/packages/virtualization.scm (qemu-minimal)[arguments]: Adjust configure-flags so that each architecture only builds for its native architectures. [synopsis]: Adjust to clarify it's only for the host's architecture. --- I tested this with building grub and a vm-image and both seem to have worked without any regressions. --- gnu/packages/virtualization.scm | 31 +++++++++++++++++++++++++------ 1 file changed, 25 insertions(+), 6 deletions(-) diff --git a/gnu/packages/virtualization.scm b/gnu/packages/virtualization.scm index b9ac18820f..e5d678e685 100644 --- a/gnu/packages/virtualization.scm +++ b/gnu/packages/virtualization.scm @@ -1,7 +1,7 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2013, 2014, 2015, 2016, 2017, 2020 Ludovic Courtès ;;; Copyright © 2015, 2016, 2017, 2018 Mark H Weaver -;;; Copyright © 2016, 2017, 2018. 2019 Efraim Flashner +;;; Copyright © 2016, 2017, 2018. 2019, 2020 Efraim Flashner ;;; Copyright © 2016, 2017 Ricardo Wurmus ;;; Copyright © 2017 Alex Vong ;;; Copyright © 2017 Andy Patterson @@ -99,7 +99,8 @@ #:use-module ((guix licenses) #:prefix license:) #:use-module (guix packages) #:use-module (guix utils) - #:use-module (srfi srfi-1)) + #:use-module (srfi srfi-1) + #:use-module (ice-9 match)) (define (qemu-patch commit file-name sha256) "Return an origin for COMMIT." @@ -274,15 +275,33 @@ server and embedded PowerPC, and S390 guests.") (supported-systems (delete "mips64el-linux" %supported-systems)))) (define-public qemu-minimal - ;; QEMU without GUI support. + ;; QEMU without GUI support, only supporting the host's architecture (package (inherit qemu) (name "qemu-minimal") - (synopsis "Machine emulator and virtualizer (without GUI)") + (synopsis + "Machine emulator and virtualizer (without GUI) for the host architecture") (arguments (substitute-keyword-arguments (package-arguments qemu) ((#:configure-flags _ '(list)) - ;; Restrict to the targets supported by Guix. - ''("--target-list=i386-softmmu,x86_64-softmmu,mips64el-softmmu,arm-softmmu,aarch64-softmmu")))) + ;; Restrict to the host's architecture. + `(,@(match (or (%current-system) + (%current-target-system)) + ("x86-64-linux" + ''("--target-list=i386-softmmu,x86_64-softmmu")) + ("i686-linux" + ''("--target-list=i386-softmmu")) + ("mips64el-linux" + ''("--target-list=mips64el-softmmu")) + ("aarch64-linux" + ''("--target-list=arm-softmmu,aarch64-softmmu")) + ("armhf-linux" + ''("--target-list=arm-softmmu")) + ((or "powerpc64-linux" "powerpc64le-linux") + ''("--target-list=ppc-softmmu,ppc64-softmmu")) + ("powerpc-linux" + ''("--target-list=ppc-softmmu")) + (_ ; An empty list actually builds all the targets. + ''())))))) ;; Remove dependencies on optional libraries, notably GUI libraries. (native-inputs (fold alist-delete (package-native-inputs qemu) -- 2.26.2