all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Alexey Abramov via Guix-patches via <guix-patches@gnu.org>
To: 58989@debbugs.gnu.org
Subject: [bug#58989] [PATCH] services: gitolite: Add local-code configuration option.
Date: Thu,  3 Nov 2022 17:15:25 +0100	[thread overview]
Message-ID: <20221103161525.2130-1-levenson@mmer.org> (raw)

* gnu/services/version-control.scm (gitolite-rc-file): Add local-code
field.
(gitolite-rc-file-compiler): Serialize the field.
* doc/guix.texi: Document it.
---
 doc/guix.texi                    | 9 +++++++++
 gnu/services/version-control.scm | 7 ++++++-
 2 files changed, 15 insertions(+), 1 deletion(-)

diff --git a/doc/guix.texi b/doc/guix.texi
index 80fb3bc47f..c05c7961e5 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -35704,6 +35704,15 @@ A value like @code{#o0027} will give read access to the group used by Gitolite
 (by default: @code{git}).  This is necessary when using Gitolite with software
 like cgit or gitweb.
 
+@item @code{local-code} (default: @code{"$rc@{GL_ADMIN_BASE@}/local"})
+Allows you to add your own non-core programs, or even override the
+shipped ones with your own.
+
+Please supply the FULL path to this variable. By default, directory
+called "local" in your gitolite clone is used, providing the benefits of
+versioning them as well as making changes to them without having to log
+on to the server.
+
 @item @code{unsafe-pattern} (default: @code{#f})
 An optional Perl regular expression for catching unsafe configurations in
 the configuration file.  See
diff --git a/gnu/services/version-control.scm b/gnu/services/version-control.scm
index cd8763f5ea..8c9701afe0 100644
--- a/gnu/services/version-control.scm
+++ b/gnu/services/version-control.scm
@@ -54,6 +54,7 @@ (define-module (gnu services version-control)
 
             <gitolite-rc-file>
             gitolite-rc-file
+            gitolite-rc-file-local-code
             gitolite-rc-file-umask
             gitolite-rc-file-unsafe-pattern
             gitolite-rc-file-git-config-keys
@@ -242,6 +243,8 @@ (define-record-type* <gitolite-rc-file>
   gitolite-rc-file?
   (umask           gitolite-rc-file-umask
                    (default #o0077))
+  (local-code      gitolite-rc-file-local-code
+                   (default "$rc{GL_ADMIN_BASE}/local"))
   (unsafe-pattern  gitolite-rc-file-unsafe-pattern
                    (default #f))
   (git-config-keys gitolite-rc-file-git-config-keys
@@ -263,11 +266,13 @@ (define-record-type* <gitolite-rc-file>
 (define-gexp-compiler (gitolite-rc-file-compiler
                        (file <gitolite-rc-file>) system target)
   (match file
-    (($ <gitolite-rc-file> umask unsafe-pattern git-config-keys roles enable)
+    (($ <gitolite-rc-file> umask local-code unsafe-pattern git-config-keys roles enable)
      (apply text-file* "gitolite.rc"
       `("%RC = (\n"
         "    UMASK => " ,(format #f "~4,'0o" umask) ",\n"
         "    GIT_CONFIG_KEYS => '" ,git-config-keys "',\n"
+        ,(if local-code
+             (simple-format #f "    LOCAL_CODE => \"~A\",\n" local-code))
         "    ROLES => {\n"
         ,@(map (match-lambda
                  ((role . value)
-- 
2.36.1





             reply	other threads:[~2022-11-03 16:18 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-03 16:15 Alexey Abramov via Guix-patches via [this message]
2022-11-06 14:03 ` [bug#58989] [PATCH] services: gitolite: Add local-code configuration option Christopher Baines
2022-11-07  6:40   ` Alexey Abramov via Guix-patches via
2022-11-07 19:54     ` Christopher Baines

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20221103161525.2130-1-levenson@mmer.org \
    --to=guix-patches@gnu.org \
    --cc=58989@debbugs.gnu.org \
    --cc=levenson@mmer.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.