unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: Efraim Flashner <efraim@flashner.co.il>
To: 50171@debbugs.gnu.org
Subject: [bug#50171] [PATCH] gnu: qemu-minimal: Don't build static binaries.
Date: Sun, 22 Aug 2021 22:24:06 +0300	[thread overview]
Message-ID: <a8441f910e8b3cd00ec0e4c5973de07ca47181e2.1629659746.git.efraim@flashner.co.il> (raw)

* 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(-)

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"

base-commit: 9e3b68203cba2b1bd96e524d3ae9dfc3336a72f7
-- 
2.33.0





             reply	other threads:[~2021-08-23  6:23 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-22 19:24 Efraim Flashner [this message]
     [not found] ` <handler.50171.B.16296997415816.ack@debbugs.gnu.org>
2021-09-09 13:08   ` bug#50171: Acknowledgement ([PATCH] gnu: qemu-minimal: Don't build static binaries.) Efraim Flashner

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=a8441f910e8b3cd00ec0e4c5973de07ca47181e2.1629659746.git.efraim@flashner.co.il \
    --to=efraim@flashner.co.il \
    --cc=50171@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).