Subject: Re: [bug#77186] [PATCH v2 06/13] services: gitolite-rc-file: Export default value for enable.

From: Maxim Cournoyer <[email-masked]>
Date: Thu, 27 Mar 2025 14:45:34 +0900

Hi,

Tomas Volf <[email-masked]> writes:

> * gnu/services/version-control.scm (gitolite-rc-file-default-enable): New
> exported variable.
> (gitolite-rc-file-compiler)[enable]: Use it.
>
> Change-Id: Ie6326ff69f3d454d96db6629dd5387757567d68f
> ---
>  gnu/services/version-control.scm | 22 +++++++++++++---------
>  1 file changed, 13 insertions(+), 9 deletions(-)
>
> diff --git a/gnu/services/version-control.scm b/gnu/services/version-control.scm
> index b93cb9f590..87f134cb23 100644
> --- a/gnu/services/version-control.scm
> +++ b/gnu/services/version-control.scm
> @@ -65,6 +65,7 @@ (define-module (gnu services version-control)
>              gitolite-rc-file-roles
>              gitolite-rc-file-enable
>              gitolite-rc-file-extra-content
> +            gitolite-rc-file-default-enable
>  
>              gitolite-service-type
>  
> @@ -244,6 +245,17 @@ (define* (git-http-nginx-location-configuration #:optional
>  ;;; Gitolite
>  ;;;
>  
> +(define gitolite-rc-file-default-enable
> +  '("help"
> +    "desc"
> +    "info"
> +    "perms"
> +    "writable"
> +    "ssh-authkeys"
> +    "git-config"
> +    "daemon"
> +    "gitweb"))
> +
>  (define-record-type* <gitolite-rc-file>
>    gitolite-rc-file make-gitolite-rc-file
>    gitolite-rc-file?
> @@ -263,15 +275,7 @@ (define-record-type* <gitolite-rc-file>
>                     (default '(("READERS" . 1)
>                                ("WRITERS" . 1))))
>    (enable          gitolite-rc-file-enable
> -                   (default '("help"
> -                              "desc"
> -                              "info"
> -                              "perms"
> -                              "writable"
> -                              "ssh-authkeys"
> -                              "git-config"
> -                              "daemon"
> -                              "gitweb")))
> +                   (default gitolite-rc-file-default-enable))

This field should control the values against a set of all valid values,
ideally.

Another ideality: this configuration should preferably use
define-configuration, where instead of #f value we could have
maybe-values that when unspecified are omitted entirely, leaving the
application to use its own defaults.

Can be made in a different series though, as that's new work I'm simply
suggesting :-).

-- 
Thanks,
Maxim