From: "Jan (janneke) Nieuwenhuizen" <janneke@gnu.org>
To: 42047@debbugs.gnu.org
Subject: bug#42047: [PATCH 3/3] guix: gc: Support for the Hurd.
Date: Thu, 25 Jun 2020 22:38:50 +0200 [thread overview]
Message-ID: <20200625203850.25057-3-janneke@gnu.org> (raw)
In-Reply-To: <20200625203850.25057-1-janneke@gnu.org>
* guix/store/roots.scm (proc-environ-roots): Handle EIO, for the Hurd.
* gnu/build/hurd-boot.scm (set-hurd-device-translators): Mount /proc. Add
symlink to /etc/mtab. Remove duplicate calls to 'scope'.
---
gnu/build/hurd-boot.scm | 21 ++++++++++++++-------
guix/store/roots.scm | 13 ++++++++++---
2 files changed, 24 insertions(+), 10 deletions(-)
diff --git a/gnu/build/hurd-boot.scm b/gnu/build/hurd-boot.scm
index aea2ac3307..2db99cdcce 100644
--- a/gnu/build/hurd-boot.scm
+++ b/gnu/build/hurd-boot.scm
@@ -191,7 +191,8 @@ set."
"10.0.2.15" ;the default QEMU guest IP
"--netmask" "255.255.255.0"
"--gateway" "10.0.2.2"
- "--ipv6" "/servers/socket/16"))))
+ "--ipv6" "/servers/socket/16"))
+ ("proc" ("/hurd/procfs" "--stat-mode=444"))))
(define devices
'(("dev/full" ("/hurd/null" "--full") #o666)
@@ -232,17 +233,23 @@ set."
#o666)))
(for-each scope-set-translator servers)
- (mkdir* (scope "dev/vcs/1"))
- (mkdir* (scope "dev/vcs/2"))
- (mkdir* (scope "dev/vcs/2"))
- (rename-file (scope "/dev/console") (scope "/dev/console-"))
+ (mkdir* "dev/vcs/1")
+ (mkdir* "dev/vcs/2")
+ (mkdir* "dev/vcs/2")
+ (rename-file (scope "/dev/console") (scope "dev/console-"))
(for-each scope-set-translator devices)
(false-if-EEXIST (symlink "/dev/random" (scope "dev/urandom")))
- (mkdir* (scope "dev/fd"))
+ (mkdir* "dev/fd")
(false-if-EEXIST (symlink "/dev/fd/0" (scope "dev/stdin")))
(false-if-EEXIST (symlink "/dev/fd/1" (scope "dev/stdout")))
- (false-if-EEXIST (symlink "/dev/fd/2" (scope "dev/stderr"))))
+ (false-if-EEXIST (symlink "/dev/fd/2" (scope "dev/stderr")))
+
+ ;; Make sure /etc/mtab is a symlink to /proc/mounts.
+ (false-if-exception
+ (delete-file (scope "etc/mtab")))
+ (mkdir* (scope "etc"))
+ (symlink "/proc/mounts" (scope "etc/mtab")))
\f
(define* (boot-hurd-system #:key (on-error 'debug))
diff --git a/guix/store/roots.scm b/guix/store/roots.scm
index 58653507f8..9b4a05b149 100644
--- a/guix/store/roots.scm
+++ b/guix/store/roots.scm
@@ -1,5 +1,6 @@
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2012, 2013, 2014, 2017, 2019 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2020 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -197,9 +198,15 @@ or the empty list."
(string-append dir "/environ"))
(append-map rhs-file-names
- (split-on-nul
- (call-with-input-file environ
- get-string-all))))
+ (catch 'system-error
+ (lambda _
+ (split-on-nul
+ (call-with-input-file environ
+ get-string-all)))
+ (lambda args
+ (if (= EIO (system-error-errno args))
+ '()
+ (apply throw args))))))
(define (referenced-files)
"Return the list of referenced store items."
--
Jan Nieuwenhuizen <janneke@gnu.org> | GNU LilyPond http://lilypond.org
Freelance IT http://JoyofSource.com | Avatar® http://AvatarAcademy.com
next prev parent reply other threads:[~2020-06-25 20:40 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-06-25 20:34 bug#42047: [PATCH 0/3] Running guix gc on the Hurd Jan (janneke) Nieuwenhuizen
2020-06-25 20:38 ` bug#42047: [PATCH 1/3] image: hurd: Create hurd-compatible ext2 file-system Jan (janneke) Nieuwenhuizen
2020-06-25 20:38 ` bug#42047: [PATCH 2/3] image: hurd: Initialize root partition for the Hurd Jan (janneke) Nieuwenhuizen
2020-06-25 20:38 ` Jan (janneke) Nieuwenhuizen [this message]
2020-06-25 20:48 ` bug#42047: [PATCH 3/3] guix: gc: Support " Ludovic Courtès
2020-06-25 22:25 ` Bengt Richter
2020-06-25 20:44 ` bug#42047: [PATCH 1/3] image: hurd: Create hurd-compatible ext2 file-system Ludovic Courtès
2020-06-25 20:53 ` Jan Nieuwenhuizen
2020-06-26 8:27 ` bug#42047: [PATCH 3/3] guix: gc: Support for the Hurd Jan Nieuwenhuizen
2020-06-27 11:25 ` bug#42047: [PATCH v2] " Jan Nieuwenhuizen
2020-06-28 14:31 ` Ludovic Courtès
2020-06-26 15:46 ` bug#42047: [PATCH 0/3] Running guix gc on " Ludovic Courtès
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200625203850.25057-3-janneke@gnu.org \
--to=janneke@gnu.org \
--cc=42047@debbugs.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/guix.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.