GNU bug report logs - #62298
[PATCH 0/8] Extensible define-configuration & mpd/mympd service fixes

Previous Next

Package: guix-patches;

Reported by: Bruno Victal <mirai <at> makinata.eu>

Date: Mon, 20 Mar 2023 16:47:01 UTC

Severity: normal

Tags: patch

Done: Liliana Marie Prikler <liliana.prikler <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


Message #74 received at 62298 <at> debbugs.gnu.org (full text, mbox):

From: Liliana Marie Prikler <liliana.prikler <at> gmail.com>
To: Bruno Victal <mirai <at> makinata.eu>, 62298 <at> debbugs.gnu.org
Cc: ludo <at> gnu.org, maxim.cournoyer <at> gmail.com
Subject: Re: [PATCH v2 8/8] services: mympd: Use user-account (resp.
 user-group) for user (resp. group) fields.
Date: Thu, 23 Mar 2023 20:19:24 +0100
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.

Cheers


This bug report was last modified 2 years and 51 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.