Merge ~alfonsosanchezbeato/snappy-hwe-snaps/+git/pulseaudio:use-layouts into ~snappy-hwe-team/snappy-hwe-snaps/+git/pulseaudio:master

Proposed by Alfonso Sanchez-Beato
Status: Merged
Approved by: Alfonso Sanchez-Beato
Approved revision: 9252467b5baf5e292e051d9dc2a8e9bb396cab2c
Merged at revision: ba7c14170389c7f5cfef072ae018f55171675295
Proposed branch: ~alfonsosanchezbeato/snappy-hwe-snaps/+git/pulseaudio:use-layouts
Merge into: ~snappy-hwe-team/snappy-hwe-snaps/+git/pulseaudio:master
Diff against target: 262 lines (+69/-76)
3 files modified
bin/client-wrapper (+1/-4)
bin/pulseaudio (+9/-12)
snapcraft.yaml (+59/-60)
Reviewer Review Type Date Requested Status
System Enablement Bot continuous-integration Approve
Review via email: mp+388225@code.launchpad.net

Commit message

Put back pulseaudio plug
Include only needed libraries in the snap
bin/pulseaudio: fix some shellcheck warnings
Use command chain for the wrapper
Use layouts and drop patches
Put back pulseaudio service slot
Add additional plugs to support ALSA fully
Enable dbus and add bluez plug
Move to audio-playback, audio-record interfaces instead of pulseaudio

Description of the change

Put back pulseaudio plug
Include only needed libraries in the snap
bin/pulseaudio: fix some shellcheck warnings
Use command chain for the wrapper
Use layouts and drop patches
Put back pulseaudio service slot
Add additional plugs to support ALSA fully
Enable dbus and add bluez plug
Move to audio-playback, audio-record interfaces instead of pulseaudio

To post a comment you must log in.

PASSED: Successfully build documentation, rev: 9252467b5baf5e292e051d9dc2a8e9bb396cab2c

