Re: [BLOG] On migration to the Hurd

2020-04-06 Thread Ludovic Courtès
Hi Tanguy,

Tanguy Le Carrour  skribis:

> I'm not (yet) able to do low-level/system contributions, but I did
> contribute some patches upstream to make some programs build and work
> on GNU/Hurd. I think I'll keep on doing this kind of things in the
> future. Better little than none, right?! :-)

Definitely, thank you!

Ludo’.



Re: [BLOG] On migration to the Hurd

2020-04-04 Thread Jan Nieuwenhuizen
Rene writes:

> Hello Ludovic, Jan,
>
> About the bootstrap ext2fs.static server, it seems that it is also
> required to create a link in /libexec, attached a patch.

Ah...great!

> and now it shows another error:
> --
>  Hurd server bootstrap: ext2fs[device:hd0s1] exec startup proc auth.
>  /libexec/console-run: /dev/console: Permission denied
>  /libexec/console-run: cannot execute /libexec/runsystem: Exec format 
> error
> --
>
> I'll keep checking ..

With the attached patches (I added a copyright line for you), I now get
a prompt!

Greetings,
janneke

PS: you can also pull wip-hurd-vm from https://gitlab.com/janneke/guix.git

>From 56f67343c4108da8c8f0a91844aebd28181dc912 Mon Sep 17 00:00:00 2001
From: Rene Saavedra 
Date: Fri, 3 Apr 2020 19:31:01 -0600
Subject: [PATCH 1/3] system: hurd: Add symlink for `../hurd/libexec.`

* /gnu/system/hurd.scm (hurd-directives): Add symlink in
`/libexec/console-run` for `../hurd/libexec`.
---
 gnu/system/hurd.scm | 7 ++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/gnu/system/hurd.scm b/gnu/system/hurd.scm
index 586bfa0fca..97c54a2992 100644
--- a/gnu/system/hurd.scm
+++ b/gnu/system/hurd.scm
@@ -1,5 +1,6 @@
 ;;; GNU Guix --- Functional package management for GNU
 ;;; Copyright © 2020 Ludovic Courtès 
