From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id F7+JB60L9V7MdwAA0tVLHw (envelope-from ) for ; Thu, 25 Jun 2020 20:40:13 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id yATMAq0L9V5wcwAAbx9fmQ (envelope-from ) for ; Thu, 25 Jun 2020 20:40:13 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 92E8A940308 for ; Thu, 25 Jun 2020 20:40:12 +0000 (UTC) Received: from localhost ([::1]:42302 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1joYfL-0001QP-8N for larch@yhetil.org; Thu, 25 Jun 2020 16:40:11 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:39374) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1joYfC-0001QC-Fl for bug-guix@gnu.org; Thu, 25 Jun 2020 16:40:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:57987) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1joYfC-0005kX-5n for bug-guix@gnu.org; Thu, 25 Jun 2020 16:40:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1joYfC-0001TN-33 for bug-guix@gnu.org; Thu, 25 Jun 2020 16:40:02 -0400 X-Loop: help-debbugs@gnu.org Subject: bug#42047: [PATCH 3/3] guix: gc: Support for the Hurd. Resent-From: "Jan (janneke) Nieuwenhuizen" Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Thu, 25 Jun 2020 20:40:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 42047 X-GNU-PR-Package: guix X-GNU-PR-Keywords: patch To: 42047@debbugs.gnu.org Received: via spool by 42047-submit@debbugs.gnu.org id=B42047.15931175435556 (code B ref 42047); Thu, 25 Jun 2020 20:40:02 +0000 Received: (at 42047) by debbugs.gnu.org; 25 Jun 2020 20:39:03 +0000 Received: from localhost ([127.0.0.1]:41294 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1joYeF-0001RW-Am for submit@debbugs.gnu.org; Thu, 25 Jun 2020 16:39:03 -0400 Received: from eggs.gnu.org ([209.51.188.92]:53032) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1joYeE-0001Qe-26 for 42047@debbugs.gnu.org; Thu, 25 Jun 2020 16:39:02 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:44858) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1joYe8-00049U-1m; Thu, 25 Jun 2020 16:38:56 -0400 Received: from [2001:980:1b4f:1:42d2:832d:bb59:862] (port=46176 helo=dundal.fritz.box) by fencepost.gnu.org with esmtpa (Exim 4.82) (envelope-from ) id 1joYe6-0000HF-5e; Thu, 25 Jun 2020 16:38:54 -0400 From: "Jan (janneke) Nieuwenhuizen" Date: Thu, 25 Jun 2020 22:38:50 +0200 Message-Id: <20200625203850.25057-3-janneke@gnu.org> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200625203850.25057-1-janneke@gnu.org> References: <20200625203850.25057-1-janneke@gnu.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-Spam-Score: -3.3 (---) X-BeenThere: bug-guix@gnu.org List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guix-bounces+larch=yhetil.org@gnu.org Sender: "bug-Guix" X-Scanner: scn0 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of bug-guix-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=bug-guix-bounces@gnu.org X-Spam-Score: -0.01 X-TUID: jDJyzOWNYvw2 * 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"))) (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 +;;; Copyright © 2020 Jan (janneke) Nieuwenhuizen ;;; ;;; 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 | GNU LilyPond http://lilypond.org Freelance IT http://JoyofSource.com | Avatar® http://AvatarAcademy.com