Subject: Re: bug#63082: [PATCH 09/17] services: mpd: Let Shepherd effect the user/group change.

From: Maxim Cournoyer <[email-masked]>
Date: Sat, 29 Apr 2023 12:52:08 -0400

Hi Bruno,

Bruno Victal <[email-masked]> writes:

[...]

>> +  ;; Note: The user and its group are not serialized, otherwise MPD would
>> +  ;; attempt to switch the user/group itself.  The task of switching the
>> +  ;; user/group is left to Shepherd instead.
>>    (user
>>     (user-account %mpd-user)
>> -   "The user to run mpd as."
>> -   (sanitizer mpd-user-sanitizer))
>> +   "The user to run @command{mpd} as."
>> +   (sanitizer mpd-user-sanitizer)
>> +   (serializer empty-serializer))
>
> Simply write empty-serializer after sanitizer instead.

Done, and for other commits too, though both works and the procedure
version appeared more consistent/readable to my eyes.

>>                       "--cachedir" #$cache-directory)
>>                     #:environment-variables (list #$log-level*)
>> -                   #:log-file #$(if (string? log-to) log-to #f))))
>> +                   #:log-file #$(if (string? log-to) log-to #f)
>
> Generic advice but how about this instead?
>
> #$@(if (string? log-to) `(#:log-file ,log-to) '())
>
> It's cleaner to not explicitly set the keyword argument values when they're not used.

They are used, but set to #f :-).  I have a slight preference for the
current version, which I find more readable.

-- 
Thanks,
Maxim