all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#41541: merge wip-hurd-vm
@ 2020-05-26 14:21 Jan Nieuwenhuizen
  2020-05-27 10:01 ` Mathieu Othacehe
                   ` (2 more replies)
  0 siblings, 3 replies; 67+ messages in thread
From: Jan Nieuwenhuizen @ 2020-05-26 14:21 UTC (permalink / raw)
  To: 41541

Hello!

TL; DR: I propose to rebase on master, squash the squash!es, collapse
the Reverts, hard reset and => review+finish the rest, merge!

So...

After about two months in the working, current wip-hurd-vm

    commit 6a284069188f59553f27760614ffb604b49ec62b
    squash! linux-boot: Update 'make-hurd-device-nodes'.

is finally in a state where it supports building a VM image for the Hurd
in three ways.  The April-1st hack^H^H^H^method

--8<---------------cut here---------------start------------->8---
./pre-inst-env guix build -f gnu/system/hurd.scm 
--8<---------------cut here---------------end--------------->8---

  => /gnu/store/f1vzgwgxjacn1rd9cpnmpgbv8c5k3rbx-qemu-image

still produces a bootable VM, but fails during startup; lacking
/boot/activation.  Starting the Shepherd from RC was introduced, which
broke this.  We could spend some effort to resurrect it, but...

It was a fun and amazing feat but I think we should remove it before the
merge.  I don't think we realised how sharp/smart this hack was,
navigating cleanly across and through cross-build and qemu-image bugs.

The next method is by using

--8<---------------cut here---------------start------------->8---
./pre-inst-env guix system vm-image --no-grafts --target=i586-pc-gnu gnu/system/examples/bare-hurd.tmpl
--8<---------------cut here---------------end--------------->8---

  => /gnu/store/8pr6qnwl4b5kria0j0hxscv66izc8zpi-qemu-image

