GNU bug report logs -
#78363
Home is read-only in guix shell container
Previous Next
Reported by: keinflue <keinflue <at> posteo.net>
Date: Sat, 10 May 2025 23:00:02 UTC
Severity: normal
Merged with 78440
Done: Ludovic Courtès <ludo <at> gnu.org>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
* guix/scripts/environment.scm (launch-environment/container): Add tmpfs for
home.
* tests/guix-environment-container.sh: Add test.
Change-Id: Iadd9b838f6442a8080998ed7e07414db562068bf
---
guix/scripts/environment.scm | 9 ++++++++-
tests/guix-environment-container.sh | 4 ++++
2 files changed, 12 insertions(+), 1 deletion(-)
diff --git a/guix/scripts/environment.scm b/guix/scripts/environment.scm
index bc06e97d7b..96bbc6c9fa 100644
--- a/guix/scripts/environment.scm
+++ b/guix/scripts/environment.scm
@@ -874,7 +874,14 @@ (define* (launch-environment/container #:key command bash user user-mappings
(writable? #f)))
reqs)))
(file-systems (append %container-file-systems
- (list tmpfs)
+ (list tmpfs ; RW /tmp
+ (file-system ; RW ~
+ (device "none")
+ (mount-point
+ (or (and=> user user-override-home)
+ home))
+ (type "tmpfs")
+ (check? #f)))
(if network?
(filter-map optional-mapping->fs
%network-file-mappings)
diff --git a/tests/guix-environment-container.sh b/tests/guix-environment-container.sh
index d0f19c8372..e1c3655846 100644
--- a/tests/guix-environment-container.sh
+++ b/tests/guix-environment-container.sh
@@ -199,6 +199,10 @@ guix environment --bootstrap --container --ad-hoc guile-bootstrap \
guix environment --bootstrap --container --ad-hoc guile-bootstrap \
-- guile -c '(mkdir "/tmp/foo")'
+# And so is ~.
+guix environment --bootstrap --container --ad-hoc guile-bootstrap \
+ -- guile -c '(mkdir (string-append (getenv "HOME") "/foo"))'
+
# Check the exit code.
--
2.49.0
This bug report was last modified 1 day ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.