[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#63082: [PATCH 09/17] services: mpd: Let Shepherd effect the user/gro
From: |
Maxim Cournoyer |
Subject: |
bug#63082: [PATCH 09/17] services: mpd: Let Shepherd effect the user/group change. |
Date: |
Sat, 29 Apr 2023 12:52:08 -0400 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) |
Hi Bruno,
Bruno Victal <mirai@makinata.eu> 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
- bug#63082: [PATCH 04/17] services: mpd: Obsolete the 'group' field., (continued)
bug#63082: [PATCH 13/17] services: mpd: Fix indentation., Maxim Cournoyer, 2023/04/28
bug#63082: [PATCH 09/17] services: mpd: Let Shepherd effect the user/group change., Maxim Cournoyer, 2023/04/28
bug#63082: [PATCH 14/17] services: mpd: Obsolete 'environment-variables' field., Maxim Cournoyer, 2023/04/28
bug#63082: [PATCH 07/17] services: mpd: Log to syslog by default., Maxim Cournoyer, 2023/04/28
bug#63082: [PATCH 17/17] services: Avoid 'delete' overrides warning in audio module., Maxim Cournoyer, 2023/04/28
bug#63082: [PATCH v2 00/16] Improve out-of-the-box experience with mpd-service-type, Maxim Cournoyer, 2023/04/29