TODO: address the no-grafts (See https://debbugs.gnu.org/cgi/bugreport.cgi?bug=41350#71)

This produces a functional VM, including openssh server.  Closures
haven't been registered, though, so adding and starting a guix-daemon
may not do what we want yet.

And lastly the new, preferred method that we finally got working
yesterday

--8<---------------cut here---------------start------------->8---
./pre-inst-env guix system disk-image --no-grafts --target=i586-pc-gnu gnu/system/examples/bare-hurd.tmpl
--8<---------------cut here---------------end--------------->8---

  => /gnu/store/qyq2pj175skkc8kffy5nzfyb47sk3kls-disk-image

It should be trivial to add a guix-daemon and do some real work here.

Mattieu is looking into cleaning up of

--8<---------------cut here---------------start------------->8---
b605a36031 * origin/wip-hurd-vm WIP hurd-directives
--8<---------------cut here---------------end--------------->8---

and we also already had a small brain storming on IRC about

--8<---------------cut here---------------start------------->8---
dd62341283 * bootloader: grub: Add support for '<hurd-menu-entry>'.
ec1dfae81b * system: Add 'hurd' field to <boot-parameters>.
43df8616f6 * bootloader: Add `<hurd-menu-entry>'.
--8<---------------cut here---------------end--------------->8---

I guess that before merging, we will want to rewrite this bit, alongside
these lines, nicely summarized as

--8<---------------cut here---------------start------------->8---
<civodul> so to sum up, the following fields would be added to <menu-entry>:
          kernel, multiboot-modules
<civodul> janneke: it's not GRUB-specific though, in the sense that GRUB
          closely matches the underlying abstractions
<civodul> that is: "multiboot kernel + modules", or "linux + initrd", etc.
<civodul> and yes, <boot-parameters> needs to be extended to reflect these
          addition
--8<---------------cut here---------------end--------------->8---

Greetings,
janneke

PS: I'm starting the VMs like so

    guix environment --ad-hoc qemu -- qemu-system-i386 -enable-kvm -m 512\
     -device rtl8139,netdev=net0 -netdev user,id=net0,hostfwd=tcp:127.0.0.1:10022-:2222\
     -snapshot -hda <the-image>

-- 
Jan Nieuwenhuizen <janneke@gnu.org> | GNU LilyPond http://lilypond.org
Freelance IT http://JoyofSource.com | Avatar® http://AvatarAcademy.com




^ permalink raw reply	[flat|nested] 67+ messages in thread

* bug#41541: merge wip-hurd-vm
  2020-05-26 14:21 bug#41541: merge wip-hurd-vm Jan Nieuwenhuizen
@ 2020-05-27 10:01 ` Mathieu Othacehe
  2020-05-27 11:11   ` Jan Nieuwenhuizen
  2020-05-30 14:40   ` Jan Nieuwenhuizen
  2020-06-04 13:59 ` bug#41541: [PATCH 0/9] Merge wip-hurd-vm "last review round" Jan (janneke) Nieuwenhuizen
  2020-06-08 12:57 ` [bug#41541] [PATCH 0/4] Final wip-hurd-vm batch Jan (janneke) Nieuwenhuizen
  2 siblings, 2 replies; 67+ messages in thread
From: Mathieu Othacehe @ 2020-05-27 10:01 UTC (permalink / raw)
  To: Jan Nieuwenhuizen; +Cc: 41541

[-- Attachment #1: Type: text/plain, Size: 503 bytes --]


Hello Jan,

That's a good summary of the (complex) situation, thank you!

> Mattieu is looking into cleaning up of
>
> b605a36031 * origin/wip-hurd-vm WIP hurd-directives

About that, I'd like to limit at maximum the (if hurd ...) conditionals
in (gnu system image).

So for the "make-device-node", I would propose to "link" it to the
image definition, as proposed in the attached patch.

I'll see if we can do something similar for the "extra-directives" and
the "boot-activation".

Thanks,

Mathieu


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-hurd-nodes.patch --]
[-- Type: text/x-diff, Size: 2821 bytes --]

From 371f2bab466cef53f66ac69927014278055572fc Mon Sep 17 00:00:00 2001
From: Mathieu Othacehe <othacehe@gnu.org>
Date: Wed, 27 May 2020 10:56:13 +0200
Subject: [PATCH] hurd nodes

---
 gnu/build/image.scm  |  5 +++++
 gnu/system/image.scm | 11 ++++++++++-
 2 files changed, 15 insertions(+), 1 deletion(-)

diff --git a/gnu/build/image.scm b/gnu/build/image.scm
index 087e2c78d9..d0722616f2 100644
--- a/gnu/build/image.scm
+++ b/gnu/build/image.scm
@@ -157,6 +157,8 @@ deduplicates files common to CLOSURE and the rest of PREFIX."
                                     references-graphs
                                     (register-closures? #t)
                                     system-directory
+                                    (make-device-nodes
+                                     make-essential-device-nodes)
                                     #:allow-other-keys)
   "Initialize the given ROOT directory. Use BOOTCFG and BOOTCFG-LOCATION to
 install the bootloader configuration.
@@ -168,6 +170,9 @@ of the directory of the 'system' derivation."
   (populate-root-file-system system-directory root)
   (populate-store references-graphs root)
 
+  ;; Populate /dev.
+  (make-device-nodes root)
+
   (when register-closures?
     (for-each (lambda (closure)
                 (register-closure root
diff --git a/gnu/system/image.scm b/gnu/system/image.scm
index 03588f7d38..67e560891b 100644
--- a/gnu/system/image.scm
+++ b/gnu/system/image.scm
@@ -89,6 +89,13 @@
    (flags '(boot))
    (initializer (gexp initialize-root-partition))))
 
+(define hurd-initialize-root-partition
+  #~(lambda* (#:rest args)
+      (apply initialize-root-partition
+             (append args
+                     (list #:make-device-nodes
+                           make-hurd-device-nodes)))))
+
 (define hurd-disk-image
   (image
    (format 'disk-image)
@@ -99,7 +106,7 @@
            (label root-label)
            (file-system "ext2")
            (flags '(boot))
-           (initializer (gexp initialize-root-partition)))))))
+           (initializer hurd-initialize-root-partition))))))
 
 (define efi-disk-image
   (image
@@ -154,12 +161,14 @@
     (with-imported-modules `(,@(source-module-closure
                                 '((gnu build vm)
                                   (gnu build image)
+                                  (gnu build linux-boot)
                                   (guix store database))
                                 #:select? not-config?)
                              ((guix config) => ,(make-config.scm)))
       #~(begin
           (use-modules (gnu build vm)
                        (gnu build image)
+                       (gnu build linux-boot)
                        (guix store database)
                        (guix build utils))
           gexp* ...))))
-- 
2.26.2


^ permalink raw reply related	[flat|nested] 67+ messages in thread

* bug#41541: merge wip-hurd-vm
  2020-05-27 10:01 ` Mathieu Othacehe
@ 2020-05-27 11:11   ` Jan Nieuwenhuizen
  2020-05-30 14:40   ` Jan Nieuwenhuizen
  1 sibling, 0 replies; 67+ messages in thread
From: Jan Nieuwenhuizen @ 2020-05-27 11:11 UTC (permalink / raw)
  To: Mathieu Othacehe; +Cc: 41541

Mathieu Othacehe writes:

Hello Mathieu,

> That's a good summary of the (complex) situation, thank you!

Yeah...well sorry for helping create such a mess :-)

>> Mattieu is looking into cleaning up of
>>
>> b605a36031 * origin/wip-hurd-vm WIP hurd-directives
>
> About that, I'd like to limit at maximum the (if hurd ...) conditionals
> in (gnu system image).

Yes, please!

> So for the "make-device-node", I would propose to "link" it to the
> image definition, as proposed in the attached patch.
>
> I'll see if we can do something similar for the "extra-directives" and
> the "boot-activation".

This looks beautiful!  It works for me when using this extra ugly patch
(yes, it contains an IF that has to go :-)

diff --git a/gnu/build/image.scm b/gnu/build/image.scm
index 70f1a61b9d..f4727b8bf5 100644
--- a/gnu/build/image.scm
+++ b/gnu/build/image.scm
@@ -67,7 +67,8 @@ take the partition metadata size into account, take a 25% margin."
 (define* (make-ext-image partition target root
                          #:key
                          (owner-uid 0)
-                         (owner-gid 0))
+                         (owner-gid 0)
+                         (options '()))
   "Handle the creation of EXT2/3/4 partition images. See
 'make-partition-image'."
   (let ((size (partition-size partition))
@@ -82,6 +83,7 @@ take the partition metadata size into account, take a 25% margin."
              "-E" ,(format #f "root_owner=~a:~a,~a"
                            owner-uid owner-gid journal-options)
              ,@fs-options
+             ,@options
              ,target
              ,(format #f "~ak"
                       (size-in-kib
@@ -105,14 +107,14 @@ take the partition metadata size into account, take a 25% margin."
                           (string-append "::" file))))
               (scandir root))))
 
-(define* (make-partition-image partition-sexp target root)
+(define* (make-partition-image partition-sexp target root #:key (options '()))
   "Create and return the image of PARTITION-SEXP as TARGET.  Use the given
 ROOT directory to populate the image."
   (let* ((partition (sexp->partition partition-sexp))
          (type (partition-file-system partition)))
     (cond
      ((string-prefix? "ext" type)
-      (make-ext-image partition target root))
+      (make-ext-image partition target root #:options options))
      ((string=? type "vfat")
       (make-vfat-image partition target root))
      (else
diff --git a/gnu/system/image.scm b/gnu/system/image.scm
index db12a40cb4..3400e01b1a 100644
--- a/gnu/system/image.scm
+++ b/gnu/system/image.scm
@@ -277,13 +277,15 @@ used in the image."
               (computed-file "partition-image-root" root-builder
                              #:options `(#:references-graphs ,inputs)))
              (type (partition-file-system partition))
+             (options (if (hurd-target?) '("-o" "hurd" "-O" "ext_attr") '()))
              (image-builder
               (with-imported-modules*
                (let ((inputs '#+(list e2fsprogs dosfstools mtools)))
                  (set-path-environment-variable "PATH" '("bin" "sbin") inputs)
                  (make-partition-image #$(partition->gexp partition)
                                        #$output
-                                       #$image-root)))))
+                                       #$image-root
+                                       #:options '#$options)))))
         (computed-file "partition.img" image-builder)))
 
     (define (partition->config partition)

until the point where it lacks the "/hurd" symlink from the directives.

So, apart from removing the IF above in a nice way, we (you?) could try
to find a nice way to insert extra-directives

> @@ -168,6 +170,9 @@ of the directory of the 'system' derivation."
>    (populate-root-file-system system-directory root)

                                                     ^ here 
I guess...and then we'd be done.

I'm not sure as to what extent the extra-directives is/was a kludge?

Janneke

-- 
Jan Nieuwenhuizen <janneke@gnu.org> | GNU LilyPond http://lilypond.org
Freelance IT http://JoyofSource.com | Avatar® http://AvatarAcademy.com




^ permalink raw reply related	[flat|nested] 67+ messages in thread

* bug#41541: merge wip-hurd-vm
  2020-05-27 10:01 ` Mathieu Othacehe
  2020-05-27 11:11   ` Jan Nieuwenhuizen
@ 2020-05-30 14:40   ` Jan Nieuwenhuizen
  2020-06-02  8:48     ` Mathieu Othacehe
  1 sibling, 1 reply; 67+ messages in thread
From: Jan Nieuwenhuizen @ 2020-05-30 14:40 UTC (permalink / raw)
  To: Mathieu Othacehe; +Cc: 41541

Mathieu Othacehe writes:

Hello!

> About that, I'd like to limit at maximum the (if hurd ...) conditionals
> in (gnu system image).
>
> So for the "make-device-node", I would propose to "link" it to the
> image definition, as proposed in the attached patch.
>
> I'll see if we can do something similar for the "extra-directives" and
> the "boot-activation".

I have managed to completely boot-activation.  Still using the same
patch for hurd-directives, but I've got a feeling we're getting real
close now.

This adds besides 'multiboot-kernel' and 'multiboot-modules' now also
'multiboot-arguments' to <menu-entry>.  The temptation to rename 'linux'
and 'linux-arguments' to 'kernel' and 'kernel-arguments' increases, but
I didn't!

I'm planning to reset wip-hurd-vm again as soon as my tests pass; there
was another grub patch on master.

Greetings,
Janneke

-- 
Jan Nieuwenhuizen <janneke@gnu.org> | GNU LilyPond http://lilypond.org
Freelance IT http://JoyofSource.com | Avatar® http://AvatarAcademy.com




^ permalink raw reply	[flat|nested] 67+ messages in thread

* bug#41541: merge wip-hurd-vm
  2020-05-30 14:40   ` Jan Nieuwenhuizen
@ 2020-06-02  8:48     ` Mathieu Othacehe
  2020-06-02  9:24       ` Jan Nieuwenhuizen
  0 siblings, 1 reply; 67+ messages in thread
From: Mathieu Othacehe @ 2020-06-02  8:48 UTC (permalink / raw)
  To: Jan Nieuwenhuizen; +Cc: 41541


Hello Jan,

> I have managed to completely boot-activation.  Still using the same
> patch for hurd-directives, but I've got a feeling we're getting real
> close now.

Just discovered your (gnu build hurd-boot), that's awesome! I wonder if
we could go one step further and move the "rc" script outside of the
"hurd" package (not sure where to put it though).

Thanks,

Mathieu




^ permalink raw reply	[flat|nested] 67+ messages in thread

* bug#41541: merge wip-hurd-vm
  2020-06-02  8:48     ` Mathieu Othacehe
@ 2020-06-02  9:24       ` Jan Nieuwenhuizen
  2020-06-02 10:16         ` Mathieu Othacehe
  0 siblings, 1 reply; 67+ messages in thread
From: Jan Nieuwenhuizen @ 2020-06-02  9:24 UTC (permalink / raw)
  To: Mathieu Othacehe; +Cc: 41541

Mathieu Othacehe writes:

Hello Mathieu,

>> I have managed to completely boot-activation.  Still using the same
>> patch for hurd-directives, but I've got a feeling we're getting real
>> close now.
>
> Just discovered your (gnu build hurd-boot), that's awesome!

Thanks...yeah I was just attempting to write a mail about that,
asking/wondering if you think some commits should be collapsed
again...especially the introduction of using MAKEDEV

--8<---------------cut here---------------start------------->8---
Subject: [PATCH 1/9] gnu: hurd: Create minimal "runsystem" script to invoke "rc".
diff --git a/gnu/packages/hurd.scm b/gnu/packages/hurd.scm
@@ -329,10 +329,26 @@ boot, since this cannot be done from GNU/Linux."
[...]
+          ;; "@HURD@" and "@COREUTILS@" are a placeholders.
+          (setenv "PATH" "@HURD@/bin:@HURD@/sbin:@COREUTILS@/bin")
@@ -349,10 +374,43 @@ boot, since this cannot be done from GNU/Linux."
[...]
-          (invoke "console" "--daemonize" "-c" "/dev/vcs"
-                  "-d" "vga" "-d" "pc_kbd" "-d" "generic_speaker"))))
+          (format #t "Creating essential device nodes...\n")
+          (with-directory-excursion "/dev"
+            (invoke "MAKEDEV" "--devdir=/dev" "std")
+            (invoke "MAKEDEV" "--devdir=/dev" "vcs")
+            (invoke "MAKEDEV" "--devdir=/dev" "tty1""tty2" "tty3" "tty4" "tty5" "tty6")
+            (invoke "MAKEDEV" "--devdir=/dev" "ptyp0" "ptyp1" "ptyp2")
+            (invoke "MAKEDEV" "--devdir=/dev" "console"))
--8<---------------cut here---------------end--------------->8---

later moving it to hurd-boot, and its subsequent removal...

> I wonder if we could go one step further and move the "rc" script
> outside of the "hurd" package (not sure where to put it though).

Yes, I agree that would be great.  I briefly thought about it and gave
up, instead of asking this question...so

The "normal" (old, current master) bootstrap goes like this

    /hurd/startup -> /libexec/runsystem -> /hurd/init ->
         /libexec/runsystem.hurd -> /libexec/rc

where RC is our initial Guile script.  I've managed to patch that into

    /hurd/startup -> /libexec/runsystem* -> /libexec/rc

Where, /hurd is symlink to /gnu/store/*-hurd-0.9/hurd/ and runsystem*
now is a very minimal bash script, doing

    exec /libexec/rc "$@"

and /libexecc is currently being substituted with the store file name,
which gives us a hurd package that does this

    /hurd/startup
    -> /gnu/store/xyz-hurd-0.9/libexec/runsystem
    -> /gnu/store/xyz-hurd-0.9/libexec/rc

Now, how could we have runsystem run another RC?  Hmm, runsystem is
being called with --load and --system arguments too; we could even
give it an --rc=RC-FILE if that's more convenient.

Then, we would only need to add this RC-FILE to the system, maybe add a
%hurd-"something" service?

Hmm.  Please share your thoughts, I'm having a go at this.

Greetings,
Janneke

-- 
Jan Nieuwenhuizen <janneke@gnu.org> | GNU LilyPond http://lilypond.org
Freelance IT http://JoyofSource.com | Avatar® http://AvatarAcademy.com




^ permalink raw reply	[flat|nested] 67+ messages in thread

* bug#41541: merge wip-hurd-vm
  2020-06-02  9:24       ` Jan Nieuwenhuizen
@ 2020-06-02 10:16         ` Mathieu Othacehe
  2020-06-02 12:23           ` Jan Nieuwenhuizen
  0 siblings, 1 reply; 67+ messages in thread
From: Mathieu Othacehe @ 2020-06-02 10:16 UTC (permalink / raw)
  To: Jan Nieuwenhuizen; +Cc: 41541


> Now, how could we have runsystem run another RC?  Hmm, runsystem is
> being called with --load and --system arguments too; we could even
> give it an --rc=RC-FILE if that's more convenient.
>
> Then, we would only need to add this RC-FILE to the system, maybe add a
> %hurd-"something" service?
>
> Hmm.  Please share your thoughts, I'm having a go at this.

Having an RC argument passed directly by the bootloader seems like a
good way to proceed for me. This is somehow remotely similar to what we
are doing with the "initrd" on Linux (pointing to some piece of code
that needs to be loaded before starting the init process).

You would also need to store this RC argument in the <boot-parameters>
record, by adding a new field or stuffing it in the "initrd"
field. Then, we wouldn't need an extra service I guess.

If we are going that way, the procedures in (gnu build hurd-boot) could
be passed the "hurd" package to install, and we could maybe get rig of
the "/hurd" symlink?

Thanks,

Mathieu




^ permalink raw reply	[flat|nested] 67+ messages in thread

* bug#41541: merge wip-hurd-vm
  2020-06-02 10:16         ` Mathieu Othacehe
@ 2020-06-02 12:23           ` Jan Nieuwenhuizen
  2020-06-02 12:40             ` Ludovic Courtès
  0 siblings, 1 reply; 67+ messages in thread
From: Jan Nieuwenhuizen @ 2020-06-02 12:23 UTC (permalink / raw)
  To: Mathieu Othacehe; +Cc: 41541

[-- Attachment #1: Type: text/plain, Size: 1352 bytes --]

Mathieu Othacehe writes:

Hi Mathieu,

> Having an RC argument passed directly by the bootloader seems like a
> good way to proceed for me. This is somehow remotely similar to what we
> are doing with the "initrd" on Linux (pointing to some piece of code
> that needs to be loaded before starting the init process).
>
> You would also need to store this RC argument in the <boot-parameters>
> record, by adding a new field or stuffing it in the "initrd"
> field. Then, we wouldn't need an extra service I guess.

Hmm...I don't understand...probably I'm missing something.

I was thinking to just extend boot-parameters with
--rc-file=%hurd-rc-script, and then add %hurd-rc-script to the SYSTEM
service...How would I get the RC script into SYSTEM without a service?

Anyway...see working prototype attached!  To get rid of the extra sevice
that I added I'd need some help.  Please feel free to just rework it if
you like!

> If we are going that way, the procedures in (gnu build hurd-boot) could
> be passed the "hurd" package to install, and we could maybe get rig of
> the "/hurd" symlink?

Hehe, that would be nice...but IME /hurd isn't easy to get rid of.  The
Hurd code uses it "everywhere" and I seem to remember that a simple
substitute* on the Hurd archive was not enough...sadly I do not remember
the details, so maybe...

Greetings,
Janneke


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-gnu-services-Add-hurd-startup-service.patch --]
[-- Type: text/x-patch, Size: 8200 bytes --]

From e11e59cbcd9165e3b885c1019e19aaab471f5498 Mon Sep 17 00:00:00 2001
From: "Jan (janneke) Nieuwenhuizen" <janneke@gnu.org>
Date: Thu, 30 Apr 2020 15:40:07 +0200
Subject: [PATCH] gnu: services: Add %hurd-startup-service.

This decouples startup of the Hurd from the "hurd" package, moving the RC
script into SYSTEM.

* gnu/packages/hurd.scm (hurd)[inputs]: Remove hurd-rc-script.
[arguments]: Do not substitute it.  Update "runsystem.sh" to parse
kernel arguments and exec into --rc-file=RC-FILE.
(hurd-rc-script): Move to...
* gnu/services.scm (%hurd-rc-file): ...this new variable.
(bootable-kernel-arguments): Use it.
(%hurd-bare-metal-service): New variable.
* gnu/system.scm (hurd-default-essential-services): Use it.
---
 gnu/packages/hurd.scm | 52 ++++++++++---------------------------------
 gnu/services.scm      | 40 +++++++++++++++++++++++++++++++++
 gnu/system.scm        | 21 ++++++++++-------
 3 files changed, 65 insertions(+), 48 deletions(-)

diff --git a/gnu/packages/hurd.scm b/gnu/packages/hurd.scm
index 5de4acb1c5..542ca1e229 100644
--- a/gnu/packages/hurd.scm
+++ b/gnu/packages/hurd.scm
@@ -310,32 +310,6 @@ Hurd-minimal package which are needed for both glibc and GCC.")
      (base32
       "0p2vhnc18cnbmb39vq4m7hzv4mhnm2l0a2s7gx3ar277fwng3hys"))))
 
-(define (hurd-rc-script)
-  "Return a script to be installed as /libexec/rc in the 'hurd' package.  The
-script takes care of installing the relevant passive translators on the first
-boot, since this cannot be done from GNU/Linux.  Then, it runs system
-activation; starting the Shepherd."
-
-  (define rc
-    (with-imported-modules '((guix build utils)
-                             (gnu build hurd-boot)
-                             (guix build syscalls))
-      #~(begin
-          (use-modules (guix build utils)
-                       (gnu build hurd-boot)
-                       (guix build syscalls)
-                       (ice-9 match)
-                       (system repl repl)
-                       (srfi srfi-1)
-                       (srfi srfi-26))
-
-          (boot-hurd-system))))
-
-  ;; FIXME: We want the program to use the cross-compiled Guile when
-  ;; cross-compiling.  But why do we need to be explicit here?
-  (with-parameters ((%current-target-system "i586-pc-gnu"))
-    (program-file "rc" rc)))
-
 (define dde-sources
   ;; This is the current tip of the dde branch
   (let ((commit "ac1c7eb7a8b24b7469bed5365be38a968d59a136"))
@@ -417,11 +391,19 @@ PATH=@PATH@
 fsck --yes --force /
 fsysopts / --writable
 settrans -c /servers/socket/1 /hurd/pflocal
-echo Starting /libexec/rc ...
-exec /libexec/rc \"$@\"
-")))
-             ))
 
+# parse multiboot arguments
+for i in \"$@\"; do
+    case $i in
+        (--rc-file=*)
+            rc=${i#--rc-file=}
+            ;;
+    esac
+done
+
+echo Starting ${rc}...
+exec ${rc} \"$@\"
+")))))
          (add-before 'build 'set-file-names
            (lambda* (#:key inputs outputs #:allow-other-keys)
              (let* ((out  (assoc-ref outputs "out"))
@@ -483,15 +465,6 @@ exec /libexec/rc \"$@\"
                (mkdir-p datadir)
                (copy-file "unifont"
                           (string-append datadir "/vga-system.bdf"))
-               #t)))
-         (add-after 'install 'install-rc-file
-           (lambda* (#:key inputs outputs #:allow-other-keys)
-             (let* ((out  (assoc-ref outputs "out"))
-                    (file (string-append out "/libexec/rc"))
-                    (rc   (assoc-ref inputs "hurd-rc"))
-                    (coreutils (assoc-ref inputs "coreutils")))
-               (delete-file file)
-               (copy-file rc file)
                #t))))
        #:configure-flags (list (string-append "LDFLAGS=-Wl,-rpath="
                                               %output "/lib")
@@ -506,7 +479,6 @@ exec /libexec/rc \"$@\"
     (build-system gnu-build-system)
     (inputs
      `(("glibc-hurd-headers" ,glibc/hurd-headers)
-       ("hurd-rc" ,(hurd-rc-script))
 
        ("libgcrypt" ,libgcrypt)                  ;for /hurd/random
        ("libdaemon" ,libdaemon)                  ;for /bin/console --daemonize
diff --git a/gnu/services.scm b/gnu/services.scm
index 4e0bbc0249..b21520eafc 100644
--- a/gnu/services.scm
+++ b/gnu/services.scm
@@ -94,6 +94,8 @@
             activation-service-type
             activation-service->script
             %linux-bare-metal-service
+            %hurd-rc-script
+            %hurd-startup-service
             special-files-service-type
             extra-special-file
             etc-service-type
@@ -630,6 +632,44 @@ ACTIVATION-SCRIPT-TYPE."
                   activation-service-type
                   %linux-kernel-activation))
 
+;; XXX this won't go into SYSTEM (as system-service); the result is fine
+;; though and it gets picked-up well by --rc-file=%hurd-rc-script
+(define %hurd-rc-script
+  ;; The RC script to be started upon boot.
+  (program-file "rc"
+                (with-imported-modules '((guix build utils)
+                                         (gnu build hurd-boot)
+                                         (guix build syscalls))
+                  #~(begin
+                      (use-modules (guix build utils)
+                                   (gnu build hurd-boot)
+                                   (guix build syscalls)
+                                   (ice-9 match)
+                                   (system repl repl)
+                                   (srfi srfi-1)
+                                   (srfi srfi-26))
+                      (boot-hurd-system)))))
+
+(define (hurd-rc-entry mrc)
+  "Return, as a monadic value, an entry for the RC script in the system
+directory."
+  (mlet %store-monad ((rc mrc))
+    (return `(("rc" ,rc)))))
+
+(define hurd-startup-service-type
+  ;; The service that creates the initial RC startup file.
+  (service-type (name 'startup)
+                (extensions
+                 (list (service-extension system-service-type hurd-rc-entry)))
+                (compose identity)
+                (extend (const (lower-object %hurd-rc-script)))
+                (description
+                 "Produce the operating system's RC script, which is executed
+by RUNSYSTEM.")))
+
+(define %hurd-startup-service
+  ;; The service that produces the RC script.
+  (service hurd-startup-service-type #t))
 
 (define special-files-service-type
   ;; Service to install "special files" such as /bin/sh and /usr/bin/env.
diff --git a/gnu/system.scm b/gnu/system.scm
index 41c551af0b..09ab574278 100644
--- a/gnu/system.scm
+++ b/gnu/system.scm
@@ -170,14 +170,18 @@
 
 (define (bootable-kernel-arguments system root-device)
   "Return a list of kernel arguments (gexps) to boot SYSTEM from ROOT-DEVICE."
-  (list (string-append "--root="
-                       ;; Note: Always use the DCE format because that's what
-                       ;; (gnu build linux-boot) expects for the '--root'
-                       ;; kernel command-line option.
-                       (file-system-device->string root-device
-                                                   #:uuid-type 'dce))
-        #~(string-append "--system=" #$system)
-        #~(string-append "--load=" #$system "/boot")))
+  (append
+   (if (hurd-target?)
+       (list #~(string-append "--rc-file=" #$%hurd-rc-script))
+       '())
+   (list (string-append "--root="
+                        ;; Note: Always use the DCE format because that's what
+                        ;; (gnu build linux-boot) expects for the '--root'
+                        ;; kernel command-line option.
+                        (file-system-device->string root-device
+                                                    #:uuid-type 'dce))
+         #~(string-append "--system=" #$system)
+         #~(string-append "--load=" #$system "/boot"))))
 
 ;; System-wide configuration.
 ;; TODO: Add per-field docstrings/stexi.
@@ -610,6 +614,7 @@ bookkeeping."
 (define (hurd-default-essential-services os)
   (list (service system-service-type '())
         %boot-service
+        %hurd-startup-service
         %activation-service
         %shepherd-root-service
         (service user-processes-service-type)
-- 
2.26.2


[-- Attachment #3: Type: text/plain, Size: 152 bytes --]


-- 
Jan Nieuwenhuizen <janneke@gnu.org> | GNU LilyPond http://lilypond.org
Freelance IT http://JoyofSource.com | Avatar® http://AvatarAcademy.com

^ permalink raw reply related	[flat|nested] 67+ messages in thread

* bug#41541: merge wip-hurd-vm
  2020-06-02 12:23           ` Jan Nieuwenhuizen
@ 2020-06-02 12:40             ` Ludovic Courtès
  2020-06-02 13:39               ` Jan Nieuwenhuizen
  0 siblings, 1 reply; 67+ messages in thread
From: Ludovic Courtès @ 2020-06-02 12:40 UTC (permalink / raw)
  To: Jan Nieuwenhuizen; +Cc: 41541, Mathieu Othacehe

Hi,

Jan Nieuwenhuizen <janneke@gnu.org> skribis:

>> Having an RC argument passed directly by the bootloader seems like a
>> good way to proceed for me. This is somehow remotely similar to what we
>> are doing with the "initrd" on Linux (pointing to some piece of code
>> that needs to be loaded before starting the init process).
>>
>> You would also need to store this RC argument in the <boot-parameters>
>> record, by adding a new field or stuffing it in the "initrd"
>> field. Then, we wouldn't need an extra service I guess.
>
> Hmm...I don't understand...probably I'm missing something.
>
> I was thinking to just extend boot-parameters with
> --rc-file=%hurd-rc-script, and then add %hurd-rc-script to the SYSTEM
> service...How would I get the RC script into SYSTEM without a service?

Normally, if you have the system (as returned by ‘guix system build’),
that’s enough to derive any other kind of thing you might want.

So for example, you could have a “startup” (or “rc”) entry in the
‘system’ directory by extending ‘system-service-type’.  And since the
system is known from the boot command line, bingo.

The guideline IMO should be to remain as close as possible to Guix
System on GNU/Linux.  It’s OK to depart a bit from upstream Hurd though
because those bits are not actually used (Debian does its own thing).

>> If we are going that way, the procedures in (gnu build hurd-boot) could
>> be passed the "hurd" package to install, and we could maybe get rig of
>> the "/hurd" symlink?
>
> Hehe, that would be nice...but IME /hurd isn't easy to get rid of.

Some of the /hurd names are embedded in libc, via the Hurd’s paths.h.
Some names are compared by string (!); for instance, symlink.c in libc
has:

  /* A symlink is a file whose translator is "/hurd/symlink\0target\0".  */

  memcpy (buf, _HURD_SYMLINK, sizeof (_HURD_SYMLINK));
  memcpy (&buf[sizeof (_HURD_SYMLINK)], from, len);

That makes it next to impossible to remove /hurd.

I think it should be treated like /bin/sh and /run/current-system: set
up at activation time.

>>From e11e59cbcd9165e3b885c1019e19aaab471f5498 Mon Sep 17 00:00:00 2001
> From: "Jan (janneke) Nieuwenhuizen" <janneke@gnu.org>
> Date: Thu, 30 Apr 2020 15:40:07 +0200
> Subject: [PATCH] gnu: services: Add %hurd-startup-service.
>
> This decouples startup of the Hurd from the "hurd" package, moving the RC
> script into SYSTEM.
>
> * gnu/packages/hurd.scm (hurd)[inputs]: Remove hurd-rc-script.
> [arguments]: Do not substitute it.  Update "runsystem.sh" to parse
> kernel arguments and exec into --rc-file=RC-FILE.
> (hurd-rc-script): Move to...
> * gnu/services.scm (%hurd-rc-file): ...this new variable.
> (bootable-kernel-arguments): Use it.
> (%hurd-bare-metal-service): New variable.
> * gnu/system.scm (hurd-default-essential-services): Use it.

[…]

> +;; XXX this won't go into SYSTEM (as system-service); the result is fine
> +;; though and it gets picked-up well by --rc-file=%hurd-rc-script
> +(define %hurd-rc-script
> +  ;; The RC script to be started upon boot.
> +  (program-file "rc"
> +                (with-imported-modules '((guix build utils)
> +                                         (gnu build hurd-boot)
> +                                         (guix build syscalls))

Probably use ‘source-module-closure’ to be on the safe side.

> +(define (hurd-rc-entry mrc)
> +  "Return, as a monadic value, an entry for the RC script in the system
> +directory."
> +  (mlet %store-monad ((rc mrc))
> +    (return `(("rc" ,rc)))))
> +
> +(define hurd-startup-service-type
> +  ;; The service that creates the initial RC startup file.
> +  (service-type (name 'startup)
> +                (extensions
> +                 (list (service-extension system-service-type hurd-rc-entry)))
> +                (compose identity)
> +                (extend (const (lower-object %hurd-rc-script)))
> +                (description
> +                 "Produce the operating system's RC script, which is executed
> +by RUNSYSTEM.")))

Is this service really meant to be extensible?  If not, we could just do:

  (service-type (name 'startup)
                (extensions
                 (list (service-extension system-service-type hurd-rc-entry)))
                (default-value %hurd-rc-script))

where:

  (define (hurd-rc-entry rc)
    (mlet %store-monad ((rc (lower-object rc)))
      (return `(("rc" ,rc)))))

> +  (append
> +   (if (hurd-target?)
> +       (list #~(string-append "--rc-file=" #$%hurd-rc-script))
> +       '())
> +   (list (string-append "--root="
> +                        ;; Note: Always use the DCE format because that's what
> +                        ;; (gnu build linux-boot) expects for the '--root'
> +                        ;; kernel command-line option.
> +                        (file-system-device->string root-device
> +                                                    #:uuid-type 'dce))
> +         #~(string-append "--system=" #$system)
> +         #~(string-append "--load=" #$system "/boot"))))

So my suggestion is to avoid --rc-file since you know that SYSTEM/rc
exists.

Ludo’, who jumps in the middle of the discussion.  :-)




^ permalink raw reply	[flat|nested] 67+ messages in thread

* bug#41541: merge wip-hurd-vm
  2020-06-02 12:40             ` Ludovic Courtès
@ 2020-06-02 13:39               ` Jan Nieuwenhuizen
  2020-06-03  9:18                 ` Ludovic Courtès
  0 siblings, 1 reply; 67+ messages in thread
From: Jan Nieuwenhuizen @ 2020-06-02 13:39 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: 41541, Mathieu Othacehe

[-- Attachment #1: Type: text/plain, Size: 5009 bytes --]

Ludovic Courtès writes:

Hello!

> Jan Nieuwenhuizen <janneke@gnu.org> skribis:
>
>>> Having an RC argument passed directly by the bootloader seems like a
>>> good way to proceed for me. This is somehow remotely similar to what we
>>> are doing with the "initrd" on Linux (pointing to some piece of code
>>> that needs to be loaded before starting the init process).
>>>
>>> You would also need to store this RC argument in the <boot-parameters>
>>> record, by adding a new field or stuffing it in the "initrd"
>>> field. Then, we wouldn't need an extra service I guess.
>>
>> Hmm...I don't understand...probably I'm missing something.
>>
>> I was thinking to just extend boot-parameters with
>> --rc-file=%hurd-rc-script, and then add %hurd-rc-script to the SYSTEM
>> service...How would I get the RC script into SYSTEM without a service?
>
> Normally, if you have the system (as returned by ‘guix system build’),
> that’s enough to derive any other kind of thing you might want.
>
> So for example, you could have a “startup” (or “rc”) entry in the
> ‘system’ directory by extending ‘system-service-type’.  And since the
> system is known from the boot command line, bingo.
>
> The guideline IMO should be to remain as close as possible to Guix
> System on GNU/Linux.  It’s OK to depart a bit from upstream Hurd though
> because those bits are not actually used (Debian does its own thing).

Okay, that makes sense. Using --system=SYSTEM => SYSTEM/rc now.

>>> If we are going that way, the procedures in (gnu build hurd-boot) could
>>> be passed the "hurd" package to install, and we could maybe get rig of
>>> the "/hurd" symlink?
>>
>> Hehe, that would be nice...but IME /hurd isn't easy to get rid of.
>
> Some of the /hurd names are embedded in libc, via the Hurd’s paths.h.
> Some names are compared by string (!); for instance, symlink.c in libc
> has:
>
>   /* A symlink is a file whose translator is "/hurd/symlink\0target\0".  */
>
>   memcpy (buf, _HURD_SYMLINK, sizeof (_HURD_SYMLINK));
>   memcpy (&buf[sizeof (_HURD_SYMLINK)], from, len);
>
> That makes it next to impossible to remove /hurd.
>
> I think it should be treated like /bin/sh and /run/current-system: set
> up at activation time.

Ah right...I think this is exactly what I found (and forgot).  The file
system embeds the full file-name...that's unfortunate.

>> +(define %hurd-rc-script
>> +  ;; The RC script to be started upon boot.
>> +  (program-file "rc"
>> +                (with-imported-modules '((guix build utils)
>> +                                         (gnu build hurd-boot)
>> +                                         (guix build syscalls))
>
> Probably use ‘source-module-closure’ to be on the safe side.

Nice!

>> +(define (hurd-rc-entry mrc)
>> +  "Return, as a monadic value, an entry for the RC script in the system
>> +directory."
>> +  (mlet %store-monad ((rc mrc))
>> +    (return `(("rc" ,rc)))))
>> +
>> +(define hurd-startup-service-type
>> +  ;; The service that creates the initial RC startup file.
>> +  (service-type (name 'startup)
>> +                (extensions
>> +                 (list (service-extension system-service-type hurd-rc-entry)))
>> +                (compose identity)
>> +                (extend (const (lower-object %hurd-rc-script)))
>> +                (description
>> +                 "Produce the operating system's RC script, which is executed
>> +by RUNSYSTEM.")))
>
> Is this service really meant to be extensible?  If not, we could just do:

(no)

>   (service-type (name 'startup)
>                 (extensions
>                  (list (service-extension system-service-type hurd-rc-entry)))
>                 (default-value %hurd-rc-script))
>
> where:
>
>   (define (hurd-rc-entry rc)
>     (mlet %store-monad ((rc (lower-object rc)))
>       (return `(("rc" ,rc)))))

Thanks, done!

>> +  (append
>> +   (if (hurd-target?)
>> +       (list #~(string-append "--rc-file=" #$%hurd-rc-script))
>> +       '())
>> +   (list (string-append "--root="
>> +                        ;; Note: Always use the DCE format because that's what
>> +                        ;; (gnu build linux-boot) expects for the '--root'
>> +                        ;; kernel command-line option.
>> +                        (file-system-device->string root-device
>> +                                                    #:uuid-type 'dce))
>> +         #~(string-append "--system=" #$system)
>> +         #~(string-append "--load=" #$system "/boot"))))
>
> So my suggestion is to avoid --rc-file since you know that SYSTEM/rc
> exists.

Done!

> Ludo’, who jumps in the middle of the discussion.  :-)

Very helpful indeed :-) -- attaching new version (and much tempted to
push to wip-hurd-vm now).

Any more wishes or ideas, things to be done before merging?  Not all
patches were reviewed in their current form, I think.

Janneke


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: v2-0001-gnu-services-Add-hurd-startup-service.patch --]
[-- Type: text/x-patch, Size: 6664 bytes --]

From 37c2a57d72f5678ec21a48ed4a3b733a20b71ab1 Mon Sep 17 00:00:00 2001
From: "Jan (janneke) Nieuwenhuizen" <janneke@gnu.org>
Date: Thu, 30 Apr 2020 15:40:07 +0200
Subject: [PATCH v2] gnu: services: Add %hurd-startup-service.

This decouples startup of the Hurd from the "hurd" package, moving the RC
script into SYSTEM.

* gnu/packages/hurd.scm (hurd)[inputs]: Remove hurd-rc-script.
[arguments]: Do not substitute it.  Update "runsystem.sh" to parse kernel
arguments and exec into --system=SYSTEM/rc.
(hurd-rc-script): Move to...
* gnu/services.scm (%hurd-rc-file): ...this new variable.
(hurd-rc-entry): New procedure.
(%hurd-startup-service): Use it in new variable.
* gnu/system.scm (hurd-default-essential-services): Use it.
---
 gnu/packages/hurd.scm | 52 ++++++++++---------------------------------
 gnu/services.scm      | 35 +++++++++++++++++++++++++++++
 gnu/system.scm        |  1 +
 3 files changed, 48 insertions(+), 40 deletions(-)

diff --git a/gnu/packages/hurd.scm b/gnu/packages/hurd.scm
index 5de4acb1c5..9dc03c6c9c 100644
--- a/gnu/packages/hurd.scm
+++ b/gnu/packages/hurd.scm
@@ -310,32 +310,6 @@ Hurd-minimal package which are needed for both glibc and GCC.")
      (base32
       "0p2vhnc18cnbmb39vq4m7hzv4mhnm2l0a2s7gx3ar277fwng3hys"))))
 
-(define (hurd-rc-script)
-  "Return a script to be installed as /libexec/rc in the 'hurd' package.  The
-script takes care of installing the relevant passive translators on the first
-boot, since this cannot be done from GNU/Linux.  Then, it runs system
-activation; starting the Shepherd."
-
-  (define rc
-    (with-imported-modules '((guix build utils)
-                             (gnu build hurd-boot)
-                             (guix build syscalls))
-      #~(begin
-          (use-modules (guix build utils)
-                       (gnu build hurd-boot)
-                       (guix build syscalls)
-                       (ice-9 match)
-                       (system repl repl)
-                       (srfi srfi-1)
-                       (srfi srfi-26))
-
-          (boot-hurd-system))))
-
-  ;; FIXME: We want the program to use the cross-compiled Guile when
-  ;; cross-compiling.  But why do we need to be explicit here?
-  (with-parameters ((%current-target-system "i586-pc-gnu"))
-    (program-file "rc" rc)))
-
 (define dde-sources
   ;; This is the current tip of the dde branch
   (let ((commit "ac1c7eb7a8b24b7469bed5365be38a968d59a136"))
@@ -417,11 +391,19 @@ PATH=@PATH@
 fsck --yes --force /
 fsysopts / --writable
 settrans -c /servers/socket/1 /hurd/pflocal
-echo Starting /libexec/rc ...
-exec /libexec/rc \"$@\"
-")))
-             ))
 
+# parse multiboot arguments
+for i in \"$@\"; do
+    case $i in
+        (--system=*)
+            system=${i#--system=}
+            ;;
+    esac
+done
+
+echo Starting ${system}/rc...
+exec ${system}/rc \"$@\"
+")))))
          (add-before 'build 'set-file-names
            (lambda* (#:key inputs outputs #:allow-other-keys)
              (let* ((out  (assoc-ref outputs "out"))
@@ -483,15 +465,6 @@ exec /libexec/rc \"$@\"
                (mkdir-p datadir)
                (copy-file "unifont"
                           (string-append datadir "/vga-system.bdf"))
-               #t)))
-         (add-after 'install 'install-rc-file
-           (lambda* (#:key inputs outputs #:allow-other-keys)
-             (let* ((out  (assoc-ref outputs "out"))
-                    (file (string-append out "/libexec/rc"))
-                    (rc   (assoc-ref inputs "hurd-rc"))
-                    (coreutils (assoc-ref inputs "coreutils")))
-               (delete-file file)
-               (copy-file rc file)
                #t))))
        #:configure-flags (list (string-append "LDFLAGS=-Wl,-rpath="
                                               %output "/lib")
@@ -506,7 +479,6 @@ exec /libexec/rc \"$@\"
     (build-system gnu-build-system)
     (inputs
      `(("glibc-hurd-headers" ,glibc/hurd-headers)
-       ("hurd-rc" ,(hurd-rc-script))
 
        ("libgcrypt" ,libgcrypt)                  ;for /hurd/random
        ("libdaemon" ,libdaemon)                  ;for /bin/console --daemonize
diff --git a/gnu/services.scm b/gnu/services.scm
index 4e0bbc0249..5a04964790 100644
--- a/gnu/services.scm
+++ b/gnu/services.scm
@@ -94,6 +94,8 @@
             activation-service-type
             activation-service->script
             %linux-bare-metal-service
+            %hurd-rc-script
+            %hurd-startup-service
             special-files-service-type
             extra-special-file
             etc-service-type
@@ -630,6 +632,39 @@ ACTIVATION-SCRIPT-TYPE."
                   activation-service-type
                   %linux-kernel-activation))
 
+(define %hurd-rc-script
+  ;; The RC script to be started upon boot.
+  (program-file "rc"
+                (with-imported-modules (source-module-closure
+                                        '((guix build utils)
+                                          (gnu build hurd-boot)
+                                          (guix build syscalls)))
+                  #~(begin
+                      (use-modules (guix build utils)
+                                   (gnu build hurd-boot)
+                                   (guix build syscalls)
+                                   (ice-9 match)
+                                   (system repl repl)
+                                   (srfi srfi-1)
+                                   (srfi srfi-26))
+                      (boot-hurd-system)))))
+
+(define (hurd-rc-entry rc)
+  "Return, as a monadic value, an entry for the RC script in the system
+directory."
+  (mlet %store-monad ((rc (lower-object rc)))
+    (return `(("rc" ,rc)))))
+
+(define hurd-startup-service-type
+  ;; The service that creates the initial SYSTEM/rc startup file.
+  (service-type (name 'startup)
+                (extensions
+                 (list (service-extension system-service-type hurd-rc-entry)))
+                (default-value %hurd-rc-script)))
+
+(define %hurd-startup-service
+  ;; The service that produces the RC script.
+  (service hurd-startup-service-type %hurd-rc-script))
 
 (define special-files-service-type
   ;; Service to install "special files" such as /bin/sh and /usr/bin/env.
diff --git a/gnu/system.scm b/gnu/system.scm
index 41c551af0b..c20f4649f9 100644
--- a/gnu/system.scm
+++ b/gnu/system.scm
@@ -610,6 +610,7 @@ bookkeeping."
 (define (hurd-default-essential-services os)
   (list (service system-service-type '())
         %boot-service
+        %hurd-startup-service
         %activation-service
         %shepherd-root-service
         (service user-processes-service-type)
-- 
2.26.2


[-- Attachment #3: Type: text/plain, Size: 152 bytes --]


-- 
Jan Nieuwenhuizen <janneke@gnu.org> | GNU LilyPond http://lilypond.org
Freelance IT http://JoyofSource.com | Avatar® http://AvatarAcademy.com

^ permalink raw reply related	[flat|nested] 67+ messages in thread

* bug#41541: merge wip-hurd-vm
  2020-06-02 13:39               ` Jan Nieuwenhuizen
@ 2020-06-03  9:18                 ` Ludovic Courtès
  2020-06-03 15:22                   ` Jan Nieuwenhuizen
  0 siblings, 1 reply; 67+ messages in thread
From: Ludovic Courtès @ 2020-06-03  9:18 UTC (permalink / raw)
  To: Jan Nieuwenhuizen; +Cc: 41541, Mathieu Othacehe

Hi,

Jan Nieuwenhuizen <janneke@gnu.org> skribis:

> From 37c2a57d72f5678ec21a48ed4a3b733a20b71ab1 Mon Sep 17 00:00:00 2001
> From: "Jan (janneke) Nieuwenhuizen" <janneke@gnu.org>
> Date: Thu, 30 Apr 2020 15:40:07 +0200
> Subject: [PATCH v2] gnu: services: Add %hurd-startup-service.
>
> This decouples startup of the Hurd from the "hurd" package, moving the RC
> script into SYSTEM.
>
> * gnu/packages/hurd.scm (hurd)[inputs]: Remove hurd-rc-script.
> [arguments]: Do not substitute it.  Update "runsystem.sh" to parse kernel
> arguments and exec into --system=SYSTEM/rc.
> (hurd-rc-script): Move to...
> * gnu/services.scm (%hurd-rc-file): ...this new variable.
> (hurd-rc-entry): New procedure.
> (%hurd-startup-service): Use it in new variable.
> * gnu/system.scm (hurd-default-essential-services): Use it.

LGTM, thank you!

Ludo’.




^ permalink raw reply	[flat|nested] 67+ messages in thread

* bug#41541: merge wip-hurd-vm
  2020-06-03  9:18                 ` Ludovic Courtès
@ 2020-06-03 15:22                   ` Jan Nieuwenhuizen
  2020-06-03 15:38                     ` Mathieu Othacehe
  0 siblings, 1 reply; 67+ messages in thread
From: Jan Nieuwenhuizen @ 2020-06-03 15:22 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: 41541, Mathieu Othacehe

Ludovic Courtès writes:

>> From 37c2a57d72f5678ec21a48ed4a3b733a20b71ab1 Mon Sep 17 00:00:00 2001
>> From: "Jan (janneke) Nieuwenhuizen" <janneke@gnu.org>
>> Date: Thu, 30 Apr 2020 15:40:07 +0200
>> Subject: [PATCH v2] gnu: services: Add %hurd-startup-service.
>>
>> This decouples startup of the Hurd from the "hurd" package, moving the RC
>> script into SYSTEM.
>>
>> * gnu/packages/hurd.scm (hurd)[inputs]: Remove hurd-rc-script.
>> [arguments]: Do not substitute it.  Update "runsystem.sh" to parse kernel
>> arguments and exec into --system=SYSTEM/rc.
>> (hurd-rc-script): Move to...
>> * gnu/services.scm (%hurd-rc-file): ...this new variable.
>> (hurd-rc-entry): New procedure.
>> (%hurd-startup-service): Use it in new variable.
>> * gnu/system.scm (hurd-default-essential-services): Use it.
>
> LGTM, thank you!

Great...pushed to wip-hurd-vm.

So...in the hope that this is helpful I created an overview of all of
current wip-hurd-vm.

Legend (in order of merge'ability / is there a convention for this?):

  [M] Mathieu
  [L] Ludo
   g  good to go LGTM'd
   t  trivial (self-LGTM :-)
   .  direct dependency of/partially superseded by a LGTM

      ack or review needed
   !  troublesome

My take on wip-hurd-vm:

   g  37c2a57d72 gnu: services: Add %hurd-startup-service.
   .  ef647de139 hurd-boot: Use setxattr instead of MAKEDEV.
   .  27f049273f hurd-boot: Further cleanup of "rc".
      b73d83f217 syscalls: set-thread-name, thread-name: Stub for the Hurd.
   t  60a510741c system: bare-hurd.tmpl: Add openssh client and service.
   t  57c16e4e6a system: hurd: Remove 'cross-hurd-image' hack.
   .  f287c8992a system: hurd: Populate services.
   g  ac0fc836a2 services: Add `hurd-getty-service-type'.
   g  e28364ea2d services: Add `hurd-console-service-type'.
   .  8e31888648 gnu: hurd: Create minimal "runsystem" script to invoke "rc".
      17638f3b4d services: hurd: Use activation-service, hurd-etc-service.
      6ed827c281 system: Add `hurd-activation'.
      83a245a8e0 services: hurd: Add `hurd-etc-service'.
      d04e51d196 system: examples: Add bare-hurd.tmpl.
   t  b8bccce071 system: Use 'hurd' package in label.
   g  cf92e7393b bootloader: grub: Add support for multiboot.
   g  1a236d1535 system: Add 'multiboot-modules' field to <boot-parameters>.
   g  6a6fc5fd64 bootloader: Extend `<menu-entry>' for multiboot.
      dd0a930ea8 system: Add 'hurd' field to <operating-system>.
      da3afc95f4 system: hurd: Add hurd-default-essential-services.
   !  ee81319934 image: Support extra-directives, add hurd-directives.
   t  4479c1c1e3 linux-boot: Update 'make-hurd-device-nodes'.
  [M] a17f91bd50 image: Add Hurd support.
   t  7359403993 gnu: hurd: Update to upstream Hurd-reserved xattr index.
  [L] 68a8a26a57 gnu: guile-static: Disable JIT on ARMv7.
  [L] 220243a2c6 vm: Shared-store script runs that native QEMU and Bash.
  [L] e3b6c5dce2 vm: <virtual-machine> compiler honors system and target.
  [L] d43423f074 vm: 'qemu-image' preserves the cross-compilation target of the OS.
  [L] c6ee3a059b vm: 'qemu-image' uses the native partitioning tools and bootloader.
  [L] ab06638f57 vm: 'expression->derivation-in-linux-vm' always returns a native build.
  [L] 113ba9d7a9 system: 'system-linux-image-file-name' takes an optional parameter.

Hoping this is helpful,
Greetings, Janneke

-- 
Jan Nieuwenhuizen <janneke@gnu.org> | GNU LilyPond http://lilypond.org
Freelance IT http://JoyofSource.com | Avatar® http://AvatarAcademy.com




^ permalink raw reply	[flat|nested] 67+ messages in thread

* bug#41541: merge wip-hurd-vm
  2020-06-03 15:22                   ` Jan Nieuwenhuizen
@ 2020-06-03 15:38                     ` Mathieu Othacehe
  2020-06-03 20:27                       ` Jan Nieuwenhuizen
  0 siblings, 1 reply; 67+ messages in thread
From: Mathieu Othacehe @ 2020-06-03 15:38 UTC (permalink / raw)
  To: Jan Nieuwenhuizen; +Cc: 41541


Hey!

> Legend (in order of merge'ability / is there a convention for this?):
>
>   [M] Mathieu
>   [L] Ludo
>    g  good to go LGTM'd
>    t  trivial (self-LGTM :-)
>    .  direct dependency of/partially superseded by a LGTM
>
>       ack or review needed
>    !  troublesome

Hehe, nice one :)

>    !  ee81319934 image: Support extra-directives, add hurd-directives.

This one now only contains the hurd symlink, that you could be done at
activation I guess.

>    t  4479c1c1e3 linux-boot: Update 'make-hurd-device-nodes'.
>   [M] a17f91bd50 image: Add Hurd support.
>    t  7359403993 gnu: hurd: Update to upstream Hurd-reserved xattr index.
>   [L] 68a8a26a57 gnu: guile-static: Disable JIT on ARMv7.
>   [L] 220243a2c6 vm: Shared-store script runs that native QEMU and Bash.
>   [L] e3b6c5dce2 vm: <virtual-machine> compiler honors system and target.
>   [L] d43423f074 vm: 'qemu-image' preserves the cross-compilation target of the OS.
>   [L] c6ee3a059b vm: 'qemu-image' uses the native partitioning tools and bootloader.
>   [L] ab06638f57 vm: 'expression->derivation-in-linux-vm' always returns a native build.
>   [L] 113ba9d7a9 system: 'system-linux-image-file-name' takes an optional parameter.

For the rest, maybe you could send a patch serie by email with all the
patch that are tagged ' ' or '!'. This way we could proceed to a last
review round?

Thanks,

Mathieu




^ permalink raw reply	[flat|nested] 67+ messages in thread

* bug#41541: merge wip-hurd-vm
  2020-06-03 15:38                     ` Mathieu Othacehe
@ 2020-06-03 20:27                       ` Jan Nieuwenhuizen
  2020-06-04  9:32                         ` Ludovic Courtès
  0 siblings, 1 reply; 67+ messages in thread
From: Jan Nieuwenhuizen @ 2020-06-03 20:27 UTC (permalink / raw)
  To: Mathieu Othacehe; +Cc: 41541

Mathieu Othacehe writes:

Hi!

>> Legend (in order of merge'ability / is there a convention for this?):
>>
>>   [M] Mathieu
>>   [L] Ludo
>>    g  good to go LGTM'd
>>    t  trivial (self-LGTM :-)
>>    .  direct dependency of/partially superseded by a LGTM
>>
>>       ack or review needed
>>    !  troublesome
>
> Hehe, nice one :)
>
>>    !  ee81319934 image: Support extra-directives, add hurd-directives.
>
> This one now only contains the hurd symlink, that you could be done at
> activation I guess.

I never believed that could work, but to my own eh, ..., I found a way
to make it work.  We "only" need to make sure that /hurd/startup etc.
are found by substitute*'ing some more, and create the symlink.

Reverting that patch and using this diff

--8<---------------cut here---------------start------------->8---
diff --git a/gnu/build/hurd-boot.scm b/gnu/build/hurd-boot.scm
index 20d012fbfa..31260b52a1 100644
--- a/gnu/build/hurd-boot.scm
+++ b/gnu/build/hurd-boot.scm
@@ -45,6 +45,35 @@ Return the value associated with OPTION, or #f on failure."
            (lambda (arg)
              (substring arg (+ 1 (string-index arg #\=)))))))
 
+;; XXX FIXME c&p from guix/utils.scm
+(define (readlink* file)
+  "Call 'readlink' until the result is not a symlink."
+  (define %max-symlink-depth 50)
+
+  (let loop ((file  file)
+             (depth 0))
+    (define (absolute target)
+      (if (absolute-file-name? target)
+          target
+          (string-append (dirname file) "/" target)))
+
+    (if (>= depth %max-symlink-depth)
+        file
+        (call-with-values
+            (lambda ()
+              (catch 'system-error
+                (lambda ()
+                  (values #t (readlink file)))
+                (lambda args
+                  (let ((errno (system-error-errno args)))
+                    (if (or (= errno EINVAL))
+                        (values #f file)
+                        (apply throw args))))))
+          (lambda (success? target)
+            (if success?
+                (loop (absolute target) (+ depth 1))
+                file))))))
+
 (define* (make-hurd-device-nodes #:optional (root "/"))
   "Make some of the nodes needed on GNU/Hurd."
   (define (scope dir)
@@ -199,18 +228,25 @@ XXX TODO: use Linux xattr/setxattr to remove (settrans in) /libexec/RUNSYSTEM
      (format #t "Setting-up essential translators...\n")
      (set-hurd-device-translators)
 
-     (format #t "Starting pager...\n")
-     (unless (zero? (system* "/hurd/mach-defpager"))
-       (format #t "FAILED...Good luck!\n"))
-
      (let* ((args    (command-line))
             (system  (find-long-option "--system" args))
             (to-load (find-long-option "--load" args)))
+
        (false-if-exception (delete-file "/run/current-system"))
        (format #t "Setting current system...~a\n" system)
        (mkdir-p "/run")
        (symlink system "/run/current-system")
+
+       (false-if-exception (delete-file "/hurd"))
+       (let ((hurd/hurd (readlink* (string-append system "/profile/hurd"))))
+         (symlink hurd/hurd "/hurd"))
+
+       (format #t "Starting pager...\n")
+       (unless (zero? (system* "/hurd/mach-defpager"))
+         (format #t "FAILED...Good luck!\n"))
+
        (cond ((member "--repl" args)
+              (format #t "Starting repl...\n")
               (start-repl))
              (to-load
               (format #t "loading '~a'...\n" to-load)
diff --git a/gnu/packages/hurd.scm b/gnu/packages/hurd.scm
index 9dc03c6c9c..087574cd61 100644
--- a/gnu/packages/hurd.scm
+++ b/gnu/packages/hurd.scm
@@ -390,6 +390,8 @@ PATH=@PATH@
 
 fsck --yes --force /
 fsysopts / --writable
+
+# Note: this /hurd/ gets substituted
 settrans -c /servers/socket/1 /hurd/pflocal
 
 # parse multiboot arguments
@@ -421,9 +423,18 @@ exec ${system}/rc \"$@\"
                (substitute* '("utils/uptime.sh")
                  (("/bin/w")
                   (string-append out "/bin/w")))
-               (substitute* "daemons/console-run.c"
+               (substitute* '("boot/boot.c"
+                              "daemons/console-run.c"
+                              "startup/startup.c")
                  (("/hurd/")
                   (string-append out "/hurd/")))
+               (substitute* "hurd/paths.h"
+                 (("_HURD_STARTUP\t")
+                  (string-append "_HURD_STARTUP\t\"" out "\" "))
+                 (("_HURD_PROC\t")
+                  (string-append "_HURD_PROC\t\"" out "\" "))
+                 (("_HURD_AUTH\t")
+                  (string-append "_HURD_AUTH\t\"" out "\" ")))
                (substitute* '("daemons/runsystem.sh"
                               "sutils/MAKEDEV.sh")
                  (("^PATH=.*")
--8<---------------cut here---------------end--------------->8---

produces a bootable VM.  So...this could be great or maybe...well, what
do you think?

>>    t  4479c1c1e3 linux-boot: Update 'make-hurd-device-nodes'.
>>   [M] a17f91bd50 image: Add Hurd support.
>>    t  7359403993 gnu: hurd: Update to upstream Hurd-reserved xattr index.
>>   [L] 68a8a26a57 gnu: guile-static: Disable JIT on ARMv7.
>>   [L] 220243a2c6 vm: Shared-store script runs that native QEMU and Bash.
>>   [L] e3b6c5dce2 vm: <virtual-machine> compiler honors system and target.
>>   [L] d43423f074 vm: 'qemu-image' preserves the cross-compilation target of the OS.
>>   [L] c6ee3a059b vm: 'qemu-image' uses the native partitioning tools and bootloader.
>>   [L] ab06638f57 vm: 'expression->derivation-in-linux-vm' always returns a native build.
>>   [L] 113ba9d7a9 system: 'system-linux-image-file-name' takes an optional parameter.
>
> For the rest, maybe you could send a patch serie by email with all the
> patch that are tagged ' ' or '!'. This way we could proceed to a last
> review round?

Sure, that makes sense.  I'll need some time to move this diff down the
tree and do some testing.

Greetings,
Janneke

-- 
Jan Nieuwenhuizen <janneke@gnu.org> | GNU LilyPond http://lilypond.org
Freelance IT http://JoyofSource.com | Avatar® http://AvatarAcademy.com




^ permalink raw reply related	[flat|nested] 67+ messages in thread

* bug#41541: merge wip-hurd-vm
  2020-06-03 20:27                       ` Jan Nieuwenhuizen
@ 2020-06-04  9:32                         ` Ludovic Courtès
  2020-06-04 11:33                           ` Jan Nieuwenhuizen
  0 siblings, 1 reply; 67+ messages in thread
From: Ludovic Courtès @ 2020-06-04  9:32 UTC (permalink / raw)
  To: Jan Nieuwenhuizen; +Cc: 41541, Mathieu Othacehe

Hi!

Jan Nieuwenhuizen <janneke@gnu.org> skribis:

> --- a/gnu/packages/hurd.scm
> +++ b/gnu/packages/hurd.scm
> @@ -390,6 +390,8 @@ PATH=@PATH@
>  
>  fsck --yes --force /
>  fsysopts / --writable
> +
> +# Note: this /hurd/ gets substituted
>  settrans -c /servers/socket/1 /hurd/pflocal
>  
>  # parse multiboot arguments
> @@ -421,9 +423,18 @@ exec ${system}/rc \"$@\"
>                 (substitute* '("utils/uptime.sh")
>                   (("/bin/w")
>                    (string-append out "/bin/w")))
> -               (substitute* "daemons/console-run.c"
> +               (substitute* '("boot/boot.c"
> +                              "daemons/console-run.c"
> +                              "startup/startup.c")
>                   (("/hurd/")
>                    (string-append out "/hurd/")))
> +               (substitute* "hurd/paths.h"
> +                 (("_HURD_STARTUP\t")
> +                  (string-append "_HURD_STARTUP\t\"" out "\" "))
> +                 (("_HURD_PROC\t")
> +                  (string-append "_HURD_PROC\t\"" out "\" "))
> +                 (("_HURD_AUTH\t")
> +                  (string-append "_HURD_AUTH\t\"" out "\" ")))
>                 (substitute* '("daemons/runsystem.sh"
>                                "sutils/MAKEDEV.sh")
>                   (("^PATH=.*")
>
> produces a bootable VM.  So...this could be great or maybe...well, what
> do you think?

As discussed on IRC, I wonder if changing <hurd/paths.h> is a good idea
because it’s captured by libc, etc.  So it could have the effect of
forcing all the applications to refer to /gnu/store/…-old-hurd instead
of using the (typically more up-to-date) /hurd.

It could also lead to setting /gnu/store/…-old-hurd as passive
translator settings, which would be very bad because
/gnu/store/…-old-hurd could be GC’d (the GC doesn’t scan passive
translator settings and probably never will).

Thanks,
Ludo’.




^ permalink raw reply	[flat|nested] 67+ messages in thread

* bug#41541: merge wip-hurd-vm
  2020-06-04  9:32                         ` Ludovic Courtès
@ 2020-06-04 11:33                           ` Jan Nieuwenhuizen
  2020-06-05 16:08                             ` Ludovic Courtès
  0 siblings, 1 reply; 67+ messages in thread
From: Jan Nieuwenhuizen @ 2020-06-04 11:33 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: 41541, Mathieu Othacehe

Ludovic Courtès writes:

Hello!

> Jan Nieuwenhuizen <janneke@gnu.org> skribis:
>
>> --- a/gnu/packages/hurd.scm
>> +++ b/gnu/packages/hurd.scm

[...]

>> +               (substitute* "hurd/paths.h"
>> +                 (("_HURD_STARTUP\t")
>> +                  (string-append "_HURD_STARTUP\t\"" out "\" "))
>> +                 (("_HURD_PROC\t")
>> +                  (string-append "_HURD_PROC\t\"" out "\" "))
>> +                 (("_HURD_AUTH\t")
>> +                  (string-append "_HURD_AUTH\t\"" out "\" ")))
>>                 (substitute* '("daemons/runsystem.sh"
>>                                "sutils/MAKEDEV.sh")
>>                   (("^PATH=.*")
>>
>> produces a bootable VM.  So...this could be great or maybe...well, what
>> do you think?
>
> As discussed on IRC, I wonder if changing <hurd/paths.h> is a good idea
> because it’s captured by libc, etc.

Thank you for explaining it on IRC and stating it so clearly here again;
this really helped me!

> So it could have the effect of
> forcing all the applications to refer to /gnu/store/…-old-hurd instead
> of using the (typically more up-to-date) /hurd.
>
> It could also lead to setting /gnu/store/…-old-hurd as passive
> translator settings, which would be very bad because
> /gnu/store/…-old-hurd could be GC’d (the GC doesn’t scan passive
> translator settings and probably never will).

Ah...right.  As discussed on IRC, I already tried only using a fixed
file-name for _HURD_STARTUP (out + "/hurd/startup"); which worked.

So, after digesting your message here I took the next step: grep for
_HURD_STARTUP and change it there, like so

diff --git a/gnu/packages/hurd.scm b/gnu/packages/hurd.scm
index 421783eb80..8c73ea8430 100644
--- a/gnu/packages/hurd.scm
+++ b/gnu/packages/hurd.scm
@@ -428,9 +428,10 @@ exec ${system}/rc \"$@\"
                               "startup/startup.c")
                  (("/hurd/")
                   (string-append out "/hurd/")))
-               (substitute* "hurd/paths.h"
-                 (("_HURD_STARTUP\t")
-                  (string-append "_HURD_STARTUP\t\"" out "\" ")))
+               (substitute* '("libdiskfs/boot-start.c"
+                              "libdiskfs/opts-std-startup.c")
+                 (("_HURD_STARTUP")
+                  (string-append "\"" out "/hurd/startup\"")))

This also works, and so I figure we're fine now.  I'm resetting
wip-hurd-vm and, like Mathieu suggested will prepare to send send a
patch series here for the unreviewed subset of patches.

Greetings,
Janneke

-- 
Jan Nieuwenhuizen <janneke@gnu.org> | GNU LilyPond http://lilypond.org
Freelance IT http://JoyofSource.com | Avatar® http://AvatarAcademy.com




^ permalink raw reply related	[flat|nested] 67+ messages in thread

* bug#41541: [PATCH 0/9] Merge wip-hurd-vm "last review round"
  2020-05-26 14:21 bug#41541: merge wip-hurd-vm Jan Nieuwenhuizen
  2020-05-27 10:01 ` Mathieu Othacehe
@ 2020-06-04 13:59 ` Jan (janneke) Nieuwenhuizen
  2020-06-04 13:59   ` bug#41541: [PATCH 1/8] system: Add 'hurd' field to <operating-system> Jan (janneke) Nieuwenhuizen
                     ` (7 more replies)
  2020-06-08 12:57 ` [bug#41541] [PATCH 0/4] Final wip-hurd-vm batch Jan (janneke) Nieuwenhuizen
  2 siblings, 8 replies; 67+ messages in thread
From: Jan (janneke) Nieuwenhuizen @ 2020-06-04 13:59 UTC (permalink / raw)
  To: 41541

From: Jan Nieuwenhuizen <janneke@gnu.org>

Hi!

I've just reset wip-hurd-vm (and already locally fixed one commit message
using a report by jonsger).

This patch set includes all patches that I haven't seen any comments on yet.
"wip-hurd-vm" is currently 23 commits and I believe we're good to go after
this review.

This patch set also includes the already reviewed three <menu-entry>,
<boot-parameters> and grub patches that I don't expect/need an explicit
LGTM on (of course I still take remarks/suggestions if you feel the need).

I based the previous version of wip-hurd-vm onto Ludo's qemu-image work,
mainly to see if it would fix the old vm-image, and make sure that it would
not break anything.  While I would still suggest to merge that work, I have
removed it from wip-hurd-vm; the only supported way to build a VM image for
the Hurd is by using the new disk-image.

Thanks,
Janneke

Jan (janneke) Nieuwenhuizen (8):
  system: Add 'hurd' field to <operating-system>.
  bootloader: Extend `<menu-entry>' for multiboot.
  system: Add 'multiboot-modules' field to <boot-parameters>.
  bootloader: grub: Add support for multiboot.
  system: Use 'hurd' package in label.
  system: examples: Add bare-hurd.tmpl.
  services: hurd: Add `hurd-etc-service'.
  system: Add `hurd-activation'.

 Makefile.am                        |   3 +-
 doc/guix.texi                      |  26 ++++++-
 gnu/bootloader.scm                 |  49 +++++++++++--
 gnu/bootloader/grub.scm            |  71 +++++++++++--------
 gnu/build/activation.scm           |   9 +--
 gnu/local.mk                       |   1 +
 gnu/services.scm                   |  86 +++++++++++++++--------
 gnu/services/hurd.scm              |  61 +++++++++++++++++
 gnu/system.scm                     | 106 +++++++++++++++++++++++------
 gnu/system/examples/bare-hurd.tmpl |  24 +++++++
 gnu/system/hurd.scm                |  50 +++++++++++++-
 11 files changed, 394 insertions(+), 92 deletions(-)
 create mode 100644 gnu/services/hurd.scm
 create mode 100644 gnu/system/examples/bare-hurd.tmpl

-- 
2.26.2





^ permalink raw reply	[flat|nested] 67+ messages in thread

* bug#41541: [PATCH 1/8] system: Add 'hurd' field to <operating-system>.
  2020-06-04 13:59 ` bug#41541: [PATCH 0/9] Merge wip-hurd-vm "last review round" Jan (janneke) Nieuwenhuizen
@ 2020-06-04 13:59   ` Jan (janneke) Nieuwenhuizen
  2020-06-06  7:21     ` Mathieu Othacehe
  2020-06-06 10:45     ` [bug#41541] " Ludovic Courtès
  2020-06-04 13:59   ` bug#41541: [PATCH 2/8] bootloader: Extend `<menu-entry>' for multiboot Jan (janneke) Nieuwenhuizen
                     ` (6 subsequent siblings)
  7 siblings, 2 replies; 67+ messages in thread
From: Jan (janneke) Nieuwenhuizen @ 2020-06-04 13:59 UTC (permalink / raw)
  To: 41541

* gnu/system.scm (<operating-system>)[hurd]: New field.
* doc/guix.texi (operating-system Reference): Document 'hurd'.
---
 doc/guix.texi  | 13 ++++++++++---
 gnu/system.scm |  3 +++
 2 files changed, 13 insertions(+), 3 deletions(-)

diff --git a/doc/guix.texi b/doc/guix.texi
index 056bf011f6..4776eacacd 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -11484,9 +11484,16 @@ configuration (@pxref{Using the Configuration System}).
 
 @table @asis
 @item @code{kernel} (default: @code{linux-libre})
-The package object of the operating system kernel to use@footnote{Currently
-only the Linux-libre kernel is supported.  In the future, it will be
-possible to use the GNU@tie{}Hurd.}.
+The package object of the operating system kernel to
+use@footnote{Currently only the Linux-libre kernel is fully supported.
+Using GNU@tie{}mach in combination with a @code{hurd} is experimental
+and only available when building a vm-image.}.
+
+@cindex hurd
+@item @code{hurd} (default: @code{#f})
+The hurd to be started by the kernel.  This is required to build an
+experimental vm-image for the Hurd and requires using @code{kernel}
+GNU@tie{}mach as well as other specific operating system overrides.
 
 @item @code{kernel-loadable-modules} (default: '())
 A list of objects (usually packages) to collect loadable kernel modules
diff --git a/gnu/system.scm b/gnu/system.scm
index 213452a6f9..43dd2ec598 100644
--- a/gnu/system.scm
+++ b/gnu/system.scm
@@ -83,6 +83,7 @@
             operating-system-packages
             operating-system-host-name
             operating-system-hosts-file
+            operating-system-hurd
             operating-system-kernel
             operating-system-kernel-file
             operating-system-kernel-arguments
@@ -187,6 +188,8 @@
                     (default '()))                ; list of packages
   (kernel-arguments operating-system-user-kernel-arguments
                     (default %default-kernel-arguments)) ; list of gexps/strings
+  (hurd operating-system-hurd
+        (default #f))                             ; package
   (bootloader operating-system-bootloader)        ; <bootloader-configuration>
   (label operating-system-label                   ; string
          (thunked)
-- 
2.26.2





^ permalink raw reply related	[flat|nested] 67+ messages in thread

* bug#41541: [PATCH 2/8] bootloader: Extend `<menu-entry>' for multiboot.
  2020-06-04 13:59 ` bug#41541: [PATCH 0/9] Merge wip-hurd-vm "last review round" Jan (janneke) Nieuwenhuizen
  2020-06-04 13:59   ` bug#41541: [PATCH 1/8] system: Add 'hurd' field to <operating-system> Jan (janneke) Nieuwenhuizen
@ 2020-06-04 13:59   ` Jan (janneke) Nieuwenhuizen
  2020-06-06 10:48     ` [bug#41541] " Ludovic Courtès
  2020-06-04 13:59   ` bug#41541: [PATCH 3/8] system: Add 'multiboot-modules' field to <boot-parameters> Jan (janneke) Nieuwenhuizen
                     ` (5 subsequent siblings)
  7 siblings, 1 reply; 67+ messages in thread
From: Jan (janneke) Nieuwenhuizen @ 2020-06-04 13:59 UTC (permalink / raw)
  To: 41541

* gnu/bootloader.scm (<menu-entry>)[multiboot-kernel,multiboot-arguments,
multiboot-modules]: New fields.
[linux,initrd]: Add default value '#f'.
(menu-entry->sexp, sexp->menu-entry): Support multiboot entry.
---
 gnu/bootloader.scm | 46 +++++++++++++++++++++++++++++++++++++++++-----
 1 file changed, 41 insertions(+), 5 deletions(-)

diff --git a/gnu/bootloader.scm b/gnu/bootloader.scm
index 668caa7fc3..2eebb8e9d9 100644
--- a/gnu/bootloader.scm
+++ b/gnu/bootloader.scm
@@ -3,6 +3,7 @@
 ;;; Copyright © 2017, 2020 Mathieu Othacehe <m.othacehe@gmail.com>
 ;;; Copyright © 2017 Leo Famulari <leo@famulari.name>
 ;;; Copyright © 2019 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2020 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -33,6 +34,9 @@
             menu-entry-linux-arguments
             menu-entry-initrd
             menu-entry-device-mount-point
+            menu-entry-multiboot-kernel
+            menu-entry-multiboot-arguments
+            menu-entry-multiboot-modules
 
             menu-entry->sexp
             sexp->menu-entry
@@ -77,22 +81,41 @@
                    (default #f))
   (device-mount-point menu-entry-device-mount-point
                    (default #f))
-  (linux           menu-entry-linux)
+  (linux           menu-entry-linux
+                   (default #f))
   (linux-arguments menu-entry-linux-arguments
                    (default '()))          ; list of string-valued gexps
-  (initrd          menu-entry-initrd))     ; file name of the initrd as a gexp
+  (initrd          menu-entry-initrd       ; file name of the initrd as a gexp
+                   (default #f))
+  (multiboot-kernel menu-entry-multiboot-kernel
+                    (default #f))
+  (multiboot-arguments menu-entry-multiboot-arguments
+                       (default '()))      ; list of string-valued gexps
+  (multiboot-modules menu-entry-multiboot-modules
+                     (default '())))       ; list of multiboot commands, where
+                                           ; a command is a list of <string>
 
 (define (menu-entry->sexp entry)
   "Return ENTRY serialized as an sexp."
   (match entry
-    (($ <menu-entry> label device mount-point linux linux-arguments initrd)
+    (($ <menu-entry> label device mount-point linux linux-arguments initrd #f
+                     ())
      `(menu-entry (version 0)
                   (label ,label)
                   (device ,device)
                   (device-mount-point ,mount-point)
                   (linux ,linux)
                   (linux-arguments ,linux-arguments)
-                  (initrd ,initrd)))))
+                  (initrd ,initrd)))
+    (($ <menu-entry> label device mount-point #f () #f
+                     multiboot-kernel multiboot-arguments multiboot-modules)
+     `(menu-entry (version 0)
+                  (label ,label)
+                  (device ,device)
+                  (device-mount-point ,mount-point)
+                  (multiboot-kernel ,multiboot-kernel)
+                  (multiboot-arguments ,multiboot-arguments)
+                  (multiboot-modules ,multiboot-modules)))))
 
 (define (sexp->menu-entry sexp)
   "Turn SEXP, an sexp as returned by 'menu-entry->sexp', into a <menu-entry>
@@ -109,7 +132,20 @@ record."
       (device-mount-point mount-point)
       (linux linux)
       (linux-arguments linux-arguments)
-      (initrd initrd)))))
+      (initrd initrd)))
+    (('menu-entry ('version 0)
+                  ('label label) ('device device)
+                  ('device-mount-point mount-point)
+                  ('multiboot-kernel multiboot-kernel)
+                  ('multiboot-arguments multiboot-arguments)
+                  ('multiboot-modules multiboot-modules) _ ...)
+     (menu-entry
+      (label label)
+      (device device)
+      (device-mount-point mount-point)
+      (multiboot-kernel multiboot-kernel)
+      (multiboot-arguments multiboot-arguments)
+      (multiboot-modules multiboot-modules)))))
 
 \f
 ;;;
-- 
2.26.2





^ permalink raw reply related	[flat|nested] 67+ messages in thread

* bug#41541: [PATCH 3/8] system: Add 'multiboot-modules' field to <boot-parameters>.
  2020-06-04 13:59 ` bug#41541: [PATCH 0/9] Merge wip-hurd-vm "last review round" Jan (janneke) Nieuwenhuizen
  2020-06-04 13:59   ` bug#41541: [PATCH 1/8] system: Add 'hurd' field to <operating-system> Jan (janneke) Nieuwenhuizen
  2020-06-04 13:59   ` bug#41541: [PATCH 2/8] bootloader: Extend `<menu-entry>' for multiboot Jan (janneke) Nieuwenhuizen
@ 2020-06-04 13:59   ` Jan (janneke) Nieuwenhuizen
  2020-06-06  7:32     ` Mathieu Othacehe
  2020-06-04 13:59   ` bug#41541: [PATCH 4/8] bootloader: grub: Add support for multiboot Jan (janneke) Nieuwenhuizen
                     ` (4 subsequent siblings)
  7 siblings, 1 reply; 67+ messages in thread
From: Jan (janneke) Nieuwenhuizen @ 2020-06-04 13:59 UTC (permalink / raw)
  To: 41541

* gnu/system.scm (<boot-parameters>)[multiboot-modules]: New field.
(read-boot-parameters): Initialize it.
(operating-system-multiboot-modules, hurd-multiboot-modules): New procedure.
(operating-system-boot-parameters): Cater for multiboot the Hurd and
initialize it; avoid initrd in that case.
(operating-system-kernel-file): Cater for for Gnumach (the Hurd) besides Linux.
(boot-parameters->menu-entry): Use it to support a multiboot <menu-entry>.
---
 gnu/system.scm | 92 +++++++++++++++++++++++++++++++++++++++-----------
 1 file changed, 73 insertions(+), 19 deletions(-)

diff --git a/gnu/system.scm b/gnu/system.scm
index 43dd2ec598..a96a6e6f2c 100644
--- a/gnu/system.scm
+++ b/gnu/system.scm
@@ -39,9 +39,11 @@
   #:use-module (guix utils)
   #:use-module (gnu packages base)
   #:use-module (gnu packages bash)
+  #:use-module (gnu packages cross-base)
   #:use-module (gnu packages guile)
   #:use-module (gnu packages guile-xyz)
   #:use-module (gnu packages admin)
+  #:use-module (gnu packages hurd)
   #:use-module (gnu packages linux)
   #:use-module (gnu packages pciutils)
   #:use-module (gnu packages package-management)
@@ -142,6 +144,7 @@
             boot-parameters-kernel
             boot-parameters-kernel-arguments
             boot-parameters-initrd
+            boot-parameters-multiboot-modules
             read-boot-parameters
             read-boot-parameters-file
             boot-parameters->menu-entry
@@ -283,7 +286,8 @@ directly by the user."
   (store-mount-point boot-parameters-store-mount-point)
   (kernel           boot-parameters-kernel)
   (kernel-arguments boot-parameters-kernel-arguments)
-  (initrd           boot-parameters-initrd))
+  (initrd           boot-parameters-initrd)
+  (multiboot-modules boot-parameters-multiboot-modules))
 
 (define (ensure-not-/dev device)
   "If DEVICE starts with a slash, return #f.  This is meant to filter out
@@ -314,7 +318,7 @@ file system labels."
   (match (read port)
     (('boot-parameters ('version 0)
                        ('label label) ('root-device root)
-                       ('kernel linux)
+                       ('kernel kernel)
                        rest ...)
      (boot-parameters
       (label label)
@@ -330,12 +334,12 @@ file system labels."
          ((_ entries) (map sexp->menu-entry entries))
          (#f          '())))
 
-      ;; In the past, we would store the directory name of the kernel instead
-      ;; of the absolute file name of its image.  Detect that and correct it.
-      (kernel (if (string=? linux (direct-store-path linux))
-                  (string-append linux "/"
+      ;; In the past, we would store the directory name of linux instead of
+      ;; the absolute file name of its image.  Detect that and correct it.
+      (kernel (if (string=? kernel (direct-store-path kernel))
+                  (string-append kernel "/"
                                  (system-linux-image-file-name))
-                  linux))
+                  kernel))
 
       (kernel-arguments
        (match (assq 'kernel-arguments rest)
@@ -349,6 +353,8 @@ file system labels."
          (('initrd (? string? file))
           file)))
 
+      (multiboot-modules (or (assq 'multiboot-modules rest) '()))
+
       (store-device
        ;; Linux device names like "/dev/sda1" are not suitable GRUB device
        ;; identifiers, so we just filter them out.
@@ -386,14 +392,25 @@ The object has its kernel-arguments extended in order to make it bootable."
                                (boot-parameters-kernel-arguments params))))))
 
 (define (boot-parameters->menu-entry conf)
-  (menu-entry
-   (label (boot-parameters-label conf))
-   (device (boot-parameters-store-device conf))
-   (device-mount-point (boot-parameters-store-mount-point conf))
-   (linux (boot-parameters-kernel conf))
-   (linux-arguments (boot-parameters-kernel-arguments conf))
-   (initrd (boot-parameters-initrd conf))))
-
+  (let* ((kernel (boot-parameters-kernel conf))
+         (multiboot-modules (boot-parameters-multiboot-modules conf))
+         (multiboot? (pair? multiboot-modules)))
+    (menu-entry
+     (label (boot-parameters-label conf))
+     (device (boot-parameters-store-device conf))
+     (device-mount-point (boot-parameters-store-mount-point conf))
+     (linux (and (not multiboot?) kernel))
+     (linux-arguments (if (not multiboot?) '
+                          (boot-parameters-kernel-arguments conf)
+                          '()))
+     (initrd (boot-parameters-initrd conf))
+     (multiboot-kernel (and multiboot? kernel))
+     (multiboot-arguments (if multiboot?
+                              (boot-parameters-kernel-arguments conf)
+                              '()))
+     (multiboot-modules (if multiboot?
+                            (boot-parameters-multiboot-modules conf)
+                            '())))))
 
 \f
 ;;;
@@ -485,8 +502,17 @@ from the initrd."
 (define (operating-system-kernel-file os)
   "Return an object representing the absolute file name of the kernel image of
 OS."
-  (file-append (operating-system-kernel os)
-               "/" (system-linux-image-file-name)))
+  (if (operating-system-hurd os)
+      (let* ((mach (operating-system-kernel os))
+             (mach (if (%current-target-system)
+                       ;; A cross-built GNUmach does not work
+                       (with-parameters ((%current-system "i686-linux")
+                                         (%current-target-system #f))
+                         mach)
+                       mach)))
+        (file-append mach "/boot/gnumach"))
+      (file-append (operating-system-kernel os)
+                      "/" (system-linux-image-file-name))))
 
 (define (package-for-kernel target-kernel module-package)
   "Return a package like MODULE-PACKAGE, adapted for TARGET-KERNEL, if
@@ -1131,17 +1157,44 @@ a list of <menu-entry>, to populate the \"old entries\" menu."
                           #:store-directory-prefix
 			  (btrfs-store-subvolume-file-name file-systems))))
 
+(define (operating-system-multiboot-modules os)
+  (if (operating-system-hurd os) (hurd-multiboot-modules os) '()))
+
+(define (hurd-multiboot-modules os)
+  (let* ((hurd (operating-system-hurd os))
+         (root-file-system-command
+          (list (file-append hurd "/hurd/ext2fs.static")
+                "ext2fs"
+                "--multiboot-command-line='${kernel-command-line}'"
+                "--host-priv-port='${host-port}'"
+                "--device-master-port='${device-port}'"
+                "--exec-server-task='${exec-task}'"
+                "--store-type=typed"
+                "--x-xattr-translator-records"
+                "'${root}'" "'$(task-create)'" "'$(task-resume)'"))
+         (target (%current-target-system))
+         (libc (if target
+                   (with-parameters ((%current-target-system #f))
+                     (cross-libc target))
+                   glibc))
+         (exec-server-command
+          (list (file-append libc "/lib/ld.so.1") "exec"
+                (file-append hurd "/hurd/exec") "'$(exec-task=task-create)'")))
+    (list root-file-system-command exec-server-command)))
+
 (define* (operating-system-boot-parameters os root-device
                                            #:key system-kernel-arguments?)
   "Return a monadic <boot-parameters> record that describes the boot
 parameters of OS.  When SYSTEM-KERNEL-ARGUMENTS? is true, add kernel arguments
 such as '--root' and '--load' to <boot-parameters>."
-  (let* ((initrd          (operating-system-initrd-file os))
+  (let* ((initrd          (and (not (hurd-target?))
+                               (operating-system-initrd-file os)))
          (store           (operating-system-store-file-system os))
          (bootloader      (bootloader-configuration-bootloader
                            (operating-system-bootloader os)))
          (bootloader-name (bootloader-name bootloader))
-         (label           (operating-system-label os)))
+         (label           (operating-system-label os))
+         (multiboot-modules (operating-system-multiboot-modules os)))
     (boot-parameters
      (label label)
      (root-device root-device)
@@ -1151,6 +1204,7 @@ such as '--root' and '--load' to <boot-parameters>."
           (operating-system-kernel-arguments os root-device)
           (operating-system-user-kernel-arguments os)))
      (initrd initrd)
+     (multiboot-modules multiboot-modules)
      (bootloader-name bootloader-name)
      (bootloader-menu-entries
       (bootloader-configuration-menu-entries (operating-system-bootloader os)))
-- 
2.26.2





^ permalink raw reply related	[flat|nested] 67+ messages in thread

* bug#41541: [PATCH 4/8] bootloader: grub: Add support for multiboot.
  2020-06-04 13:59 ` bug#41541: [PATCH 0/9] Merge wip-hurd-vm "last review round" Jan (janneke) Nieuwenhuizen
                     ` (2 preceding siblings ...)
  2020-06-04 13:59   ` bug#41541: [PATCH 3/8] system: Add 'multiboot-modules' field to <boot-parameters> Jan (janneke) Nieuwenhuizen
@ 2020-06-04 13:59   ` Jan (janneke) Nieuwenhuizen
  2020-06-06  7:47     ` Mathieu Othacehe
  2020-06-06 10:57     ` [bug#41541] " Ludovic Courtès
  2020-06-04 13:59   ` bug#41541: [PATCH 5/8] system: Use 'hurd' package in label Jan (janneke) Nieuwenhuizen
                     ` (3 subsequent siblings)
  7 siblings, 2 replies; 67+ messages in thread
From: Jan (janneke) Nieuwenhuizen @ 2020-06-04 13:59 UTC (permalink / raw)
  To: 41541

* gnu/bootloader/grub.scm (grub-configuration-file): Add support for
multiboot.
---
 gnu/bootloader.scm      |  3 +-
 gnu/bootloader/grub.scm | 71 +++++++++++++++++++++++++----------------
 2 files changed, 46 insertions(+), 28 deletions(-)

diff --git a/gnu/bootloader.scm b/gnu/bootloader.scm
index 2eebb8e9d9..d0bcab1a06 100644
--- a/gnu/bootloader.scm
+++ b/gnu/bootloader.scm
@@ -26,7 +26,8 @@
   #:use-module (guix ui)
   #:use-module (srfi srfi-1)
   #:use-module (ice-9 match)
-  #:export (menu-entry
+  #:export (<menu-entry>
+            menu-entry
             menu-entry?
             menu-entry-label
             menu-entry-device
diff --git a/gnu/bootloader/grub.scm b/gnu/bootloader/grub.scm
index 2d9a39afc3..3e95fece1c 100644
--- a/gnu/bootloader/grub.scm
+++ b/gnu/bootloader/grub.scm
@@ -25,12 +25,16 @@
   #:use-module (guix records)
   #:use-module ((guix utils) #:select (%current-system))
   #:use-module (guix gexp)
+  #:use-module (guix utils)
   #:use-module (gnu artwork)
   #:use-module (gnu bootloader)
   #:use-module (gnu system uuid)
   #:use-module (gnu system file-systems)
   #:use-module (gnu system keyboard)
+  #:use-module (gnu packages base)
   #:use-module (gnu packages bootloaders)
+  #:use-module (gnu packages cross-base)
+  #:use-module (gnu packages hurd)
   #:autoload   (gnu packages gtk) (guile-cairo guile-rsvg)
   #:autoload   (gnu packages xorg) (xkeyboard-config)
   #:use-module (ice-9 match)
@@ -330,36 +334,49 @@ when booting a root file system on a Btrfs subvolume."
   (define all-entries
     (append entries (bootloader-configuration-menu-entries config)))
   (define (menu-entry->gexp entry)
-    (let* ((device (menu-entry-device entry))
-           (device-mount-point (menu-entry-device-mount-point entry))
-           (label (menu-entry-label entry))
-           (arguments (menu-entry-linux-arguments entry))
-           (kernel (normalize-file (menu-entry-linux entry)
-                                   device-mount-point
-                                   store-directory-prefix))
-           (initrd (normalize-file (menu-entry-initrd entry)
-                                   device-mount-point
-                                   store-directory-prefix)))
-      ;; Here DEVICE is the store and DEVICE-MOUNT-POINT is its mount point.
-      ;; Use the right file names for KERNEL and INITRD in case
-      ;; DEVICE-MOUNT-POINT is not "/", meaning that the store is on a
-      ;; separate partition.
-      #~(format port "menuentry ~s {
+    (match entry
+      (($ <menu-entry> label device mount-point linux arguments initrd #f ())
+       (let ((linux (normalize-file linux mount-point
+                                    store-directory-prefix))
+             (initrd (normalize-file initrd mount-point
+                                     store-directory-prefix)))
+         ;; Here DEVICE is the store and DEVICE-MOUNT-POINT is its mount point.
+         ;; Use the right file names for LINUX and INITRD in case
+         ;; DEVICE-MOUNT-POINT is not "/", meaning that the store is on a
+         ;; separate partition.
+
+         ;; When BTRFS-SUBVOLUME-FILE-NAME is defined, prepend it the linux and
+         ;; initrd paths, to allow booting from a Btrfs subvolume.
+         #~(format port "menuentry ~s {
   ~a
   linux ~a ~a
   initrd ~a
 }~%"
-                #$label
-                #$(grub-root-search device kernel)
-                #$kernel (string-join (list #$@arguments))
-                #$initrd)))
-  (define sugar
-    (eye-candy config
-               (menu-entry-device (first all-entries))
-               (menu-entry-device-mount-point (first all-entries))
-               #:store-directory-prefix store-directory-prefix
-               #:system system
-               #:port #~port))
+                   #$label
+                   #$(grub-root-search device linux)
+                   #$linux (string-join (list #$@arguments))
+                   #$initrd)))
+      (($ <menu-entry> label device mount-point #f () #f kernel arguments modules)
+       (let* ((target (%current-target-system)))
+         #~(format port "
+menuentry ~s {
+  multiboot ~a root=device:hd0s1~a~a
+}~%"
+                   #$label
+                   #$kernel (string-join (list #$@arguments) " " 'prefix)
+                   (string-join (map string-join '#$modules)
+                                "\n  module " 'prefix))))))
+
+  (define (sugar)
+    (let* ((entry (first all-entries))
+           (device (menu-entry-device entry))
+           (mount-point (menu-entry-device-mount-point entry)))
+      (eye-candy config
+                 device
+                 mount-point
+                 #:store-directory-prefix store-directory-prefix
+                 #:system system
+                 #:port #~port)))
 
   (define keyboard-layout-config
     (let* ((layout (bootloader-configuration-keyboard-layout config))
@@ -384,7 +401,7 @@ keymap ~a~%" #$keymap))))
                   "# This file was generated from your Guix configuration.  Any changes
 # will be lost upon reconfiguration.
 ")
-          #$sugar
+          #$(sugar)
           #$keyboard-layout-config
           (format port "
 set default=~a
-- 
2.26.2





^ permalink raw reply related	[flat|nested] 67+ messages in thread

* bug#41541: [PATCH 5/8] system: Use 'hurd' package in label.
  2020-06-04 13:59 ` bug#41541: [PATCH 0/9] Merge wip-hurd-vm "last review round" Jan (janneke) Nieuwenhuizen
                     ` (3 preceding siblings ...)
  2020-06-04 13:59   ` bug#41541: [PATCH 4/8] bootloader: grub: Add support for multiboot Jan (janneke) Nieuwenhuizen
@ 2020-06-04 13:59   ` Jan (janneke) Nieuwenhuizen
  2020-06-06 10:57     ` [bug#41541] " Ludovic Courtès
  2020-06-04 13:59   ` bug#41541: [PATCH 6/8] system: examples: Add bare-hurd.tmpl Jan (janneke) Nieuwenhuizen
                     ` (2 subsequent siblings)
  7 siblings, 1 reply; 67+ messages in thread
From: Jan (janneke) Nieuwenhuizen @ 2020-06-04 13:59 UTC (permalink / raw)
  To: 41541

* gnu/system.scm (kernel->boot-label): Add keyword parameter 'hurd'.  If set,
use it for label.
(operating-system-default-label): Call with it with operating-system-hurd.
---
 gnu/system.scm | 11 ++++++++---
 1 file changed, 8 insertions(+), 3 deletions(-)

diff --git a/gnu/system.scm b/gnu/system.scm
index a96a6e6f2c..b814181c69 100644
--- a/gnu/system.scm
+++ b/gnu/system.scm
@@ -1098,9 +1098,13 @@ listed in OS.  The C library expects to find it under
   (locale-directory definitions
                     #:libcs (operating-system-locale-libcs os)))
 
-(define (kernel->boot-label kernel)
+(define* (kernel->boot-label kernel #:key hurd)
   "Return a label for the bootloader menu entry that boots KERNEL."
-  (cond ((package? kernel)
+  (cond ((package? hurd)
+         (string-append "GNU with the "
+                        (string-titlecase (package-name hurd)) " "
+                        (package-version hurd)))
+        ((package? kernel)
          (string-append "GNU with "
                         (string-titlecase (package-name kernel)) " "
                         (package-version kernel)))
@@ -1113,7 +1117,8 @@ listed in OS.  The C library expects to find it under
 (define (operating-system-default-label os)
   "Return the default label for OS, as it will appear in the bootloader menu
 entry."
-  (kernel->boot-label (operating-system-kernel os)))
+  (kernel->boot-label (operating-system-kernel os)
+                      #:hurd (operating-system-hurd os)))
 
 (define (store-file-system file-systems)
   "Return the file system object among FILE-SYSTEMS that contains the store."
-- 
2.26.2





^ permalink raw reply related	[flat|nested] 67+ messages in thread

* bug#41541: [PATCH 6/8] system: examples: Add bare-hurd.tmpl.
  2020-06-04 13:59 ` bug#41541: [PATCH 0/9] Merge wip-hurd-vm "last review round" Jan (janneke) Nieuwenhuizen
                     ` (4 preceding siblings ...)
  2020-06-04 13:59   ` bug#41541: [PATCH 5/8] system: Use 'hurd' package in label Jan (janneke) Nieuwenhuizen
@ 2020-06-04 13:59   ` Jan (janneke) Nieuwenhuizen
  2020-06-06  7:56     ` Mathieu Othacehe
  2020-06-06 10:59     ` Ludovic Courtès
  2020-06-04 13:59   ` bug#41541: [PATCH 7/8] services: hurd: Add `hurd-etc-service' Jan (janneke) Nieuwenhuizen
  2020-06-04 13:59   ` bug#41541: [PATCH 8/8] system: Add `hurd-activation' Jan (janneke) Nieuwenhuizen
  7 siblings, 2 replies; 67+ messages in thread
From: Jan (janneke) Nieuwenhuizen @ 2020-06-04 13:59 UTC (permalink / raw)
  To: 41541

With this, we can now build a VM like so

    ./pre-inst-env guix system vm-image --target=i586-pc-gnu --no-grafts \
        gnu/system/examples/bare-hurd.tmpl

it boots, but needs some more setup/services to be really useful.

See also: <https://bugs.gnu.org/40839>; wip-disk-image.

* gnu/system/hurd.scm (%hurd-default-operating-system): New exported variable.
* gnu/system/examples/bare-hurd.tmpl: New file.
* Makefile.am (EXAMPLES): Add it.
---
 Makefile.am                        |  3 +-
 gnu/services.scm                   |  5 ++-
 gnu/system/examples/bare-hurd.tmpl | 24 ++++++++++++++
 gnu/system/hurd.scm                | 50 ++++++++++++++++++++++++++++--
 4 files changed, 78 insertions(+), 4 deletions(-)
 create mode 100644 gnu/system/examples/bare-hurd.tmpl

diff --git a/Makefile.am b/Makefile.am
index 5b64386b53..d8c519b4af 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -7,7 +7,7 @@
 # Copyright © 2017 Mathieu Othacehe <m.othacehe@gmail.com>
 # Copyright © 2017 Leo Famulari <leo@famulari.name>
 # Copyright © 2017 Ricardo Wurmus <rekado@elephly.net>
-# Copyright © 2017 Jan Nieuwenhuizen <janneke@gnu.org>
+# Copyright © 2017, 2020 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
 # Copyright © 2017 Arun Isaac <arunisaac@systemreboot.net>
 # Copyright © 2018 Nikita <nikita@n0.is>
 # Copyright © 2018 Julien Lepiller <julien@lepiller.eu>
@@ -346,6 +346,7 @@ AUX_FILES =						\
 EXAMPLES =					\
   gnu/system/examples/asus-c201.tmpl		\
   gnu/system/examples/bare-bones.tmpl		\
+  gnu/system/examples/bare-hurd.tmpl		\
   gnu/system/examples/beaglebone-black.tmpl	\
   gnu/system/examples/desktop.tmpl		\
   gnu/system/examples/lightweight-desktop.tmpl	\
diff --git a/gnu/services.scm b/gnu/services.scm
index 2e4648bf78..614956fbab 100644
--- a/gnu/services.scm
+++ b/gnu/services.scm
@@ -1,6 +1,7 @@
 ;;; GNU Guix --- Functional package management for GNU
 ;;; Copyright © 2015, 2016, 2017, 2018, 2019, 2020 Ludovic Courtès <ludo@gnu.org>
 ;;; Copyright © 2016 Chris Marusich <cmmarusich@gmail.com>
+;;; Copyright © 2020 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -29,10 +30,12 @@
   #:use-module (guix describe)
   #:use-module (guix sets)
   #:use-module (guix ui)
-  #:use-module ((guix utils) #:select (source-properties->location))
+  #:use-module ((guix utils) #:select (source-properties->location
+                                       %current-target-system))
   #:use-module (guix modules)
   #:use-module (gnu packages base)
   #:use-module (gnu packages bash)
+  #:use-module (gnu packages hurd)
   #:use-module (srfi srfi-1)
   #:use-module (srfi srfi-9)
   #:use-module (srfi srfi-9 gnu)
diff --git a/gnu/system/examples/bare-hurd.tmpl b/gnu/system/examples/bare-hurd.tmpl
new file mode 100644
index 0000000000..d100bd6dd8
--- /dev/null
+++ b/gnu/system/examples/bare-hurd.tmpl
@@ -0,0 +1,24 @@
+;; -*-scheme-*-
+
+;; This is an operating system configuration template
+;; for a "bare bones" setup, with no X11 display server.
+
+(use-modules (gnu) (gnu system hurd) (guix utils))
+
+(define %hurd-os
+  (operating-system
+    (inherit %hurd-default-operating-system)
+    (bootloader (bootloader-configuration
+                 (bootloader grub-minimal-bootloader)
+                 (target "/dev/sdX")))
+    (file-systems (cons (file-system
+                          (device (file-system-label "my-root"))
+                          (mount-point "/")
+                          (type "ext2"))
+                        %base-file-systems))
+    (host-name "guixygnu")
+    (timezone "GNUrope")
+    (packages %base-packages/hurd)
+    (services %base-services/hurd)))
+
+%hurd-os
diff --git a/gnu/system/hurd.scm b/gnu/system/hurd.scm
index 3ccf47aa21..472eca82b9 100644
--- a/gnu/system/hurd.scm
+++ b/gnu/system/hurd.scm
@@ -21,6 +21,7 @@
   #:use-module (guix gexp)
   #:use-module (guix profiles)
   #:use-module (guix utils)
+  #:use-module (gnu bootloader)
   #:use-module (gnu bootloader grub)
   #:use-module (gnu packages admin)
   #:use-module (gnu packages base)
@@ -31,8 +32,17 @@
   #:use-module (gnu packages guile-xyz)
   #:use-module (gnu packages hurd)
   #:use-module (gnu packages less)
+  #:use-module (gnu services)
+  #:use-module (gnu services base)
+  #:use-module (gnu services hurd)
+  #:use-module (gnu services shepherd)
+  #:use-module (gnu system)
+  #:use-module (gnu system shadow)
   #:use-module (gnu system vm)
-  #:export (cross-hurd-image))
+  #:export (cross-hurd-image
+            %base-packages/hurd
+            %base-services/hurd
+            %hurd-default-operating-system))
 
 ;;; Commentary:
 ;;;
@@ -44,7 +54,43 @@
 (define %base-packages/hurd
   (list hurd bash coreutils file findutils grep sed
         guile-3.0 guile-colorized guile-readline
-        net-base inetutils less which))
+        net-base inetutils less shepherd which))
+
+(define %base-services/hurd
+  '())
+
+(define %hurd-default-operating-system
+  (operating-system
+    (kernel gnumach)
+    ;; (kernel-loadable-modules '())
+    (kernel-arguments '())
+    (hurd hurd)
+    (bootloader (bootloader-configuration
+                 (bootloader grub-minimal-bootloader)
+                 (target "/dev/vda")))
+    ;; (label (operating-system-default-label this-operating-system))
+    (initrd (lambda _ '()))
+    (initrd-modules (lambda _ '()))
+    (firmware '())
+    (host-name "guixygnu")
+    ;; (hosts-file #F)
+    ;; (mapped-devices '())
+    (file-systems '())
+    ;; (swap-devices '())
+    (users '())
+    ;(groups '())
+    (skeletons '())
+    ;; (issue %default-issue)
+    (packages %base-packages/hurd)
+    (timezone "GNUrope")
+    ;; (locale "en_US.utf8")
+    (locale-definitions '())
+    ;; (locale-libcs '())
+    (name-service-switch #f)
+    (essential-services (hurd-default-essential-services this-operating-system))
+    (pam-services '())
+    (setuid-programs '())
+    (sudoers-file #f)))
 
 (define* (cross-hurd-image #:key (hurd hurd) (gnumach gnumach))
   "Return a cross-built GNU/Hurd image."
-- 
2.26.2





^ permalink raw reply related	[flat|nested] 67+ messages in thread

* bug#41541: [PATCH 7/8] services: hurd: Add `hurd-etc-service'.
  2020-06-04 13:59 ` bug#41541: [PATCH 0/9] Merge wip-hurd-vm "last review round" Jan (janneke) Nieuwenhuizen
                     ` (5 preceding siblings ...)
  2020-06-04 13:59   ` bug#41541: [PATCH 6/8] system: examples: Add bare-hurd.tmpl Jan (janneke) Nieuwenhuizen
@ 2020-06-04 13:59   ` Jan (janneke) Nieuwenhuizen
  2020-06-06 11:08     ` [bug#41541] " Ludovic Courtès
  2020-06-04 13:59   ` bug#41541: [PATCH 8/8] system: Add `hurd-activation' Jan (janneke) Nieuwenhuizen
  7 siblings, 1 reply; 67+ messages in thread
From: Jan (janneke) Nieuwenhuizen @ 2020-06-04 13:59 UTC (permalink / raw)
  To: 41541

* gnu/services/hurd.scm: New file.
* gnu/local.mk (GNU_SYSTEM_MODULES): Add it.
* doc/guix.texi (Hurd Services): Document it.
---
 doc/guix.texi         | 13 +++++++++
 gnu/local.mk          |  1 +
 gnu/services/hurd.scm | 61 +++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 75 insertions(+)
 create mode 100644 gnu/services/hurd.scm

diff --git a/doc/guix.texi b/doc/guix.texi
index 4776eacacd..97bf067074 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -319,7 +319,9 @@ Services
 * Version Control Services::    Providing remote access to Git repositories.
 * Game Services::               Game servers.
 * PAM Mount Service::           Service to mount volumes when logging in.
+* Guix Services::               Services relating specifically to Guix.
 * Linux Services::              Services tied to the Linux kernel.
+* Hurd Services::               Services specific to a Hurd System.
 * Miscellaneous Services::      Other services.
 
 Defining Services
@@ -12594,6 +12596,7 @@ declaration.
 * PAM Mount Service::           Service to mount volumes when logging in.
 * Guix Services::               Services relating specifically to Guix.
 * Linux Services::              Services tied to the Linux kernel.
+* Hurd Services::               Services specific for a Hurd System.
 * Miscellaneous Services::      Other services.
 @end menu
 
@@ -26032,6 +26035,16 @@ parameters, can be done as follow:
 @end lisp
 @end deffn
 
+@node Hurd Services
+@subsection Hurd Services
+
+@deffn {Scheme Procedure} hurd-etc-service @var{os}
+This service implements a minimal @code{etc-service}, adding some
+specifics for the Hurd.
+
+It is part of the @code{hurd-default-essential-services}.
+@end deffn
+
 @node Miscellaneous Services
 @subsection Miscellaneous Services
 
diff --git a/gnu/local.mk b/gnu/local.mk
index 8abca8659e..d1d086abe0 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -582,6 +582,7 @@ GNU_SYSTEM_MODULES =				\
   %D%/services/games.scm			\
   %D%/services/getmail.scm				\
   %D%/services/guix.scm			\
+  %D%/services/hurd.scm				\
   %D%/services/kerberos.scm			\
   %D%/services/linux.scm			\
   %D%/services/lirc.scm				\
diff --git a/gnu/services/hurd.scm b/gnu/services/hurd.scm
new file mode 100644
index 0000000000..6e57b22810
--- /dev/null
+++ b/gnu/services/hurd.scm
@@ -0,0 +1,61 @@
+;;; GNU Guix --- Functional package management for GNU
+;;; Copyright © 2020 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
+;;;
+;;; This file is part of GNU Guix.
+;;;
+;;; GNU Guix is free software; you can redistribute it and/or modify it
+;;; under the terms of the GNU General Public License as published by
+;;; the Free Software Foundation; either version 3 of the License, or (at
+;;; your option) any later version.
+;;;
+;;; GNU Guix is distributed in the hope that it will be useful, but
+;;; WITHOUT ANY WARRANTY; without even the implied warranty of
+;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+;;; GNU General Public License for more details.
+;;;
+;;; You should have received a copy of the GNU General Public License
+;;; along with GNU Guix.  If not, see <http://www.gnu.org/licenses/>.
+
+(define-module (gnu services hurd)
+  #:use-module (gnu packages admin)
+  #:use-module (gnu services)
+  #:use-module (gnu system)
+  #:use-module (guix gexp)
+  #:use-module (guix records)
+  #:export (hurd-etc-service))
+
+;;; Commentary:
+;;;
+;;; This module implements services for the Hurd.
+;;;
+;;; Code:
+
+\f
+;;;
+;;; The ETC service for the Hurd.
+;;;
+
+(define (hurd-etc-service os)
+  "Return a <service> that builds containing the static part of the /etc
+directory."
+  (let ((profile (mixed-text-file "profile"  "\
+# Generated by hurd-etc-services
+export PS1='\\u@\\h\\$ '
+
+GUIX_PROFILE=\"/run/current-system/profile\"
+. \"$GUIX_PROFILE/etc/profile\"
+
+GUIX_PROFILE=\"$HOME/.guix-profile\"
+if [ -f \"$GUIX_PROFILE/etc/profile\" ]; then
+  . \"$GUIX_PROFILE/etc/profile\"
+fi\n"))
+        (hurd (operating-system-hurd os)))
+    (etc-service
+     `(("services" ,(file-append net-base "/etc/services"))
+       ("protocols" ,(file-append net-base "/etc/protocols"))
+       ("profile" ,profile)
+       ("hostname" ,(plain-file "hostname" (operating-system-host-name os)))
+       ("login" ,(file-append hurd "/etc/login"))
+       ("motd" ,(file-append hurd "/etc/motd"))))))
+
+;;; hurd.scm ends here
-- 
2.26.2





^ permalink raw reply related	[flat|nested] 67+ messages in thread

* bug#41541: [PATCH 8/8] system: Add `hurd-activation'.
  2020-06-04 13:59 ` bug#41541: [PATCH 0/9] Merge wip-hurd-vm "last review round" Jan (janneke) Nieuwenhuizen
                     ` (6 preceding siblings ...)
  2020-06-04 13:59   ` bug#41541: [PATCH 7/8] services: hurd: Add `hurd-etc-service' Jan (janneke) Nieuwenhuizen
@ 2020-06-04 13:59   ` Jan (janneke) Nieuwenhuizen
  2020-06-06  8:03     ` Mathieu Othacehe
  2020-06-06 11:05     ` [bug#41541] " Ludovic Courtès
  7 siblings, 2 replies; 67+ messages in thread
From: Jan (janneke) Nieuwenhuizen @ 2020-06-04 13:59 UTC (permalink / raw)
  To: 41541

* gnu/build/activation.scm (boot-time-system): Add #:kernel-command-line
parameter.
* gnu/build/activation.scm (activate-current-system): Likewise, and pass it.
Change optional system parameter to #:system.
* gnu/system.scm (gnu/linux-activation-script): Rename from activation-script.
(activation-script, hurd-activation-script): New procedure.
---
 gnu/build/activation.scm |  9 +++--
 gnu/services.scm         | 81 +++++++++++++++++++++++++++-------------
 2 files changed, 60 insertions(+), 30 deletions(-)

diff --git a/gnu/build/activation.scm b/gnu/build/activation.scm
index 30f5e87d5a..85ff8d8996 100644
--- a/gnu/build/activation.scm
+++ b/gnu/build/activation.scm
@@ -318,13 +318,14 @@ improvement."
   ;; a new system configuration and activate it, without rebooting.
   "/run/current-system")
 
-(define (boot-time-system)
+(define* (boot-time-system #:key (kernel-command-line linux-command-line))
   "Return the '--system' argument passed on the kernel command line."
-  (find-long-option "--system" (linux-command-line)))
+  (find-long-option "--system" (kernel-command-line)))
 
 (define* (activate-current-system
-          #:optional (system (or (getenv "GUIX_NEW_SYSTEM")
-                                 (boot-time-system))))
+          #:key (kernel-command-line linux-command-line)
+          (system (or (getenv "GUIX_NEW_SYSTEM")
+                      (boot-time-system #:kernel-command-line kernel-command-line))))
   "Atomically make SYSTEM the current system."
   ;; The 'GUIX_NEW_SYSTEM' environment variable is used as a way for 'guix
   ;; system reconfigure' to pass the file name of the new system.
diff --git a/gnu/services.scm b/gnu/services.scm
index 614956fbab..78f5d15f06 100644
--- a/gnu/services.scm
+++ b/gnu/services.scm
@@ -519,35 +519,64 @@ ACTIVATION-SCRIPT-TYPE."
 
 (define (activation-script gexps)
   "Return the system's activation script, which evaluates GEXPS."
+  (program-file "activate.scm" (if (hurd-target?)
+                                   (hurd-activation-script gexps)
+                                   (gnu/linux-activation-script gexps))))
+
+(define (gnu/linux-activation-script gexps)
+  "Return a GNU/Linux system activation script, which evaluates GEXPS."
+
   (define actions
     (map (cut program-file "activate-service.scm" <>) gexps))
 
-  (program-file "activate.scm"
-                (with-imported-modules (source-module-closure
-                                        '((gnu build activation)
-                                          (guix build utils)))
-                  #~(begin
-                      (use-modules (gnu build activation)
-                                   (guix build utils))
-
-                      ;; Make sure the user accounting database exists.  If it
-                      ;; does not exist, 'setutxent' does not create it and
-                      ;; thus there is no accounting at all.
-                      (close-port (open-file "/var/run/utmpx" "a0"))
-
-                      ;; Same for 'wtmp', which is populated by mingetty et
-                      ;; al.
-                      (mkdir-p "/var/log")
-                      (close-port (open-file "/var/log/wtmp" "a0"))
-
-                      ;; Set up /run/current-system.  Among other things this
-                      ;; sets up locales, which the activation snippets
-                      ;; executed below may expect.
-                      (activate-current-system)
-
-                      ;; Run the services' activation snippets.
-                      ;; TODO: Use 'load-compiled'.
-                      (for-each primitive-load '#$actions)))))
+  (with-imported-modules (source-module-closure
+                          '((gnu build activation)
+                            (guix build utils)))
+    #~(begin
+        (use-modules (gnu build activation)
+                     (guix build utils))
+
+        ;; Make sure the user accounting database exists.  If it
+        ;; does not exist, 'setutxent' does not create it and
+        ;; thus there is no accounting at all.
+        (close-port (open-file "/var/run/utmpx" "a0"))
+
+        ;; Same for 'wtmp', which is populated by mingetty et
+        ;; al.
+        (close-port (open-file "/var/log/wtmp" "a0"))
+
+        ;; Set up /run/current-system.  Among other things this
+        ;; sets up locales, which the activation snippets
+        ;; executed below may expect.
+        (activate-current-system)
+
+        ;; Run the services' activation snippets.
+        ;; TODO: Use 'load-compiled'.
+        (for-each primitive-load '#$actions))))
+
+(define (hurd-activation-script gexps)
+  "Return the Hurd activation script, which evaluates GEXPS."
+  (define actions
+    (map (cut program-file "activate-service.scm" <>) gexps))
+
+  (with-imported-modules (source-module-closure
+                          '((gnu build activation)
+                            (guix build utils)))
+    #~(begin
+        (use-modules (gnu build activation)
+                     (guix build utils))
+
+        (mkdir-p "/var/run")            ;for the PID files
+        (mkdir-p "/var/log")
+
+        ;; Set up /run/current-system.  Among other things this
+        ;; sets up locales, which the activation snippets
+        ;; executed below may expect.
+        (activate-current-system #:kernel-command-line command-line)
+
+        ;; Run the services' activation snippets.
+        ;; TODO: Use 'load-compiled'.
+        (for-each primitive-load '#$actions))))
 
 (define (gexps->activation-gexp gexps)
   "Return a gexp that runs the activation script containing GEXPS."
-- 
2.26.2





^ permalink raw reply related	[flat|nested] 67+ messages in thread

* bug#41541: merge wip-hurd-vm
  2020-06-04 11:33                           ` Jan Nieuwenhuizen
@ 2020-06-05 16:08                             ` Ludovic Courtès
  2020-06-05 16:24                               ` Jan Nieuwenhuizen
  0 siblings, 1 reply; 67+ messages in thread
From: Ludovic Courtès @ 2020-06-05 16:08 UTC (permalink / raw)
  To: Jan Nieuwenhuizen; +Cc: 41541, Mathieu Othacehe

Hi,

Jan Nieuwenhuizen <janneke@gnu.org> skribis:

> So, after digesting your message here I took the next step: grep for
> _HURD_STARTUP and change it there, like so
>
> diff --git a/gnu/packages/hurd.scm b/gnu/packages/hurd.scm
> index 421783eb80..8c73ea8430 100644
> --- a/gnu/packages/hurd.scm
> +++ b/gnu/packages/hurd.scm
> @@ -428,9 +428,10 @@ exec ${system}/rc \"$@\"
>                                "startup/startup.c")
>                   (("/hurd/")
>                    (string-append out "/hurd/")))
> -               (substitute* "hurd/paths.h"
> -                 (("_HURD_STARTUP\t")
> -                  (string-append "_HURD_STARTUP\t\"" out "\" ")))
> +               (substitute* '("libdiskfs/boot-start.c"
> +                              "libdiskfs/opts-std-startup.c")
> +                 (("_HURD_STARTUP")
> +                  (string-append "\"" out "/hurd/startup\"")))

Perfect!  Perhaps we can add a comment explaining that this is needed
for the first boot, when the /hurd symlink doesn’t exist yet.

> This also works, and so I figure we're fine now.  I'm resetting
> wip-hurd-vm and, like Mathieu suggested will prepare to send send a
> patch series here for the unreviewed subset of patches.

Thank you!

Ludo’.




^ permalink raw reply	[flat|nested] 67+ messages in thread

* bug#41541: merge wip-hurd-vm
  2020-06-05 16:08                             ` Ludovic Courtès
@ 2020-06-05 16:24                               ` Jan Nieuwenhuizen
  0 siblings, 0 replies; 67+ messages in thread
From: Jan Nieuwenhuizen @ 2020-06-05 16:24 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: 41541, Mathieu Othacehe

Ludovic Courtès writes:

> Jan Nieuwenhuizen <janneke@gnu.org> skribis:
>
>> So, after digesting your message here I took the next step: grep for
>> _HURD_STARTUP and change it there, like so
>>
>> diff --git a/gnu/packages/hurd.scm b/gnu/packages/hurd.scm
>> index 421783eb80..8c73ea8430 100644
>> --- a/gnu/packages/hurd.scm
>> +++ b/gnu/packages/hurd.scm
>> @@ -428,9 +428,10 @@ exec ${system}/rc \"$@\"
>>                                "startup/startup.c")
>>                   (("/hurd/")
>>                    (string-append out "/hurd/")))
>> -               (substitute* "hurd/paths.h"
>> -                 (("_HURD_STARTUP\t")
>> -                  (string-append "_HURD_STARTUP\t\"" out "\" ")))
>> +               (substitute* '("libdiskfs/boot-start.c"
>> +                              "libdiskfs/opts-std-startup.c")
>> +                 (("_HURD_STARTUP")
>> +                  (string-append "\"" out "/hurd/startup\"")))
>
> Perfect!  Perhaps we can add a comment explaining that this is needed
> for the first boot, when the /hurd symlink doesn’t exist yet.

That's a good idea.  I've added a squash commit with

               ;; Upon first boot the /hurd symlink does not exist; it is
               ;; created during activation: Hard-code the .../hurd store file
               ;; name.

>> This also works, and so I figure we're fine now.  I'm resetting
>> wip-hurd-vm and, like Mathieu suggested will prepare to send send a
>> patch series here for the unreviewed subset of patches.
>
> Thank you!

In other news, I've been playing with at "devel-hurd.tmpl" system and
just succeeded to build gnu-make-boot0!  I still need sort of a hack to
include %bootstrap-gcc etc, but this gives me good hopes that we'll be
able create a functional VM to build substitutes after merging!

Greetings,
Janneke

-- 
Jan Nieuwenhuizen <janneke@gnu.org> | GNU LilyPond http://lilypond.org
Freelance IT http://JoyofSource.com | Avatar® http://AvatarAcademy.com




^ permalink raw reply	[flat|nested] 67+ messages in thread

* bug#41541: [PATCH 1/8] system: Add 'hurd' field to <operating-system>.
  2020-06-04 13:59   ` bug#41541: [PATCH 1/8] system: Add 'hurd' field to <operating-system> Jan (janneke) Nieuwenhuizen
@ 2020-06-06  7:21     ` Mathieu Othacehe
  2020-06-06  8:26       ` Jan Nieuwenhuizen
  2020-06-06 10:45     ` [bug#41541] " Ludovic Courtès
  1 sibling, 1 reply; 67+ messages in thread
From: Mathieu Othacehe @ 2020-06-06  7:21 UTC (permalink / raw)
  To: Jan (janneke) Nieuwenhuizen; +Cc: 41541


Hey Jan,

> +Using GNU@tie{}mach in combination with a @code{hurd} is experimental
> +and only available when building a vm-image.}.

Maybe replace "vm-image" by "virtual machine disk image"?
> +
> +@cindex hurd
> +@item @code{hurd} (default: @code{#f})
> +The hurd to be started by the kernel.  This is required to build an
> +experimental vm-image for the Hurd and requires using @code{kernel}

Ditto.

Thanks,

Mathieu




^ permalink raw reply	[flat|nested] 67+ messages in thread

* bug#41541: [PATCH 3/8] system: Add 'multiboot-modules' field to <boot-parameters>.
  2020-06-04 13:59   ` bug#41541: [PATCH 3/8] system: Add 'multiboot-modules' field to <boot-parameters> Jan (janneke) Nieuwenhuizen
@ 2020-06-06  7:32     ` Mathieu Othacehe
  2020-06-06 10:13       ` Jan Nieuwenhuizen
  2020-06-06 10:55       ` [bug#41541] " Ludovic Courtès
  0 siblings, 2 replies; 67+ messages in thread
From: Mathieu Othacehe @ 2020-06-06  7:32 UTC (permalink / raw)
  To: Jan (janneke) Nieuwenhuizen; +Cc: 41541


> +             (mach (if (%current-target-system)
> +                       ;; A cross-built GNUmach does not work
> +                       (with-parameters ((%current-system "i686-linux")
> +                                         (%current-target-system #f))
> +                         mach)

Maybe it would make more sense to check if we are on a Hurd system,
rather than just checking for %current-target-system to be set, don't
know.

> +         (libc (if target
> +                   (with-parameters ((%current-target-system #f))
> +                     (cross-libc target))
> +                   glibc))

In the future, it would be nice to make this think transparent. Anyway,
for now this is the best we can do I think.

Thanks,

Mathieu




^ permalink raw reply	[flat|nested] 67+ messages in thread

* bug#41541: [PATCH 4/8] bootloader: grub: Add support for multiboot.
  2020-06-04 13:59   ` bug#41541: [PATCH 4/8] bootloader: grub: Add support for multiboot Jan (janneke) Nieuwenhuizen
@ 2020-06-06  7:47     ` Mathieu Othacehe
  2020-06-06  8:46       ` Jan Nieuwenhuizen
  2020-06-06 10:57     ` [bug#41541] " Ludovic Courtès
  1 sibling, 1 reply; 67+ messages in thread
From: Mathieu Othacehe @ 2020-06-06  7:47 UTC (permalink / raw)
  To: Jan (janneke) Nieuwenhuizen; +Cc: 41541


> +      (($ <menu-entry> label device mount-point #f () #f kernel arguments modules)
> +       (let* ((target (%current-target-system)))

This doesn't seem to be used anymore. Plus using %current-target-system
here could not give the expected result. I think that the only two
"safe" ways are to use (current-target-system) from a monadic context,
or to use "let-system".

We should maybe write something about that in the documentation.

> +         #~(format port "
> +menuentry ~s {
> +  multiboot ~a root=device:hd0s1~a~a
> +}~%"

If we add support for EFI one day, then it could be "hd0s2". In
"install-grub-disk-image", I manage to get to root-index from the
caller. I think it will be harder to do the same thing here. It's ok for
me if we leave it this way.

Thanks,

Mathieu




^ permalink raw reply	[flat|nested] 67+ messages in thread

* bug#41541: [PATCH 6/8] system: examples: Add bare-hurd.tmpl.
  2020-06-04 13:59   ` bug#41541: [PATCH 6/8] system: examples: Add bare-hurd.tmpl Jan (janneke) Nieuwenhuizen
@ 2020-06-06  7:56     ` Mathieu Othacehe
  2020-06-06 10:58       ` [bug#41541] " Jan Nieuwenhuizen
  2020-06-06 10:59     ` Ludovic Courtès
  1 sibling, 1 reply; 67+ messages in thread
From: Mathieu Othacehe @ 2020-06-06  7:56 UTC (permalink / raw)
  To: Jan (janneke) Nieuwenhuizen; +Cc: 41541


>     ./pre-inst-env guix system vm-image --target=i586-pc-gnu --no-grafts \
>         gnu/system/examples/bare-hurd.tmpl

Not related to your serie, but I would really like the "image" catalog I
proposed to help here. Most people struggle to get the difference
between --system and --target. Plus, those cross-compilation targets are
not really documented.

I think if one could write:

guix system image gnu/system/images/bare-hurd.scm

or so, it would help. But this needs some more discussions.

> -  #:use-module ((guix utils) #:select (source-properties->location))
> +  #:use-module ((guix utils) #:select (source-properties->location
> +                                       %current-target-system))

You're not using it right?

> +    ;; (kernel-loadable-modules '())

Remove it.

> +    ;; (label (operating-system-default-label this-operating-system))

Same for this one and the other commented lines below.

Thanks,

Mathieu




^ permalink raw reply	[flat|nested] 67+ messages in thread

* bug#41541: [PATCH 8/8] system: Add `hurd-activation'.
  2020-06-04 13:59   ` bug#41541: [PATCH 8/8] system: Add `hurd-activation' Jan (janneke) Nieuwenhuizen
@ 2020-06-06  8:03     ` Mathieu Othacehe
  2020-06-06  8:54       ` Jan Nieuwenhuizen
  2020-06-06 11:05     ` [bug#41541] " Ludovic Courtès
  1 sibling, 1 reply; 67+ messages in thread
From: Mathieu Othacehe @ 2020-06-06  8:03 UTC (permalink / raw)
  To: Jan (janneke) Nieuwenhuizen; +Cc: 41541


>  (define (activation-script gexps)
>    "Return the system's activation script, which evaluates GEXPS."
> +  (program-file "activate.scm" (if (hurd-target?)
> +                                   (hurd-activation-script gexps)
> +                                   (gnu/linux-activation-script gexps))))

"hurd-target?" is using %current-target-system. It would be safer to use
let-system here I guess.

I think Ludo will have some more comments, but let me say again that you
are doing a great job here, many thanks!

Mathieu




^ permalink raw reply	[flat|nested] 67+ messages in thread

* bug#41541: [PATCH 1/8] system: Add 'hurd' field to <operating-system>.
  2020-06-06  7:21     ` Mathieu Othacehe
@ 2020-06-06  8:26       ` Jan Nieuwenhuizen
  0 siblings, 0 replies; 67+ messages in thread
From: Jan Nieuwenhuizen @ 2020-06-06  8:26 UTC (permalink / raw)
  To: Mathieu Othacehe; +Cc: 41541

Mathieu Othacehe writes:

> Hey Jan,
>
>> +Using GNU@tie{}mach in combination with a @code{hurd} is experimental
>> +and only available when building a vm-image.}.
>
> Maybe replace "vm-image" by "virtual machine disk image"?

Okay.

>> +
>> +@cindex hurd
>> +@item @code{hurd} (default: @code{#f})
>> +The hurd to be started by the kernel.  This is required to build an
>> +experimental vm-image for the Hurd and requires using @code{kernel}
>
> Ditto.

Done.

Thanks, Janneke

-- 
Jan Nieuwenhuizen <janneke@gnu.org> | GNU LilyPond http://lilypond.org
Freelance IT http://JoyofSource.com | Avatar® http://AvatarAcademy.com




^ permalink raw reply	[flat|nested] 67+ messages in thread

* bug#41541: [PATCH 4/8] bootloader: grub: Add support for multiboot.
  2020-06-06  7:47     ` Mathieu Othacehe
@ 2020-06-06  8:46       ` Jan Nieuwenhuizen
  0 siblings, 0 replies; 67+ messages in thread
From: Jan Nieuwenhuizen @ 2020-06-06  8:46 UTC (permalink / raw)
  To: Mathieu Othacehe; +Cc: 41541

Mathieu Othacehe writes:

>> +      (($ <menu-entry> label device mount-point #f () #f kernel arguments modules)
>> +       (let* ((target (%current-target-system)))
>
> This doesn't seem to be used anymore.

Oops, but yeah: great!  Sorry -- this went through so many iterations,
thanks for catching it.

> Plus using %current-target-system
> here could not give the expected result. I think that the only two
> "safe" ways are to use (current-target-system) from a monadic context,
> or to use "let-system".

> We should maybe write something about that in the documentation.

Maybe...I think also that I should become more aware about monadic
context and its implications.

>> +         #~(format port "
>> +menuentry ~s {
>> +  multiboot ~a root=device:hd0s1~a~a
>> +}~%"
>
> If we add support for EFI one day, then it could be "hd0s2". In
> "install-grub-disk-image", I manage to get to root-index from the
> caller. I think it will be harder to do the same thing here. It's ok for
> me if we leave it this way.

Of course -- and this only works as long as we are only building virtual
machine images.  Changed to this

       (let ((root-index 1))         ; XXX EFI will need root-index 2

Thanks, Janneke

-- 
Jan Nieuwenhuizen <janneke@gnu.org> | GNU LilyPond http://lilypond.org
Freelance IT http://JoyofSource.com | Avatar® http://AvatarAcademy.com




^ permalink raw reply	[flat|nested] 67+ messages in thread

* bug#41541: [PATCH 8/8] system: Add `hurd-activation'.
  2020-06-06  8:03     ` Mathieu Othacehe
@ 2020-06-06  8:54       ` Jan Nieuwenhuizen
  0 siblings, 0 replies; 67+ messages in thread
From: Jan Nieuwenhuizen @ 2020-06-06  8:54 UTC (permalink / raw)
  To: Mathieu Othacehe; +Cc: 41541

Mathieu Othacehe writes:

Hello Mathieu,

>>  (define (activation-script gexps)
>>    "Return the system's activation script, which evaluates GEXPS."
>> +  (program-file "activate.scm" (if (hurd-target?)
>> +                                   (hurd-activation-script gexps)
>> +                                   (gnu/linux-activation-script gexps))))
>
> "hurd-target?" is using %current-target-system. It would be safer to use
> let-system here I guess.

Okay, changed to

  (let-system (system target)
    (program-file "activate.scm" (if (hurd-triplet? (or target system))
                                     (hurd-activation-script gexps)
                                     (gnu/linux-activation-script gexps)))))

> I think Ludo will have some more comments, but let me say again that you
> are doing a great job here, many thanks!

Thank you! -- luckily I get some help ;)
Janneke

-- 
Jan Nieuwenhuizen <janneke@gnu.org> | GNU LilyPond http://lilypond.org
Freelance IT http://JoyofSource.com | Avatar® http://AvatarAcademy.com




^ permalink raw reply	[flat|nested] 67+ messages in thread

* bug#41541: [PATCH 3/8] system: Add 'multiboot-modules' field to <boot-parameters>.
  2020-06-06  7:32     ` Mathieu Othacehe
@ 2020-06-06 10:13       ` Jan Nieuwenhuizen
  2020-06-06 10:55       ` [bug#41541] " Ludovic Courtès
  1 sibling, 0 replies; 67+ messages in thread
From: Jan Nieuwenhuizen @ 2020-06-06 10:13 UTC (permalink / raw)
  To: Mathieu Othacehe; +Cc: 41541

Mathieu Othacehe writes:

Hello!

>> +             (mach (if (%current-target-system)
>> +                       ;; A cross-built GNUmach does not work
>> +                       (with-parameters ((%current-system "i686-linux")
>> +                                         (%current-target-system #f))
>> +                         mach)
>
> Maybe it would make more sense to check if we are on a Hurd system,
> rather than just checking for %current-target-system to be set, don't
> know.

Ah yes.  When this IF runs we already checked that we are building a
hurd system; this adds two lines leading up to the above snippet

  (if (operating-system-hurd os)
      (let* ((mach (operating-system-kernel os))
             (mach (if (%current-target-system)

...but that means that this last IF is maybe unnecessarily implicit and
only really makes sense by adding/remembering that context.  Changed it
to

             (mach (if (and=> (%current-target-system) hurd-triplet?)

I guess that's friendlier?

>> +         (libc (if target
>> +                   (with-parameters ((%current-target-system #f))
>> +                     (cross-libc target))
>> +                   glibc))
>
> In the future, it would be nice to make this think transparent. Anyway,
> for now this is the best we can do I think.

Yes, I've added a comment

                     ;; TODO: cross-libc has extra patches for the Hurd;
                     ;; remove in next rebuild cycle
                     (cross-libc target))

I have now 8 squash! commits; I'll be resetting wip-hurd-vm just once
more before merging, after checking in with Ludovic and re-running some
tests.

Really looking forward to seeing a Guix Hurd VM hookup-up in bayfront
and really start building a Hurd system, mabye we'll see some more
people join in.  I think that should be (almost?) possible after
merging, right?

Greetings, Janneke

-- 
Jan Nieuwenhuizen <janneke@gnu.org> | GNU LilyPond http://lilypond.org
Freelance IT http://JoyofSource.com | Avatar® http://AvatarAcademy.com




^ permalink raw reply	[flat|nested] 67+ messages in thread

* [bug#41541] [PATCH 1/8] system: Add 'hurd' field to <operating-system>.
  2020-06-04 13:59   ` bug#41541: [PATCH 1/8] system: Add 'hurd' field to <operating-system> Jan (janneke) Nieuwenhuizen
  2020-06-06  7:21     ` Mathieu Othacehe
@ 2020-06-06 10:45     ` Ludovic Courtès
  2020-06-06 11:14       ` Jan Nieuwenhuizen
  1 sibling, 1 reply; 67+ messages in thread
From: Ludovic Courtès @ 2020-06-06 10:45 UTC (permalink / raw)
  To: Jan (janneke) Nieuwenhuizen; +Cc: 41541

Hi!

"Jan (janneke) Nieuwenhuizen" <janneke@gnu.org> skribis:

> * gnu/system.scm (<operating-system>)[hurd]: New field.
> * doc/guix.texi (operating-system Reference): Document 'hurd'.
> ---
>  doc/guix.texi  | 13 ++++++++++---
>  gnu/system.scm |  3 +++
>  2 files changed, 13 insertions(+), 3 deletions(-)
>
> diff --git a/doc/guix.texi b/doc/guix.texi
> index 056bf011f6..4776eacacd 100644
> --- a/doc/guix.texi
> +++ b/doc/guix.texi
> @@ -11484,9 +11484,16 @@ configuration (@pxref{Using the Configuration System}).
>  
>  @table @asis
>  @item @code{kernel} (default: @code{linux-libre})
> -The package object of the operating system kernel to use@footnote{Currently
> -only the Linux-libre kernel is supported.  In the future, it will be
> -possible to use the GNU@tie{}Hurd.}.
> +The package object of the operating system kernel to
> +use@footnote{Currently only the Linux-libre kernel is fully supported.
> +Using GNU@tie{}mach in combination with a @code{hurd} is experimental

Using GNU@tie{}Mach with the GNU@tie{}Hurd is experimental

> +and only available when building a vm-image.}.
> +
> +@cindex hurd
> +@item @code{hurd} (default: @code{#f})
> +The hurd to be started by the kernel.  This is required to build an
> +experimental vm-image for the Hurd and requires using @code{kernel}
> +GNU@tie{}mach as well as other specific operating system overrides.

To show that this field is not specific to disk/VM images, how about
something along these lines:

  When this field is set, produce a GNU/Hurd operating system.  In that
  case, @code{kernel} must also be set to the @code{gnumach}
  package---the microkernel the Hurd runs on.

  @quotation Warning
  This feature is experimental and only supported for disk images.
  @end quotation

Ludo’.




^ permalink raw reply	[flat|nested] 67+ messages in thread

* [bug#41541] [PATCH 2/8] bootloader: Extend `<menu-entry>' for multiboot.
  2020-06-04 13:59   ` bug#41541: [PATCH 2/8] bootloader: Extend `<menu-entry>' for multiboot Jan (janneke) Nieuwenhuizen
@ 2020-06-06 10:48     ` Ludovic Courtès
  2020-06-06 12:00       ` Jan Nieuwenhuizen
  0 siblings, 1 reply; 67+ messages in thread
From: Ludovic Courtès @ 2020-06-06 10:48 UTC (permalink / raw)
  To: Jan (janneke) Nieuwenhuizen; +Cc: 41541

"Jan (janneke) Nieuwenhuizen" <janneke@gnu.org> skribis:

> * gnu/bootloader.scm (<menu-entry>)[multiboot-kernel,multiboot-arguments,
> multiboot-modules]: New fields.
> [linux,initrd]: Add default value '#f'.
> (menu-entry->sexp, sexp->menu-entry): Support multiboot entry.

Could you mention the new fields in guix.texi?

Otherwise LGTM!




^ permalink raw reply	[flat|nested] 67+ messages in thread

* [bug#41541] [PATCH 3/8] system: Add 'multiboot-modules' field to <boot-parameters>.
  2020-06-06  7:32     ` Mathieu Othacehe
  2020-06-06 10:13       ` Jan Nieuwenhuizen
@ 2020-06-06 10:55       ` Ludovic Courtès
  2020-06-07  7:39         ` Jan Nieuwenhuizen
  1 sibling, 1 reply; 67+ messages in thread
From: Ludovic Courtès @ 2020-06-06 10:55 UTC (permalink / raw)
  To: Mathieu Othacehe; +Cc: 41541, Jan (janneke) Nieuwenhuizen

Hi,

Mathieu Othacehe <othacehe@gnu.org> skribis:

>> +             (mach (if (%current-target-system)
>> +                       ;; A cross-built GNUmach does not work
>> +                       (with-parameters ((%current-system "i686-linux")
>> +                                         (%current-target-system #f))
>> +                         mach)
>
> Maybe it would make more sense to check if we are on a Hurd system,
> rather than just checking for %current-target-system to be set, don't
> know.

If this hack is still needed, can we move it away to hurd-os.tmpl, or to
the ‘gnumach’ package itself or something?

I think it’s best to keep (gnu system) free of any such assumptions.

>> +         (libc (if target
>> +                   (with-parameters ((%current-target-system #f))
>> +                     (cross-libc target))
>> +                   glibc))
>
> In the future, it would be nice to make this think transparent. Anyway,
> for now this is the best we can do I think.

Yeah, perhaps add a FIXME.

>> "--x-xattr-translator-records"

Do we need this yet?  If it can wait for later, that’s even nicer IMO as
it would allow us to separate concerns.

Ludo’.




^ permalink raw reply	[flat|nested] 67+ messages in thread

* [bug#41541] [PATCH 4/8] bootloader: grub: Add support for multiboot.
  2020-06-04 13:59   ` bug#41541: [PATCH 4/8] bootloader: grub: Add support for multiboot Jan (janneke) Nieuwenhuizen
  2020-06-06  7:47     ` Mathieu Othacehe
@ 2020-06-06 10:57     ` Ludovic Courtès
  2020-06-06 12:08       ` Jan Nieuwenhuizen
  1 sibling, 1 reply; 67+ messages in thread
From: Ludovic Courtès @ 2020-06-06 10:57 UTC (permalink / raw)
  To: Jan (janneke) Nieuwenhuizen; +Cc: 41541

"Jan (janneke) Nieuwenhuizen" <janneke@gnu.org> skribis:

> * gnu/bootloader/grub.scm (grub-configuration-file): Add support for
> multiboot.

[...]

> -  #:export (menu-entry
> +  #:export (<menu-entry>

Please don’t do that.  In general we shouldn’t export record-type
descriptors as it breaks encapsulation.




^ permalink raw reply	[flat|nested] 67+ messages in thread

* [bug#41541] [PATCH 5/8] system: Use 'hurd' package in label.
  2020-06-04 13:59   ` bug#41541: [PATCH 5/8] system: Use 'hurd' package in label Jan (janneke) Nieuwenhuizen
@ 2020-06-06 10:57     ` Ludovic Courtès
  0 siblings, 0 replies; 67+ messages in thread
From: Ludovic Courtès @ 2020-06-06 10:57 UTC (permalink / raw)
  To: Jan (janneke) Nieuwenhuizen; +Cc: 41541

"Jan (janneke) Nieuwenhuizen" <janneke@gnu.org> skribis:

> * gnu/system.scm (kernel->boot-label): Add keyword parameter 'hurd'.  If set,
> use it for label.
> (operating-system-default-label): Call with it with operating-system-hurd.

LGTM! :-)




^ permalink raw reply	[flat|nested] 67+ messages in thread

* [bug#41541] [PATCH 6/8] system: examples: Add bare-hurd.tmpl.
  2020-06-06  7:56     ` Mathieu Othacehe
@ 2020-06-06 10:58       ` Jan Nieuwenhuizen
  2020-06-06 16:49         ` Mathieu Othacehe
  0 siblings, 1 reply; 67+ messages in thread
From: Jan Nieuwenhuizen @ 2020-06-06 10:58 UTC (permalink / raw)
  To: Mathieu Othacehe; +Cc: 41541, Ludovic Courtès

Mathieu Othacehe writes:

Hello Mathieu, Ludo!

>>     ./pre-inst-env guix system vm-image --target=i586-pc-gnu --no-grafts \
>>         gnu/system/examples/bare-hurd.tmpl
>
> Not related to your serie, but I would really like the "image" catalog I
> proposed to help here. Most people struggle to get the difference
> between --system and --target. Plus, those cross-compilation targets are
> not really documented.
>
> I think if one could write:
>
> guix system image gnu/system/images/bare-hurd.scm
>
> or so, it would help. But this needs some more discussions.

Yes, I agree.  Do you propose to hold back merging wip-hurd-vm until
after merging the "image" catalog feature and then rewrite this message?

Exactly when we merge wip-hurd-vm does not matter all that much to me,
it's much more important/interesting to agree when we're happy with it.

>> -  #:use-module ((guix utils) #:select (source-properties->location))
>> +  #:use-module ((guix utils) #:select (source-properties->location
>> +                                       %current-target-system))
>
> You're not using it right?

Ah, no (not since the grub work moved).

>> +    ;; (kernel-loadable-modules '())
>
> Remove it.

Ok, I was already unsure about keeping...

>> +    ;; (label (operating-system-default-label this-operating-system))
>
> Same for this one and the other commented lines below.

...these all.  They were pretty helpful for me to get it to work,
initially.  This will see more changes as Hurd support improves!

Hmm, oops: the guix-system.sh test fails.  Added this

--8<---------------cut here---------------start------------->8---
diff --git a/tests/guix-system.sh b/tests/guix-system.sh
index 3a831cba1d..0e22686a34 100644
--- a/tests/guix-system.sh
+++ b/tests/guix-system.sh
@@ -307,7 +307,12 @@ guix system search anonym network | grep "^name: tor"
 
 # Verify that the examples can be built.
 for example in gnu/system/examples/*.tmpl; do
-    guix system -n disk-image "$example"
+    if echo "$example" | grep hurd; then
+        target="--target=i586-pc-gnu"
+    else
+        target=
+    fi
+    guix system -n disk-image $target "$example"
 done
 
 # Verify that the disk image types can be built.
--8<---------------cut here---------------end--------------->8---

to "fix" that.  It feals a bit heavy, ugly and specific.  Ideas?

Greetings, Janneke

-- 
Jan Nieuwenhuizen <janneke@gnu.org> | GNU LilyPond http://lilypond.org
Freelance IT http://JoyofSource.com | Avatar® http://AvatarAcademy.com




^ permalink raw reply related	[flat|nested] 67+ messages in thread

* [bug#41541] [PATCH 6/8] system: examples: Add bare-hurd.tmpl.
  2020-06-04 13:59   ` bug#41541: [PATCH 6/8] system: examples: Add bare-hurd.tmpl Jan (janneke) Nieuwenhuizen
  2020-06-06  7:56     ` Mathieu Othacehe
@ 2020-06-06 10:59     ` Ludovic Courtès
  2020-06-06 12:34       ` Jan Nieuwenhuizen
  1 sibling, 1 reply; 67+ messages in thread
From: Ludovic Courtès @ 2020-06-06 10:59 UTC (permalink / raw)
  To: Jan (janneke) Nieuwenhuizen; +Cc: 41541

"Jan (janneke) Nieuwenhuizen" <janneke@gnu.org> skribis:

> With this, we can now build a VM like so
>
>     ./pre-inst-env guix system vm-image --target=i586-pc-gnu --no-grafts \
>         gnu/system/examples/bare-hurd.tmpl
>
> it boots, but needs some more setup/services to be really useful.

Maybe make it a comment at the top of bare-hurd.tmpl?

> See also: <https://bugs.gnu.org/40839>; wip-disk-image.

What does this mean?

Otherwise LGTM!




^ permalink raw reply	[flat|nested] 67+ messages in thread

* [bug#41541] [PATCH 8/8] system: Add `hurd-activation'.
  2020-06-04 13:59   ` bug#41541: [PATCH 8/8] system: Add `hurd-activation' Jan (janneke) Nieuwenhuizen
  2020-06-06  8:03     ` Mathieu Othacehe
@ 2020-06-06 11:05     ` Ludovic Courtès
  2020-06-06 14:21       ` Jan Nieuwenhuizen
  1 sibling, 1 reply; 67+ messages in thread
From: Ludovic Courtès @ 2020-06-06 11:05 UTC (permalink / raw)
  To: Jan (janneke) Nieuwenhuizen; +Cc: 41541

"Jan (janneke) Nieuwenhuizen" <janneke@gnu.org> skribis:

> +(define (hurd-activation-script gexps)
> +  "Return the Hurd activation script, which evaluates GEXPS."
> +  (define actions
> +    (map (cut program-file "activate-service.scm" <>) gexps))
> +
> +  (with-imported-modules (source-module-closure
> +                          '((gnu build activation)
> +                            (guix build utils)))
> +    #~(begin
> +        (use-modules (gnu build activation)
> +                     (guix build utils))
> +
> +        (mkdir-p "/var/run")            ;for the PID files
> +        (mkdir-p "/var/log")
> +
> +        ;; Set up /run/current-system.  Among other things this
> +        ;; sets up locales, which the activation snippets
> +        ;; executed below may expect.
> +        (activate-current-system #:kernel-command-line command-line)

It seems that ‘command-line’ is unbound here, no?

I was wondering: if the only thing that differs between Linux and Mach
is the command line, could we keep the same activation script for both
cases, and instead move the conditional to (gnu build activation), like:

  (if (string-contains %host-type "linux-gnu")
      linux-command-line
      mach-command-line)

Does that make sense?

Thanks,
Ludo’.




^ permalink raw reply	[flat|nested] 67+ messages in thread

* [bug#41541] [PATCH 7/8] services: hurd: Add `hurd-etc-service'.
  2020-06-04 13:59   ` bug#41541: [PATCH 7/8] services: hurd: Add `hurd-etc-service' Jan (janneke) Nieuwenhuizen
@ 2020-06-06 11:08     ` Ludovic Courtès
  2020-06-06 14:31       ` Jan Nieuwenhuizen
  0 siblings, 1 reply; 67+ messages in thread
From: Ludovic Courtès @ 2020-06-06 11:08 UTC (permalink / raw)
  To: Jan (janneke) Nieuwenhuizen; +Cc: 41541

"Jan (janneke) Nieuwenhuizen" <janneke@gnu.org> skribis:

> * gnu/services/hurd.scm: New file.
> * gnu/local.mk (GNU_SYSTEM_MODULES): Add it.
> * doc/guix.texi (Hurd Services): Document it.

[...]

> +@deffn {Scheme Procedure} hurd-etc-service @var{os}
> +This service implements a minimal @code{etc-service}, adding some
> +specifics for the Hurd.
> +
> +It is part of the @code{hurd-default-essential-services}.
> +@end deffn

The ‘hurd-default-essential-services’ bit is not in this patch, though.

> +;;; The ETC service for the Hurd.

s/ETC/etc/

> +(define (hurd-etc-service os)
> +  "Return a <service> that builds containing the static part of the /etc
> +directory."
> +  (let ((profile (mixed-text-file "profile"  "\
> +# Generated by hurd-etc-services
> +export PS1='\\u@\\h\\$ '
> +
> +GUIX_PROFILE=\"/run/current-system/profile\"
> +. \"$GUIX_PROFILE/etc/profile\"
> +
> +GUIX_PROFILE=\"$HOME/.guix-profile\"
> +if [ -f \"$GUIX_PROFILE/etc/profile\" ]; then
> +  . \"$GUIX_PROFILE/etc/profile\"
> +fi\n"))
> +        (hurd (operating-system-hurd os)))
> +    (etc-service
> +     `(("services" ,(file-append net-base "/etc/services"))
> +       ("protocols" ,(file-append net-base "/etc/protocols"))
> +       ("profile" ,profile)
> +       ("hostname" ,(plain-file "hostname" (operating-system-host-name os)))
> +       ("login" ,(file-append hurd "/etc/login"))
> +       ("motd" ,(file-append hurd "/etc/motd"))))))

Why again does it need to be different from that on GNU/Linux?
Intuitively it should be the same, but it’s fine to keep this one,
perhaps with a FIXME, until we’ve figured out what to do to use the same
/etc service in both cases.

Ludo’.




^ permalink raw reply	[flat|nested] 67+ messages in thread

* [bug#41541] [PATCH 1/8] system: Add 'hurd' field to <operating-system>.
  2020-06-06 10:45     ` [bug#41541] " Ludovic Courtès
@ 2020-06-06 11:14       ` Jan Nieuwenhuizen
  0 siblings, 0 replies; 67+ messages in thread
From: Jan Nieuwenhuizen @ 2020-06-06 11:14 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: 41541

Ludovic Courtès writes:

Hello!

> "Jan (janneke) Nieuwenhuizen" <janneke@gnu.org> skribis:
>
>> * gnu/system.scm (<operating-system>)[hurd]: New field.
>> * doc/guix.texi (operating-system Reference): Document 'hurd'.
>> ---
>>  doc/guix.texi  | 13 ++++++++++---
>>  gnu/system.scm |  3 +++
>>  2 files changed, 13 insertions(+), 3 deletions(-)
>>
>> diff --git a/doc/guix.texi b/doc/guix.texi
>> index 056bf011f6..4776eacacd 100644
>> --- a/doc/guix.texi
>> +++ b/doc/guix.texi
>> @@ -11484,9 +11484,16 @@ configuration (@pxref{Using the Configuration System}).
>>  
>>  @table @asis
>>  @item @code{kernel} (default: @code{linux-libre})
>> -The package object of the operating system kernel to use@footnote{Currently
>> -only the Linux-libre kernel is supported.  In the future, it will be
>> -possible to use the GNU@tie{}Hurd.}.
>> +The package object of the operating system kernel to
>> +use@footnote{Currently only the Linux-libre kernel is fully supported.
>> +Using GNU@tie{}mach in combination with a @code{hurd} is experimental
>
> Using GNU@tie{}Mach with the GNU@tie{}Hurd is experimental

Ok!  (I think i tried to refer to the field "hurd", but I like your suggestion better)

>> +and only available when building a vm-image.}.
>> +
>> +@cindex hurd
>> +@item @code{hurd} (default: @code{#f})
>> +The hurd to be started by the kernel.  This is required to build an
>> +experimental vm-image for the Hurd and requires using @code{kernel}
>> +GNU@tie{}mach as well as other specific operating system overrides.
>
> To show that this field is not specific to disk/VM images, how about
> something along these lines:
>
>   When this field is set, produce a GNU/Hurd operating system.  In that
>   case, @code{kernel} must also be set to the @code{gnumach}
>   package---the microkernel the Hurd runs on.
>
>   @quotation Warning
>   This feature is experimental and only supported for disk images.
>   @end quotation

Nice, thanks!  Changed to

@item @code{hurd} (default: @code{#f})
The package object of the hurd to be started by the kernel.  When this
field is set, produce a GNU/Hurd operating system.  In that case,
@code{kernel} must also be set to the @code{gnumach} package---the
microkernel the Hurd runs on.

@quotation Warning
This feature is experimental and only supported for disk images.
@end quotation

Janneke

-- 
Jan Nieuwenhuizen <janneke@gnu.org> | GNU LilyPond http://lilypond.org
Freelance IT http://JoyofSource.com | Avatar® http://AvatarAcademy.com




^ permalink raw reply	[flat|nested] 67+ messages in thread

* [bug#41541] [PATCH 2/8] bootloader: Extend `<menu-entry>' for multiboot.
  2020-06-06 10:48     ` [bug#41541] " Ludovic Courtès
@ 2020-06-06 12:00       ` Jan Nieuwenhuizen
  0 siblings, 0 replies; 67+ messages in thread
From: Jan Nieuwenhuizen @ 2020-06-06 12:00 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: 41541

Ludovic Courtès writes:

> "Jan (janneke) Nieuwenhuizen" <janneke@gnu.org> skribis:
>
>> * gnu/bootloader.scm (<menu-entry>)[multiboot-kernel,multiboot-arguments,
>> multiboot-modules]: New fields.
>> [linux,initrd]: Add default value '#f'.
>> (menu-entry->sexp, sexp->menu-entry): Support multiboot entry.
>
> Could you mention the new fields in guix.texi?

Oops, I missed that.  Added the "default #f" for the linux and initrd
fields, and this

@item @code{multiboot-kernel} (default: @code{#f})
The kernel to boot in Multiboot-mode (@pxref{multiboot,,, grub, GNU GRUB
manual}).  When this field is set, a Multiboot menu-entry is generated.
For example:

@lisp
(file-append mach "/boot/gnumach")
@end lisp

@item @code{multiboot-arguments} (default: @code{()})
The list of extra command-line arguments for the multiboot-kernel.

@item @code{multiboot-modules} (default: @code{()})
The list of commands for loading Multiboot modules.  For example:

@lisp
(list (list (file-append hurd "/hurd/ext2fs.static") "ext2fs"
             @dots{})
      (list (file-append libc "/lib/ld.so.1") "exec"
             @dots{}))
@end lisp

> Otherwise LGTM!

Thanks, Janneke

-- 
Jan Nieuwenhuizen <janneke@gnu.org> | GNU LilyPond http://lilypond.org
Freelance IT http://JoyofSource.com | Avatar® http://AvatarAcademy.com




^ permalink raw reply	[flat|nested] 67+ messages in thread

* [bug#41541] [PATCH 4/8] bootloader: grub: Add support for multiboot.
  2020-06-06 10:57     ` [bug#41541] " Ludovic Courtès
@ 2020-06-06 12:08       ` Jan Nieuwenhuizen
  0 siblings, 0 replies; 67+ messages in thread
From: Jan Nieuwenhuizen @ 2020-06-06 12:08 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: 41541

Ludovic Courtès writes:

> "Jan (janneke) Nieuwenhuizen" <janneke@gnu.org> skribis:
>
>> * gnu/bootloader/grub.scm (grub-configuration-file): Add support for
>> multiboot.
>
> [...]
>
>> -  #:export (menu-entry
>> +  #:export (<menu-entry>
>
> Please don’t do that.  In general we shouldn’t export record-type
> descriptors as it breaks encapsulation.

Hmm...okay, it's not needed per se.  I rewrote the (match (($
<menu-entry>) ... ) to use accessors again!

Greetings, Janneke

-- 
Jan Nieuwenhuizen <janneke@gnu.org> | GNU LilyPond http://lilypond.org
Freelance IT http://JoyofSource.com | Avatar® http://AvatarAcademy.com




^ permalink raw reply	[flat|nested] 67+ messages in thread

* [bug#41541] [PATCH 6/8] system: examples: Add bare-hurd.tmpl.
  2020-06-06 10:59     ` Ludovic Courtès
@ 2020-06-06 12:34       ` Jan Nieuwenhuizen
  0 siblings, 0 replies; 67+ messages in thread
From: Jan Nieuwenhuizen @ 2020-06-06 12:34 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: 41541

Ludovic Courtès writes:

> "Jan (janneke) Nieuwenhuizen" <janneke@gnu.org> skribis:
>
>> With this, we can now build a VM like so
>>
>>     ./pre-inst-env guix system vm-image --target=i586-pc-gnu --no-grafts \
>>         gnu/system/examples/bare-hurd.tmpl
>>
>> it boots, but needs some more setup/services to be really useful.
>
> Maybe make it a comment at the top of bare-hurd.tmpl?

Sure, moved there and...

...and adapted to say "disk-image".

>> See also: <https://bugs.gnu.org/40839>; wip-disk-image.

> What does this mean?

Removed.  This was from before our "explosive" mixture of the two wip
branches, as a courtesy for fellow Hurd hackers to get involved :-/

I tend to add extra stuff to commit messages and then forget to clean-up
later.

> Otherwise LGTM!

Thanks, Janneke

-- 
Jan Nieuwenhuizen <janneke@gnu.org> | GNU LilyPond http://lilypond.org
Freelance IT http://JoyofSource.com | Avatar® http://AvatarAcademy.com




^ permalink raw reply	[flat|nested] 67+ messages in thread

* [bug#41541] [PATCH 8/8] system: Add `hurd-activation'.
  2020-06-06 11:05     ` [bug#41541] " Ludovic Courtès
@ 2020-06-06 14:21       ` Jan Nieuwenhuizen
  0 siblings, 0 replies; 67+ messages in thread
From: Jan Nieuwenhuizen @ 2020-06-06 14:21 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: 41541

Ludovic Courtès writes:

> "Jan (janneke) Nieuwenhuizen" <janneke@gnu.org> skribis:
>
>> +(define (hurd-activation-script gexps)
>> +        (activate-current-system #:kernel-command-line command-line)
>
> It seems that ‘command-line’ is unbound here, no?

I don't think so...activation will be loaded from RC (following commit),
which is a guile script started by RUNSYSTEM:

--8<---------------cut here---------------start------------->8---
...
exec ${system}/rc \"$@\"
--8<---------------cut here---------------end--------------->8---

> I was wondering: if the only thing that differs between Linux and Mach
> is the command line, could we keep the same activation script for both
> cases, and instead move the conditional to (gnu build activation), like:
>
   (if (string-contains %host-type "linux-gnu")
       linux-command-line
       mach-command-line)

> Does that make sense?

Yes, much better now.  Using (command-line), though.

This used to be much more complicated, when stuff didn't cross build
correctly etc.

Greetings,
Janneke

-- 
Jan Nieuwenhuizen <janneke@gnu.org> | GNU LilyPond http://lilypond.org
Freelance IT http://JoyofSource.com | Avatar® http://AvatarAcademy.com




^ permalink raw reply	[flat|nested] 67+ messages in thread

* [bug#41541] [PATCH 7/8] services: hurd: Add `hurd-etc-service'.
  2020-06-06 11:08     ` [bug#41541] " Ludovic Courtès
@ 2020-06-06 14:31       ` Jan Nieuwenhuizen
  2020-06-07 20:02         ` Ludovic Courtès
  0 siblings, 1 reply; 67+ messages in thread
From: Jan Nieuwenhuizen @ 2020-06-06 14:31 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: 41541

[-- Attachment #1: Type: text/plain, Size: 2161 bytes --]

Ludovic Courtès writes:

> "Jan (janneke) Nieuwenhuizen" <janneke@gnu.org> skribis:
>
>> * gnu/services/hurd.scm: New file.
>> * gnu/local.mk (GNU_SYSTEM_MODULES): Add it.
>> * doc/guix.texi (Hurd Services): Document it.
>
> [...]

As discussed on IRC: dropped altogether, replaced with attached patch.

>> +@deffn {Scheme Procedure} hurd-etc-service @var{os}
>> +This service implements a minimal @code{etc-service}, adding some
>> +specifics for the Hurd.
>> +
>> +It is part of the @code{hurd-default-essential-services}.
>> +@end deffn
>
> The ‘hurd-default-essential-services’ bit is not in this patch, though.

Hmm.  I think it's complicated...No, it was complicated.  ETC depends on
%activatation which depends on %boot, but those now work; so I can
reorder!

Reordered, added to hurd-default-essential-services in compliance with
the documentation.

>> +;;; The ETC service for the Hurd.
>
> s/ETC/etc/

OK.  Eh... ok. ;-)

>> +(define (hurd-etc-service os)
[..]
>> +    (etc-service
>> +     `(("services" ,(file-append net-base "/etc/services"))
>> +       ("protocols" ,(file-append net-base "/etc/protocols"))
>> +       ("profile" ,profile)
>> +       ("hostname" ,(plain-file "hostname" (operating-system-host-name os)))
>> +       ("login" ,(file-append hurd "/etc/login"))
>> +       ("motd" ,(file-append hurd "/etc/motd"))))))
>
> Why again does it need to be different from that on GNU/Linux?

Good question!  Yeah...this started out as a more formalized copy of the
gnu/system/hurd.scm hack and it used to be complicated; services didn't
cross build, for example.

Also, it felt good to start really minimalistic, especially because of
the cross build troubles.

I seemed to remember that on top of that there was a Hurd build problem,
but I think that must have been sudo and it's easy to disable.

> Intuitively it should be the same, but it’s fine to keep this one,
> perhaps with a FIXME, until we’ve figured out what to do to use the same
> /etc service in both cases.

Phew, I didn't expect so much work; but also not so much cleanup so
soon.

Thanks, Janneke


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-services-Support-etc-service-for-the-Hurd.patch --]
[-- Type: text/x-patch, Size: 3181 bytes --]

From 4cef6e73ce9fd137640c1c00f98958cdc41dda90 Mon Sep 17 00:00:00 2001
From: "Jan (janneke) Nieuwenhuizen" <janneke@gnu.org>
Date: Sat, 25 Apr 2020 11:55:56 +0200
Subject: [PATCH] services: Support etc-service for the Hurd.

* gnu/system.scm (operating-system-etc-service): Cater for missing nsswitch
and missing sudoers-file.  For the Hurd, add "login" and "motd".
(hurd-default-essential-services): Add operating-system-etc-service.
---
 gnu/system.scm | 20 +++++++++++++-------
 1 file changed, 13 insertions(+), 7 deletions(-)

diff --git a/gnu/system.scm b/gnu/system.scm
index ac64dfcff6..0df642679d 100644
--- a/gnu/system.scm
+++ b/gnu/system.scm
@@ -611,6 +611,7 @@ bookkeeping."
   (list (service system-service-type '())
         %boot-service
         %activation-service
+        (operating-system-etc-service os)
         (service profile-service-type '())))
 
 (define* (operating-system-services os)
@@ -716,7 +717,7 @@ This is the GNU system.  Welcome.\n")
 (define* (operating-system-etc-service os)
   "Return a <service> that builds containing the static part of the /etc
 directory."
-  (let ((login.defs
+  (let* ((login.defs
           (plain-file "login.defs"
                       (string-append
                         "# Default paths for non-login shells started by su(1).\n"
@@ -727,10 +728,13 @@ directory."
                         "/run/current-system/profile/bin:"
                         "/run/current-system/profile/sbin\n")))
 
-        (issue      (plain-file "issue" (operating-system-issue os)))
-        (nsswitch   (plain-file "nsswitch.conf"
-                                (name-service-switch->string
-                                 (operating-system-name-service-switch os))))
+         (hurd       (operating-system-hurd os))
+         (issue      (plain-file "issue" (operating-system-issue os)))
+         (nsswitch   (operating-system-name-service-switch os))
+         (nsswitch   (and nsswitch
+                          (plain-file "nsswitch.conf"
+                                      (name-service-switch->string nsswitch))))
+         (sudoers    (operating-system-sudoers-file os))
 
         ;; Startup file for POSIX-compliant login shells, which set system-wide
         ;; environment variables.
@@ -820,7 +824,7 @@ fi\n")))
        ("rpc" ,(file-append net-base "/etc/rpc"))
        ("login.defs" ,#~#$login.defs)
        ("issue" ,#~#$issue)
-       ("nsswitch.conf" ,#~#$nsswitch)
+       ,@(if nsswitch `(("nsswitch.conf" ,#~#$nsswitch)) '())
        ("profile" ,#~#$profile)
        ("bashrc" ,#~#$bashrc)
        ("hosts" ,#~#$(or (operating-system-hosts-file os)
@@ -836,7 +840,9 @@ fi\n")))
        ("timezone" ,(plain-file "timezone" (operating-system-timezone os)))
        ("localtime" ,(file-append tzdata "/share/zoneinfo/"
                                   (operating-system-timezone os)))
-       ("sudoers" ,(operating-system-sudoers-file os))))))
+       ,@(if sudoers `(("sudoers" ,sudoers)) '())
+       ,@(if hurd `(("login" ,(file-append hurd "/etc/login"))
+                    ("motd"  ,(file-append hurd "/etc/motd"))))))))
 
 (define %root-account
   ;; Default root account.
-- 
2.26.2


[-- Attachment #3: Type: text/plain, Size: 152 bytes --]


-- 
Jan Nieuwenhuizen <janneke@gnu.org> | GNU LilyPond http://lilypond.org
Freelance IT http://JoyofSource.com | Avatar® http://AvatarAcademy.com

^ permalink raw reply related	[flat|nested] 67+ messages in thread

* [bug#41541] [PATCH 6/8] system: examples: Add bare-hurd.tmpl.
  2020-06-06 10:58       ` [bug#41541] " Jan Nieuwenhuizen
@ 2020-06-06 16:49         ` Mathieu Othacehe
  2020-06-06 22:44           ` Jan Nieuwenhuizen
  0 siblings, 1 reply; 67+ messages in thread
From: Mathieu Othacehe @ 2020-06-06 16:49 UTC (permalink / raw)
  To: Jan Nieuwenhuizen; +Cc: 41541, Ludovic Courtès


Hey,

>
> Yes, I agree.  Do you propose to hold back merging wip-hurd-vm until
> after merging the "image" catalog feature and then rewrite this message?

No, I have no clear objective for the catalog in mind, and as your serie
is almost ready, let's merge it first!

>  # Verify that the examples can be built.
>  for example in gnu/system/examples/*.tmpl; do
> -    guix system -n disk-image "$example"
> +    if echo "$example" | grep hurd; then
> +        target="--target=i586-pc-gnu"
> +    else
> +        target=
> +    fi
> +    guix system -n disk-image $target "$example"
>  done
>  
>  # Verify that the disk image types can be built.
>
> to "fix" that.  It feals a bit heavy, ugly and specific.  Ideas?

It's somehow linked to the catalog subject. I think we should get rid of
this "examples" folder and provide something encapsulating the
system/target, the image and the operating-system, but I'm not sure how.

For now, I don't think that there's much better that the hack you're
proposing.

Thanks,

Mathieu




^ permalink raw reply	[flat|nested] 67+ messages in thread

* [bug#41541] [PATCH 6/8] system: examples: Add bare-hurd.tmpl.
  2020-06-06 16:49         ` Mathieu Othacehe
@ 2020-06-06 22:44           ` Jan Nieuwenhuizen
  0 siblings, 0 replies; 67+ messages in thread
From: Jan Nieuwenhuizen @ 2020-06-06 22:44 UTC (permalink / raw)
  To: Mathieu Othacehe; +Cc: 41541, Ludovic Courtès

Mathieu Othacehe writes:

Hello Mathieu,

>> Yes, I agree.  Do you propose to hold back merging wip-hurd-vm until
>> after merging the "image" catalog feature and then rewrite this message?
>
> No, I have no clear objective for the catalog in mind, and as your serie
> is almost ready, let's merge it first!

Good; let's look at the last bits tomorrow.  I think wip-hurd-vm should
be ready to merge (except of course the top "DRAFT" commit).

>>  # Verify that the examples can be built.
>>  for example in gnu/system/examples/*.tmpl; do
>> -    guix system -n disk-image "$example"
>> +    if echo "$example" | grep hurd; then
>> +        target="--target=i586-pc-gnu"
>> +    else
>> +        target=
>> +    fi
>> +    guix system -n disk-image $target "$example"
>>  done
>>  
>>  # Verify that the disk image types can be built.
>>
>> to "fix" that.  It feals a bit heavy, ugly and specific.  Ideas?
>
> It's somehow linked to the catalog subject. I think we should get rid of
> this "examples" folder and provide something encapsulating the
> system/target, the image and the operating-system, but I'm not sure how.
>
> For now, I don't think that there's much better that the hack you're
> proposing.

Ok, all great then for now.  Thank, Janneke

-- 
Jan Nieuwenhuizen <janneke@gnu.org> | GNU LilyPond http://lilypond.org
Freelance IT http://JoyofSource.com | Avatar® http://AvatarAcademy.com




^ permalink raw reply	[flat|nested] 67+ messages in thread

* [bug#41541] [PATCH 3/8] system: Add 'multiboot-modules' field to <boot-parameters>.
  2020-06-06 10:55       ` [bug#41541] " Ludovic Courtès
@ 2020-06-07  7:39         ` Jan Nieuwenhuizen
  0 siblings, 0 replies; 67+ messages in thread
From: Jan Nieuwenhuizen @ 2020-06-07  7:39 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: 41541, Mathieu Othacehe

Ludovic Courtès writes:

Hi,

> Mathieu Othacehe <othacehe@gnu.org> skribis:
>
>>> +             (mach (if (%current-target-system)
>>> +                       ;; A cross-built GNUmach does not work
>>> +                       (with-parameters ((%current-system "i686-linux")
>>> +                                         (%current-target-system #f))
>>> +                         mach)
>>
>> Maybe it would make more sense to check if we are on a Hurd system,
>> rather than just checking for %current-target-system to be set, don't
>> know.
>
> If this hack is still needed, can we move it away to hurd-os.tmpl, or to
> the ‘gnumach’ package itself or something?

Yes, it's needed; GNUmach does not work when cross-built.

> I think it’s best to keep (gnu system) free of any such assumptions.

Ok.

Changed this to

--8<---------------cut here---------------start------------->8---
(define (operating-system-kernel-file os)
  "Return an object representing the absolute file name of the kernel image of
OS."
  (if (operating-system-hurd os)
      (file-append (operating-system-kernel os) "/boot/gnumach")
      (file-append (operating-system-kernel os)
                      "/" (system-linux-image-file-name))))
--8<---------------cut here---------------end--------------->8---

and compensated for MACH (folded in a later patch) in
gnu/system/hurd.scm, like

--8<---------------cut here---------------start------------->8---
(define %hurd-default-operating-system-kernel
  (if (hurd-system?)
      gnumach
      ;; A cross-built GNUmach does not work
      (with-parameters ((%current-system "i686-linux")
                        (%current-target-system #f))
        gnumach)))
[...]
(define %hurd-default-operating-system
  (operating-system
    (kernel %hurd-default-operating-system-kernel)
[...]
--8<---------------cut here---------------end--------------->8---

>>> +         (libc (if target
>>> +                   (with-parameters ((%current-target-system #f))
>>> +                     (cross-libc target))
>>> +                   glibc))
>>
>> In the future, it would be nice to make this think transparent. Anyway,
>> for now this is the best we can do I think.
>
> Yeah, perhaps add a FIXME.

Yes, did that!

>>> "--x-xattr-translator-records"
>
> Do we need this yet?  If it can wait for later, that’s even nicer IMO as
> it would allow us to separate concerns.

Not "just" yet, it's used after the introduction of hurd-boot.scm, where
I use setxattr instead of MAKEDEV.  Moved it up the stack, to

    8dff3d0382 hurd-boot: Use setxattr instead of MAKEDEV.

Phew.  I think that was it for this round.  I've reset wip-hurd-vm so
that we can have another good look tomorrow.

Thanks a lot!
Janneke

-- 
Jan Nieuwenhuizen <janneke@gnu.org> | GNU LilyPond http://lilypond.org
Freelance IT http://JoyofSource.com | Avatar® http://AvatarAcademy.com




^ permalink raw reply	[flat|nested] 67+ messages in thread

* [bug#41541] [PATCH 7/8] services: hurd: Add `hurd-etc-service'.
  2020-06-06 14:31       ` Jan Nieuwenhuizen
@ 2020-06-07 20:02         ` Ludovic Courtès
  2020-06-07 20:31           ` Jan Nieuwenhuizen
  0 siblings, 1 reply; 67+ messages in thread
From: Ludovic Courtès @ 2020-06-07 20:02 UTC (permalink / raw)
  To: Jan Nieuwenhuizen; +Cc: 41541

Hi,

Jan Nieuwenhuizen <janneke@gnu.org> skribis:

> From 4cef6e73ce9fd137640c1c00f98958cdc41dda90 Mon Sep 17 00:00:00 2001
> From: "Jan (janneke) Nieuwenhuizen" <janneke@gnu.org>
> Date: Sat, 25 Apr 2020 11:55:56 +0200
> Subject: [PATCH] services: Support etc-service for the Hurd.
>
> * gnu/system.scm (operating-system-etc-service): Cater for missing nsswitch
> and missing sudoers-file.  For the Hurd, add "login" and "motd".
> (hurd-default-essential-services): Add operating-system-etc-service.

Perfect!
  
[...]

> +       ,@(if sudoers `(("sudoers" ,sudoers)) '())
> +       ,@(if hurd `(("login" ,(file-append hurd "/etc/login"))
> +                    ("motd"  ,(file-append hurd "/etc/motd"))))))))

We’re missing the ‘else’ branch  here.

Apart from that, LGTM!

Thank you,
Ludo’.




^ permalink raw reply	[flat|nested] 67+ messages in thread

* [bug#41541] [PATCH 7/8] services: hurd: Add `hurd-etc-service'.
  2020-06-07 20:02         ` Ludovic Courtès
@ 2020-06-07 20:31           ` Jan Nieuwenhuizen
  0 siblings, 0 replies; 67+ messages in thread
From: Jan Nieuwenhuizen @ 2020-06-07 20:31 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: 41541

Ludovic Courtès writes:

Hi,

> Jan Nieuwenhuizen <janneke@gnu.org> skribis:
>
>> From 4cef6e73ce9fd137640c1c00f98958cdc41dda90 Mon Sep 17 00:00:00 2001
>> From: "Jan (janneke) Nieuwenhuizen" <janneke@gnu.org>
>> Date: Sat, 25 Apr 2020 11:55:56 +0200
>> Subject: [PATCH] services: Support etc-service for the Hurd.
>>
>> * gnu/system.scm (operating-system-etc-service): Cater for missing nsswitch
>> and missing sudoers-file.  For the Hurd, add "login" and "motd".
>> (hurd-default-essential-services): Add operating-system-etc-service.
>
> Perfect!
>   
> [...]
>
>> +       ,@(if sudoers `(("sudoers" ,sudoers)) '())
>> +       ,@(if hurd `(("login" ,(file-append hurd "/etc/login"))
>> +                    ("motd"  ,(file-append hurd "/etc/motd"))))))))
>
> We’re missing the ‘else’ branch  here.

Ah yes -- make check found that for me...

    http://git.savannah.gnu.org/cgit/guix.git/commit/?h=wip-hurd-vm&id=c7012882da88760fdc7ae5413dc80bd768469341

; already fixed :-)

> Apart from that, LGTM!

Great...getting there!
Janneke

-- 
Jan Nieuwenhuizen <janneke@gnu.org> | GNU LilyPond http://lilypond.org
Freelance IT http://JoyofSource.com | Avatar® http://AvatarAcademy.com




^ permalink raw reply	[flat|nested] 67+ messages in thread

* [bug#41541] [PATCH 0/4] Final wip-hurd-vm batch.
  2020-05-26 14:21 bug#41541: merge wip-hurd-vm Jan Nieuwenhuizen
  2020-05-27 10:01 ` Mathieu Othacehe
  2020-06-04 13:59 ` bug#41541: [PATCH 0/9] Merge wip-hurd-vm "last review round" Jan (janneke) Nieuwenhuizen
@ 2020-06-08 12:57 ` Jan (janneke) Nieuwenhuizen
  2020-06-08 12:57   ` [bug#41541] [PATCH 1/4] hurd-boot: Create individual translators instead of running MAKEDEV Jan (janneke) Nieuwenhuizen
                     ` (3 more replies)
  2 siblings, 4 replies; 67+ messages in thread
From: Jan (janneke) Nieuwenhuizen @ 2020-06-08 12:57 UTC (permalink / raw)
  To: 41541; +Cc: Mathieu Othacehe, Ludovic Courtès, Jan Nieuwenhuizen

From: Jan Nieuwenhuizen <janneke@gnu.org>

Hi!

Almost done...these patches didn't see a review yet; I would like you to have
a look at the two hurd-boot patches.  I have tested them both because I
decided to do the split-up a bit differently: first introduce the MAKEDEV
replacement and make the settrans invocation => setxattr syscall transition a
separate feature.  Hope you like it :-)

Thanks!

Jan (janneke) Nieuwenhuizen (4):
  hurd-boot: Create individual translators instead of running MAKEDEV.
  system: hurd: Remove 'cross-hurd-image' hack.
  system: bare-hurd.tmpl: Add openssh client and service.
  hurd-boot: Use 'setxattr' instead of invoking settrans.

 gnu/build/hurd-boot.scm            | 172 ++++++++++++++++++++--------
 gnu/system.scm                     |   1 +
 gnu/system/examples/bare-hurd.tmpl |  13 ++-
 gnu/system/hurd.scm                | 177 +----------------------------
 4 files changed, 140 insertions(+), 223 deletions(-)

-- 
2.26.2





^ permalink raw reply	[flat|nested] 67+ messages in thread

* [bug#41541] [PATCH 1/4] hurd-boot: Create individual translators instead of running MAKEDEV.
  2020-06-08 12:57 ` [bug#41541] [PATCH 0/4] Final wip-hurd-vm batch Jan (janneke) Nieuwenhuizen
@ 2020-06-08 12:57   ` Jan (janneke) Nieuwenhuizen
  2020-06-08 12:58   ` [bug#41541] [PATCH 2/4] system: hurd: Remove 'cross-hurd-image' hack Jan (janneke) Nieuwenhuizen
                     ` (2 subsequent siblings)
  3 siblings, 0 replies; 67+ messages in thread
From: Jan (janneke) Nieuwenhuizen @ 2020-06-08 12:57 UTC (permalink / raw)
  To: 41541; +Cc: Mathieu Othacehe, Ludovic Courtès

* gnu/build/hurd-boot.scm (make-hurd-device-nodes): Do not create
dev/{null,zero,full,random,urandom} mount points.
(setup-translator, xattr-translator,
showtrans-translator?, translated?, set-hurd-device-translators): New
procedures.
(boot-hurd-system): Use them instead of running MAKEDEV.
---
 gnu/build/hurd-boot.scm | 172 +++++++++++++++++++++++++++++-----------
 1 file changed, 125 insertions(+), 47 deletions(-)

diff --git a/gnu/build/hurd-boot.scm b/gnu/build/hurd-boot.scm
index 09326233d2..398cee1395 100644
--- a/gnu/build/hurd-boot.scm
+++ b/gnu/build/hurd-boot.scm
@@ -80,16 +80,8 @@ Return the value associated with OPTION, or #f on failure."
     (string-append root (if (string-suffix? "/" root) "" "/") dir))
 
   (mkdir (scope "dev"))
-  (for-each (lambda (file)
-              (call-with-output-file (scope file)
-                (lambda (port)
-                  (display file port)   ;avoid hard-linking
-                  (chmod port #o666))))
-            '("dev/null"
-              "dev/zero"
-              "dev/full"
-              "dev/random"
-              "dev/urandom"))
+  ;; Don't create /dev/null etc just yet; the store
+  ;; messes-up the permission bits.
   ;; Don't create /dev/console, /dev/vcs, etc.: they are created by
   ;; console-run on first boot.
 
@@ -115,6 +107,125 @@ Return the value associated with OPTION, or #f on failure."
   ;; settings?
   )
 
+(define (xattr-translator? file-name)
+  "Return true if FILE-NAME has an extended @code{gnu.translator} attribute
+set."
+  (false-if-exception
+   (not (string-null? (getxattr file-name "gnu.translator")))))
+
+(define (showtrans-translator? file-name)
+  "Return true if @file{showtrans} finds a translator installed on FILE-NAME."
+  (with-output-to-port (%make-void-port "w")
+    (lambda _
+      (with-error-to-port (%make-void-port "w")
+        (lambda _
+          (zero? (system* "showtrans" "--silent" file-name)))))))
+
+(define (translated? file-name)
+  "Return true if a translator is installed on FILE-NAME."
+  (if (string-contains %host-type "linux-gnu")
+      (xattr-translator? file-name)
+      (showtrans-translator? file-name)))
+
+(define* (setup-translator file-name command #:optional (mode #o600))
+  "Setup translator COMMAND on FILE-NAME."
+  (unless (translated? file-name)
+    (let ((dir (dirname file-name)))
+      (unless (directory-exists? dir)
+        (mkdir-p dir))
+      (unless (file-exists? file-name)
+        (call-with-output-file file-name
+          (lambda (port)
+            (display file-name port)  ;avoid hard-linking
+            (chmod port mode)))))
+    (catch 'system-error
+      (lambda _
+        (apply invoke "settrans" "--create" file-name command))
+      (lambda (key . args)
+        (let ((errno (system-error-errno (cons key args))))
+          (format (current-error-port) "~a: ~a\n"
+                  (strerror errno) file-name)
+          (format (current-error-port) "Ignoring...Good Luck!\n"))))))
+
+(define* (set-hurd-device-translators #:optional (root "/"))
+  "Make some of the device nodes needed on GNU/Hurd."
+
+  (define (scope dir)
+    (string-append root (if (string-suffix? "/" root) "" "/") dir))
+
+  (define scope-setup-translator
+    (match-lambda
+      ((file-name command)
+       (scope-setup-translator (list file-name command #o600)))
+      ((file-name command mode)
+       (let ((mount-point (scope file-name)))
+         (setup-translator mount-point command mode)))))
+
+  (define servers
+    '(("servers/crash-dump-core" ("/hurd/crash" "--dump-core"))
+      ("servers/crash-kill"      ("/hurd/crash" "--kill"))
+      ("servers/crash-suspend"   ("/hurd/crash" "--suspend"))
+      ("servers/password"        ("/hurd/password"))
+      ("servers/socket/1"        ("/hurd/pflocal"))
+      ("servers/socket/2"        ("/hurd/pfinet"
+                                  "--interface" "eth0"
+                                  "--address"
+                                  "10.0.2.15" ;the default QEMU guest IP
+                                  "--netmask" "255.255.255.0"
+                                  "--gateway" "10.0.2.2"
+                                  "--ipv6" "/servers/socket/16"))))
+
+  (define devices
+    '(("dev/full"    ("/hurd/null"     "--full")            #o666)
+      ("dev/null"    ("/hurd/null")                         #o666)
+      ("dev/random"  ("/hurd/random"   "--seed-file" "/var/lib/random-seed")
+                                                            #o644)
+      ("dev/zero"    ("/hurd/storeio"  "--store-type=zero") #o666)
+
+      ("dev/console" ("/hurd/term"     "/dev/console" "device" "console"))
+
+      ("dev/klog"    ("/hurd/streamio" "kmsg"))
+      ("dev/mem"     ("/hurd/storeio"  "--no-cache" "mem")  #o660)
+      ("dev/shm"     ("/hurd/tmpfs"    "--mode=1777" "50%") #o644)
+      ("dev/time"    ("/hurd/storeio"  "--no-cache" "time") #o644)
+
+      ("dev/vcs"     ("/hurd/console"))
+      ("dev/tty"     ("/hurd/magic"    "tty")               #o666)
+
+      ("dev/tty1"    ("/hurd/term"     "/dev/tty1" "hurdio" "/dev/vcs/1/console")
+                                                            #o666)
+      ("dev/tty2"    ("/hurd/term"     "/dev/tty2" "hurdio" "/dev/vcs/2/console")
+                                                            #o666)
+      ("dev/tty3"    ("/hurd/term"     "/dev/tty3" "hurdio" "/dev/vcs/3/console")
+                                                            #o666)
+
+      ("dev/ptyp0"   ("/hurd/term"     "/dev/ptyp0" "pty-master" "/dev/ttyp0")
+                                                            #o666)
+      ("dev/ptyp1"   ("/hurd/term"     "/dev/ptyp1" "pty-master" "/dev/ttyp1")
+                                                            #o666)
+      ("dev/ptyp2"   ("/hurd/term"     "/dev/ptyp2" "pty-master" "/dev/ttyp2")
+                                                            #o666)
+
+      ("dev/ttyp0"   ("/hurd/term"     "/dev/ttyp0" "pty-slave" "/dev/ptyp0")
+                                                            #o666)
+      ("dev/ttyp1"   ("/hurd/term"     "/dev/ttyp1" "pty-slave" "/dev/ptyp1")
+                                                            #o666)
+      ("dev/ttyp2"   ("/hurd/term"     "/dev/ttyp2" "pty-slave" "/dev/ptyp2")
+                                                            #o666)))
+
+  (for-each scope-setup-translator servers)
+  (false-if-exception (mkdir-p (scope "dev/vcs/1")))
+  (false-if-exception (mkdir-p (scope "dev/vcs/2")))
+  (false-if-exception (mkdir-p (scope "dev/vcs/3")))
+  (false-if-exception (rename-file "/dev/console" "/dev/console-"))
+  (for-each scope-setup-translator devices)
+
+  (false-if-exception (symlink "/dev/random" "/dev/urandom"))
+  (false-if-exception (mkdir-p "/dev/fd"))
+  (false-if-exception (symlink "/dev/fd/0"   "/dev/stdin"))
+  (false-if-exception (symlink "/dev/fd/1"   "/dev/stdout"))
+  (false-if-exception (symlink "/dev/fd/2"   "/dev/stderr")))
+
 \f
 (define* (boot-hurd-system #:key (on-error 'debug))
   "This procedure is meant to be called from an early RC script.
@@ -126,20 +237,9 @@ starting the Shepherd.
 XXX TODO: see linux-boot.scm:boot-system.
 XXX TODO: add proper file-system checking, mounting
 XXX TODO: move bits to (new?) (hurd?) (activation?) services
-XXX TODO: use settrans/setxattr instead of MAKEDEV
+XXX TODO: use Linux xattr/setxattr to remove (settrans in) /libexec/RUNSYSTEM
 
 "
-  (define translators
-    '(("/servers/crash-dump-core" ("/hurd/crash" "--dump-core"))
-      ("/servers/crash-kill" ("/hurd/crash" "--kill"))
-      ("/servers/crash-suspend" ("/hurd/crash" "--suspend"))
-      ("/servers/password" ("/hurd/password"))
-      ("/servers/socket/1" ("/hurd/pflocal"))
-      ("/servers/socket/2" ("/hurd/pfinet" "--interface" "eth0"
-                            "--address" "10.0.2.15" ;the default QEMU guest IP
-                            "--netmask" "255.255.255.0"
-                            "--gateway" "10.0.2.2"
-                            "--ipv6" "/servers/socket/16"))))
 
   (display "Welcome, this is GNU's early boot Guile.\n")
   (display "Use '--repl' for an initrd REPL.\n\n")
@@ -147,35 +247,13 @@ XXX TODO: use settrans/setxattr instead of MAKEDEV
   (call-with-error-handling
    (lambda ()
 
-     (define (translated? node)
-       ;; Return true if a translator is installed on NODE.
-       (with-output-to-port (%make-void-port "w")
-         (lambda ()
-           (with-error-to-port (%make-void-port "w")
-             (lambda ()
-               (zero? (system* "showtrans" "--silent" node)))))))
-
      (let* ((args    (command-line))
             (system  (find-long-option "--system" args))
             (to-load (find-long-option "--load" args)))
 
-       (format #t "Creating essential servers...\n")
-       (setenv "PATH" (string-append system "/profile/bin"
-                                     ":" system "/profile/sbin"))
-       (for-each (match-lambda
-                   ((node command)
-                    (unless (translated? node)
-                      (mkdir-p (dirname node))
-                      (apply invoke "settrans" "--create" node command))))
-                 translators)
-
-       (format #t "Creating essential device nodes...\n")
-       (with-directory-excursion "/dev"
-         (invoke "MAKEDEV" "--devdir=/dev" "std")
-         (invoke "MAKEDEV" "--devdir=/dev" "vcs")
-         (invoke "MAKEDEV" "--devdir=/dev" "tty1""tty2" "tty3" "tty4" "tty5" "tty6")
-         (invoke "MAKEDEV" "--devdir=/dev" "ptyp0" "ptyp1" "ptyp2")
-         (invoke "MAKEDEV" "--devdir=/dev" "console"))
+       (format #t "Setting-up essential translators...\n")
+       (setenv "PATH" (string-append system "/profile/bin"))
+       (set-hurd-device-translators)
 
        (false-if-exception (delete-file "/hurd"))
        (let ((hurd/hurd (readlink* (string-append system "/profile/hurd"))))
-- 
2.26.2





^ permalink raw reply related	[flat|nested] 67+ messages in thread

* [bug#41541] [PATCH 2/4] system: hurd: Remove 'cross-hurd-image' hack.
  2020-06-08 12:57 ` [bug#41541] [PATCH 0/4] Final wip-hurd-vm batch Jan (janneke) Nieuwenhuizen
  2020-06-08 12:57   ` [bug#41541] [PATCH 1/4] hurd-boot: Create individual translators instead of running MAKEDEV Jan (janneke) Nieuwenhuizen
@ 2020-06-08 12:58   ` Jan (janneke) Nieuwenhuizen
  2020-06-13 10:49     ` Jan Nieuwenhuizen
  2020-06-08 12:58   ` [bug#41541] [PATCH 3/4] system: bare-hurd.tmpl: Add openssh client and service Jan (janneke) Nieuwenhuizen
  2020-06-08 12:58   ` [bug#41541] [PATCH 4/4] hurd-boot: Use 'setxattr' instead of invoking settrans Jan (janneke) Nieuwenhuizen
  3 siblings, 1 reply; 67+ messages in thread
From: Jan (janneke) Nieuwenhuizen @ 2020-06-08 12:58 UTC (permalink / raw)
  To: 41541; +Cc: Mathieu Othacehe, Ludovic Courtès

The initial

    guix build -f gnu/system/hurd.scm

hack has been superseded by regular guix system (cross) build.

* gnu/system/hurd.scm (compile-manifest, cross-hurd-image): Remove.
---
 gnu/system/hurd.scm | 177 +-------------------------------------------
 1 file changed, 3 insertions(+), 174 deletions(-)

diff --git a/gnu/system/hurd.scm b/gnu/system/hurd.scm
index 956682357e..2205def577 100644
--- a/gnu/system/hurd.scm
+++ b/gnu/system/hurd.scm
@@ -39,16 +39,15 @@
   #:use-module (gnu system)
   #:use-module (gnu system shadow)
   #:use-module (gnu system vm)
-  #:export (cross-hurd-image
-            %base-packages/hurd
+  #:export (%base-packages/hurd
             %base-services/hurd
             %hurd-default-operating-system
             %hurd-default-operating-system-kernel))
 
 ;;; Commentary:
 ;;;
-;;; This module provides tools to (cross-)build GNU/Hurd virtual machine
-;;; images.
+;;; This module provides system-specifics for the GNU/Hurd operating system
+;;; and virtual machine.
 ;;;
 ;;; Code:
 
@@ -104,173 +103,3 @@
     (pam-services '())
     (setuid-programs '())
     (sudoers-file #f)))
-
-(define* (cross-hurd-image #:key (hurd hurd) (gnumach gnumach))
-  "Return a cross-built GNU/Hurd image."
-
-  (define (cross-built thing)
-    (with-parameters ((%current-target-system "i586-pc-gnu"))
-      thing))
-
-  (define (cross-built-entry entry)
-    (manifest-entry
-      (inherit entry)
-      (item (cross-built (manifest-entry-item entry)))
-      (dependencies (map cross-built-entry
-                         (manifest-entry-dependencies entry)))))
-
-  (define system-profile
-    (profile
-     (content
-      (map-manifest-entries cross-built-entry
-                            (packages->manifest %base-packages/hurd)))))
-
-  (define grub.cfg
-    (let ((hurd (cross-built hurd))
-          (mach (with-parameters ((%current-system "i686-linux"))
-                  gnumach))
-          (libc (cross-libc "i586-pc-gnu")))
-      (computed-file "grub.cfg"
-                     #~(call-with-output-file #$output
-                         (lambda (port)
-                           (format port "
-set timeout=2
-search.file ~a/boot/gnumach
-
-menuentry \"GNU\" {
-  multiboot ~a/boot/gnumach root=device:hd0s1
-  module ~a/hurd/ext2fs.static ext2fs \\
-    --multiboot-command-line='${kernel-command-line}' \\
-    --host-priv-port='${host-port}' \\
-    --device-master-port='${device-port}' \\
-    --exec-server-task='${exec-task}' -T typed '${root}' \\
-    '$(task-create)' '$(task-resume)'
-  module ~a/lib/ld.so.1 exec ~a/hurd/exec '$(exec-task=task-create)'
-}\n"
-                                   #+mach #+mach #+hurd
-                                   #+libc #+hurd))))))
-
-  (define fstab
-    (plain-file "fstab"
-                "# This file was generated from your Guix configuration.  Any changes
-# will be lost upon reboot or reconfiguration.
-
-/dev/hd0s1	/	ext2	defaults
-"))
-
-  (define passwd
-    (plain-file "passwd"
-                "root:x:0:0:root:/root:/bin/sh
-guixbuilder:x:1:1:guixbuilder:/var/empty:/bin/no-sh
-"))
-
-  (define group
-    (plain-file "group"
-                "guixbuild:x:1:guixbuilder
-"))
-
-  (define shadow
-    (plain-file "shadow"
-                "root::0:0:0:0:::
-"))
-
-  (define etc-profile
-    (plain-file "profile"
-                "\
-export PS1='\\u@\\h\\$ '
-
-GUIX_PROFILE=\"/run/current-system/profile\"
-. \"$GUIX_PROFILE/etc/profile\"
-
-GUIX_PROFILE=\"$HOME/.guix-profile\"
-if [ -f \"$GUIX_PROFILE/etc/profile\" ]; then
-  . \"$GUIX_PROFILE/etc/profile\"
-fi\n"))
-
-  (define hurd-directives
-    `((directory "/servers")
-      ,@(map (lambda (server)
-               `(file ,(string-append "/servers/" server)))
-             '("startup" "exec" "proc" "password"
-               "default-pager" "crash-dump-core"
-               "kill" "suspend"))
-      ("/servers/crash" -> "crash-dump-core")
-      (directory "/servers/socket")
-      (file "/servers/socket/1")
-      (file "/servers/socket/2")
-      (file "/servers/socket/16")
-      ("/servers/socket/local" -> "1")
-      ("/servers/socket/inet" -> "2")
-      ("/servers/socket/inet6" -> "16")
-      (directory "/boot")
-      ("/boot/grub.cfg" -> ,grub.cfg)   ;XXX: not strictly needed
-      ("/hurd" -> ,(file-append (with-parameters ((%current-target-system
-                                                   "i586-pc-gnu"))
-                                  hurd)
-                                "/hurd"))
-
-      ;; TODO: Create those during activation, eventually.
-      (directory "/root")
-      (file "/root/.guile"
-            ,(object->string
-              '(begin
-                 (use-modules (ice-9 readline) (ice-9 colorized))
-                 (activate-readline) (activate-colorized))))
-      (directory "/run")
-      (directory "/run/current-system")
-      ("/run/current-system/profile" -> ,system-profile)
-      ("/etc/profile" -> ,etc-profile)
-      ("/etc/fstab" -> ,fstab)
-      ("/etc/group" -> ,group)
-      ("/etc/passwd" -> ,passwd)
-      ("/etc/shadow" -> ,shadow)
-      (file "/etc/hostname" "guixygnu")
-      (file "/etc/resolv.conf"
-            "nameserver 10.0.2.3\n")
-      ("/etc/services" -> ,(file-append (with-parameters ((%current-target-system
-                                                           "i586-pc-gnu"))
-                                          net-base)
-                                        "/etc/services"))
-      ("/etc/protocols" -> ,(file-append (with-parameters ((%current-target-system
-                                                            "i586-pc-gnu"))
-                                           net-base)
-                                         "/etc/protocols"))
-      ("/etc/motd" -> ,(file-append (with-parameters ((%current-target-system
-                                                       "i586-pc-gnu"))
-                                      hurd)
-                                    "/etc/motd"))
-      ("/etc/login" -> ,(file-append (with-parameters ((%current-target-system
-                                                        "i586-pc-gnu"))
-                                       hurd)
-                                     "/etc/login"))
-
-
-      ;; XXX can we instead, harmlessly set _PATH_TTYS (from glibc) in runttys.c?
-      ("/etc/ttys" -> ,(file-append (with-parameters ((%current-target-system
-                                                       "i586-pc-gnu"))
-                                      hurd)
-                                    "/etc/ttys"))
-      ("/bin/sh" -> ,(file-append (with-parameters ((%current-target-system
-                                                     "i586-pc-gnu"))
-                                    bash)
-                                  "/bin/sh"))))
-
-  (qemu-image #:file-system-type "ext2"
-              #:file-system-options '("-o" "hurd")
-              #:device-nodes 'hurd
-              #:inputs `(("system" ,system-profile)
-                         ("grub.cfg" ,grub.cfg)
-                         ("fstab" ,fstab)
-                         ("passwd" ,passwd)
-                         ("group" ,group)
-                         ("etc-profile" ,etc-profile)
-                         ("shadow" ,shadow))
-              #:copy-inputs? #t
-              #:os system-profile
-              #:bootcfg-drv grub.cfg
-              #:bootloader grub-bootloader
-              #:register-closures? #f
-              #:extra-directives hurd-directives))
-
-;; Return this thunk so one can type "guix build -f gnu/system/hurd.scm".
-cross-hurd-image
-- 
2.26.2





^ permalink raw reply related	[flat|nested] 67+ messages in thread

* [bug#41541] [PATCH 3/4] system: bare-hurd.tmpl: Add openssh client and service.
  2020-06-08 12:57 ` [bug#41541] [PATCH 0/4] Final wip-hurd-vm batch Jan (janneke) Nieuwenhuizen
  2020-06-08 12:57   ` [bug#41541] [PATCH 1/4] hurd-boot: Create individual translators instead of running MAKEDEV Jan (janneke) Nieuwenhuizen
  2020-06-08 12:58   ` [bug#41541] [PATCH 2/4] system: hurd: Remove 'cross-hurd-image' hack Jan (janneke) Nieuwenhuizen
@ 2020-06-08 12:58   ` Jan (janneke) Nieuwenhuizen
  2020-06-08 13:23     ` Jan Nieuwenhuizen
  2020-06-13  7:24     ` Jan Nieuwenhuizen
  2020-06-08 12:58   ` [bug#41541] [PATCH 4/4] hurd-boot: Use 'setxattr' instead of invoking settrans Jan (janneke) Nieuwenhuizen
  3 siblings, 2 replies; 67+ messages in thread
From: Jan (janneke) Nieuwenhuizen @ 2020-06-08 12:58 UTC (permalink / raw)
  To: 41541; +Cc: Mathieu Othacehe, Ludovic Courtès

This:

    ./pre-inst-env guix system disk-image --no-grafts --target=i586-pc-gnu \
        gnu/system/examples/bare-hurd.tmpl

now produces a VM image with functional ssh daemon that you may run like

    guix environment --ad-hoc qemu -- qemu-system-i386 -enable-kvm -m 512M \
     -device rtl8139,netdev=net0 -netdev user,id=net0,hostfwd=tcp:127.0.0.1:10022-:2222 \
     -snapshot -hda <the-image>

and use like

    ssh -p 10022 root@localhost
    guix build -e '(@@ (gnu packages commencement) gnu-make-boot0)'

or even (if you use --image-size=3G)

    guix build hello

* gnu/system/examples/bare-hurd.tmpl (%hurd-os)[packages]: Add openssh.
[services]: Add openssh-service.
---
 gnu/system/examples/bare-hurd.tmpl | 13 +++++++++++--
 1 file changed, 11 insertions(+), 2 deletions(-)

diff --git a/gnu/system/examples/bare-hurd.tmpl b/gnu/system/examples/bare-hurd.tmpl
index 16f20416aa..6b421550b7 100644
--- a/gnu/system/examples/bare-hurd.tmpl
+++ b/gnu/system/examples/bare-hurd.tmpl
@@ -11,6 +11,8 @@
 ;; it boots, but needs activation, more setup and services to be useful.
 
 (use-modules (gnu) (gnu system hurd) (guix utils))
+(use-service-modules ssh)
+(use-package-modules ssh)
 
 (define %hurd-os
   (operating-system
@@ -25,7 +27,14 @@
                         %base-file-systems))
     (host-name "guixygnu")
     (timezone "Europe/Amsterdam")
-    (packages %base-packages/hurd)
-    (services %base-services/hurd)))
+    (packages (cons openssh %base-packages/hurd))
+    (services (cons (service openssh-service-type
+                             (openssh-configuration
+                              (use-pam? #f)
+                              (port-number 2222)
+                              (permit-root-login #t)
+                              (allow-empty-passwords? #t)
+                              (password-authentication? #t)))
+               %base-services/hurd))))
 
 %hurd-os
-- 
2.26.2





^ permalink raw reply related	[flat|nested] 67+ messages in thread

* [bug#41541] [PATCH 4/4] hurd-boot: Use 'setxattr' instead of invoking settrans.
  2020-06-08 12:57 ` [bug#41541] [PATCH 0/4] Final wip-hurd-vm batch Jan (janneke) Nieuwenhuizen
                     ` (2 preceding siblings ...)
  2020-06-08 12:58   ` [bug#41541] [PATCH 3/4] system: bare-hurd.tmpl: Add openssh client and service Jan (janneke) Nieuwenhuizen
@ 2020-06-08 12:58   ` Jan (janneke) Nieuwenhuizen
  3 siblings, 0 replies; 67+ messages in thread
From: Jan (janneke) Nieuwenhuizen @ 2020-06-08 12:58 UTC (permalink / raw)
  To: 41541; +Cc: Mathieu Othacehe, Ludovic Courtès

Note: Using `getxattr' on the Hurd instead of running showtrans does not
work (yet?).

* gnu/build/hurd-boot.scm (setup-translator): Use 'setxattr' instead of
invoking settrans.
* gnu/system.scm (hurd-multiboot-modules): Add --x-xattr-translator-records to
enable xattr-embebbing of translators.
---
 gnu/build/hurd-boot.scm | 2 +-
 gnu/system.scm          | 1 +
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/gnu/build/hurd-boot.scm b/gnu/build/hurd-boot.scm
index 398cee1395..8150aff972 100644
--- a/gnu/build/hurd-boot.scm
+++ b/gnu/build/hurd-boot.scm
@@ -140,7 +140,7 @@ set."
             (chmod port mode)))))
     (catch 'system-error
       (lambda _
-        (apply invoke "settrans" "--create" file-name command))
+        (setxattr file-name "gnu.translator" (string-join command "\0" 'suffix)))
       (lambda (key . args)
         (let ((errno (system-error-errno (cons key args))))
           (format (current-error-port) "~a: ~a\n"
diff --git a/gnu/system.scm b/gnu/system.scm
index 21d0fbd190..c6feea08f9 100644
--- a/gnu/system.scm
+++ b/gnu/system.scm
@@ -1190,6 +1190,7 @@ a list of <menu-entry>, to populate the \"old entries\" menu."
                 "--device-master-port='${device-port}'"
                 "--exec-server-task='${exec-task}'"
                 "--store-type=typed"
+                "--x-xattr-translator-records"
                 "'${root}'" "'$(task-create)'" "'$(task-resume)'"))
          (target (%current-target-system))
          (libc (if target
-- 
2.26.2





^ permalink raw reply related	[flat|nested] 67+ messages in thread

* [bug#41541] [PATCH 3/4] system: bare-hurd.tmpl: Add openssh client and service.
  2020-06-08 12:58   ` [bug#41541] [PATCH 3/4] system: bare-hurd.tmpl: Add openssh client and service Jan (janneke) Nieuwenhuizen
@ 2020-06-08 13:23     ` Jan Nieuwenhuizen
  2020-06-13  7:24     ` Jan Nieuwenhuizen
  1 sibling, 0 replies; 67+ messages in thread
From: Jan Nieuwenhuizen @ 2020-06-08 13:23 UTC (permalink / raw)
  To: 41541; +Cc: Mathieu Othacehe, Ludovic Courtès

[-- Attachment #1: Type: text/plain, Size: 191 bytes --]

Jan (janneke) Nieuwenhuizen writes:

Oops ... to fast.

Moved comment in commit message into bare-hurd.tmpl, and update do use
openssh-sans-x instead.

New patch attached, sorry :-)
Janneke


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0003-system-bare-hurd.tmpl-Add-openssh-sans-x-client-and-.patch --]
[-- Type: text/x-patch, Size: 2288 bytes --]

From 97abb4aeab3aecc6f4b8177e61d588a64116666d Mon Sep 17 00:00:00 2001
From: "Jan (janneke) Nieuwenhuizen" <janneke@gnu.org>
Date: Thu, 7 May 2020 19:14:07 +0200
Subject: [PATCH 3/4] system: bare-hurd.tmpl: Add openssh-sans-x client and
 service.

* gnu/system/examples/bare-hurd.tmpl (%hurd-os)[packages]: Add openssh-sans-x.
[services]: Add openssh-service.  Add example usage.
---
 gnu/system/examples/bare-hurd.tmpl | 29 ++++++++++++++++++++++++++---
 1 file changed, 26 insertions(+), 3 deletions(-)

diff --git a/gnu/system/examples/bare-hurd.tmpl b/gnu/system/examples/bare-hurd.tmpl
index 16f20416aa..cdde80200c 100644
--- a/gnu/system/examples/bare-hurd.tmpl
+++ b/gnu/system/examples/bare-hurd.tmpl
@@ -8,9 +8,24 @@
 ;;     ./pre-inst-env guix system disk-image --target=i586-pc-gnu --no-grafts \
 ;;         gnu/system/examples/bare-hurd.tmpl
 ;;
-;; it boots, but needs activation, more setup and services to be useful.
+;; You may run it like so
+;;
+;;     guix environment --ad-hoc qemu -- qemu-system-i386 -enable-kvm -m 512M \
+;;      -device rtl8139,netdev=net0 -netdev user,id=net0,hostfwd=tcp:127.0.0.1:10022-:2222 \
+;;      -snapshot -hda <the-image>
+;;
+;; and use it like
+;;
+;;     ssh -p 10022 root@localhost
+;;     guix build -e '(@@ (gnu packages commencement) gnu-make-boot0)'
+;;
+;; or even (if you use --image-size=3G)
+;;
+;;     guix build hello
 
 (use-modules (gnu) (gnu system hurd) (guix utils))
+(use-service-modules ssh)
+(use-package-modules ssh)
 
 (define %hurd-os
   (operating-system
@@ -25,7 +40,15 @@
                         %base-file-systems))
     (host-name "guixygnu")
     (timezone "Europe/Amsterdam")
-    (packages %base-packages/hurd)
-    (services %base-services/hurd)))
+    (packages (cons openssh-sans-x %base-packages/hurd))
+    (services (cons (service openssh-service-type
+                             (openssh-configuration
+                              (openssh openssh-sans-x)
+                              (use-pam? #f)
+                              (port-number 2222)
+                              (permit-root-login #t)
+                              (allow-empty-passwords? #t)
+                              (password-authentication? #t)))
+               %base-services/hurd))))
 
 %hurd-os
-- 
2.26.2


[-- Attachment #3: Type: text/plain, Size: 152 bytes --]


-- 
Jan Nieuwenhuizen <janneke@gnu.org> | GNU LilyPond http://lilypond.org
Freelance IT http://JoyofSource.com | Avatar® http://AvatarAcademy.com

^ permalink raw reply related	[flat|nested] 67+ messages in thread

* [bug#41541] [PATCH 3/4] system: bare-hurd.tmpl: Add openssh client and service.
  2020-06-08 12:58   ` [bug#41541] [PATCH 3/4] system: bare-hurd.tmpl: Add openssh client and service Jan (janneke) Nieuwenhuizen
  2020-06-08 13:23     ` Jan Nieuwenhuizen
@ 2020-06-13  7:24     ` Jan Nieuwenhuizen
  1 sibling, 0 replies; 67+ messages in thread
From: Jan Nieuwenhuizen @ 2020-06-13  7:24 UTC (permalink / raw)
  To: 41541; +Cc: Mathieu Othacehe, Ludovic Courtès

Jan (janneke) Nieuwenhuizen writes:

> * gnu/system/examples/bare-hurd.tmpl (%hurd-os)[packages]: Add openssh.
> [services]: Add openssh-service.
> ---

Moved instructions from commit message to bare-hurd.tmpl and
Pushed to master as edbc067138fa417d03cbb204511d8b08b61a3d4d

Thank you!

-- 
Jan Nieuwenhuizen <janneke@gnu.org> | GNU LilyPond http://lilypond.org
Freelance IT http://JoyofSource.com | Avatar® http://AvatarAcademy.com




^ permalink raw reply	[flat|nested] 67+ messages in thread

* [bug#41541] [PATCH 2/4] system: hurd: Remove 'cross-hurd-image' hack.
  2020-06-08 12:58   ` [bug#41541] [PATCH 2/4] system: hurd: Remove 'cross-hurd-image' hack Jan (janneke) Nieuwenhuizen
@ 2020-06-13 10:49     ` Jan Nieuwenhuizen
  2020-06-14 16:46       ` bug#41541: " Jan Nieuwenhuizen
  0 siblings, 1 reply; 67+ messages in thread
From: Jan Nieuwenhuizen @ 2020-06-13 10:49 UTC (permalink / raw)
  To: 41541; +Cc: Mathieu Othacehe, Ludovic Courtès

Jan (janneke) Nieuwenhuizen writes:

> The initial
>
>     guix build -f gnu/system/hurd.scm
>
> hack has been superseded by regular guix system (cross) build.
>
> * gnu/system/hurd.scm (compile-manifest, cross-hurd-image): Remove.
> ---

Pushed to master as 60fdd9e3896bcd31e0b6ec29ac46d92aa8558565

-- 
Jan Nieuwenhuizen <janneke@gnu.org> | GNU LilyPond http://lilypond.org
Freelance IT http://JoyofSource.com | Avatar® http://AvatarAcademy.com




^ permalink raw reply	[flat|nested] 67+ messages in thread

* bug#41541: [PATCH 2/4] system: hurd: Remove 'cross-hurd-image' hack.
  2020-06-13 10:49     ` Jan Nieuwenhuizen
@ 2020-06-14 16:46       ` Jan Nieuwenhuizen
  2020-06-14 17:48         ` [bug#41541] " Mathieu Othacehe
  2020-06-14 20:29         ` Ludovic Courtès
  0 siblings, 2 replies; 67+ messages in thread
From: Jan Nieuwenhuizen @ 2020-06-14 16:46 UTC (permalink / raw)
  To: 41541-done; +Cc: Mathieu Othacehe, Ludovic Courtès

Jan Nieuwenhuizen writes:

> Pushed to master as 60fdd9e3896bcd31e0b6ec29ac46d92aa8558565

Hurd is merged, serviced, done, closing.

\o/

Thank you so much for getting this done.

And let this be the beginning of much more Hurd!
Janneke

-- 
Jan Nieuwenhuizen <janneke@gnu.org> | GNU LilyPond http://lilypond.org
Freelance IT http://JoyofSource.com | Avatar® http://AvatarAcademy.com




^ permalink raw reply	[flat|nested] 67+ messages in thread

* [bug#41541] [PATCH 2/4] system: hurd: Remove 'cross-hurd-image' hack.
  2020-06-14 16:46       ` bug#41541: " Jan Nieuwenhuizen
@ 2020-06-14 17:48         ` Mathieu Othacehe
  2020-06-14 20:29         ` Ludovic Courtès
  1 sibling, 0 replies; 67+ messages in thread
From: Mathieu Othacehe @ 2020-06-14 17:48 UTC (permalink / raw)
  To: 41541; +Cc: janneke


>> Pushed to master as 60fdd9e3896bcd31e0b6ec29ac46d92aa8558565
>
> Hurd is merged, serviced, done, closing.
>
> \o/
>
> Thank you so much for getting this done.

That's terrific, congrats!

Mathieu




^ permalink raw reply	[flat|nested] 67+ messages in thread

* [bug#41541] [PATCH 2/4] system: hurd: Remove 'cross-hurd-image' hack.
  2020-06-14 16:46       ` bug#41541: " Jan Nieuwenhuizen
  2020-06-14 17:48         ` [bug#41541] " Mathieu Othacehe
@ 2020-06-14 20:29         ` Ludovic Courtès
  1 sibling, 0 replies; 67+ messages in thread
From: Ludovic Courtès @ 2020-06-14 20:29 UTC (permalink / raw)
  To: Jan Nieuwenhuizen; +Cc: 41541-done, Mathieu Othacehe

Jan Nieuwenhuizen <janneke@gnu.org> skribis:

> Jan Nieuwenhuizen writes:
>
>> Pushed to master as 60fdd9e3896bcd31e0b6ec29ac46d92aa8558565
>
> Hurd is merged, serviced, done, closing.
>
> \o/
>
> Thank you so much for getting this done.
>
> And let this be the beginning of much more Hurd!

Woohoo!  Congrats, and thanks for all the hard work & patience!
Now’s the time to have some more fun, indeed!

Ludo’.




^ permalink raw reply	[flat|nested] 67+ messages in thread

end of thread, other threads:[~2020-06-14 20:30 UTC | newest]

Thread overview: 67+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-05-26 14:21 bug#41541: merge wip-hurd-vm Jan Nieuwenhuizen
2020-05-27 10:01 ` Mathieu Othacehe
2020-05-27 11:11   ` Jan Nieuwenhuizen
2020-05-30 14:40   ` Jan Nieuwenhuizen
2020-06-02  8:48     ` Mathieu Othacehe
2020-06-02  9:24       ` Jan Nieuwenhuizen
2020-06-02 10:16         ` Mathieu Othacehe
2020-06-02 12:23           ` Jan Nieuwenhuizen
2020-06-02 12:40             ` Ludovic Courtès
2020-06-02 13:39               ` Jan Nieuwenhuizen
2020-06-03  9:18                 ` Ludovic Courtès
2020-06-03 15:22                   ` Jan Nieuwenhuizen
2020-06-03 15:38                     ` Mathieu Othacehe
2020-06-03 20:27                       ` Jan Nieuwenhuizen
2020-06-04  9:32                         ` Ludovic Courtès
2020-06-04 11:33                           ` Jan Nieuwenhuizen
2020-06-05 16:08                             ` Ludovic Courtès
2020-06-05 16:24                               ` Jan Nieuwenhuizen
2020-06-04 13:59 ` bug#41541: [PATCH 0/9] Merge wip-hurd-vm "last review round" Jan (janneke) Nieuwenhuizen
2020-06-04 13:59   ` bug#41541: [PATCH 1/8] system: Add 'hurd' field to <operating-system> Jan (janneke) Nieuwenhuizen
2020-06-06  7:21     ` Mathieu Othacehe
2020-06-06  8:26       ` Jan Nieuwenhuizen
2020-06-06 10:45     ` [bug#41541] " Ludovic Courtès
2020-06-06 11:14       ` Jan Nieuwenhuizen
2020-06-04 13:59   ` bug#41541: [PATCH 2/8] bootloader: Extend `<menu-entry>' for multiboot Jan (janneke) Nieuwenhuizen
2020-06-06 10:48     ` [bug#41541] " Ludovic Courtès
2020-06-06 12:00       ` Jan Nieuwenhuizen
2020-06-04 13:59   ` bug#41541: [PATCH 3/8] system: Add 'multiboot-modules' field to <boot-parameters> Jan (janneke) Nieuwenhuizen
2020-06-06  7:32     ` Mathieu Othacehe
2020-06-06 10:13       ` Jan Nieuwenhuizen
2020-06-06 10:55       ` [bug#41541] " Ludovic Courtès
2020-06-07  7:39         ` Jan Nieuwenhuizen
2020-06-04 13:59   ` bug#41541: [PATCH 4/8] bootloader: grub: Add support for multiboot Jan (janneke) Nieuwenhuizen
2020-06-06  7:47     ` Mathieu Othacehe
2020-06-06  8:46       ` Jan Nieuwenhuizen
2020-06-06 10:57     ` [bug#41541] " Ludovic Courtès
2020-06-06 12:08       ` Jan Nieuwenhuizen
2020-06-04 13:59   ` bug#41541: [PATCH 5/8] system: Use 'hurd' package in label Jan (janneke) Nieuwenhuizen
2020-06-06 10:57     ` [bug#41541] " Ludovic Courtès
2020-06-04 13:59   ` bug#41541: [PATCH 6/8] system: examples: Add bare-hurd.tmpl Jan (janneke) Nieuwenhuizen
2020-06-06  7:56     ` Mathieu Othacehe
2020-06-06 10:58       ` [bug#41541] " Jan Nieuwenhuizen
2020-06-06 16:49         ` Mathieu Othacehe
2020-06-06 22:44           ` Jan Nieuwenhuizen
2020-06-06 10:59     ` Ludovic Courtès
2020-06-06 12:34       ` Jan Nieuwenhuizen
2020-06-04 13:59   ` bug#41541: [PATCH 7/8] services: hurd: Add `hurd-etc-service' Jan (janneke) Nieuwenhuizen
2020-06-06 11:08     ` [bug#41541] " Ludovic Courtès
2020-06-06 14:31       ` Jan Nieuwenhuizen
2020-06-07 20:02         ` Ludovic Courtès
2020-06-07 20:31           ` Jan Nieuwenhuizen
2020-06-04 13:59   ` bug#41541: [PATCH 8/8] system: Add `hurd-activation' Jan (janneke) Nieuwenhuizen
2020-06-06  8:03     ` Mathieu Othacehe
2020-06-06  8:54       ` Jan Nieuwenhuizen
2020-06-06 11:05     ` [bug#41541] " Ludovic Courtès
2020-06-06 14:21       ` Jan Nieuwenhuizen
2020-06-08 12:57 ` [bug#41541] [PATCH 0/4] Final wip-hurd-vm batch Jan (janneke) Nieuwenhuizen
2020-06-08 12:57   ` [bug#41541] [PATCH 1/4] hurd-boot: Create individual translators instead of running MAKEDEV Jan (janneke) Nieuwenhuizen
2020-06-08 12:58   ` [bug#41541] [PATCH 2/4] system: hurd: Remove 'cross-hurd-image' hack Jan (janneke) Nieuwenhuizen
2020-06-13 10:49     ` Jan Nieuwenhuizen
2020-06-14 16:46       ` bug#41541: " Jan Nieuwenhuizen
2020-06-14 17:48         ` [bug#41541] " Mathieu Othacehe
2020-06-14 20:29         ` Ludovic Courtès
2020-06-08 12:58   ` [bug#41541] [PATCH 3/4] system: bare-hurd.tmpl: Add openssh client and service Jan (janneke) Nieuwenhuizen
2020-06-08 13:23     ` Jan Nieuwenhuizen
2020-06-13  7:24     ` Jan Nieuwenhuizen
2020-06-08 12:58   ` [bug#41541] [PATCH 4/4] hurd-boot: Use 'setxattr' instead of invoking settrans Jan (janneke) Nieuwenhuizen

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.