[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
47/58: hurd-boot: Support system init: Create essential device nodes.
From: |
guix-commits |
Subject: |
47/58: hurd-boot: Support system init: Create essential device nodes. |
Date: |
Wed, 19 Jul 2023 03:00:50 -0400 (EDT) |
janneke pushed a commit to branch hurd-team
in repository guix.
commit 3331a7f653f09683f06185b7351e6a72c7fffa69
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)
- 17/58: gnu: libgcrypt: Skip hanging benchmark tests on the Hurd., (continued)
- 17/58: gnu: libgcrypt: Skip hanging benchmark tests on the Hurd., guix-commits, 2023/07/19
- 11/58: gnu: python: Support native build on the Hurd., guix-commits, 2023/07/19
- 25/58: gnu: openssl-1.1: Fix shared build for the Hurd., guix-commits, 2023/07/19
- 31/58: gnu: cmake-minimal: Skip tests on the Hurd., guix-commits, 2023/07/19
- 36/58: gnu: harfbuzz: Support build for the Hurd., guix-commits, 2023/07/19
- 37/58: gnu: pango: Support build for the Hurd., guix-commits, 2023/07/19
- 43/58: gnu: hurd: Support native build on the Hurd., guix-commits, 2023/07/19
- 44/58: gnu: guix: Disable some test on 32bit., guix-commits, 2023/07/19
- 39/58: gnu: po4a: Skip failing test on the Hurd., guix-commits, 2023/07/19
- 50/58: build: Build gnu/packages/*.go in five steps., guix-commits, 2023/07/19
- 47/58: hurd-boot: Support system init: Create essential device nodes.,
guix-commits <=
- 46/58: hurd: Support system init in /libexec/runsystem., guix-commits, 2023/07/19
- 06/58: gnu: findutils: Move test-strerror_r from XFAIL to skip on the Hurd., guix-commits, 2023/07/19
- 41/58: gnu: cairo: Support building for the Hurd., guix-commits, 2023/07/19
- 04/58: gnu: grep: Update hanging and failing tests on the Hurd., guix-commits, 2023/07/19
- 35/58: gnu: ghostscript: Fix build for the Hurd., guix-commits, 2023/07/19
- 42/58: gnu: glib: Disable tests for the Hurd., guix-commits, 2023/07/19
- 58/58: locale: Set %default-locale-definitions to glibc/hurd on the Hurd., guix-commits, 2023/07/19
- 26/58: gnu: ruby-2.6: Skip test on the Hurd., guix-commits, 2023/07/19
- 29/58: gnu: zstd: Skip tests when building for the Hurd., guix-commits, 2023/07/19
- 33/58: gnu: graphite2: Skip test on the Hurd., guix-commits, 2023/07/19