From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jan Nieuwenhuizen Subject: Re: [BLOG] On migration to the Hurd Date: Sat, 04 Apr 2020 12:05:33 +0200 Message-ID: <87a73ra7ma.fsf@gnu.org> References: Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Return-path: Received: from eggs.gnu.org ([2001:470:142:3::10]:34755) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jKfgJ-0003yj-T7 for guix-devel@gnu.org; Sat, 04 Apr 2020 06:05:41 -0400 In-Reply-To: (Rene's message of "Sat, 04 Apr 2020 01:47:43 +0000") List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane-mx.org@gnu.org Sender: "Guix-devel" To: Rene Cc: "guix-devel@gnu.org" --=-=-= Content-Type: text/plain 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 --=-=-= Content-Type: text/x-patch; charset=utf-8 Content-Disposition: inline; filename=0001-system-hurd-Add-symlink-for-.-hurd-libexec.patch Content-Transfer-Encoding: quoted-printable >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 =C2=A9 2020 Ludovic Court=C3=A8s +;;; Copyright =C2=A9 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-syst= em + "i586-pc-gnu")) + hurd) + "/libexec")))) =20 (qemu-image #:file-system-type "ext2" #:file-system-options '("-o" "hurd") --=20 2.26.0 --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=0002-gnu-hurd-Have-scripts-use-store-file-names.patch >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 (string-append "LDFLAGS=-Wl,-rpath=" %output "/lib") @@ -370,8 +401,11 @@ boot, since this cannot be done from GNU/Linux." "--without-parted"))) (build-system gnu-build-system) (inputs - `(("glibc-hurd-headers" ,glibc/hurd-headers) - ("hurd-rc" ,(hurd-rc-script)))) + `(("bash" ,bash-minimal) + ("coreutils" ,coreutils) + ("glibc-hurd-headers" ,glibc/hurd-headers) + ("hurd-rc" ,(hurd-rc-script)) + ("sed" ,sed))) (native-inputs `(("autoconf" ,autoconf) ("automake" ,automake) -- 2.26.0 --=-=-= Content-Type: text/x-patch; charset=utf-8 Content-Disposition: inline; filename=0003-system-hurd-Add-bin-sh-symlink.patch Content-Transfer-Encoding: quoted-printable >From 293e2c316005f2674b3cad32a2127c27a70b8ff6 Mon Sep 17 00:00:00 2001 From: "Jan (janneke) Nieuwenhuizen" Date: Sat, 4 Apr 2020 11:53:13 +0200 Subject: [PATCH 3/3] system: hurd: Add /bin/sh symlink. * gnu/system/hurd.scm (cross-hurd-image): Create /bin/sh symlink. --- gnu/system/hurd.scm | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/gnu/system/hurd.scm b/gnu/system/hurd.scm index 97c54a2992..82a9d94d5c 100644 --- a/gnu/system/hurd.scm +++ b/gnu/system/hurd.scm @@ -1,6 +1,7 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright =C2=A9 2020 Ludovic Court=C3=A8s ;;; Copyright =C2=A9 2020 Rene Saavedra +;;; Copyright =C2=A9 2020 Jan (janneke) Nieuwenhuizen ;;; ;;; This file is part of GNU Guix. ;;; @@ -22,6 +23,7 @@ #:use-module (guix utils) #:use-module (gnu bootloader grub) #:use-module (gnu packages base) + #:use-module (gnu packages bash) #:use-module (gnu packages cross-base) #:use-module (gnu packages hurd) #:use-module (gnu system vm) @@ -45,7 +47,7 @@ (directory-union "gnu+hurd" (cons (with-parameters ((%current-system "i686-linu= x")) gnumach) - (for-hurd hurd coreutils grep sed))))) + (for-hurd hurd bash-minimal coreutils grep se= d))))) =20 (define grub.cfg (let ((hurd (with-parameters ((%current-target-system "i586-pc-gnu")) @@ -99,7 +101,11 @@ menuentry \"GNU\" { ("/libexec" -> ,(file-append (with-parameters ((%current-target-syst= em "i586-pc-gnu")) hurd) - "/libexec")))) + "/libexec")) + ("/bin/sh" -> ,(file-append (with-parameters ((%current-target-system + "i586-pc-gnu")) + bash-minimal) + "/bin/sh")))) =20 (qemu-image #:file-system-type "ext2" #:file-system-options '("-o" "hurd") --=20 2.26.0 --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable --=20 Jan Nieuwenhuizen | GNU LilyPond http://lilypond.org Freelance IT http://JoyofSource.com | Avatar=C2=AE http://AvatarAcademy.com --=-=-=--