Subject: Re: [bug#30817] [PATCH] openssh-service: export AcceptEnv option

From: [email-masked] (Ludovic Courtès)
Date: Thu, 15 Mar 2018 18:13:37 +0100

Hello,

Martin Castillo <[email-masked]> skribis:

> This patch makes AcceptEnv configurable from config.scm.

Nice!

> Questions:
> Is the dash in environment-variables correct?

No, just “environment variables”.

> Why are there always two spaces after a period?

It’s inherited from an (old) convention honored by Emacs notably that
mimics English typographic conventions regarding spacing after
end-of-sentence periods.

> Is @option the correct annotation for AcceptEnv?

@option is normally for command-line option, so I’d just use @code.

> From e64e4a908936c5aec0c026324cc08be12edb8ec1 Mon Sep 17 00:00:00 2001
> From: Martin Castillo <[email-masked]>
> Date: Tue, 13 Mar 2018 16:40:55 +0100
> Subject: [PATCH] services: openssh: Add 'AcceptEnv' field.
>
> * gnu/services/ssh.scm (<openssh-configuration>)[AcceptEnv]: New field.
> (openssh-config-file): Honor 'AcceptEnv'.
> * doc/guix.texi (Networking Services): Document it.

Overall the patch LGTM, so the comments below are really nitpicking:

> +@item @code{accept-env} (default: @code{'()})
> +List of strings describing which environment-variables may be exported.
> +
> +Each string gets on its own line.  See the @option{AcceptEnv} option in
> +@code{sshd_config(5)}.

I’d write “… in @code{man sshd_config(5)}.”

> +@example
> +(service openssh-service-type
> +         (openssh-configuration
> +		  (accept-env '("COLORTERM"))))
> +@end example

Please add a sentence describing the example, even if it seems obvious.

> +  ;; list of strings
> +  (accept-env            openssh-configuration-accept-env
> +                         (default '()))

We usually avoid abbreviations, so that would be “accepted-environment”
(see <https://gnu.org/software/guix/manual/html_node/Formatting-Code.html>).

Could you send an updated patch?

Thanks,
Ludo’.