Generated documentation is available at https://jenkins.canonical.com/system-enablement/job/snappy-hwe-snaps-snap-docs/1350/

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/bin/client-wrapper b/bin/client-wrapper
2index 255187c..a75baeb 100755
3--- a/bin/client-wrapper
4+++ b/bin/client-wrapper
5@@ -19,7 +19,6 @@ if [ "$(id -u)" -ne 0 ]; then
6 exit 1
7 fi
8
9-export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$SNAP/usr/lib/pulseaudio:$SNAP/usr/lib/pulse-8.0/modules/
10 export PULSE_CLIENTCONFIG=$SNAP/etc/pulse/client.conf
11 export PULSE_RUNTIME_PATH=/var/run/pulse
12 export PULSE_SYSTEM=1
13@@ -29,6 +28,4 @@ unset XDG_RUNTIME_DIR
14 export HOME=$SNAP_DATA/home
15 mkdir -p "$HOME"
16
17-command="$SNAP/$1"
18-shift
19-exec "$command" "$@"
20+exec "$@"
21diff --git a/bin/pulseaudio b/bin/pulseaudio
22index 8b9a797..ea17f08 100755
23--- a/bin/pulseaudio
24+++ b/bin/pulseaudio
25@@ -1,8 +1,5 @@
26-#!/bin/sh
27-set -e
28-set -x
29+#!/bin/bash -ex
30
31-export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$SNAP/usr/lib/pulseaudio:$SNAP/usr/lib/pulse-8.0/modules/
32 export PULSE_RUNTIME_PATH=/var/run/pulse
33 export PULSE_STATE_PATH=$SNAP_DATA/state
34 export ALSA_CONFIG_UCM=$SNAP/usr/share/alsa/ucm
35@@ -10,20 +7,20 @@ export ALSA_CONFIG_TPLG=$SNAP/usr/share/alsa/topology
36 export ALSA_CONFIG_PATH=$SNAP/usr/share/alsa/alsa.conf
37 export ALSA_MIXER_SIMPLE=$SNAP/usr/share/alsa/smixer.conf
38
39-mkdir -p $PULSE_STATE_PATH
40+mkdir -p "$PULSE_STATE_PATH"
41
42-EXTRA_ARGS=
43+EXTRA_ARGS=()
44
45-if [ -e $SNAP_DATA/config/debug ] ; then
46- EXTRA_ARGS="$EXTRA_ARGS -vvvv"
47+if [ -e "$SNAP_DATA"/config/debug ] ; then
48+ EXTRA_ARGS+=(-vvvv)
49 export LIBASOUND_DEBUG=1
50 fi
51
52-exec $SNAP/usr/bin/pulseaudio \
53+exec "$SNAP"/usr/bin/pulseaudio \
54 --exit-idle-time=-1 \
55 --disallow-exit=yes \
56 --system \
57- -F $SNAP/etc/pulse/default.pa \
58- -p $SNAP/usr/lib/pulse-8.0/modules \
59+ -F "$SNAP"/etc/pulse/default.pa \
60+ -p "$SNAP"/usr/lib/pulse-8.0/modules \
61 -n \
62- $EXTRA_ARGS
63+ "${EXTRA_ARGS[@]}"
64diff --git a/snapcraft.yaml b/snapcraft.yaml
65index 34e50a4..6c8967c 100644
66--- a/snapcraft.yaml
67+++ b/snapcraft.yaml
68@@ -16,26 +16,25 @@ apps:
69 pulseaudio:
70 command: bin/pulseaudio
71 daemon: simple
72- plugs: [network, network-bind]
73- slots: [service]
74+ plugs: [network, network-bind, bluez, hardware-observe, alsa]
75+ slots: [service, audio-playback, audio-record]
76 pactl:
77- command: bin/client-wrapper usr/bin/pactl
78- plugs: [client, network]
79- # NOTE: This is deprecated with snapd 2.25 but needs to stay to
80- # guarantee all clients are updated correctly.
81+ command-chain: [bin/client-wrapper]
82+ command: usr/bin/pactl
83+ plugs: [client, playback, record, network]
84 paplay:
85- command: bin/client-wrapper usr/bin/paplay
86- plugs: [client, home, network]
87- # NOTE: This is deprecated with snapd 2.25 but needs to stay to
88- # guarantee all clients are updated correctly.
89+ command-chain: [bin/client-wrapper]
90+ command: usr/bin/paplay
91+ plugs: [client, playback, home, network]
92 parec:
93- command: bin/client-wrapper usr/bin/parec
94- plugs: [client, home, network]
95- # NOTE: This is deprecated with snapd 2.25 but needs to stay to
96- # guarantee all clients are updated correctly.
97+ command-chain: [bin/client-wrapper]
98+ command: usr/bin/parec
99+ plugs: [client, playback, record, home, network]
100 config:
101 command: bin/config
102
103+# For compatibility reasons, we will still offer the pulseaudio
104+# slot, so older snaps can connect to it.
105 slots:
106 service:
107 interface: pulseaudio
108@@ -43,8 +42,23 @@ slots:
109 plugs:
110 client:
111 interface: pulseaudio
112+ playback:
113+ interface: audio-playback
114+ record:
115+ interface: audio-record
116+
117+layout:
118+ /var/lib/pulse:
119+ bind: $SNAP_DATA
120+ /usr/lib/pulse-8.0:
121+ symlink: $SNAP/usr/lib/pulse-8.0
122+ /usr/share/pulseaudio:
123+ symlink: $SNAP/usr/share/pulseaudio
124+ /usr/share/alsa:
125+ symlink: $SNAP/usr/share/alsa
126
127 parts:
128+
129 pulseaudio-common:
130 source: .
131 plugin: nil
132@@ -56,46 +70,14 @@ parts:
133 done
134 cp -av data/copyright $SNAPCRAFT_PART_INSTALL/usr/share/doc/pulseaudio/
135
136- alsa-lib:
137- plugin: autotools
138-
139- source: https://git.launchpad.net/~snappy-hwe-team/snappy-hwe-snaps/+git/pulseaudio
140- source-type: git
141- source-branch: alsa-lib/xenial/1.1.0
142-
143- configflags:
144- - --prefix=/usr
145- - --sysconfdir=/etc
146- - --libexec=/usr/lib
147- - --libdir=/usr/lib
148- - --localstatedir=/var
149- - --with-plugindir=/usr/lib/alsa-lib
150- - --disable-silent-rules
151- - --disable-static
152- - --disable-python
153-
154- filesets:
155- libasound2:
156- - usr/lib/libasound.so*
157- - usr/lib/alsa-lib/*
158- - usr/share/alsa/*
159-
160- stage:
161- - $libasound2
162-
163-
164 pulseaudio:
165- after:
166- - alsa-lib
167-
168 plugin: autotools
169-
170- source: https://git.launchpad.net/~snappy-hwe-team/snappy-hwe-snaps/+git/pulseaudio
171+ source: https://git.launchpad.net/ubuntu/+source/pulseaudio
172 source-type: git
173- source-branch: pulseaudio/8.0
174-
175+ source-branch: applied/ubuntu/xenial-updates
176 build-packages:
177 - intltool
178+ - libapparmor-dev
179 - libasound2-dev
180 - libdbus-1-dev
181 - libjson-c-dev
182@@ -105,26 +87,26 @@ parts:
183 - libwebrtc-audio-processing-dev
184 - libltdl-dev
185 - libsndfile1-dev
186- - libx11-xcb-dev
187- - libx11-dev
188 - libtdb-dev
189 - libudev-dev
190 - libasyncns-dev
191- - libxcb1-dev
192 - libsbc-dev
193-
194+ - libsnapd-glib-dev
195 stage-packages:
196+ - libapparmor1
197+ - libasound2
198+ - libasound2-data
199 - libasyncns0
200 - libflac8
201 - libltdl7
202 - libogg0
203 - libsbc1
204+ - libsnapd-glib1
205 - libsndfile1
206 - libspeexdsp1
207 - libtdb1
208 - libvorbis0a
209 - libvorbisenc2
210-
211 configflags:
212 - --prefix=/usr
213 - --sysconfdir=/etc
214@@ -143,14 +125,12 @@ parts:
215 - --disable-systemd-login
216 - --without-caps
217 - --disable-webrtc-aec
218- - --disable-dbus
219 - --disable-oss-output
220 - --disable-oss-wrapper
221 - --disable-jack
222 - --disable-x11
223 - --with-system-user=root
224 - --with-system-group=root
225-
226 filesets:
227 wanted:
228 - etc/*
229@@ -165,10 +145,29 @@ parts:
230 - usr/lib/libpulse.so*
231 - usr/lib/pulse-8.0/*
232 - usr/lib/pulseaudio/*.so
233- - usr/lib/*/lib*
234- - usr/share/doc
235+ - usr/lib/*/libasound*
236+ - usr/lib/*/libltdl*
237+ - usr/lib/*/libsndfile*
238+ - usr/lib/*/liborc*
239+ - usr/lib/*/libsbc*
240+ - usr/lib/*/libtdb*
241+ - usr/lib/*/libspeexdsp*
242+ - usr/lib/*/libasyncns*
243+ - usr/lib/*/libFLAC*
244+ - usr/lib/*/libvorbis*
245+ - usr/lib/*/libogg*
246+ - usr/share/alsa/*
247+ - usr/share/doc/libasound2*
248+ - usr/share/doc/libltdl*
249+ - usr/share/doc/libsbc*
250+ - usr/share/doc/libsndfile*
251+ - usr/share/doc/liborc*
252+ - usr/share/doc/libtdb*
253+ - usr/share/doc/libspeexdsp*
254+ - usr/share/doc/libasyncns*
255+ - usr/share/doc/libFLAC*
256+ - usr/share/doc/libvorbis*
257+ - usr/share/doc/libogg*
258 - usr/share/pulseaudio/*
259-
260 stage:
261 - $wanted
262-

Subscribers

People subscribed via source and target branches