+;;; Copyright © 2020 Rene Saavedra 
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -94,7 +95,11 @@ menuentry \"GNU\" {
   ("/hurd" -> ,(file-append (with-parameters ((%current-target-system
"i586-pc-gnu"))
   hurd)
-"/hurd"
+"/hurd"))
+  ("/libexec" -> ,(file-append (with-parameters ((%current-target-system
+  "i586-pc-gnu"))
+ hurd)
+   "/libexec"
 
   (qemu-image #:file-system-type "ext2"
   #:file-system-options '("-o" "hurd")
-- 
2.26.0

>From 248e44e7f42312c92b23d2bc3d10a80a5bb2eadf Mon Sep 17 00:00:00 2001
From: "Jan (janneke) Nieuwenhuizen" 
Date: Sat, 4 Apr 2020 10:32:22 +0200
Subject: [PATCH 2/3] gnu: hurd: Have scripts use store file names.

* gnu/packages/hurd.scm (hurd)[inputs]: Add bash-minimal, coreutils, sed.
[arguments]: Use them in new `use-store-file-names' stage.
---
 gnu/packages/hurd.scm | 38 --
 1 file changed, 36 insertions(+), 2 deletions(-)

diff --git a/gnu/packages/hurd.scm b/gnu/packages/hurd.scm
index 8f087172de..09b09b6397 100644
--- a/gnu/packages/hurd.scm
+++ b/gnu/packages/hurd.scm
@@ -30,6 +30,7 @@
   #:use-module (guix build-system gnu)
   #:use-module (guix build-system trivial)
   #:use-module (gnu packages autotools)
+  #:use-module (gnu packages bash)
   #:use-module (gnu packages flex)
   #:use-module (gnu packages bison)
   #:use-module (gnu packages perl)
@@ -361,6 +362,36 @@ boot, since this cannot be done from GNU/Linux."
(copy-file rc file)
(substitute* file
  (("@HURD@") out))
+   #t)))
+ (add-after 'install 'use-store-file-names
+   (lambda* (#:key inputs outputs #:allow-other-keys)
+ (let* ((out  (assoc-ref outputs "out"))
+(bash (assoc-ref inputs "bash"))
+(coreutils (assoc-ref inputs "coreutils"))
+(sed (assoc-ref inputs "sed")))
+   (substitute* (list (string-append out "/libexec/runsystem")
+  (string-append out "/libexec/runsystem.hurd") ; Hmm?
+  (string-append out "/sbin/MAKEDEV")
+  (string-append out "/bin/fakeroot")
+  (string-append out "/bin/remap")
+  (string-append out "/bin/sush"))
+ ;; huh, why are shebangs using the build system's bash?
+ (("^#!.*/bash") (string-append "#! " bash "/bin/bash"))
+ (("^#!.*/sh") (string-append "#! " bash "/bin/bash"))
+ (("=/libexec") (string-append "=" out "/libexec"))
+ (("^SHELL=/bin/sh")
+  (string-append "SHELL=" bash "/bin/bash"))
+ (("^PATH=")
+  (string-append "PATH=" out "/bin"
+ ":" out "/sbin"
+ ":" coreutils "/bin"
+ ":" sed "/bin"
+ ":/run/current-system/profile/bin"
+ ":/run/current-system/profile/sbin"))
+ )
+   (substitute* (string-append out "/bin/sush")
+ (("-/bin/fmt") (string-append "-/" coreutils "/bin/fmt"))
+ (("-/bin/login") (string-append "-/" coreutils "/bin/legin")))
#t
#:configure-flags (list 

Re: [BLOG] On migration to the Hurd

2020-04-04 Thread Rene
Hi,

>
> and now it shows another error:
> --
>  /libexec/console-run: /dev/console: Permission denied

for this error it is required to create the devices with:

./MAKEDEV console tty ...

I did this manually in Debian and the error no longer shows.


Rene



Re: [BLOG] On migration to the Hurd

2020-04-03 Thread Rene
Hello Ludovic, Jan,

About the bootstrap ext2fs.static server, it seems that it is also required to 
create a link in /libexec, attached a patch.

and now it shows another error:
--
 Hurd server bootstrap: ext2fs[device:hd0s1] exec startup proc auth.
 /libexec/console-run: /dev/console: Permission denied
 /libexec/console-run: cannot execute /libexec/runsystem: Exec format error
--

I'll keep checking ..

ReneFrom 536286f6b6817a15826420a793a83a5779fced12 Mon Sep 17 00:00:00 2001
From: Rene Saavedra 
Date: Fri, 3 Apr 2020 19:31:01 -0600
Subject: [PATCH] system: hurd: Add symlink for `../hurd/libexec.`

* /gnu/system/hurd.scm (hurd-directives): Add symlink in
`/libexec/console-run` for `../hurd/libexec`.
---
 gnu/system/hurd.scm | 6 +-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/gnu/system/hurd.scm b/gnu/system/hurd.scm
index 586bfa0fca..6469e66b2e 100644
--- a/gnu/system/hurd.scm
+++ b/gnu/system/hurd.scm
@@ -94,7 +94,11 @@ menuentry \"GNU\" {
   ("/hurd" -> ,(file-append (with-parameters ((%current-target-system
"i586-pc-gnu"))
   hurd)
-"/hurd"
+"/hurd"))
+  ("/libexec" -> ,(file-append (with-parameters ((%current-target-system
+  "i586-pc-gnu"))
+ hurd)
+   "/libexec"
 
   (qemu-image #:file-system-type "ext2"
   #:file-system-options '("-o" "hurd")
-- 
2.21.0



Re: [BLOG] On migration to the Hurd

2020-04-03 Thread Tanguy Le Carrour
Le 04/02, Ludovic Courtès a écrit :
> Tanguy Le Carrour  skribis:
> > Le 04/01, Jan Nieuwenhuizen a écrit :
> >> We are thrilled to have published a post about migrating to the Hurd:
> >>
> >> 
> >> https://guix.gnu.org/blog/2020/deprecating-support-for-the-linux-kernel/
> > […]
> > The question is now: if not yesterday, when!?
> >
> > Thanks to all the people who will help make it a reality!
>
> Yup, it can actually become a reality!
> […]
>
>   ./pre-inst-env guix build -f gnu/system/hurd.scm
>
> That gives you a QEMU image containing a cross-built GNU/Hurd system,
> which is pretty cool.
>
> Unfortunately, the bootstrap ext2fs.static server currently hangs early
> on for reasons that haven’t been elucidated yet.  For anyone who wants
> to fiddle with the Hurd, here’s a good hacking opportunity!

I'm not (yet) able to do low-level/system contributions, but I did
contribute some patches upstream to make some programs build and work
on GNU/Hurd. I think I'll keep on doing this kind of things in the
future. Better little than none, right?! :-)

Regards

-- 
Tanguy



Re: [BLOG] On migration to the Hurd

2020-04-02 Thread Ludovic Courtès
Hi!

Tanguy Le Carrour  skribis:

> Le 04/01, Jan Nieuwenhuizen a écrit :
>> We are thrilled to have published a post about migrating to the Hurd:
>> 
>> https://guix.gnu.org/blog/2020/deprecating-support-for-the-linux-kernel/
>
> So, I guess I was not the only one to figure out that it was a joke! A
> good one, but still… a joke!
>
> But anyway, I clicked and read the post! And I couldn't help but feel…
> mmm… nostalgic for the future!? Is that even possible?!
>
> The question is now: if not yesterday, when!?
>
> Thanks to all the people who will help make it a reality!

Yup, it can actually become a reality!

Yesterday led us to hack some more.  The new ‘wip-hurd-vm’ branch is
based on ‘core-updates’, which includes Janneke’s Hurd work, notably
supporting native builds on GNU/Hurd.  On that branch, from a GNU/Linux
box, one can run:

  ./pre-inst-env guix build -f gnu/system/hurd.scm

That gives you a QEMU image containing a cross-built GNU/Hurd system,
which is pretty cool.

Unfortunately, the bootstrap ext2fs.static server currently hangs early
on for reasons that haven’t been elucidated yet.  For anyone who wants
to fiddle with the Hurd, here’s a good hacking opportunity!

The branch is almost mergeable, I think.  With that in place, it’ll be
trivial to provide a “GNU/Hurd VM service” for Guix System running on
GNU/Linux, and we can use that to provide GNU/Hurd build VMs on berlin,
for instance.

Currently, unlike ‘qemu-image’, the new ‘cross-hurd-image’ doesn’t
expect a full-blown  but simply a bunch of store
items.  However, we can hopefully use that as a starting point to port
Guix System itself to GNU/Hurd.

Food for thought!

Ludo’.

PS: In the meantime, Linux-libre support remains available, fear not!



Re: [BLOG] On migration to the Hurd

2020-04-02 Thread Tanguy Le Carrour
Hi Guix!

Le 04/01, Jan Nieuwenhuizen a écrit :
> We are thrilled to have published a post about migrating to the Hurd:
> 
> https://guix.gnu.org/blog/2020/deprecating-support-for-the-linux-kernel/

So, I guess I was not the only one to figure out that it was a joke! A
good one, but still… a joke!

But anyway, I clicked and read the post! And I couldn't help but feel…
mmm… nostalgic for the future!? Is that even possible?!

The question is now: if not yesterday, when!?

Thanks to all the people who will help make it a reality!

-- 
Tanguy



Re: [BLOG] On migration to the Hurd

2020-04-01 Thread Bengt Richter
On +2020-04-01 23:39:29 +0200, Jan Nieuwenhuizen wrote:
 ^--[1]
> Hello Guix!
> 
> We are thrilled to have published a post about migrating to the Hurd:
> 
> https://guix.gnu.org/blog/2020/deprecating-support-for-the-linux-kernel/
> 
> Thanks to the merge of ‘wip-hurd’ a few days ago and the awesome joint
> work today of the Guix maintainers... read more
> 
> Enjoy!

[1] No April-fooling? ;-)

> janneke, ludo, rekado, mbakke
> 
> -- 
> Jan Nieuwenhuizen  | GNU LilyPond http://lilypond.org
> Freelance IT http://JoyofSource.com | Avatar® http://AvatarAcademy.com
> 

-- 
Regards,
Bengt Richter



[BLOG] On migration to the Hurd

2020-04-01 Thread Jan Nieuwenhuizen
Hello Guix!

We are thrilled to have published a post about migrating to the Hurd:

https://guix.gnu.org/blog/2020/deprecating-support-for-the-linux-kernel/

Thanks to the merge of ‘wip-hurd’ a few days ago and the awesome joint
work today of the Guix maintainers... read more

Enjoy!
janneke, ludo, rekado, mbakke

-- 
Jan Nieuwenhuizen  | GNU LilyPond http://lilypond.org
Freelance IT http://JoyofSource.com | Avatar® http://AvatarAcademy.com