GNU bug report logs -
#54377
[PATCH 0/3] Add 'guix home container'
Previous Next
Reported by: Ludovic Courtès <ludo <at> gnu.org>
Date: Sun, 13 Mar 2022 21:54:02 UTC
Severity: normal
Tags: patch
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
* gnu/system/linux-container.scm (eval/container): Add #:guest-uid
and #:guest-gid and honor them.
---
gnu/system/linux-container.scm | 14 +++++++++-----
1 file changed, 9 insertions(+), 5 deletions(-)
diff --git a/gnu/system/linux-container.scm b/gnu/system/linux-container.scm
index 415d6b9775..eeb0f68c02 100644
--- a/gnu/system/linux-container.scm
+++ b/gnu/system/linux-container.scm
@@ -1,6 +1,6 @@
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2015 David Thompson <davet <at> gnu.org>
-;;; Copyright © 2016, 2017, 2019, 2020, 2021 Ludovic Courtès <ludo <at> gnu.org>
+;;; Copyright © 2016-2017, 2019-2022 Ludovic Courtès <ludo <at> gnu.org>
;;; Copyright © 2019 Arun Isaac <arunisaac <at> systemreboot.net>
;;; Copyright © 2020 Efraim Flashner <efraim <at> flashner.co.il>
;;; Copyright © 2020 Google LLC
@@ -248,11 +248,13 @@ (define (explain pid)
(define* (eval/container exp
#:key
(mappings '())
- (namespaces %namespaces))
+ (namespaces %namespaces)
+ (guest-uid 0) (guest-gid 0))
"Evaluate EXP, a gexp, in a new process executing in separate namespaces as
listed in NAMESPACES. Add MAPPINGS, a list of <file-system-mapping>, to the
-set of directories visible in the process's mount namespace. Return the
-process' exit status as a monadic value.
+set of directories visible in the process's mount namespace. Inside the
+namespaces, run code as GUEST-UID and GUEST-GID. Return the process' exit
+status as a monadic value.
This is useful to implement processes that, unlike derivations, are not
entirely pure and need to access the outside world or to perform side
@@ -292,4 +294,6 @@ (define items
(list "-c"
(object->string
(lowered-gexp-sexp lowered))))))
- #:namespaces namespaces))))))
+ #:namespaces namespaces
+ #:guest-uid guest-uid
+ #:guest-gid guest-gid))))))
--
2.34.0
This bug report was last modified 3 years and 61 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.