[pulseaudio] 01/01: Update snapcraft.yaml to latest 16.04 images + enable alsa backend

David Henningsson diwic-guest at moszumanska.debian.org
Thu Feb 11 14:13:42 UTC 2016


This is an automated email from the git hooks/post-receive script.

diwic-guest pushed a commit to branch ubuntu-snappy
in repository pulseaudio.

commit 68803794d7b87ba79ffb8148574213638b8c8e48
Author: David Henningsson <david.henningsson at canonical.com>
Date:   Thu Feb 11 15:10:46 2016 +0100

    Update snapcraft.yaml to latest 16.04 images + enable alsa backend
    
    Signed-off-by: David Henningsson <david.henningsson at canonical.com>
---
 debian/patches/0002-snappy-paths.patch | 21 +++++++++++++++++++++
 debian/patches/series                  |  1 +
 snapcraft.yaml                         | 19 ++++++++++++++++---
 3 files changed, 38 insertions(+), 3 deletions(-)

diff --git a/debian/patches/0002-snappy-paths.patch b/debian/patches/0002-snappy-paths.patch
new file mode 100644
index 0000000..69659c8
--- /dev/null
+++ b/debian/patches/0002-snappy-paths.patch
@@ -0,0 +1,21 @@
+Index: pkg-pulseaudio/src/pulsecore/core-util.c
+===================================================================
+--- pkg-pulseaudio.orig/src/pulsecore/core-util.c	2016-02-11 11:14:31.000000000 +0100
++++ pkg-pulseaudio/src/pulsecore/core-util.c	2016-02-11 11:39:27.866826432 +0100
+@@ -3343,6 +3343,16 @@
+ char* pa_maybe_prefix_path(const char *path, const char *prefix) {
+     pa_assert(path);
+ 
++/* Ubuntu Snappy hack - if our directory starts with /share, then add the
++   snap directory first */
++
++    if (pa_startswith(prefix, "/share")) {
++        const char *t = getenv("SNAP");
++        pa_log_debug("Ubuntu snappy prefix is: %s", t);
++        if (t)
++            return pa_sprintf_malloc("%s%s" PA_PATH_SEP "%s", t, prefix, path);
++    }
++
+     if (pa_is_path_absolute(path))
+         return pa_xstrdup(path);
+ 
diff --git a/debian/patches/series b/debian/patches/series
index 4e3ec1f..be9de78 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,4 +1,5 @@
 # Snappy patches
+0002-snappy-paths.patch
 0001-no-personality.patch
 
 # Ubuntu/Debian specific config/fixes
diff --git a/snapcraft.yaml b/snapcraft.yaml
index 8296b34..9dacf9d 100644
--- a/snapcraft.yaml
+++ b/snapcraft.yaml
@@ -5,17 +5,30 @@ description: Contains PulseAudio and its dependencies, to
   enable apps to play back and record sound by talking to
   PulseAudio.
 
+# sudo snappy hw-assign pulseaudio.sideload /dev/snd/controlC0
+# sudo snappy hw-assign pulseaudio.sideload /dev/snd/pcmC0D0c
+# sudo snappy hw-assign pulseaudio.sideload /dev/snd/pcmC0D0p
+# sudo snappy hw-assign pulseaudio.sideload /dev/snd/timer
+# export ALSA_RUNTIME_PATH=/snap/pulseaudio.sideload/current/usr/share/alsa/alsa.conf
+
 apps:
   pulseaudio:
     command: pulseaudio -vvvvnF $SNAP/etc/pulse/default.pa -p $SNAP/lib
+    uses: [paserver-permissions]
+
+uses:
+  paserver-permissions:
+    type: migration-skill
     security-override:
       syscalls: [setpriority, bind, listen]
 # listen needed to listen for client connections
-# /run/udev (and bind) needed for scanning for sound cards
+# /run/udev/data (and bind) needed for scanning for sound cards
 # /dev/snd needed for accessing the sound cards
 # /run/dbus/system_bus_socket needed for Bluez 5
-      read-paths: [/run/udev/data/*, /dev/snd/control*, /dev/snd/pcm*]
-      write-paths: [/dev/snd/control*, /dev/snd/pcm*]
+# /run/user/<uid>/pulse - that's where clients connect
+      read-paths: [/run/udev/data/*, /dev/snd/control*, /dev/snd/pcm*, /run/user/*/pulse, /run/user/*/pulse/**]
+      write-paths: [/dev/snd/control*, /dev/snd/pcm*, /run/user/*/pulse, /run/user/*/pulse/**]
+      socket: [/run/user/*/pulse/native]
 
 parts:
   pulseaudio:

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-pulseaudio/pulseaudio.git



More information about the pkg-pulseaudio-devel mailing list