[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
14/19: DRAFT hurd-boot: Support second boot.
From: |
guix-commits |
Subject: |
14/19: DRAFT hurd-boot: Support second boot. |
Date: |
Sat, 2 Sep 2023 11:48:57 -0400 (EDT) |
janneke pushed a commit to branch hurd-team
in repository guix.
commit 66b51eed9c980e3d2a18601b6dac15e1729d2c49
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 bd19fd5212..c412a9a394 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")
- 09/19: hurd: Support system init in /libexec/runsystem., (continued)
- 09/19: hurd: Support system init in /libexec/runsystem., guix-commits, 2023/09/02
- 11/19: system: hurd: Add procps to %base-packages/hurd., guix-commits, 2023/09/02
- 13/19: DRAFT hurd: Support second boot., guix-commits, 2023/09/02
- 03/19: gnu: guix: Update to 1.4.0-12.329069a2fb., guix-commits, 2023/09/02
- 08/19: gnu: librsvg: Build without gobject-introspection for the Hurd., guix-commits, 2023/09/02
- 10/19: hurd-boot: Support system init: Create essential device nodes., guix-commits, 2023/09/02
- 01/19: self: Build directories in chunks of max 25 files at a time., guix-commits, 2023/09/02
- 19/19: Revert "DRAFT daemon: Support chroot builds on GNU/Hurd.", guix-commits, 2023/09/02
- 05/19: squash! self: Build directories in chunks of max 25 files at a time. -- remove gc, guix-commits, 2023/09/02
- 02/19: gnu: guix: Update to 1.4.0-11.45de303d8b., guix-commits, 2023/09/02
- 14/19: DRAFT hurd-boot: Support second boot.,
guix-commits <=
- 16/19: gnu: Add libc-locales-for-target and glibc-locales/hurd., guix-commits, 2023/09/02
- 18/19: DRAFT daemon: Support chroot builds on GNU/Hurd., guix-commits, 2023/09/02
- 15/19: DRAFT system: examples: Add devel-hurd.tmpl., guix-commits, 2023/09/02
- 17/19: locale: Set %default-locale-definitions to glibc/hurd on the Hurd., guix-commits, 2023/09/02
- 12/19: system: hurd: Add swap-services to hurd-default-essential-services., guix-commits, 2023/09/02