From debbugs-submit-bounces@debbugs.gnu.org Fri Jun 12 10:45:17 2020 Received: (at 41785) by debbugs.gnu.org; 12 Jun 2020 14:45:17 +0000 Received: from localhost ([127.0.0.1]:40415 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jjkvl-0005Gs-7c for submit@debbugs.gnu.org; Fri, 12 Jun 2020 10:45:17 -0400 Received: from eggs.gnu.org ([209.51.188.92]:39424) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jjkvj-0005Gf-88 for 41785@debbugs.gnu.org; Fri, 12 Jun 2020 10:45:16 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:37015) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jjkvd-0000I6-6W; Fri, 12 Jun 2020 10:45:09 -0400 Received: from [2a01:e0a:1d:7270:6a6c:dc17:fc02:cfda] (port=54488 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1jjkva-00079i-1q; Fri, 12 Jun 2020 10:45:08 -0400 From: =?utf-8?Q?Ludovic_Court=C3=A8s?= To: Jan Nieuwenhuizen Subject: Re: [bug#41785] [PATCH] DRAFT services: Add 'hurd-in-vm service-type'. References: <20200610085441.890-1-janneke@gnu.org> <87eeql9xvt.fsf@gnu.org> <87wo4d2rm5.fsf@gnu.org> X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: 25 Prairial an 228 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: Fri, 12 Jun 2020 16:45:04 +0200 In-Reply-To: <87wo4d2rm5.fsf@gnu.org> (Jan Nieuwenhuizen's message of "Thu, 11 Jun 2020 23:57:06 +0200") Message-ID: <87imfw737z.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-Debbugs-Envelope-To: 41785 Cc: Mathieu Othacehe , 41785@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Hi! 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. >> (The Hurd actually has =E2=80=9Csub-Hurds=E2=80=9D=C2=B9 and =E2=80=9Cne= ighborhurds=E2=80=9D=C2=B2. I wonder if >> it=E2=80=99s our duty to coin another term=E2=80=A6 a guesthurd? a visit= hurd?) >> >> =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! > "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! >> So, assuming =E2=80=98find-image=E2=80=99 is non-monadic, the code above= becomes >> something like: >> >> (system-image >> (image (inherit base-image) >> (size image-size) >> (operating-system >> (with-parameters ((%current-target-system "i586-pc-gnu")) >> os)))) > > Hmm...I don't think that I understand. This > > (define* (disk-image os #:key (image-size 'guess) target) > "Return a disk-image for OS with size IMAGE-SIZE, built for TARGET." > (let ((base-image (find-image "ext2"))) > (system-image > (image (inherit base-image) > (size image-size) > (operating-system > (with-parameters ((%current-target-system target)) > os)))))) > > > gives > > $ ~/src/guix/master/pre-inst-env guix system build dundal.scm > %default-substitute-urls:("https://ci.guix.gnu.org") > Backtrace: > In ice-9/boot-9.scm: > 1736:10 4 (with-exception-handler _ _ #:unwind? _ #:unwind-for-type _) > In unknown file: > 3 (apply-smob/0 #) > In ice-9/boot-9.scm: > 718:2 2 (call-with-prompt _ _ #) > In ice-9/eval.scm: > 619:8 1 (_ #(#(#))) > In guix/ui.scm: > 1945:12 0 (run-guix-command _ . _) > > guix/ui.scm:1945:12: In procedure run-guix-command: > In procedure operating-system-file-systems: Wrong type argument: #< bindings: ((#< 7f4ce7c23740 proc: #> #)) thunk: #> > > ...I could do with some help here. 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? >>> +(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 lif= ting 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.) > 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. > 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-servic= e, > 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! Ludo=E2=80=99.