[gnome-build-meta] project.conf: Provide access to pulseaudio from within `bst shell`
- From: Tristan Van Berkom <tvb src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-build-meta] project.conf: Provide access to pulseaudio from within `bst shell`
- Date: Tue, 6 Mar 2018 12:58:48 +0000 (UTC)
commit e51367ef5e3ec5b7cd9d253de8bf4fb45629b7d4
Author: Tristan Van Berkom <tristan vanberkom codethink co uk>
Date: Tue Mar 6 20:17:55 2018 +0900
project.conf: Provide access to pulseaudio from within `bst shell`
This leverages some new features to expose the host XDG_RUNTIME_DIR
into the runtime where the pulseaudio socket will reside, and to
set the PULSE_SERVER environment so that applications using
pulseaudio will be able to talk to the host side audio server.
Also, with format version 4 we remove `environment-inherit` as it
is redundant with the newly added `environment` configuration.
project.conf | 23 ++++++++++++++++++-----
1 file changed, 18 insertions(+), 5 deletions(-)
---
diff --git a/project.conf b/project.conf
index db1037d..9a4056e 100644
--- a/project.conf
+++ b/project.conf
@@ -2,7 +2,7 @@
name: gnome
# The minimum base BuildStream format
-format-version: 3
+format-version: 4
# Where elements are stored
element-path: elements
@@ -117,10 +117,18 @@ shell:
command: [ 'bash', '--noprofile', '--norc', '-i' ]
# Some environment variables to inherit from the host environment
- environment-inherit:
- - LANG
- - DISPLAY
- - DBUS_SESSION_BUS_ADDRESS
+ environment:
+ LANG: '$LANG'
+ DISPLAY: '$DISPLAY'
+ DBUS_SESSION_BUS_ADDRESS: '$DBUS_SESSION_BUS_ADDRESS'
+ XDG_RUNTIME_DIR: '$XDG_RUNTIME_DIR'
+
+ # We dont automatically mount the user's home, but this makes things work
+ # better if the user decides to mount in their homedir explicitly with `bst shell`
+ HOME: '$HOME'
+
+ # Inform applications which use pulseaudio of the server socket
+ PULSE_SERVER: 'unix:${XDG_RUNTIME_DIR}/pulse/native'
# Some things to mount into the sandbox
host-files:
@@ -149,3 +157,8 @@ shell:
# Allow access to sysfs, needed for local device discovery
- '/sys'
+
+ # Allow access to the user runtime directory, this
+ # will include the pulseaudio socket along with some
+ # other things.
+ - '${XDG_RUNTIME_DIR}'
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]