GNU bug report logs -
#62298
[PATCH 0/8] Extensible define-configuration & mpd/mympd service fixes
Previous Next
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 #71 received at 62298 <at> debbugs.gnu.org (full text, mbox):
Am Donnerstag, dem 23.03.2023 um 15:02 +0000 schrieb Bruno Victal:
> If a string value is encountered, it is ignored and a predefined
> variable is used instead. This is essentially a rollback to how it
> used to be before '5c5f0fc1135ff15f9c4adfc5f27eadd9a592b5d1'.
As far as I can see, this is not actually what happens. Don't forget
to update your commit messages :)
> Fixes #61570 <https://issues.guix.gnu.org/61570>.
You only need one newline after this one imho.
> --- a/gnu/services/audio.scm
> +++ b/gnu/services/audio.scm
> @@ -140,6 +140,14 @@ (define (uglify-field-name field-name)
> (define list-of-symbol?
> (list-of symbol?))
>
> +;; helpers for deprecated field types, to be removed later
> +(define %lazy-group (make-symbol "%lazy-group"))
> +
> +(define (inject-group-into-user user group)
> + (user-account
> + (inherit user)
> + (group (user-group-name group))))
> +
>
> ;;;
> ;;; MPD
> @@ -559,17 +620,11 @@ (define (mpd-shepherd-service config)
>
> (define (mpd-accounts config)
> (match-record config <mpd-configuration> (user group)
> - (list (user-group
> - (name group)
> - (system? #t))
> - (user-account
> - (name user)
> - (group group)
> - (system? #t)
> - (comment "Music Player Daemon (MPD) user")
> - ;; MPD can use $HOME (or $XDG_CONFIG_HOME) to place its
> data
> - (home-directory "/var/lib/mpd")
> - (shell (file-append shadow "/sbin/nologin"))))))
> + ;; TODO: deprecation code, to be removed
> + (let ((user (if (eq? (user-account-group user) %lazy-group)
> + (inject-group-into-user user group)
> + user)))
> + (list user group))))
A little over-engineered, but works for me :)
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.