* [bug#43816] [PATCH] services: gitolite: Install the rc file as gitolite's user.
@ 2020-10-05 15:50 Julien Lepiller
2020-10-05 17:18 ` Christopher Baines
0 siblings, 1 reply; 3+ messages in thread
From: Julien Lepiller @ 2020-10-05 15:50 UTC (permalink / raw)
To: 43816
[-- Attachment #1: Type: text/plain, Size: 227 bytes --]
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.
[-- Attachment #2: 0001-services-gitolite-Install-the-rc-file-as-gitolite-s-.patch --]
[-- Type: text/x-patch, Size: 1541 bytes --]
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(-)
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
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [bug#43816] [PATCH] services: gitolite: Install the rc file as gitolite's user.
2020-10-05 15:50 [bug#43816] [PATCH] services: gitolite: Install the rc file as gitolite's user Julien Lepiller
@ 2020-10-05 17:18 ` Christopher Baines
2020-10-05 17:43 ` bug#43816: " Julien Lepiller
0 siblings, 1 reply; 3+ messages in thread
From: Christopher Baines @ 2020-10-05 17:18 UTC (permalink / raw)
To: Julien Lepiller; +Cc: 43816
[-- Attachment #1: Type: text/plain, Size: 332 bytes --]
Julien Lepiller <julien@lepiller.eu> writes:
> 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.
As mentioned on IRC, this looks good to me :)
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 987 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
* bug#43816: [PATCH] services: gitolite: Install the rc file as gitolite's user.
2020-10-05 17:18 ` Christopher Baines
@ 2020-10-05 17:43 ` Julien Lepiller
0 siblings, 0 replies; 3+ messages in thread
From: Julien Lepiller @ 2020-10-05 17:43 UTC (permalink / raw)
To: Christopher Baines; +Cc: 43816-done
Thank you, pushed as 4e3ed9bad9ed5758cdee6e636805f65e9ab710eb.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2020-10-05 17:44 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-10-05 15:50 [bug#43816] [PATCH] services: gitolite: Install the rc file as gitolite's user Julien Lepiller
2020-10-05 17:18 ` Christopher Baines
2020-10-05 17:43 ` bug#43816: " Julien Lepiller
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/guix.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.