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 KH27CNP0414udAAA0tVLHw (envelope-from ) for ; Fri, 12 Jun 2020 21:34: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 yMO1BNP04151WgAAB5/wlQ (envelope-from ) for ; Fri, 12 Jun 2020 21:34: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 93AC0940AF4 for ; Fri, 12 Jun 2020 21:34:10 +0000 (UTC) Received: from localhost ([::1]:40266 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jjrJR-0002dF-IT for larch@yhetil.org; Fri, 12 Jun 2020 17:34:09 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:56350) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jjrJK-0002cU-Mr for guix-patches@gnu.org; Fri, 12 Jun 2020 17:34:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:57324) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jjrJK-0006NX-Dc for guix-patches@gnu.org; Fri, 12 Jun 2020 17:34:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1jjrJK-0000WN-BI for guix-patches@gnu.org; Fri, 12 Jun 2020 17:34:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#41785] [PATCH] DRAFT services: Add 'hurd-in-vm service-type'. Resent-From: Jan Nieuwenhuizen Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Fri, 12 Jun 2020 21:34:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 41785 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Ludovic =?UTF-8?Q?Court=C3=A8s?= Cc: Mathieu Othacehe , 41785@debbugs.gnu.org Received: via spool by 41785-submit@debbugs.gnu.org id=B41785.15919976401988 (code B ref 41785); Fri, 12 Jun 2020 21:34:02 +0000 Received: (at 41785) by debbugs.gnu.org; 12 Jun 2020 21:34:00 +0000 Received: from localhost ([127.0.0.1]:40636 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jjrJI-0000W0-7h for submit@debbugs.gnu.org; Fri, 12 Jun 2020 17:34:00 -0400 Received: from eggs.gnu.org ([209.51.188.92]:48194) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jjrJH-0000Vn-4j for 41785@debbugs.gnu.org; Fri, 12 Jun 2020 17:33:59 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:45531) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jjrJB-0006M1-SZ; Fri, 12 Jun 2020 17:33:53 -0400 Received: from [2001:980:1b4f:1:42d2:832d:bb59:862] (port=33452 helo=dundal.peder.onsbrabantnet.nl) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1jjrJB-0003Sy-0q; Fri, 12 Jun 2020 17:33:53 -0400 From: Jan Nieuwenhuizen Organization: AvatarAcademy.nl References: <20200610085441.890-1-janneke@gnu.org> <87eeql9xvt.fsf@gnu.org> <87wo4d2rm5.fsf@gnu.org> <87imfw737z.fsf@gnu.org> X-Url: http://AvatarAcademy.nl Date: Fri, 12 Jun 2020 23:33:51 +0200 In-Reply-To: <87imfw737z.fsf@gnu.org> ("Ludovic \=\?utf-8\?Q\?Court\=C3\=A8s\=22'\?\= \=\?utf-8\?Q\?s\?\= message of "Fri, 12 Jun 2020 16:45:04 +0200") Message-ID: <87d064nf40.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-Spam-Score: -3.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 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Spam-Score: -1.01 X-TUID: S/yQLfP9++9U Ludovic Court=C3=A8s writes: Hello, > Jan Nieuwenhuizen skribis: > >>> It=E2=80=99s a volatile VM, due to the use of =E2=80=98-snapshot=E2=80= =99, right? >> >> By default: Yes. That seemed more ready-to-use. A stateful VM image >> would need to an out-of-store, writable copy. You can actually do that >> and modify the hurd-vm-configuration. > > It=E2=80=99s maybe worth mentioning in the manual. Ah right, I wanted to do that after your remark...but forgot. Could be an unpleasant surprise to lose everything. I've now added --8<---------------cut here---------------start------------->8--- Note that by default the VM image is volatile, i.e., once stopped the contents are lost. If you want a stateful image instead, override the configuration's @code{image} and @code{options} without the @code{--snapshot} flag using something along these lines: @lisp (service hurd-vm-service-type (hurd-vm-configuration (image (const "/out/of/store/writable/hurd.img")) (options '("--device" "rtl8139,netdev=3Dnet0" "--netdev" "user,id=3Dnet0,hostfwd=3Dtcp:127.0.0.1:20022-:2222"))= )) @end lisp --8<---------------cut here---------------end--------------->8--- to the patch. >>> (The Hurd actually has =E2=80=9Csub-Hurds=E2=80=9D=C2=B9 and =E2=80=9Cn= eighborhurds=E2=80=9D=C2=B2. I wonder if >>> it=E2=80=99s our duty to coin another term=E2=80=A6 a guesthurd? a visi= thurd?) >>> >>> =C2=B9 https://www.gnu.org/software/hurd/hurd/subhurd.html >>> =C2=B2 https://www.gnu.org/software/hurd/hurd/neighborhurd.html >> >> Oh, that's cool! Associating along from the neighborhurd pun, what >> about a "childhurd" (as a pun on childhood -- only needed while the Hurd >> is growing up)? > > =E2=80=9CChildhurd=E2=80=9D, LOVE IT! Heh; ... >> "herd start childhurd" -- hmm? In the updated patch, I still have >> hurd-vm. If we do our duty and coin "childhurd", should I just >> s/hurd-vm/childhurd/g ? > > Shepherd services can have more than one name, so I propose to have both! ... great, now lemme see where to mention this. I just put in in the code --8<---------------cut here---------------start------------->8--- (list (shepherd-service (documentation "Run the Hurd in a Virtual Machine: a Childhurd.") (provision '(hurd-vm childhurd)) --8<---------------cut here---------------end--------------->8--- and docs here --8<---------------cut here---------------start------------->8--- @example herd start hurd-vm herd stop childhurd @end example --8<---------------cut here---------------end--------------->8--- > Ooh, sadness. We can=E2=80=99t do that because the image machinery really > expects an . > > What if you move =E2=80=98with-parameters=E2=80=99 around (system-image = =E2=80=A6) instead? =3D> \o/ that works! You're genius ;-) >>>> +(define %hurd-in-vm-operating-system >> [..] >>>> + (operating-system >>>> + (service openssh-service-type >>>> + (openssh-configuration >>>> + (openssh openssh-sans-x) >> [..] >>>> + %base-services/hurd)))) >>> >>> I understand the need to factorize useful configs, but IMO it doesn=E2= =80=99t >>> belong here. So I=E2=80=99d just leave it out. There=E2=80=99s already >>> =E2=80=98%hurd-default-operating-system=E2=80=99 that does the heavy li= fting anyway. >> >> Sure, removed! Users will most probably want to add an openssh server >> using openssh-sans-x; but I guess that's something for a blog post or >> cookbook then. > > Yeah. > > Hmm, come to think about it, we need a default value here anyway, so > after all, we have a good reason to have it here. (Says the guy who > changes his mind.) Heh, it's such a pleasure working with you. I've put it back again, without the -in- bit. (says the guy who was easily convinced we didn't need it.) >> From b01b8d2a46a6a04cb8f09d74c06cbbc82878f070 Mon Sep 17 00:00:00 2001 >> From: "Jan (janneke) Nieuwenhuizen" >> Date: Thu, 11 Jun 2020 22:52:12 +0200 >> Subject: [PATCH v2 1/2] image: Make 'find-image' non-monadic. >> >> * gnu/system/image.scm (find-image): Make non-monadic. >> * gnu/tests/install.scm (run-install): Update caller. >> * guix/scripts/system.scm (perform-action): Likewise. > > [...] > >> "Find and return an image that could match the given FILE-SYSTEM-TYPE= . This >> is useful to adapt to interfaces written before the addition of the >> record." >> - (mlet %store-monad ((target (current-target-system))) >> - (mbegin %store-monad >> - (return >> - (match file-system-type >> - ("iso9660" iso9660-image) >> - (_ (cond >> - ((and target >> - (hurd-triplet? target)) >> - hurd-disk-image) >> - (else >> - efi-disk-image)))))))) >> + (let ((target (%current-target-system))) >> + (match file-system-type >> + ("iso9660" iso9660-image) >> + (_ (cond >> + ((and target >> + (hurd-triplet? target)) >> + hurd-disk-image) >> + (else >> + efi-disk-image)))))) > > I=E2=80=99d prefer: > > (define* (find-image #:optional (system (%current-system))) > =E2=80=A6) > > In your case, you=E2=80=99d need to make this call: > > (find-image "i586-gnu") > > (Beware of the triplet/system type distinction!) > > Perhaps the other call sites need to be adjusted. Then Mathieu writes > > I would prefer 'target' to be part of the image itself, as I proposed > > here: https://lists.gnu.org/archive/html/guix-devel/2020-05/msg00417.ht= ml. > > > > There's no way for now, that the image is built without cross-compiling > > for "i586-pc-gnu", so I think it could be part of the "image" record > > itself. > > > > WDYT? and Ludo writes > Yes, why not, a =E2=80=98target=E2=80=99 field in sounds fine. So...I'm sticking with a the 'target' parameter for now; as that was Mathieu's suggestion and a closer match to the final solution of moving TARGET into image. >> From e5bdf050f628cc7ea1b6bc4ccdcfeb757429820f Mon Sep 17 00:00:00 2001 >> From: "Jan (janneke) Nieuwenhuizen" >> Date: Wed, 10 Jun 2020 00:10:28 +0200 >> Subject: [PATCH v2 2/2] services: Add 'hurd-vm service-type'. >> >> * gnu/services/virtualization.scm (disk-image, hurd-in-vm-shepherd-servi= ce, >> hurd-vm-disk-image): New procedures. >> (hurd-in-vm-service-type): New variable. >> (): New record type. >> * doc/guix.texi (Virtualization Services): Document it. > > s/hurd-in-vm/hurd-vm/ in the commit log. > > Otherwise LGTM, thank you! Thanks! I'll be sending a v3 series that should be OK (apart from the image work that's not finished yet), and we can decide what to do. Greetings, Janneke --=20 Jan Nieuwenhuizen | GNU LilyPond http://lilypond.org Freelance IT http://JoyofSource.com | Avatar=C2=AE http://AvatarAcademy.com