(address . guix-patches@gnu.org)
Hi Guix!
I had some issues when installing my gitolite service. Turns out the
.gitolite.rc file, that contains gitolite's configuration, was owned by
root, with no access to others. This patch fixes that by using chown on
it.
From abaac031616bbae42c455fdbe44b680e7da93d44 Mon Sep 17 00:00:00 2001
From: Julien Lepiller <julien@lepiller.eu>
Date: Mon, 5 Oct 2020 17:47:13 +0200
Subject: [PATCH] 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(-)
Toggle diff (24 lines)
diff --git a/gnu/services/version-control.scm b/gnu/services/version-control.scm
index cc07f8025b..f3df0b979f 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)
--
2.28.0