guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

branch master updated: services: gitolite: Install the rc file as gitoli


From: guix-commits
Subject: branch master updated: services: gitolite: Install the rc file as gitolite's user.
Date: Mon, 05 Oct 2020 13:41:45 -0400

This is an automated email from the git hooks/post-receive script.

roptat pushed a commit to branch master
in repository guix.

The following commit(s) were added to refs/heads/master by this push:
     new 4e3ed9b  services: gitolite: Install the rc file as gitolite's user.
4e3ed9b is described below

commit 4e3ed9bad9ed5758cdee6e636805f65e9ab710eb
Author: Julien Lepiller <julien@lepiller.eu>
AuthorDate: Mon Oct 5 17:47:13 2020 +0200

    services: gitolite: Install the rc file as gitolite's user.
    
    * gnu/services/version-control.scm (gitolite-activation): Install the rc
    file as gitolite's user.
---
 gnu/services/version-control.scm | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/gnu/services/version-control.scm b/gnu/services/version-control.scm
index cc07f80..f3df0b9 100644
--- a/gnu/services/version-control.scm
+++ b/gnu/services/version-control.scm
@@ -307,10 +307,15 @@ access to exported repositories under @file{/srv/git}."
                 (pubkey-file (string-append
                               #$home "/"
                               (basename
-                               (strip-store-file-name admin-pubkey)))))
+                               (strip-store-file-name admin-pubkey))))
+                (rc-file #$(string-append home "/.gitolite.rc")))
 
            (simple-format #t "guix: gitolite: installing ~A\n" #$rc-file)
-           (copy-file #$rc-file #$(string-append home "/.gitolite.rc"))
+           (copy-file #$rc-file rc-file)
+           ;; ensure gitolite's user can read the configuration
+           (chown rc-file
+                  (passwd:uid user-info)
+                  (passwd:gid user-info))
 
            ;; The key must be writable, so copy it from the store
            (copy-file admin-pubkey pubkey-file)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]