[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug#62298] [PATCH v2 8/8] services: mympd: Use user-account (resp. user
From: |
Bruno Victal |
Subject: |
[bug#62298] [PATCH v2 8/8] services: mympd: Use user-account (resp. user-group) for user (resp. group) fields. |
Date: |
Sat, 25 Mar 2023 00:39:46 +0000 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.8.0 |
On 2023-03-23 19:19, Liliana Marie Prikler wrote:
> Am Donnerstag, dem 23.03.2023 um 15:02 +0000 schrieb Bruno Victal:
>> +(define %mympd-user
>> + (user-account
>> + (name "mympd")
>> + (group "mympd")
>> + (system? #t)
>> + (comment "myMPD user")
>> + (home-directory "/var/empty")
>> + (shell (file-append shadow "/sbin/nologin"))))
>> +
>> +(define %mympd-group
>> + (user-group
>> + (name "mympd")
>> + (system? #t)))
>> +
>> +;;; TODO: procedures for unsupported value types, to be removed.
>> +(define (mympd-user-sanitizer value)
>> + (cond ((user-account? value) value)
>> + ((string? value)
>> + (warning (G_ "string value for 'user' is not supported, use
>> \
>> +user-account instead~%"))
>> + (user-account
>> + (inherit %mympd-user)
>> + (name value)
>> + ;; XXX: this is to be lazily substituted in (…-accounts)
>> + ;; with the value from 'group'.
>> + (group %lazy-group)))
>> + (else
>> + (configuration-field-error #f 'user value))))
> I think an in-place creation of the user and group might make more
> sense than defining a dummy value for inheritance purposes. Same
> probably also applies to the MPD service patch.
Though already replied to in private via IRC, to leave this clarified for other
reviewers,
these are not dummy values. They're the default values that the service will use
if none are specified. The inheritance happened to be a bonus here.
Cheers,
Bruno
- [bug#62298] [PATCH v2 1/8] services: configuration: Add user-defined sanitizer support., (continued)
- [bug#62298] [PATCH v2 1/8] services: configuration: Add user-defined sanitizer support., Bruno Victal, 2023/03/23
- [bug#62298] [PATCH v2 4/8] services: mympd: Require 'syslog service when configured to log to syslog., Bruno Victal, 2023/03/23
- [bug#62298] [PATCH v2 2/8] services: replace bare serializers with (serializer ...), Bruno Victal, 2023/03/23
- [bug#62298] [PATCH v2 6/8] services: mpd: Set PulseAudio related variables as default value for environment-variables field., Bruno Victal, 2023/03/23
- [bug#62298] [PATCH v2 3/8] services: audio: remove redundant list-of-string? predicate., Bruno Victal, 2023/03/23
- [bug#62298] [PATCH v2 8/8] services: mympd: Use user-account (resp. user-group) for user (resp. group) fields., Bruno Victal, 2023/03/23
- [bug#62298] [PATCH v2 8/8] services: mympd: Use user-account (resp. user-group) for user (resp. group) fields., Maxim Cournoyer, 2023/03/24
- [bug#62298] [PATCH v2 8/8] services: mympd: Use user-account (resp. user-group) for user (resp. group) fields., Bruno Victal, 2023/03/24
- [bug#62298] [PATCH v2 8/8] services: mympd: Use user-account (resp. user-group) for user (resp. group) fields., Liliana Marie Prikler, 2023/03/25
[bug#62298] [PATCH v2 7/8] services: mpd: Use user-account (resp. user-group) for user (resp. group) fields., Bruno Victal, 2023/03/23
[bug#62298] [PATCH v2 5/8] services: mpd: Fix unintentional API breakage for mixer-type field., Bruno Victal, 2023/03/23
[bug#62298] [PATCH v2 1/8] services: configuration: Add user-defined sanitizer support., Liliana Marie Prikler, 2023/03/23
[bug#62298] [PATCH v2 1/8] services: configuration: Add user-defined sanitizer support., Maxim Cournoyer, 2023/03/24