From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id sBraFPO+NGBXQAAA0tVLHw (envelope-from ) for ; Tue, 23 Feb 2021 08:38:11 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id GL1lEPO+NGB4aQAAB5/wlQ (envelope-from ) for ; Tue, 23 Feb 2021 08:38:11 +0000 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 AE4F1C352 for ; Tue, 23 Feb 2021 09:38:10 +0100 (CET) Received: from localhost ([::1]:55226 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lETCr-0003GE-FE for larch@yhetil.org; Tue, 23 Feb 2021 03:38:09 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:36840) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lETCk-0003G5-JM for bug-guix@gnu.org; Tue, 23 Feb 2021 03:38:02 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:46715) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lETCk-0004hA-Bj for bug-guix@gnu.org; Tue, 23 Feb 2021 03:38:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lETCk-0002Vy-9e for bug-guix@gnu.org; Tue, 23 Feb 2021 03:38:02 -0500 X-Loop: help-debbugs@gnu.org Subject: bug#36117: [PATCH 4/4] services/qemu-binfmt: Use the F flag and the static output of QEMU. Resent-From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Tue, 23 Feb 2021 08:38:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 36117 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: Maxim Cournoyer Received: via spool by 36117-submit@debbugs.gnu.org id=B36117.16140694509619 (code B ref 36117); Tue, 23 Feb 2021 08:38:02 +0000 Received: (at 36117) by debbugs.gnu.org; 23 Feb 2021 08:37:30 +0000 Received: from localhost ([127.0.0.1]:58261 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lETCD-0002V4-P4 for submit@debbugs.gnu.org; Tue, 23 Feb 2021 03:37:30 -0500 Received: from eggs.gnu.org ([209.51.188.92]:47086) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lETCB-0002Ur-Ui for 36117@debbugs.gnu.org; Tue, 23 Feb 2021 03:37:28 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]:42545) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lETC6-0004Gq-LX; Tue, 23 Feb 2021 03:37:22 -0500 Received: from [2a01:e0a:1d:7270:af76:b9b:ca24:c465] (port=38704 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1lETC4-00050P-JH; Tue, 23 Feb 2021 03:37:21 -0500 From: Ludovic =?UTF-8?Q?Court=C3=A8s?= References: <87k1dbb260.fsf@gnu.org> <20210222195006.11357-1-maxim.cournoyer@gmail.com> <20210222195006.11357-4-maxim.cournoyer@gmail.com> X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: 5 =?UTF-8?Q?Vent=C3=B4se?= an 229 de la =?UTF-8?Q?R=C3=A9volution?= X-PGP-Key-ID: 0x090B11993D9AEBB5 X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc X-PGP-Fingerprint: 3CE4 6455 8A84 FDC6 9DB4 0CFB 090B 1199 3D9A EBB5 X-OS: x86_64-pc-linux-gnu Date: Tue, 23 Feb 2021 09:37:18 +0100 In-Reply-To: <20210222195006.11357-4-maxim.cournoyer@gmail.com> (Maxim Cournoyer's message of "Mon, 22 Feb 2021 14:50:06 -0500") Message-ID: <87zgzv6uyp.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-guix@gnu.org List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Vagrant Cascadian , 36117@debbugs.gnu.org Errors-To: bug-guix-bounces+larch=yhetil.org@gnu.org Sender: "bug-Guix" X-Migadu-Flow: FLOW_IN X-Migadu-Spam-Score: -2.87 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of bug-guix-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=bug-guix-bounces@gnu.org X-Migadu-Queue-Id: AE4F1C352 X-Spam-Score: -2.87 X-Migadu-Scanner: scn0.migadu.com X-TUID: 5uQi6HYCXAvA Hi Maxim, Maxim Cournoyer skribis: > Fixes . > > Before this change, the 'binfmt_misc' entries registered for QEMU would n= ot 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 dir= ectory" > > 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.")) > ;;; >=20=20 > ;; Platforms that QEMU can emulate. > -(define-record-type > - (qemu-platform name family magic mask) > +(define-record-type* Since this is for internal consumption, I=E2=80=99m in favor of keeping pla= in =E2=80=98define-record-type=E2=80=99. Also, I don=E2=80=99t think the =E2= =80=9CF=E2=80=9D flag belongs here, it=E2=80=99s 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-sys= tem))) > (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=E2=80=99s not worth the maintenance trouble. Thoughts? Thanks for fixing this issue! Ludo=E2=80=99.