GNU bug report logs -
#52712
[PATCH v2 4/4] services: cuirass: Ensure correct ownership of directory trees.
Previous Next
To reply to this bug, email your comments to 52712 AT debbugs.gnu.org.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
guix-patches <at> gnu.org
:
bug#52712
; Package
guix-patches
.
(Tue, 21 Dec 2021 19:37:01 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Brice Waegeneire <brice <at> waegenei.re>
:
New bug report received and forwarded. Copy sent to
guix-patches <at> gnu.org
.
(Tue, 21 Dec 2021 19:37:01 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
* gnu/services/cuirass.scm (cuirass-activation): Replace 'chown'
calls by 'lchown-recursive'.
---
gnu/services/cuirass.scm | 18 +++++++++++-------
1 file changed, 11 insertions(+), 7 deletions(-)
diff --git a/gnu/services/cuirass.scm b/gnu/services/cuirass.scm
index 96f28a9670..41e45604dd 100644
--- a/gnu/services/cuirass.scm
+++ b/gnu/services/cuirass.scm
@@ -5,6 +5,7 @@
;;; Copyright © 2017 Jan Nieuwenhuizen <janneke <at> gnu.org>
;;; Copyright © 2018, 2019 Ricardo Wurmus <rekado <at> elephly.net>
;;; Copyright © 2018 Clément Lassieur <clement <at> lassieur.org>
+;;; Copyright © 2021 Brice Waegeneire <brice <at> waegenei.re>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -24,6 +25,7 @@
(define-module (gnu services cuirass)
#:use-module (guix channels)
#:use-module (guix gexp)
+ #:use-module (guix modules)
#:use-module (guix records)
#:use-module (guix store)
#:use-module (guix utils)
@@ -278,9 +280,11 @@ (define (cuirass-activation config)
(profile (string-append "/var/guix/profiles/per-user/" user))
(roots (string-append profile "/cuirass"))
(group (cuirass-configuration-group config)))
- (with-imported-modules '((guix build utils))
+ (with-imported-modules (source-module-closure
+ '((gnu build activation)))
#~(begin
- (use-modules (guix build utils))
+ (use-modules (guix build utils)
+ (gnu build activation))
(mkdir-p #$cache)
(mkdir-p #$log)
@@ -291,13 +295,13 @@ (define (cuirass-activation config)
(let ((uid (passwd:uid (getpw #$user)))
(gid (group:gid (getgr #$group))))
- (chown #$cache uid gid)
- (chown #$log uid gid)
- (chown #$roots uid gid)
- (chown #$profile uid gid)
+ (lchown-recursive #$cache uid gid)
+ (lchown-recursive #$log uid gid)
+ (lchown-recursive #$profile uid gid)
+ (lchown-recursive (passwd:dir (getpw #$user)) uid gid)
(when #$remote-cache
- (chown #$remote-cache uid gid)))))))
+ (lchown-recursive #$remote-cache uid gid)))))))
(define (cuirass-log-rotations config)
"Return the list of log rotations that corresponds to CONFIG."
--
2.34.0
This bug report was last modified 3 years and 173 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.