[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
47/48: DRAFT hurd-boot: Support second boot.
From: |
guix-commits |
Subject: |
47/48: DRAFT hurd-boot: Support second boot. |
Date: |
Sun, 4 Jun 2023 07:43:47 -0400 (EDT) |
janneke pushed a commit to branch wip-hurd
in repository guix.
commit ec65d4673fec89fda100422aa5feb8a51d612dac
Author: Janneke Nieuwenhuizen <janneke@gnu.org>
AuthorDate: Tue May 30 18:08:38 2023 +0200
DRAFT hurd-boot: Support second boot.
* gnu/build/hurd-boot.scm (boot-hurd-system): Check for stale shepherd
socket
and remove it. Be chattier about /hurd symlink replacement.
---
gnu/build/hurd-boot.scm | 21 ++++++++++++++++-----
1 file changed, 16 insertions(+), 5 deletions(-)
diff --git a/gnu/build/hurd-boot.scm b/gnu/build/hurd-boot.scm
index d3f9daeec0..4b6e5e0b66 100644
--- a/gnu/build/hurd-boot.scm
+++ b/gnu/build/hurd-boot.scm
@@ -309,18 +309,29 @@ XXX TODO: use Linux xattr/setxattr to remove (settrans
in) /libexec/RUNSYSTEM
(let* ((args (command-line))
(system (find-long-option "gnu.system" args))
- (to-load (find-long-option "gnu.load" args)))
+ (to-load (find-long-option "gnu.load" args))
+ (profile (string-append system "/profile"))
+ (bin (string-append profile "/bin"))
+ (sbin (string-append profile "/bin")))
- (false-if-exception (delete-file "/hurd"))
- (let ((hurd/hurd (readlink* (string-append system "/profile/hurd"))))
- (symlink hurd/hurd "/hurd"))
+ (setenv "PATH" (string-append bin ":" sbin))
+
+ (when (file-exists? "/var/run/shepherd/socket")
+ (format #t "Removing stale shepherd socket...\n")
+ (delete-file "/var/run/shepherd/socket"))
(unless (file-exists? "/servers/startup")
(format #t "Creating essential device nodes...\n")
(make-hurd-device-nodes))
+ (let ((profile/hurd (readlink* (string-append profile "/hurd"))))
+ (when (file-exists? "/hurd")
+ (format #t "Removing stale /hurd link\n")
+ (delete-file "/hurd"))
+ (format #t "Linking /hurd from ~a...\n" profile/hurd)
+ (symlink profile/hurd "/hurd"))
+
(format #t "Setting-up essential translators...\n")
- (setenv "PATH" (string-append system "/profile/bin"))
(set-hurd-device-translators)
(format #t "Starting pager...\n")
- 10/48: squash! gnu: mig: Update to 04bfe7a91223ba15d868f7165e49328b1c6e86c3., (continued)
- 10/48: squash! gnu: mig: Update to 04bfe7a91223ba15d868f7165e49328b1c6e86c3., guix-commits, 2023/06/04
- 06/48: gnu: gnumach: Update to 1.8+git20221224., guix-commits, 2023/06/04
- 27/48: gnu: commencement: Add autoconf-boot0., guix-commits, 2023/06/04
- 48/48: DRAFT system: examples: Add devel-hurd.tmpl., guix-commits, 2023/06/04
- 40/48: gnu: findutils: Move test-strerror_r from XFAIL to skip for the Hurd., guix-commits, 2023/06/04
- 30/48: gnu: commencement: mig-boot0: Update to 1.8+git20230520., guix-commits, 2023/06/04
- 31/48: gnu: commencement: hurd-headers-boot0: Update to 0.9.git20230216., guix-commits, 2023/06/04
- 36/48: gnu: guile: Skip hanging and failing pipe tests on the Hurd., guix-commits, 2023/06/04
- 24/48: system: hurd: Add netdde to %base-packages/hurd., guix-commits, 2023/06/04
- 17/48: hurd-boot: Setup pci-arbiter and rumpdisk translators., guix-commits, 2023/06/04
- 47/48: DRAFT hurd-boot: Support second boot.,
guix-commits <=
- 18/48: services: childhurd: Bump default qemu memory to 2048MB., guix-commits, 2023/06/04
- 14/48: gnu: hurd-minimal: Include libshouldbeinlibc and libstore., guix-commits, 2023/06/04
- 08/48: gnu: hurd: Update to v0.9.git20230216., guix-commits, 2023/06/04