From patchwork Sun Aug 22 19:24:06 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Efraim Flashner X-Patchwork-Id: 32238 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 2989927BC78; Mon, 23 Aug 2021 07:23:18 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.9 required=5.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_MSPIKE_H2,SPF_HELO_PASS autolearn=unavailable autolearn_force=no version=3.4.2 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id E56E127BC6B for ; Mon, 23 Aug 2021 07:23:17 +0100 (BST) Received: from localhost ([::1]:60302 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mI3Mb-0007Ml-1g for patchwork@mira.cbaines.net; Mon, 23 Aug 2021 02:23:17 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:33246) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mI3MM-0007Mc-5v for guix-patches@gnu.org; Mon, 23 Aug 2021 02:23:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:57038) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mI3ML-0002PF-V5 for guix-patches@gnu.org; Mon, 23 Aug 2021 02:23:01 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mI3ML-0001X1-RM for guix-patches@gnu.org; Mon, 23 Aug 2021 02:23:01 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#50171] [PATCH] gnu: qemu-minimal: Don't build static binaries. Resent-From: Efraim Flashner Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 23 Aug 2021 06:23:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 50171 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 50171@debbugs.gnu.org X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.16296997415816 (code B ref -1); Mon, 23 Aug 2021 06:23:01 +0000 Received: (at submit) by debbugs.gnu.org; 23 Aug 2021 06:22:21 +0000 Received: from localhost ([127.0.0.1]:40351 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mI3Lg-0001Vj-PD for submit@debbugs.gnu.org; Mon, 23 Aug 2021 02:22:20 -0400 Received: from lists.gnu.org ([209.51.188.17]:35342) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mI3Le-0001Vc-QB for submit@debbugs.gnu.org; Mon, 23 Aug 2021 02:22:19 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:33124) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mI3Le-0007FJ-F9 for guix-patches@gnu.org; Mon, 23 Aug 2021 02:22:18 -0400 Received: from flashner.co.il ([178.62.234.194]:36222) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mI3Lc-0001mU-UU for guix-patches@gnu.org; Mon, 23 Aug 2021 02:22:18 -0400 Received: from localhost (unknown [141.226.169.107]) by flashner.co.il (Postfix) with ESMTPSA id C7D7640990 for ; Mon, 23 Aug 2021 06:22:15 +0000 (UTC) Date: Sun, 22 Aug 2021 22:24:06 +0300 From: Efraim Flashner Message-ID: Mail-Followup-To: guix-patches@gnu.org MIME-Version: 1.0 Content-Disposition: inline X-TUID: D0J0tI4DgRQi Received-SPF: pass client-ip=178.62.234.194; envelope-from=efraim@flashner.co.il; helo=flashner.co.il X-Spam_score_int: -3 X-Spam_score: -0.4 X-Spam_bar: / X-Spam_report: (-0.4 / 5.0 requ) BAYES_00=-1.9, DATE_IN_PAST_06_12=1.543, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=no 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+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" X-getmail-retrieved-from-mailbox: Patches * gnu/packages/virtualization.scm (qemu-minimal)[arguments]: Remove inherited phases for static binaries. [native-inputs]: Remove glib:static, pcre:static and zlib:static. [outputs]: Remove static output. --- This drops the package size by about 55%. If we can drop the firmware files too that'd drop it down to about 42MB, from 260MB with this patch. We probably don't need the firmware for what we're using qemu-minimal for, but I haven't checked to see if it gets pulled in automagically when we spin up VMs for making images. --- gnu/packages/virtualization.scm | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) base-commit: 9e3b68203cba2b1bd96e524d3ae9dfc3336a72f7 diff --git a/gnu/packages/virtualization.scm b/gnu/packages/virtualization.scm index 1bbcb46b99..ceae1437c0 100644 --- a/gnu/packages/virtualization.scm +++ b/gnu/packages/virtualization.scm @@ -372,6 +372,7 @@ server and embedded PowerPC, and S390 guests.") (package (inherit qemu) (name "qemu-minimal") + (outputs '("out" "doc")) (synopsis "Machine emulator and virtualizer (without GUI) for the host architecture") (arguments @@ -407,11 +408,16 @@ server and embedded PowerPC, and S390 guests.") "--target-list=riscv32-softmmu,riscv64-softmmu") (else ; An empty list actually builds all the targets. '())))) - `(cons ,target-list-arg ,configure-flags))))) + `(cons ,target-list-arg ,configure-flags))) + ((#:phases phases) + `(modify-phases ,phases + (delete 'configure-user-static) + (delete 'build-user-static) + (delete 'install-user-static))))) ;; Remove dependencies on optional libraries, notably GUI libraries. (native-inputs (fold alist-delete (package-native-inputs qemu) - '("gettext"))) + '("gettext" "glib:static" "pcre:static" "zlib:static"))) (inputs (fold alist-delete (package-inputs qemu) '("libusb" "mesa" "sdl2" "spice" "virglrenderer" "gtk+" "usbredir" "libdrm" "libepoxy" "pulseaudio" "vde2"