From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id wHxtKMT5q14oQQAA0tVLHw (envelope-from ) for ; Fri, 01 May 2020 10:28:20 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id ANzIHs75q17hGQAAbx9fmQ (envelope-from ) for ; Fri, 01 May 2020 10:28:30 +0000 Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:470:142::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 9844E943595 for ; Fri, 1 May 2020 10:28:28 +0000 (UTC) Received: from localhost ([::1]:46778 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jUSuC-0006Ys-Os for larch@yhetil.org; Fri, 01 May 2020 06:28:28 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:40464) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jUStv-0006VK-Jd for guix-devel@gnu.org; Fri, 01 May 2020 06:28:14 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:46466) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jUStt-0006OM-Ge; Fri, 01 May 2020 06:28:09 -0400 Received: from [2001:980:1b4f:1:42d2:832d:bb59:862] (port=53182 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 1jUSts-0004Jb-Dn; Fri, 01 May 2020 06:28:09 -0400 From: Jan Nieuwenhuizen To: Ludovic =?utf-8?Q?Court=C3=A8s?= Subject: Re: 20/36: system: hurd: Add the Shepherd. Organization: AvatarAcademy.nl References: <20200427101927.7020.76060@vcs0.savannah.gnu.org> <20200427101948.9B2B220A5E@vcs0.savannah.gnu.org> <875zdglifm.fsf@gnu.org> X-Url: http://AvatarAcademy.nl Date: Fri, 01 May 2020 12:28:06 +0200 In-Reply-To: <875zdglifm.fsf@gnu.org> ("Ludovic \=\?utf-8\?Q\?Court\=C3\=A8s\=22'\?\= \=\?utf-8\?Q\?s\?\= message of "Fri, 01 May 2020 00:25:49 +0200") Message-ID: <87v9lgq79l.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-BeenThere: guix-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: guix-devel@gnu.org Errors-To: guix-devel-bounces+larch=yhetil.org@gnu.org Sender: "Guix-devel" X-Scanner: scn0 X-Spam-Score: -1.01 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of guix-devel-bounces@gnu.org designates 2001:470:142::17 as permitted sender) smtp.mailfrom=guix-devel-bounces@gnu.org X-Scan-Result: default: False [-1.01 / 13.00]; RCVD_VIA_SMTP_AUTH(0.00)[]; GENERIC_REPUTATION(0.00)[-0.49512037757527]; TO_DN_SOME(0.00)[]; R_SPF_ALLOW(-0.20)[+ip6:2001:470:142::/48:c]; IP_REPUTATION_HAM(0.00)[asn: 22989(0.16), country: US(-0.00), ip: 2001:470:142::17(-0.50)]; DWL_DNSWL_FAIL(0.00)[2001:470:142::17:server fail]; HAS_ORG_HEADER(0.00)[]; MX_GOOD(-0.50)[cached: eggs.gnu.org]; RCPT_COUNT_TWO(0.00)[2]; MAILLIST(-0.20)[mailman]; FORGED_RECIPIENTS_MAILLIST(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:22989, ipnet:2001:470:142::/48, country:US]; TAGGED_FROM(0.00)[larch=yhetil.org]; FROM_NEQ_ENVFROM(0.00)[janneke@gnu.org,guix-devel-bounces@gnu.org]; ARC_NA(0.00)[]; RCVD_COUNT_FIVE(0.00)[5]; MID_RHS_MATCH_FROM(0.00)[]; FROM_HAS_DN(0.00)[]; URIBL_BLOCKED(0.00)[avataracademy.com:url,gnu.org:email,joyofsource.com:url,lilypond.org:url]; MIME_GOOD(-0.10)[text/plain]; RCVD_TLS_LAST(0.00)[]; DMARC_NA(0.00)[gnu.org]; HAS_LIST_UNSUB(-0.01)[]; DNSWL_BLOCKED(0.00)[2001:470:142::17:from]; FORGED_SENDER_MAILLIST(0.00)[] X-TUID: gDGvz1fxexDe Ludovic Court=C3=A8s writes: Hi Ludo'! >> commit bb17242a511014e1691d494b17152865db0580e0 >> Author: Jan (janneke) Nieuwenhuizen >> AuthorDate: Tue Apr 7 08:03:03 2020 +0200 >> >> system: hurd: Add the Shepherd. >> + (define shepherd.conf >> + (with-parameters ((%current-target-system "i586-pc-gnu")) >> + (shepherd-configuration-file (hurd-shepherd-services %hurd-os)))) > > This looks like an intermediate before fully using the service/OS > framework TL;DR: Thanks a lot for your review and questions! I will be using this to rewrite the Shepherd/services introduction in a proper way, until it can be merged. > , but I wonder how much it helps. Yes, that's exactly it! This intermediate, is curerently the only way I found that can produce a fully functional VM-image; i.e., one that starts guix-daemon and openssh. So it helps by being an intermediate. > The way I see it, now that you=E2=80=99ve defined services for Hurd-speci= fic > things like the console client, you could very much write: > > (operating-system > ;; =E2=80=A6 > (kernel gnumach) > (hurd hurd) ;<- we probably need this new field (oh...prolly better than the (if hurd-target?) I've been sprinkling and implicit adding of gnumach. I'll have a go at this. > (essential-services (hurd-essential-services this-operating-system)) > (services %base-hurd-services)) > > (Eventually we can even arrange for =E2=80=98essential-services=E2=80=99 = and =E2=80=98services=E2=80=99 > to pick the right default as a function of the chosen kernel.) > > and then do: > > guix system build --target=3Di586-pc-gnu the-config-above.scm > Assuming system cross-compilation works as advertised :-), it should > cross-compile the whole system. Yeah...is seems that the marketing department may have sold us something that has yet to be delivered. Either that, or I failed to read some bits of the instruction manual ;-) To get something to run, we need (near the top of wip-hurd-vm) 6302837257 HACK Don't fail on running host's localedef. 443e1b2176 gnu: hurd: Cross-build hack: Set target i586-pc-gnu if unset. 87b50146ee gnu: glibc/hurd-headers: Cross-build fix for the Hurd. So, on a well-chosen version of wip-hurd-vm (for example: wip-hurd-vm24 on my gitlab), I can now finally run this ./pre-inst-env guix system build --target=3Di586-pc-gnu gnu/system/exam= ples/bare-hurd.tmpl ...but (most of) the OS is not cross-compiled; /bin/bash is the build host's bash. Some things, like Grub, Gnumach, the Hurd are cross compiled, so ... > At that stage, you don=E2=80=99t need =E2=80=98cross-hurd-image=E2=80=99 = any longer and you can > instead run: > > guix system vm-image --target=3Di586-pc-gnu the-config-above.scm > > to achieve the same result. ... indeed, running: ./pre-inst-env guix system vm-image --target=3Di586-pc-gnu gnu/system/e= xamples/bare-hurd.tmpl creates a bootable VM-image that drops into a bash-minimal shell, because /bin/bash cannot be executed. > But! There=E2=80=99s one missing bit: a Hurdish grub.cfg. I think that = can be > hacked in (gnu bootloader grub), by inheriting from =E2=80=98grub-bootloa= der=E2=80=99 > and providing a custom =E2=80=98configuration-file-generator=E2=80=99 fie= ld and maybe > =E2=80=98installer=E2=80=99 as well. I think I have that covered here d6ec2c2543 * system: hurd: Add hurd-grub-configuration-file. a9a6b716d9 * system: hurd: Add hurd-grub-minimal-bootloader. possibly depending on these 4fd4296325 * system: Add hurd-operating-system-directory-base-entries. f4f872a440 * services: hurd: Move hurd-default-essential-services. 5f7c73d83a * services: Add hurd-file-systems-service-type. d7cd2f122d * services: hurd: Move hurd-etc-sevcices. > Thus, (gnu system hurd) would be left with nothing but the definitions > of =E2=80=98%base-services/hurd=E2=80=99, =E2=80=98%base-packages/hurd=E2= =80=99, and so on. > =E2=80=98hurd-essential-services=E2=80=99 could maybe go to (gnu services= hurd). Yes! > But I wonder if I=E2=80=99m missing something, WDYT? You're right...and this is what I am trying to work towards. The reason for me to introduce these intermediate steps is that they enable to run intermediate tests. Currently, "guix build -f gnu/system/hurd.scm" is the only way I have that produces a functional VM. We are pretty close t creating such a thing with "guix system ...", but to do so we need a cross build that works and a shepherd config generated...and that all needs to come together. So instead of attempting a giant leap, I'm trying to throw some intermediate stepping stones in the pond :-) We don't need to merge, or keep this history; but I don't see how to walk this path without going round these extra curves; let alone getting feedback or asking questions. So I can imagine that these commits keep being rewritten/removed on wip-hurd-vm until everything works. > Thanks for the exciting developments again! :-) Thanks for your insights, we're getting there... I have some more specific, related questions/puzzles in response to your other mail about services. Greetings, janneke --=20 Jan Nieuwenhuizen | GNU LilyPond http://lilypond.org Freelance IT http://JoyofSource.com | Avatar=C2=AE http://AvatarAcademy.com