[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
17/65: hurd-boot: Support system init: Create essential device nodes.
From: |
guix-commits |
Subject: |
17/65: hurd-boot: Support system init: Create essential device nodes. |
Date: |
Fri, 14 Jul 2023 10:06:00 -0400 (EDT) |
janneke pushed a commit to branch hurd-team
in repository guix.
commit 84bf54ff6cdaefcb129c7126a845cc98d087fcf1
Author: Janneke Nieuwenhuizen <janneke@gnu.org>
AuthorDate: Tue May 30 18:07:17 2023 +0200
hurd-boot: Support system init: Create essential device nodes.
* gnu/build/hurd-boot.scm (make-hurd-device-nodes): Cater for existing
directories (dev, servers).
(set-hurd-device-translators): Remove /servers/socket/1, that is created by
libexec/console-run. Cater for nonexistent /dev/console.
(boot-hurd-system): Call make-hurd-device-nodes on initial run.
---
gnu/build/hurd-boot.scm | 14 ++++++++++----
1 file changed, 10 insertions(+), 4 deletions(-)
diff --git a/gnu/build/hurd-boot.scm b/gnu/build/hurd-boot.scm
index 19bdbdf6ae..bd19fd5212 100644
--- a/gnu/build/hurd-boot.scm
+++ b/gnu/build/hurd-boot.scm
@@ -79,13 +79,13 @@ Return the value associated with OPTION, or #f on failure."
(define (scope dir)
(string-append root (if (string-suffix? "/" root) "" "/") dir))
- (mkdir (scope "dev"))
+ (mkdir-p (scope "dev"))
;; 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.
- (mkdir (scope "servers"))
+ (mkdir-p (scope "servers"))
(for-each (lambda (file)
(call-with-output-file (scope (string-append "servers/" file))
(lambda (port)
@@ -100,7 +100,8 @@ Return the value associated with OPTION, or #f on failure."
"kill"
"suspend"))
- (mkdir (scope "servers/socket"))
+ (mkdir-p (scope "servers/socket"))
+
;; Don't create /servers/socket/1 & co: runsystem does that on first boot.
;; TODO: Set the 'gnu.translator' extended attribute for passive translator
@@ -266,7 +267,8 @@ set."
(for-each scope-set-translator servers)
(mkdir* "dev/vcs/1")
(mkdir* "dev/vcs/2")
- (rename-file (scope "dev/console") (scope "dev/console-"))
+ (when (file-exists? (scope "dev/console"))
+ (rename-file (scope "dev/console") (scope "dev/console-")))
(for-each scope-set-translator devices)
(false-if-EEXIST (symlink "/dev/random" (scope "dev/urandom")))
@@ -313,6 +315,10 @@ XXX TODO: use Linux xattr/setxattr to remove (settrans in)
/libexec/RUNSYSTEM
(let ((hurd/hurd (readlink* (string-append system "/profile/hurd"))))
(symlink hurd/hurd "/hurd"))
+ (unless (file-exists? "/servers/startup")
+ (format #t "Creating essential device nodes...\n")
+ (make-hurd-device-nodes))
+
(format #t "Setting-up essential translators...\n")
(setenv "PATH" (string-append system "/profile/bin"))
(set-hurd-device-translators)
- 11/65: Revert "gnu: sed: Skip failing test on GNU/Hurd.", (continued)
- 11/65: Revert "gnu: sed: Skip failing test on GNU/Hurd.", guix-commits, 2023/07/14
- 15/65: gnu: m4: Skip gnulib stack-overflow tests for the Hurd., guix-commits, 2023/07/14
- 16/65: hurd: Support system init in /libexec/runsystem., guix-commits, 2023/07/14
- 19/65: gnu: python: Support native build on the Hurd., guix-commits, 2023/07/14
- 26/65: gnu: tcl: Remove failing tests on the Hurd.., guix-commits, 2023/07/14
- 18/65: gnu: openssl: Build fix for the Hurd., guix-commits, 2023/07/14
- 22/65: gnu: libbsd: Skip failing test on the Hurd., guix-commits, 2023/07/14
- 49/65: gnu: fontforge: Support build on the Hurd., guix-commits, 2023/07/14
- 09/65: gnu: coreutils: Skip hanging and failing test on the Hurd., guix-commits, 2023/07/14
- 12/65: gnu: findutils: Move test-strerror_r from XFAIL to skip on the Hurd., guix-commits, 2023/07/14
- 17/65: hurd-boot: Support system init: Create essential device nodes.,
guix-commits <=
- 02/65: gnu: commencement: Add automake-boot0., guix-commits, 2023/07/14
- 08/65: gnu: guile: Skip hanging and failing pipe tests on the Hurd., guix-commits, 2023/07/14
- 28/65: gnu: git: Skip failing test on the Hurd., guix-commits, 2023/07/14
- 06/65: gnu: commencement: hurd-minimal-boot0: Update to 0.9.git20230216., guix-commits, 2023/07/14
- 14/65: gnu: gettext-minimal: Remove XFAIL_TESTS for the Hurd., guix-commits, 2023/07/14
- 20/65: gnu: mpfr: Skip failing test on the Hurd., guix-commits, 2023/07/14
- 23/65: gnu: c-ares: Skip failing tests on the Hurd., guix-commits, 2023/07/14
- 24/65: gnu: libgpg-error: Skip failing test on the Hurd., guix-commits, 2023/07/14
- 27/65: gnu: curl: Skip failing test on the Hurd., guix-commits, 2023/07/14
- 25/65: gnu: libgcrypt: Skip hanging benchmark tests on the Hurd., guix-commits, 2023/07/14