[bug#77186,v2,02/13] services: gitolite-rc-file: Add log-extra field.
Commit Message
* gnu/services/version-control.scm (<gitolite-rc-file>): Add log-extra field.
(gitolite-rc-file-compiler): Handle it during configuration file generation.
* doc/guix.texi (Version Control Services): Document it.
Change-Id: Ice65dbdf4f42549e3c83914da7229db9d2cf856b
---
doc/guix.texi | 7 +++++++
gnu/services/version-control.scm | 9 ++++++++-
2 files changed, 15 insertions(+), 1 deletion(-)
Comments
Hi Tomas,
Tomas Volf <~@wolfsden.cz> writes:
> * gnu/services/version-control.scm (<gitolite-rc-file>): Add log-extra field.
> (gitolite-rc-file-compiler): Handle it during configuration file generation.
> * doc/guix.texi (Version Control Services): Document it.
[...]
> +@item @code{log-extra} (default: @code{#f})
> +Whether gitolite should log extra details.
> +
> +For historical reasons, this field defaults to @code{#f}. The default
> +value from gitolite however is @code{1} (written as @code{#t} in this
> +configuration).
Since this is newly introduced, what ar ethe historical reasons given?
Shouldn't it follows the default upstream behavior and default to #t?
Maxim Cournoyer <maxim.cournoyer@gmail.com> writes:
> Hi Tomas,
>
> Tomas Volf <~@wolfsden.cz> writes:
>
>> * gnu/services/version-control.scm (<gitolite-rc-file>): Add log-extra field.
>> (gitolite-rc-file-compiler): Handle it during configuration file generation.
>> * doc/guix.texi (Version Control Services): Document it.
>
> [...]
>
>> +@item @code{log-extra} (default: @code{#f})
>> +Whether gitolite should log extra details.
>> +
>> +For historical reasons, this field defaults to @code{#f}. The default
>> +value from gitolite however is @code{1} (written as @code{#t} in this
>> +configuration).
>
> Since this is newly introduced, what ar ethe historical reasons given?
> Shouldn't it follows the default upstream behavior and default to #t?
The problem is that the upstream default is done using the following
lines in the default configuration file (distributed with gitolite):
--8<---------------cut here---------------start------------->8---
# comment out if you don't need all the extra detail in the logfile
LOG_EXTRA => 1,
--8<---------------cut here---------------end--------------->8---
Since we are generating our own configuration file from scratch, and it
does not include the LOG_EXTRA line, we have already changed the
behavior away from the default one, and I felt it necessary to keep it
that way.
Tomas
@@ -41147,6 +41147,13 @@ Version Control Services
Gitolite allows you to set git config values using the @samp{config}
keyword. This setting allows control over the config keys to accept.
+@item @code{log-extra} (default: @code{#f})
+Whether gitolite should log extra details.
+
+For historical reasons, this field defaults to @code{#f}. The default
+value from gitolite however is @code{1} (written as @code{#t} in this
+configuration).
+
@item @code{roles} (default: @code{'(("READERS" . 1) ("WRITERS" . ))})
Set the role names allowed to be used by users running the perms command.
@@ -60,6 +60,7 @@ (define-module (gnu services version-control)
gitolite-rc-file-umask
gitolite-rc-file-unsafe-pattern
gitolite-rc-file-git-config-keys
+ gitolite-rc-file-log-extra
gitolite-rc-file-roles
gitolite-rc-file-enable
@@ -252,6 +253,8 @@ (define-record-type* <gitolite-rc-file>
(default #f))
(git-config-keys gitolite-rc-file-git-config-keys
(default ""))
+ (log-extra gitolite-rc-file-log-extra
+ (default #f))
(roles gitolite-rc-file-roles
(default '(("READERS" . 1)
("WRITERS" . 1))))
@@ -269,7 +272,8 @@ (define-record-type* <gitolite-rc-file>
(define-gexp-compiler (gitolite-rc-file-compiler
(file <gitolite-rc-file>) system target)
(match-record file <gitolite-rc-file>
- (umask local-code unsafe-pattern git-config-keys roles enable)
+ ( umask local-code unsafe-pattern git-config-keys log-extra
+ roles enable)
(apply text-file* "gitolite.rc"
`("%RC = (\n"
" UMASK => " ,(format #f "~4,'0o" umask) ",\n"
@@ -277,6 +281,9 @@ (define-gexp-compiler (gitolite-rc-file-compiler
,(if local-code
(simple-format #f " LOCAL_CODE => \"~A\",\n" local-code)
"")
+ ,(if log-extra
+ " LOG_EXTRA => 1,\n"
+ "")
" ROLES => {\n"
,@(map (match-lambda
((role . value)