unofficial mirror of bug-guix@gnu.org 
 help / color / mirror / code / Atom feed
From: "Ludovic Courtès" <ludo@gnu.org>
To: Maxim Cournoyer <maxim.cournoyer@gmail.com>
Cc: Vagrant Cascadian <vagrant@debian.org>, 36117@debbugs.gnu.org
Subject: bug#36117: [PATCH 4/4] services/qemu-binfmt: Use the F flag and the static output of QEMU.
Date: Tue, 23 Feb 2021 09:37:18 +0100	[thread overview]
Message-ID: <87zgzv6uyp.fsf@gnu.org> (raw)
In-Reply-To: <20210222195006.11357-4-maxim.cournoyer@gmail.com> (Maxim Cournoyer's message of "Mon, 22 Feb 2021 14:50:06 -0500")

Hi Maxim,

Maxim Cournoyer <maxim.cournoyer@gmail.com> skribis:

> Fixes <https://issues.guix.gnu.org/36117>.
>
> Before this change, the 'binfmt_misc' entries registered for QEMU would not be
> usable in container contexts outside of guix-daemon (without manually bind
> mounting file names).
>
> For example:
>
> $ docker run --rm arm32v7/debian true
> standard_init_linux.go:207: exec user process caused "no such file or directory"
>
> After this change, any container can make use of the QEMU binfmt_misc
> registrations, as their corresponding QEMU static binaries are fully
> pre-loaded by the kernel.

[...]

> +++ b/gnu/services/virtualization.scm
> @@ -554,13 +554,14 @@ potential infinite waits blocking libvirt."))
>  ;;;
>  
>  ;; Platforms that QEMU can emulate.
> -(define-record-type <qemu-platform>
> -  (qemu-platform name family magic mask)
> +(define-record-type* <qemu-platform>

Since this is for internal consumption, I’m in favor of keeping plain
‘define-record-type’.  Also, I don’t think the “F” flag belongs here,
it’s mostly orthogonal.

>  (define qemu-binfmt-service-type
>    ;; TODO: Make a separate binfmt_misc service out of this?
>    (service-type (name 'qemu-binfmt)
> @@ -800,9 +833,7 @@ given QEMU package."
>                                            (const
>                                             (list %binary-format-file-system)))
>                         (service-extension shepherd-root-service-type
> -                                          qemu-binfmt-shepherd-services)
> -                       (service-extension guix-service-type
> -                                          qemu-binfmt-guix-chroot)))
> +                                          qemu-binfmt-shepherd-services)))

As discussed on IRC, the downside of this approach is increased disk and
memory footprint (those big binaries have to be loaded in memory).

One possibility would be to add an option to choose between this and the
current approach, but maybe it’s not worth the maintenance trouble.

Thoughts?

Thanks for fixing this issue!

Ludo’.




  reply	other threads:[~2021-02-23  8:38 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-06-06 17:55 bug#36117: qemu-binfmt with non-native chroot Vagrant Cascadian
2019-06-07 13:00 ` Ludovic Courtès
2019-06-08  6:03   ` Vagrant Cascadian
2019-06-24 12:25     ` Ludovic Courtès
2021-02-22 19:50       ` bug#36117: [PATCH 1/4] gnu: qemu: Fix indentation and remove trailing #t Maxim Cournoyer
2021-02-22 19:50         ` bug#36117: [PATCH 2/4] gnu: Add glib-static Maxim Cournoyer
2021-02-22 19:50         ` bug#36117: [PATCH 3/4] gnu: qemu: Add a static output Maxim Cournoyer
2021-02-23  8:38           ` Ludovic Courtès
2021-02-25 13:57             ` Maxim Cournoyer
2021-02-25 14:50               ` Ludovic Courtès
2021-02-22 19:50         ` bug#36117: [PATCH 4/4] services/qemu-binfmt: Use the F flag and the static output of QEMU Maxim Cournoyer
2021-02-23  8:37           ` Ludovic Courtès [this message]
2021-02-25 21:47             ` Maxim Cournoyer
2021-03-15 22:07               ` bug#36117: qemu-binfmt with non-native chroot Maxim Cournoyer

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=87zgzv6uyp.fsf@gnu.org \
    --to=ludo@gnu.org \
    --cc=36117@debbugs.gnu.org \
    --cc=maxim.cournoyer@gmail.com \
    --cc=vagrant@debian.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).