mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2024-12-24 05:18:07 -05:00
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.
This commit is contained in:
parent
e3bf2a66a2
commit
3ed94ed8c2
1 changed files with 12 additions and 15 deletions
|
@ -1,6 +1,7 @@
|
||||||
;;; GNU Guix --- Functional package management for GNU
|
;;; GNU Guix --- Functional package management for GNU
|
||||||
;;; Copyright © 2018, 2020 Oleg Pykhalov <go.wigust@gmail.com>
|
;;; Copyright © 2018, 2020 Oleg Pykhalov <go.wigust@gmail.com>
|
||||||
;;; Copyright © 2020 Leo Prikler <leo.prikler@student.tugraz.at>
|
;;; Copyright © 2020 Leo Prikler <leo.prikler@student.tugraz.at>
|
||||||
|
;;; Copyright © 2020 Marius Bakke <mbakke@fastmail.com>
|
||||||
;;;
|
;;;
|
||||||
;;; This file is part of GNU Guix.
|
;;; This file is part of GNU Guix.
|
||||||
;;;
|
;;;
|
||||||
|
@ -127,11 +128,6 @@ (define-record-type* <pulseaudio-configuration>
|
||||||
(default
|
(default
|
||||||
(file-append pulseaudio "/etc/pulse/system.pa"))))
|
(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)
|
(define (pulseaudio-conf-entry arg)
|
||||||
(match arg
|
(match arg
|
||||||
((key . value)
|
((key . value)
|
||||||
|
@ -139,21 +135,22 @@ (define (pulseaudio-conf-entry arg)
|
||||||
((? string? _)
|
((? string? _)
|
||||||
(string-append arg "\n"))))
|
(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
|
(define pulseaudio-etc
|
||||||
(match-lambda
|
(match-lambda
|
||||||
(($ <pulseaudio-configuration> client-conf daemon-conf
|
(($ <pulseaudio-configuration> _ _ default-script-file system-script-file)
|
||||||
default-script-file system-script-file)
|
|
||||||
`(("pulse"
|
`(("pulse"
|
||||||
,(file-union
|
,(file-union
|
||||||
"pulse"
|
"pulse"
|
||||||
`(("client.conf"
|
`(("default.pa" ,default-script-file)
|
||||||
,(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)
|
|
||||||
("system.pa" ,system-script-file))))))))
|
("system.pa" ,system-script-file))))))))
|
||||||
|
|
||||||
(define pulseaudio-service-type
|
(define pulseaudio-service-type
|
||||||
|
|
Loading…
Reference in a new issue