unofficial mirror of bug-guix@gnu.org 
 help / color / mirror / code / Atom feed
* bug#61570: Backward incompatible changes in mpd-service-type
@ 2023-02-17 12:53 Maxim Cournoyer
  2023-02-17 15:33 ` Bruno Victal
                   ` (2 more replies)
  0 siblings, 3 replies; 9+ messages in thread
From: Maxim Cournoyer @ 2023-02-17 12:53 UTC (permalink / raw)
  To: 61570; +Cc: Liliana Prikler, Bruno Victal

Hi!

I wanted to note some findings regarding the improved
mpd-configuration/mdp-service-type (thanks!)
(5c5f0fc1135ff15f9c4adfc5f27eadd9a592b5d1, "services: mpd: Refactor MPD
service.") after having reconfigured my machine yesterday.  I've noted
these two backward incompatible changes:

1. the mixer type must now be a string instead of a symbol, and takes
"none" instead of 'null for the null mixer:

--8<---------------cut here---------------start------------->8---
@@ -239,7 +239,7 @@
                        (mpd-output
                         (name "streaming")
                         (type "httpd")
-                        (mixer-type 'null)
+                        (mixer-type "none")
                         (extra-options
                          `((encoder . "lame")
                            (port    . "6601")
--8<---------------cut here---------------end--------------->8---

It'd be nice if there was some deprecation warning and automatic healing
code for now.  The doc should also be updated, because it still mention
the @code{null} value:

--8<---------------cut here---------------start------------->8---
     ‘mixer-type’ (default: ‘"none"’) (type: string)
          This field accepts a string that specifies which mixer should
          be used for this audio output: the ‘hardware’ mixer, the
          ‘software’ mixer, the ‘null’ mixer (allows setting the volume,
          but with no effect; this can be used as a trick to implement
          an external mixer External Mixer) or no mixer (‘none’).
--8<---------------cut here---------------end--------------->8---

2.  The MPD user appears to be created instead of using an existing
one.  I was using my own account, like this:

--8<---------------cut here---------------start------------->8---
      (service mpd-service-type
               (mpd-configuration
                (user "maxim")
                (address "0.0.0.0")
                (outputs
                 (list (mpd-output)
                       (mpd-output
                        (name "streaming")
                        (type "httpd")
                        (mixer-type "none")
                        (extra-options
                         `((encoder . "lame")
                           (port    . "6601")
                           (bitrate . "320"))))))))
--8<---------------cut here---------------end--------------->8---

and 'guix system reconfigure' is now warning that a user is defined
twice, and my user description following reconfiguration is: "Music
Player Daemon (MPD) user" :-).

Perhaps it should check if a user already exists and not add it if it
does?  Else an error rather than a warning when multiple same-name users
are defined would be more appropriate, I think.

-- 
Thanks,
Maxim




^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2023-04-02 14:43 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-02-17 12:53 bug#61570: Backward incompatible changes in mpd-service-type Maxim Cournoyer
2023-02-17 15:33 ` Bruno Victal
2023-02-17 18:06   ` Liliana Marie Prikler
2023-03-07  1:13     ` Maxim Cournoyer
2023-03-07  5:31       ` Liliana Marie Prikler
2023-02-18 17:42 ` bug#61570: [PATCH] services: mpd: Use proper records Liliana Marie Prikler
2023-02-19 13:54   ` Bruno Victal
2023-02-25 20:13     ` Maxim Cournoyer
2023-04-02 14:42 ` bug#61570: control-msg Bruno Victal

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).