guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

01/08: services: Do not use symbolic links in PulseAudio variables.


From: guix-commits
Subject: 01/08: services: Do not use symbolic links in PulseAudio variables.
Date: Wed, 6 May 2020 16:51:44 -0400 (EDT)

mbakke pushed a commit to branch master
in repository guix.

commit 3ed94ed8c2d1d0befc99ef2740b6fb9f717207db
Author: Marius Bakke <address@hidden>
AuthorDate: Wed May 6 17:48:42 2020 +0200

    services: Do not use symbolic links in PulseAudio variables.
    
    This addresses <https://bugs.gnu.org/40837> by making these configuration
    files more easily accessible within the WebKitGTK sandbox.
    
    * gnu/services/sound.scm (pulseaudio-environment): Move below
    PULSEAUDIO-CONF-ENTRY.  Instantiate PULSE_CONFIG and PULSE_CLIENTCONFIG
    entries directly instead of referring to /etc/pulse.
    (pulseaudio-etc): Do not create /etc/pulse/client.conf and 
/etc/pulse/daemon.conf.
---
 gnu/services/sound.scm | 27 ++++++++++++---------------
 1 file changed, 12 insertions(+), 15 deletions(-)

diff --git a/gnu/services/sound.scm b/gnu/services/sound.scm
index a1c9282..bdf819b 100644
--- a/gnu/services/sound.scm
+++ b/gnu/services/sound.scm
@@ -1,6 +1,7 @@
 ;;; GNU Guix --- Functional package management for GNU
 ;;; Copyright © 2018, 2020 Oleg Pykhalov <address@hidden>
 ;;; Copyright © 2020 Leo Prikler <address@hidden>
+;;; Copyright © 2020 Marius Bakke <address@hidden>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -127,11 +128,6 @@ ctl.!default {
                       (default
                         (file-append pulseaudio "/etc/pulse/system.pa"))))
 
-(define (pulseaudio-environment config)
-  `(;; Define these variables, so that pulseaudio honors /etc.
-    ("PULSE_CONFIG" . "/etc/pulse/daemon.conf")
-    ("PULSE_CLIENTCONFIG" . "/etc/pulse/client.conf")))
-
 (define (pulseaudio-conf-entry arg)
   (match arg
     ((key . value)
@@ -139,21 +135,22 @@ ctl.!default {
     ((? string? _)
      (string-append arg "\n"))))
 
+(define pulseaudio-environment
+  (match-lambda
+    (($ <pulseaudio-configuration> client-conf daemon-conf default-script-file)
+     `(("PULSE_CONFIG" . ,(apply mixed-text-file "daemon.conf"
+                                 "default-script-file = " default-script-file 
"\n"
+                                 (map pulseaudio-conf-entry daemon-conf)))
+       ("PULSE_CLIENTCONFIG" . ,(apply mixed-text-file "client.conf"
+                                       (map pulseaudio-conf-entry 
client-conf)))))))
+
 (define pulseaudio-etc
   (match-lambda
-    (($ <pulseaudio-configuration> client-conf daemon-conf
-                                   default-script-file system-script-file)
+    (($ <pulseaudio-configuration> _ _ default-script-file system-script-file)
      `(("pulse"
         ,(file-union
           "pulse"
-          `(("client.conf"
-             ,(apply mixed-text-file "client.conf"
-                     (map pulseaudio-conf-entry client-conf)))
-            ("daemon.conf"
-             ,(apply mixed-text-file "daemon.conf"
-                     "default-script-file = " default-script-file "\n"
-                     (map pulseaudio-conf-entry daemon-conf)))
-            ("default.pa" ,default-script-file)
+          `(("default.pa" ,default-script-file)
             ("system.pa" ,system-script-file))))))))
 
 (define pulseaudio-service-type



reply via email to

[Prev in Thread] Current Thread [Next in Thread]