From: Maxim Cournoyer <maxim.cournoyer@gmail.com>
To: 71352@debbugs.gnu.org
Cc: Oleg Pykhalov <go.wigust@gmail.com>
Subject: bug#71352: branch master updated: services: nix: Mount Nix store read only.
Date: Mon, 03 Jun 2024 22:34:35 -0400 [thread overview]
Message-ID: <87o78hv3k4.fsf@gmail.com> (raw)
In-Reply-To: <171695309234.24183.12881718488458327568@vcs2.savannah.gnu.org> (guix-commits@gnu.org's message of "Tue, 28 May 2024 23:24:52 -0400")
Hello,
guix-commits@gnu.org writes:
> services: nix: Mount Nix store read only.
>
> * gnu/services/nix.scm (nix-shepherd-service): Add requirements.
> (%nix-store-directory): New variable.
> (nix-service-type): Add file-system-service-type extension.
>
> Change-Id: I18a5d58c92c1f2b5b6dcecc3d5b439cc15bf4e49
This commit unfortunately appears to introduce a regression where
reconfiguring a system with the read-only /nix/store causes the
following error:
--8<---------------cut here---------------start------------->8---
guix system: error: chown: Système de fichiers accessible en lecture seulement
--8<---------------cut here---------------end--------------->8---
With the accompanying strace output:
--8<---------------cut here---------------start------------->8---
20261 close(17) = 0
20261 chown("/nix/store", 0, 981) = -1 EROFS (Système de fichiers accessible en lecture seulement)
20261 close(13) = 0
20261 write(2, "guix system: \33[1;31merror: \33[0m\33[1mchown\33[0m: Syst\303\250me de fichiers accessible en lecture seulement\n", 99) = 99
--8<---------------cut here---------------end--------------->8---
Are these chown still useful in the activation snippet?
--8<---------------cut here---------------start------------->8---
(define (nix-activation _)
;; Return the activation gexp.
#~(begin
(use-modules (guix build utils)
(srfi srfi-26))
(for-each (cut mkdir-p <>) '("/nix/store" "/nix/var/log"
"/nix/var/nix/gcroots/per-user"
"/nix/var/nix/profiles/per-user"))
(chown "/nix/store"
(passwd:uid (getpw "root")) (group:gid (getpw "nixbld01")))
(chmod "/nix/store" #o775)
(for-each (cut chmod <> #o777) '("/nix/var/nix/profiles"
"/nix/var/nix/profiles/per-user"))))
--8<---------------cut here---------------end--------------->8---
If they are useful only on the first time, perhaps we could catch the
exceptions for when it runs on an already read-only mounted /nix/store?
--
Thanks,
Maxim
next parent reply other threads:[~2024-06-04 2:35 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <171695309234.24183.12881718488458327568@vcs2.savannah.gnu.org>
2024-06-04 2:34 ` Maxim Cournoyer [this message]
2024-06-04 8:34 ` bug#71352: branch master updated: services: nix: Mount Nix store read only Oleg Pykhalov
2024-06-06 2:03 ` Maxim Cournoyer
2024-06-24 2:47 ` Maxim Cournoyer
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=87o78hv3k4.fsf@gmail.com \
--to=maxim.cournoyer@gmail.com \
--cc=71352@debbugs.gnu.org \
--cc=go.wigust@gmail.com \
/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.