[PATCH] services: gitolite: Install the rc file as gitolite's user.

  • Done
  • quality assurance status badge
Details
2 participants
  • Julien Lepiller
  • Christopher Baines
Owner
unassigned
Submitted by
Julien Lepiller
Severity
normal
J
J
Julien Lepiller wrote on 5 Oct 2020 17:50
(address . guix-patches@gnu.org)
20201005175029.5f89e6b9@tachikoma
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
C
C
Christopher Baines wrote on 5 Oct 2020 19:18
(name . Julien Lepiller)(address . julien@lepiller.eu)(address . 43816@debbugs.gnu.org)
877ds41tho.fsf@cbaines.net
Julien Lepiller <julien@lepiller.eu> writes:

Toggle quote (7 lines)
> 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 :)
-----BEGIN PGP SIGNATURE-----

iQKlBAEBCgCPFiEEPonu50WOcg2XVOCyXiijOwuE9XcFAl97VXNfFIAAAAAALgAo
aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldDNF
ODlFRUU3NDU4RTcyMEQ5NzU0RTBCMjVFMjhBMzNCMEI4NEY1NzcRHG1haWxAY2Jh
aW5lcy5uZXQACgkQXiijOwuE9Xe+XA/7BEfQxC6KeyXQVwIqtmJed89M4RLMcQkh
JhGSD9p1GNraiZnvOnEKtrbmYPUOuyHGyazQejvS9Zn/gHpTy74wwo6j1LK7YtBJ
ZS6wwaZRG/sRaFGnAwwNa1H1+bJKFEMVxzDdw+uQBhz4R4MG/x3t4mIUGBBv7A2g
EUZT7f+c2tYzf9MLNbIZr4QQBskhX5iIs/9zzQf/fbMelI6iB4I3kKOO/9qt5SUI
wG3r+llMYdUTS9GQ0EVqEMvpws1AjtDSqozK6b7DVFHpXgEB5Hjvz2XWpEbWf9Wz
7Gdy90YfRCdej5qQXXMgP0gezBobbxYK45o7kXlsZseKLj+cEjetNUz1UxPLc5xA
QgKQ27NuQPfJ0QptsklALLQSR4Ixurx2GOkopLCmdaJCjoTEb1ygNicUsAQZsDzm
lkbtJ/H8SXDuabYdMy98h46Ruh5H81Ly6t+7VqwuUeQZIEdKriHYaZCtovgX1Swk
DlEE2N8byy+F+LZMqPXn2W2z1kTHk05vGTio2n99up6U/sPQtDBsyusXpKmh/qxB
jBjGokhQlPGvF/CUA3a0JoS2kRxP4xZQcSgq/19/sh+jFNBAna2ZSs1OCv1qfGg+
NUtsBLj6eAsTIdrRSJ4M1IknDMa37lqxdS4CRUIAOdi2TKKfQQRq4j2z7L+vYyvZ
2RWjy3pf92o=
=JXZO
-----END PGP SIGNATURE-----

J
J
Julien Lepiller wrote on 5 Oct 2020 19:43
(name . Christopher Baines)(address . mail@cbaines.net)(address . 43816-done@debbugs.gnu.org)
20201005194316.0b022d3f@tachikoma
Thank you, pushed as 4e3ed9bad9ed5758cdee6e636805f65e9ab710eb.
Closed
?