Merge ~morphis/snappy-hwe-snaps/+git/pulseaudio:bug/enable-proposed into ~snappy-hwe-team/snappy-hwe-snaps/+git/se-test-tools:master

Proposed by Simon Fels
Status: Superseded
Proposed branch: ~morphis/snappy-hwe-snaps/+git/pulseaudio:bug/enable-proposed
Merge into: ~snappy-hwe-team/snappy-hwe-snaps/+git/se-test-tools:master
Diff against target: 1658 lines (+1479/-0) (has conflicts)
26 files modified
MAINTAINERS (+4/-0)
README.md (+6/-0)
bin/config (+70/-0)
bin/pactl (+28/-0)
bin/paplay (+28/-0)
bin/parec (+28/-0)
bin/pulseaudio (+28/-0)
data/copyright (+604/-0)
run-tests.sh (+84/-0)
snapcraft.yaml (+152/-0)
spread.yaml (+50/-0)
tests/image/README.md (+7/-0)
tests/image/create-image.sh (+157/-0)
tests/image/pc-model.json (+11/-0)
tests/image/pc.model (+21/-0)
tests/image/test-user-assertion.json (+13/-0)
tests/image/test-user.assertion (+25/-0)
tests/lib/prepare-all.sh (+35/-0)
tests/lib/prepare-each.sh (+6/-0)
tests/lib/prepare.sh (+51/-0)
tests/lib/restore-each.sh (+22/-0)
tests/lib/snap-names.sh (+7/-0)
tests/lib/utilities.sh (+9/-0)
tests/main/installation/task.yaml (+16/-0)
tests/main/modules-loaded/task.yaml (+11/-0)
tests/main/pactl/task.yaml (+6/-0)
Conflict in MAINTAINERS
Conflict in README.md
Conflict in snapcraft.yaml
Reviewer Review Type Date Requested Status
System Enablement Bot continuous-integration Needs Fixing
Review via email: mp+314226@code.launchpad.net

This proposal has been superseded by a proposal from 2017-01-06.

Description of the change

Enable Ubuntu proposed archive within the classic snap for builds

As the current core snap is based on a systemd deb package from the Ubuntu Core image ppa we run into some conflicts with a newer one from the archive. To fix this issue we need to force upgrade to a newer systemd package from xenial proposed.

To post a comment you must log in.
Revision history for this message
System Enablement Bot (system-enablement-ci-bot) wrote :
review: Needs Fixing (continuous-integration)

Unmerged commits

c755d8e... by Simon Fels

tests: upgrade classic system from proposed

a29ac2f... by =?utf-8?q?Konrad_Zapa=C5=82owicz?= <email address hidden>

Version 8.0-3

c3e5e6e... by System Enablement CI Bot <email address hidden>

Merge remote tracking branch feature/fix-runtime-issues

Merge-Proposal: https://code.launchpad.net/~kzapalowicz/snappy-hwe-snaps/+git/pulseaudio/+merge/313340

0792791... by =?utf-8?q?Konrad_Zapa=C5=82owicz?= <email address hidden>

Use stable channelm not candidate, for image building

ef3646b... by =?utf-8?q?Konrad_Zapa=C5=82owicz?= <email address hidden>

Use stable channel for image creation

The Core image from th candidate channel hes problems in resolving the
dependencies for the pulseaudio snap. This forces the image to be
created out of the 'stable' channel which should not have this
problem

99ba403... by =?utf-8?q?Konrad_Zapa=C5=82owicz?= <email address hidden>

Fix failing CI infrastructure due to broken packages

The CI is failing because libudev-dev is having the unmet dependencies.
This commit makes sure that the upgrade is performed before the snap
is build.

9268445... by =?utf-8?q?Konrad_Zapa=C5=82owicz?= <email address hidden>

pulseaudio: fix the plug/slot connectin problem

The plugs and slots for pulseaudio snap cannot be connected w/o the
assertion which is a case when installing a locally build snap. This
change makes sure that the snap from the store is installed before
so that the connection is made.

60fd5cc... by =?utf-8?q?Konrad_Zapa=C5=82owicz?= <email address hidden>

Add home plug for parec command

This commit adds home plug to the parec command so that it is possible
to play files from the ~ directory.

7a8251b... by =?utf-8?q?Konrad_Zapa=C5=82owicz?= <email address hidden>

Add network plug

The network plug is needed to overcome SecComp complaining of
the unauthorized usage of the send system call.

d35ba51... by =?utf-8?q?Konrad_Zapa=C5=82owicz?= <email address hidden>

Decide to run the pa* scripts only as root

The pactl, parec and paplay commands, when run normally, try to access
/run/user/$USERID/ on Core which is disallowed by AppArmor rules.

This commit is make sure that the mentioned commands are run as root,
not regular user.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
diff --git a/MAINTAINERS b/MAINTAINERS
index 170e9f4..b249add 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -1,2 +1,6 @@
1<<<<<<< MAINTAINERS
1Alfonso Sanchez-Beato <alfonso.sanchez-beato@canonical.com>2Alfonso Sanchez-Beato <alfonso.sanchez-beato@canonical.com>
3=======
4Jim Hodapp <jim.hodapp@canonical.com>
5>>>>>>> MAINTAINERS
2Simon Fels <simon.fels@canonical.com>6Simon Fels <simon.fels@canonical.com>
diff --git a/README.md b/README.md
index 08d7a05..1cc87d3 100644
--- a/README.md
+++ b/README.md
@@ -1,3 +1,4 @@
1<<<<<<< README.md
1# Test tools2# Test tools
23
3This snap bundles various tools needed from the test suites the4This snap bundles various tools needed from the test suites the
@@ -27,3 +28,8 @@ running them like
27```28```
28 $ se-test-tools.radvd -h29 $ se-test-tools.radvd -h
29```30```
31=======
32# PulseAudio
33
34This is the snap to package the PulseAudio management service.
35>>>>>>> README.md
diff --git a/bin/config b/bin/config
30new file mode 10075536new file mode 100755
index 0000000..86b115c
--- /dev/null
+++ b/bin/config
@@ -0,0 +1,70 @@
1#!/bin/bash
2#
3# Copyright (C) 2016 Canonical Ltd
4#
5# This program is free software: you can redistribute it and/or modify
6# it under the terms of the GNU General Public License version 3 as
7# published by the Free Software Foundation.
8#
9# This program is distributed in the hope that it will be useful,
10# but WITHOUT ANY WARRANTY; without even the implied warranty of
11# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12# GNU General Public License for more details.
13#
14# You should have received a copy of the GNU General Public License
15# along with this program. If not, see <http://www.gnu.org/licenses/>.
16
17export PATH="$PATH:$SNAP/sbin"
18
19show_help() {
20 echo "Usage: $0 COMMAND..."
21 echo
22 echo "Commands:"
23 echo " enable-debug Enable verbose debugging."
24 echo " disable-debug Disable verbose debugging."
25}
26
27if [ "$1" = "" ]; then
28 show_help
29 exit
30fi
31
32while [ "$1" != '' ]; do
33 case "$1" in
34 --help)
35 show_help
36 exit
37 ;;
38 enable-debug|disable-debug)
39 commands="$commands $1"
40 shift
41 ;;
42 *)
43 echo "Unknown command: $1"
44 exit 1
45 ;;
46 esac
47done
48
49if [ ! -d $SNAP_DATA/config ] ; then
50 mkdir $SNAP_DATA/config
51fi
52
53run_commands() {
54 while [ -n "$1" ]; do
55 case "$1" in
56 disable-debug)
57 if [ -e $SNAP_DATA/config/debug ] ; then
58 rm $SNAP_DATA/config/debug
59 fi
60 shift
61 ;;
62 enable-debug)
63 touch $SNAP_DATA/config/debug
64 shift
65 ;;
66 esac
67 done
68}
69
70run_commands $commands
diff --git a/bin/pactl b/bin/pactl
0new file mode 10075571new file mode 100755
index 0000000..97e23b2
--- /dev/null
+++ b/bin/pactl
@@ -0,0 +1,28 @@
1#!/bin/sh
2#
3# Copyright (C) 2016 Canonical Ltd
4#
5# This program is free software: you can redistribute it and/or modify
6# it under the terms of the GNU General Public License version 3 as
7# published by the Free Software Foundation.
8#
9# This program is distributed in the hope that it will be useful,
10# but WITHOUT ANY WARRANTY; without even the implied warranty of
11# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12# GNU General Public License for more details.
13#
14# You should have received a copy of the GNU General Public License
15# along with this program. If not, see <http://www.gnu.org/licenses/>.
16
17if [ $(id -u) -ne 0 ]; then
18 echo "This script must be run as root" 1>&2
19 exit 1
20fi
21
22export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$SNAP/usr/lib/pulseaudio:$SNAP/usr/lib/pulse-8.0/modules/
23export PULSE_CLIENTCONFIG=$SNAP/etc/pulse/client.conf
24export HOME=$SNAP_DATA/home
25
26mkdir -p $HOME
27
28$SNAP/usr/bin/pactl $@
diff --git a/bin/paplay b/bin/paplay
0new file mode 10075529new file mode 100755
index 0000000..a132d51
--- /dev/null
+++ b/bin/paplay
@@ -0,0 +1,28 @@
1#!/bin/sh
2#
3# Copyright (C) 2016 Canonical Ltd
4#
5# This program is free software: you can redistribute it and/or modify
6# it under the terms of the GNU General Public License version 3 as
7# published by the Free Software Foundation.
8#
9# This program is distributed in the hope that it will be useful,
10# but WITHOUT ANY WARRANTY; without even the implied warranty of
11# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12# GNU General Public License for more details.
13#
14# You should have received a copy of the GNU General Public License
15# along with this program. If not, see <http://www.gnu.org/licenses/>.
16
17if [ $(id -u) -ne 0 ]; then
18 echo "This script must be run as root" 1>&2
19 exit 1
20fi
21
22export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$SNAP/usr/lib/pulseaudio:$SNAP/usr/lib/pulse-8.0/modules/
23export PULSE_CLIENTCONFIG=$SNAP/etc/pulse/client.conf
24export HOME=$SNAP_DATA/home
25
26mkdir -p $HOME
27
28$SNAP/usr/bin/paplay $@
diff --git a/bin/parec b/bin/parec
0new file mode 10075529new file mode 100755
index 0000000..269e0f8
--- /dev/null
+++ b/bin/parec
@@ -0,0 +1,28 @@
1#!/bin/sh
2#
3# Copyright (C) 2016 Canonical Ltd
4#
5# This program is free software: you can redistribute it and/or modify
6# it under the terms of the GNU General Public License version 3 as
7# published by the Free Software Foundation.
8#
9# This program is distributed in the hope that it will be useful,
10# but WITHOUT ANY WARRANTY; without even the implied warranty of
11# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12# GNU General Public License for more details.
13#
14# You should have received a copy of the GNU General Public License
15# along with this program. If not, see <http://www.gnu.org/licenses/>.
16
17if [ $(id -u) -ne 0 ]; then
18 echo "This script must be run as root" 1>&2
19 exit 1
20fi
21
22export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$SNAP/usr/lib/pulseaudio:$SNAP/usr/lib/pulse-8.0/modules/
23export PULSE_CLIENTCONFIG=$SNAP/etc/pulse/client.conf
24export HOME=$SNAP_DATA/home
25
26mkdir -p $HOME
27
28$SNAP/usr/bin/parec $@
diff --git a/bin/pulseaudio b/bin/pulseaudio
0new file mode 10075529new file mode 100755
index 0000000..d9fb85f
--- /dev/null
+++ b/bin/pulseaudio
@@ -0,0 +1,28 @@
1#!/bin/sh
2set -e
3set -x
4
5export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$SNAP/usr/lib/pulseaudio:$SNAP/usr/lib/pulse-8.0/modules/
6export PULSE_STATE_PATH=$SNAP_DATA/state
7export ALSA_CONFIG_UCM=$SNAP/usr/share/alsa/ucm
8export ALSA_CONFIG_TPLG=$SNAP/usr/share/alsa/topology
9export ALSA_CONFIG_PATH=$SNAP/usr/share/alsa/alsa.conf
10export ALSA_MIXER_SIMPLE=$SNAP/usr/share/alsa/smixer.conf
11
12mkdir -p $PULSE_STATE_PATH
13
14EXTRA_ARGS=
15
16if [ -e $SNAP_DATA/config/debug ] ; then
17 EXTRA_ARGS="$EXTRA_ARGS -vvvv"
18 export LIBASOUND_DEBUG=1
19fi
20
21$SNAP/usr/bin/pulseaudio \
22 --exit-idle-time=-1 \
23 --disallow-exit=yes \
24 --system \
25 -F $SNAP/etc/pulse/default.pa \
26 -p $SNAP/usr/lib/pulse-8.0/modules \
27 -n \
28 $EXTRA_ARGS
diff --git a/data/copyright b/data/copyright
0new file mode 10064429new file mode 100644
index 0000000..970053b
--- /dev/null
+++ b/data/copyright
@@ -0,0 +1,604 @@
1This package was debianized by CJ van den Berg <cj@vdbonline.com> on
2Thu, 10 Aug 2006 15:59:43 +0200.
3
4It was downloaded from <http://pulseaudio.org/wiki/DownloadPulseAudio>.
5
6 Upstream Authors
7 ================
8
9 Lennart Poettering <lennart@poettering.net>
10 Pierre Ossman <drzeus@drzeus.cx>,
11 through his employer Cendio <http://www.cendio.com/>
12
13Files: *
14Copyright:
15 Copyright (C) 2004-2009 Lennart Poettering
16 Copyright (C) 2006-2007 Pierre Ossman <ossman@cendio.se> for Cendio AB
17License: LGPL-2.1+
18 The upstream license clarifies pretty well that the sources of pulseaudio are
19 LGPL (please see LGPL license grant below), but that some parts will be
20 effectively GPL since they rely on GPL libraries, quoting the upstream
21 LICENSE:
22
23 """All PulseAudio source files are licensed under the GNU Lesser General
24 Public License. (see file LGPL for details)
25
26 However, the server side links to the GPL-only library 'libsamplerate'
27 which practically downgrades the license of the server part to GPL (see
28 file GPL for details), exercising section 3 of the LGPL.
29
30 Hence you should treat the client library ('libpulse') of PulseAudio as
31 being LGPL licensed and the server part ('libpulsecore') as being GPL
32 licensed. Since the PulseAudio daemon and the modules link to
33 'libpulsecore' they are of course also GPL licensed.
34
35 -- Lennart Poettering, April 20th, 2006."""
36
37 On Debian systems, the complete text of the LGPL-2.1 can be found in
38 /usr/share/common-licenses/LGPL-2.1.
39
40File: src/pulsecore/g711.c
41Copyright:
42 Copyright (C) Sun Microsystems, Inc
43License:
44 This source code is a product of Sun Microsystems, Inc. and is provided
45 for unrestricted use. Users may copy or modify this source code without
46 charge.
47
48 SUN SOURCE CODE IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING
49 THE WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR
50 PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE.
51
52 Sun source code is provided with no support and without any obligation on
53 the part of Sun Microsystems, Inc. to assist in its use, correction,
54 modification or enhancement.
55
56 SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE
57 INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY THIS SOFTWARE
58 OR ANY PART THEREOF.
59
60 In no event will Sun Microsystems, Inc. be liable for any lost revenue
61 or profits or other special, indirect and consequential damages, even if
62 Sun has been advised of the possibility of such damages.
63
64Files: src/pulsecore/g711.h
65Copyright:
66 Copyright (C) 2001 Chris Bagwell
67Licence:
68 Permission to use, copy, modify, and distribute this software and its
69 documentation for any purpose and without fee is hereby granted, provided
70 that the above copyright notice appear in all copies and that both that
71 copyright notice and this permission notice appear in supporting
72 documentation. This software is provided "as is" without express or
73 implied warranty.
74
75Files: src/pulsecore/poll.*
76Copyright:
77 Copyright 2006 Pierre Ossman <ossman@cendio.se> for Cendio AB
78 Copyright (C)1994,96,97,98,99,2000,2001,2004 Free Software Foundation, Inc.
79License: LGPL-2.1+
80 On Debian systems, the complete text of the LGPL-2.1 can be found in
81 /usr/share/common-licenses/LGPL-2.1.
82
83Files: src/pulse/utf8.c
84Copyright:
85 Copyright (C) 1999 Tom Tromey
86 Copyright (C) 2000 Red Hat, Inc.
87License: LGPL-2.1+
88 On Debian systems, the complete text of the LGPL-2.1 can be found in
89 /usr/share/common-licenses/LGPL-2.1.
90
91Files: src/modules/bluetooth/ipc.*, src/modules/bluetooth/rtp.*
92Copyright:
93 Copyright (C) 2004-2009 Marcel Holtmann <marcel@holtmann.org>
94License: LGPL-2.1+
95 On Debian systems, the complete text of the LGPL-2.1 can be found in
96 /usr/share/common-licenses/LGPL-2.1.
97
98Files: src/modules/bluetooth/module-bluetooth-{device,discover}.c,
99 src/modules/bluetooth/bluetooth-util.*
100Copyright:
101 Copyright (C) 2008-2009 Joao Paulo Rechi Vita
102License: LGPL-2.1+
103 On Debian systems, the complete text of the LGPL-2.1 can be found in
104 /usr/share/common-licenses/LGPL-2.
105
106File: src/modules/bluetooth/proximity-helper.c
107Copyright:
108 Copyright (C) 2000-2001 Qualcomm Incorporated
109 Copyright (C) 2002-2003 Maxim Krasnyansky <maxk@qualcomm.com>
110 Copyright (C) 2002-2007 Marcel Holtmann <marcel@holtmann.org>
111License: GPL-2+
112 On Debian systems, the complete text of the GPL-2 can be found in
113 /usr/share/common-licenses/GPL-2.
114
115Files: src/modules/bluetooth/sbc*
116Copyright:
117 Copyright (C) 2004-2009 Marcel Holtmann <marcel@holtmann.org>
118 Copyright (C) 2004-2005 Henryk Ploetz <henryk@ploetzli.ch>
119 Copyright (C) 2005-2006 Brad Midgley <bmidgley@xmission.com>
120License: LGPL-2.1+
121 On Debian systems, the complete text of the LGPL-2.1 can be found in
122 /usr/share/common-licenses/LGPL-2.1.
123
124File: src/modules/dbus/iface-{client,stream}.c:
125Copyright:
126 Copyright 2009 Tanu Kaskinen
127 Copyright 2009 Vincent Filali-Ansary <filali.v@azurdigitalnetworks.net>
128License: LGPL-2.1+
129 On Debian systems, the complete text of the LGPL-2.1 can be found in
130 /usr/share/common-licenses/LGPL-2.1.
131
132File: src/modules/dbus/module-dbus-protocol.c
133Copyright:
134 Copyright 2009 Tanu Kaskinen
135 Copyright 2006 Lennart Poettering
136 Copyright 2006 Shams E. King
137License: LGPL-2.1+
138 On Debian systems, the complete text of the LGPL-2.1 can be found in
139 /usr/share/common-licenses/LGPL-2.1.
140
141Files: src/modules/dbus/*
142Copyright:
143 Copyright 2009 Tanu Kaskinen
144License: LGPL-2.1+
145 On Debian systems, the complete text of the LGPL-2.1 can be found in
146 /usr/share/common-licenses/LGPL-2.1.
147
148Files: src/modules/echo-cancel/adrian*.*
149Copyright:
150 Copyright (C) DFS Deutsche Flugsicherung (2004). All Rights Reserved.
151License:
152 You are allowed to use this source code in any open source or closed
153 source software you want. You are allowed to use the algorithms for a
154 hardware solution. You are allowed to modify the source code.
155 You are not allowed to remove the name of the author from this memo or
156 from the source code files. You are not allowed to monopolize the
157 source code or the algorithms behind the source code as your
158 intellectual property. This source code is free of royalty and comes
159 with no warranty.
160
161File: src/modules/echo-cancel/echo-cancel.h
162Copyright:
163 Copyright 2010 Arun Raghavan <arun.raghavan@collabora.co.uk>
164License: LGPL-2.1+
165 On Debian systems, the complete text of the LGPL-2.1 can be found in
166 /usr/share/common-licenses/LGPL-2.1.
167
168File: src/modules/echo-cancel/module-echo-cancel.c
169Copyright:
170 Copyright 2010 Wim Taymans <wim.taymans@gmail.com>
171License: LGPL-2.1+
172 On Debian systems, the complete text of the LGPL-2.1 can be found in
173 /usr/share/common-licenses/LGPL-2.1.
174
175File: src/modules/echo-cancel/speex.c
176Copyright:
177 Copyright 2010 Wim Taymans <wim.taymans@gmail.com>
178 Contributor: Arun Raghavan <arun.raghavan@collabora.co.uk>
179License: LGPL-2.1+
180 On Debian systems, the complete text of the LGPL-2.1 can be found in
181 /usr/share/common-licenses/LGPL-2.1.
182
183File: src/modules/jack/module-jackdbus-detect.c
184Copyright:
185 Written by David Henningsson <david.henningsson@canonical.com>
186 Copyright 2010 Canonical Ltd.
187License: LGPL-2.1+
188 On Debian systems, the complete text of the LGPL-2.1 can be found in
189 /usr/share/common-licenses/LGPL-2.1.
190
191Files: src/modules/module-device-manager.*
192Copyright:
193 Copyright 2006-2008 Lennart Poettering
194 Copyright (C) 2009 Colin Guthrie
195License: LGPL-2.1+
196 On Debian systems, the complete text of the LGPL-2.1 can be found in
197 /usr/share/common-licenses/LGPL-2.1.
198
199File: src/modules/module-equalizer-sink.c
200Copyright:
201 Copyright 2004-2008 Lennart Poettering
202 Copyright 2009 Jason Newton <nevion@gmail.com>
203License: LGPL-2.1+
204 On Debian systems, the complete text of the LGPL-2.1 can be found in
205 /usr/share/common-licenses/LGPL-2.1.
206
207Files: src/pulsecore/dbus-*.*, src/modules/module-hal-detect.c
208Copyright:
209 Copyright 2006 Lennart Poettering
210 Copyright 2006 Shams E. King
211License: LGPL-2.1+
212 On Debian systems, the complete text of the LGPL-2.1 can be found in
213 /usr/share/common-licenses/LGPL-2.1.
214
215File: src/modules/ladspa.h
216Copyright:
217 Copyright (C) 2000-2002 Richard W.E. Furse, Paul Barton-Davis, Stefan
218 Westerfeld.
219License: LGPL-2.1+
220 On Debian systems, the complete text of the LGPL-2.1 can be found in
221 /usr/share/common-licenses/LGPL-2.1.
222
223Files: src/modules/module-always-sink.c, src/modules/rtp/rtsp_client.*
224Copyright:
225 Copyright (C) 2008 Colin Guthrie
226License: LGPL-2.1+
227 On Debian systems, the complete text of the LGPL-2.1 can be found in
228 /usr/share/common-licenses/LGPL-2.1.
229
230Files: src/modules/module-detect.c
231Copyright:
232 Copyright 2006 Lennart Poettering
233 Copyright 2006 Pierre Ossman <ossman@cendio.se> for Cendio AB
234 Copyright 2006 Diego Petteno
235License: LGPL-2.1+
236 On Debian systems, the complete text of the LGPL-2.1 can be found in
237 /usr/share/common-licenses/LGPL-2.1.
238
239Files: src/modules/roap/*roap*, src/modules/rtp/headerlist.*
240Copyright:
241 Copyright 2005-2007 Lennart Poettering
242 Copyright (C) 2008 Colin Guthrie
243License: LGPL-2.1+
244 On Debian systems, the complete text of the LGPL-2.1 can be found in
245 /usr/share/common-licenses/LGPL-2.1.
246
247Files: src/modules/roap/base64.*
248Copyright:
249 Copyright (C) 2008 Colin Guthrie
250 Copyright (C) Kungliga Tekniska Hogskolan
251License: LGPL-2.1+
252 On Debian systems, the complete text of the LGPL-2.1 can be found in
253 /usr/share/common-licenses/LGPL-2.1.
254
255Files: src/modules/module-device-manager.c
256Copyright:
257 Copyright 2006-2008 Lennart Poettering
258 Copyright 2009 Colin Guthrie
259License: LGPL-2.1+
260 On Debian systems, the complete text of the LGPL-2.1 can be found in
261 /usr/share/common-licenses/LGPL-2.1.
262
263Files: src/modules/module-filter-{apply,heuristics}*.c
264Copyright:
265 Copyright 2011 Colin Guthrie
266License: LGPL-2.1+
267 On Debian systems, the complete text of the LGPL-2.1 can be found in
268 /usr/share/common-licenses/LGPL-2.1.
269
270Files: src/modules/module-solaris.c
271Copyright:
272 Copyright 2006 Lennart Poettering
273 Copyright 2006-2007 Pierre Ossman <ossman@cendio.se> for Cendio AB
274 Copyright 2009 Finn Thain
275License: LGPL-2.1+
276 On Debian systems, the complete text of the LGPL-2.1 can be found in
277 /usr/share/common-licenses/LGPL-2.1.
278
279File: src/modules/module-switch-on-connect.c
280Copyright:
281 Copyright 2006 Lennart Poettering
282 Copyright 2009 Canonical Ltd
283License: LGPL-2.1+
284 On Debian systems, the complete text of the LGPL-2.1 can be found in
285 /usr/share/common-licenses/LGPL-2.1.
286
287Files: src/modules/module-virtual-s{ink,ource}.c
288Copyright:
289 Copyright 2010 Intel Corporation
290 Contributor: Pierre-Louis Bossart <pierre-louis.bossart@intel.com>
291License: LGPL-2.1+
292 On Debian systems, the complete text of the LGPL-2.1 can be found in
293 /usr/share/common-licenses/LGPL-2.1.
294
295Files: src/modules/reserve.*
296Copyright:
297 Copyright 2009 (C) Lennart Poettering
298License:
299 Permission is hereby granted, free of charge, to any person
300 obtaining a copy of this software and associated documentation files
301 (the "Software"), to deal in the Software without restriction,
302 including without limitation the rights to use, copy, modify, merge,
303 publish, distribute, sublicense, and/or sell copies of the Software,
304 and to permit persons to whom the Software is furnished to do so,
305 subject to the following conditions:
306
307 The above copyright notice and this permission notice shall be
308 included in all copies or substantial portions of the Software.
309
310 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
311 EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
312 MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
313 NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
314 BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
315 ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
316 CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
317 SOFTWARE.
318
319Files: src/pulsecore/atomic.h
320Copyright:
321 Copyright (C) 2006-2008 Lennart Poettering
322 Copyright (C) 2008 Nokia Corporation
323License: LGPL-2.1+
324 On Debian systems, the complete text of the LGPL-2.1 can be found in
325 /usr/share/common-licenses/LGPL-2.1.
326
327File: src/pulsecore/core-util.c
328Copyright:
329 Copyright (C) 2004-2006 Lennart Poettering
330 Copyright (C) 2004 Joe Marcus Clarke
331 Copyright (C) 2006-2007 Pierre Ossman <ossman@cendio.se> for Cendio AB
332License: LGPL-2.1+
333 On Debian systems, the complete text of the LGPL-2.1 can be found in
334 /usr/share/common-licenses/LGPL-2.1.
335
336Files: src/pulse/ext-device-manager.*
337Copyright:
338 Copyright (C) 2008 Lennart Poettering
339 Copyright (C) 2009 Colin Guthrie
340License: LGPL-2.1+
341 On Debian systems, the complete text of the LGPL-2.1 can be found in
342 /usr/share/common-licenses/LGPL-2.1.
343
344File: src/pulsecore/ffmpeg/avcodec.h
345Copyright:
346 Copyright (c) 2001 Fabrice Bellard
347License: LGPL-2.1+
348 On Debian systems, the complete text of the LGPL-2.1 can be found in
349 /usr/share/common-licenses/LGPL-2.1.
350
351File: src/pulsecore/ffmpeg/resample2.c
352Copyright:
353 Copyright (c) 2004 Michael Niedermayer <michaelni@gmx.at>
354License: LGPL-2.1+
355 On Debian systems, the complete text of the LGPL-2.1 can be found in
356 /usr/share/common-licenses/LGPL-2.1.
357
358File: src/pulsecore/socket-util.c
359Copyright:
360 Copyright (C) 2004-2006 Lennart Poettering
361 Copyright (C) 2004 Joe Marcus Clarke
362 Copyright (C) 2006-2007 Pierre Ossman <ossman@cendio.se> for Cendio AB
363License: LGPL-2.1+
364 On Debian systems, the complete text of the LGPL-2.1 can be found in
365 /usr/share/common-licenses/LGPL-2.1.
366
367File: man/xmltoman
368Copyright:
369 Copyright (C) 2000-2002 Oliver Kurth <oku@masqmail.cx>
370 Copyright (C) 2003 Lennart Poettering <mzkzygbzna@0pointer.de>
371License: LGPL-2+
372 On Debian systems, the complete text of the LGPL-2 can be found in
373 /usr/share/common-licenses/LGPL-2.
374
375File: po/ca.po
376Copyright:
377 Copyright (C) 2008 Xavier Conde Rueda <xavi.conde@gmail.com>
378 Copyright (C) 2009 Agustí Grau <fletxa@gmail.com>, 2009.
379 Copyright (C) Judith Pintó Subirada <judithp@gmail.com>
380 Copyright (C) 2009 Josep Torné Llavall <josep.torne@gmail.com>
381
382License: LGPL-2.1+
383 On Debian systems, the complete text of the LGPL-2.1 can be found in
384 /usr/share/common-licenses/LGPL-2.1.
385
386File: po/cs.po
387Copyright:
388 Copyright (C) 2008,2009 Petr Kovar <pknbe@volny.cz>
389License: LGPL-2.1+
390 On Debian systems, the complete text of the LGPL-2.1 can be found in
391 /usr/share/common-licenses/LGPL-2.1.
392
393File: po/de.po
394Copyright:
395 Copyright (C) 2008,2009 Fabian Affolter <fab@fedoraproject.org>
396 Copyright (C) 2008,2009 Micha Pietsch <barney@fedoraproject.org>
397License: LGPL-2.1+
398 On Debian systems, the complete text of the LGPL-2.1 can be found in
399 /usr/share/common-licenses/LGPL-2.1.
400
401File: po/de_CH.po
402Copyright:
403 Copyright (C) 2008, 2009 Fabian Affolter <fab@fedoraproject.org>
404 Copyright (C) 2008, 2009 Micha Pietsch <barney@fedoraproject.org>
405License: LGPL-2.1+
406 On Debian systems, the complete text of the LGPL-2.1 can be found in
407 /usr/share/common-licenses/LGPL-2.1.
408
409File: po/el.po
410Copyright:
411 Copyright (C) 2008 Dimitris Glezos <dimitris@glezos.com>
412 Copyright (C) 2009 Thalia Papoutsaki <saliyath@gmail.com>
413License: LGPL-2.1+
414 On Debian systems, the complete text of the LGPL-2.1 can be found in
415 /usr/share/common-licenses/LGPL-2.1.
416
417File: po/es.po
418Copyright:
419 Copyright (C) 2009 Domingo Becker <domingobecker@gmail.com>
420 Copyright (C) 2008 Hector Daniel Cabrera <h.daniel.cabrera@gmail.com>
421 Copyright (C) 2009 Fernando Gonzalez Blanco <fgonz@fedoraproject.org>
422License: LGPL-2.1+
423 On Debian systems, the complete text of the LGPL-2.1 can be found in
424 /usr/share/common-licenses/LGPL-2.1.
425
426File: po/fi.po
427Copyright:
428 Copyright (C) 2009 Timo Jyrinki <timo.jyrinki@iki.fi>
429 Copyright (C) 2009 Ville-Pekka Vainio <vpivaini@cs.helsinki.fi>
430License: LGPL-2.1+
431 On Debian systems, the complete text of the LGPL-2.1 can be found in
432 /usr/share/common-licenses/LGPL-2.1.
433
434File: po/fr.po
435Copyright:
436 Copyright (C) 2008 Robert-Andre Mauchin <zebob.m@pengzone.org>
437 Copyright (C) 2008 Michael Ughetto <telimektar esraonline com>
438 Copyright (C) 2008 Pablo Martin-Gomez <pablo.martin-gomez@laposte.net>
439 Copyright (C) 2009 Corentin Perard <corentin.perard@gmail.com>
440License: LGPL-2.1+
441 On Debian systems, the complete text of the LGPL-2.1 can be found in
442 /usr/share/common-licenses/LGPL-2.1.
443
444File: po/gu.po
445Copyright:
446 Copyright (C) 2009 Sweta Kothari <swkothar@redhat.com>
447License: LGPL-2.1+
448 On Debian systems, the complete text of the LGPL-2.1 can be found in
449 /usr/share/common-licenses/LGPL-2.1.
450
451File: po/hi.po
452Copyright:
453 Copyright (C) 2009 Rajesh Ranjan <rajesh672@gmail.com>
454License: LGPL-2.1+
455 On Debian systems, the complete text of the LGPL-2.1 can be found in
456 /usr/share/common-licenses/LGPL-2.1.
457
458File: po/it.po
459Copyright:
460 Copyright (C) 2008,2009 Luca Ferretti <elle.uca@libero.it>
461 Copyright (C) 2009 Milo Casagrande <milo@ubuntu.com>
462 Copyright (C) 2009 ario_santagiuliana <mario at marionline.it>
463 Copyright (C) 2009 Milo Casagrande <milo@ubuntu.com>
464
465License: LGPL-2.1+
466 On Debian systems, the complete text of the LGPL-2.1 can be found in
467 /usr/share/common-licenses/LGPL-2.1.
468
469File: po/ja.po
470Copyright:
471 Copyright (C) 2009 Hyu_gabaru Ryu_ichi <hyu_gabaru@yahoo.co.jp>
472License: LGPL-2.1+
473 On Debian systems, the complete text of the LGPL-2.1 can be found in
474 /usr/share/common-licenses/LGPL-2.1.
475
476File: po/kn.po
477Copyright:
478 Copyright (C) 2009 Shankar Prasad <svenkate@redhat.com>
479License: LGPL-2.1+
480 On Debian systems, the complete text of the LGPL-2.1 can be found in
481 /usr/share/common-licenses/LGPL-2.1.
482
483File: po/mr.po
484Copyright:
485 Copyright (C) 2009 Sandeep Shedmake <sandeep.shedmake@gmail.com>
486 Copyright (C) 2009 Sandeep Shedmake <sshedmak@redhat.com>
487License: LGPL-2.1+
488 On Debian systems, the complete text of the LGPL-2.1 can be found in
489 /usr/share/common-licenses/LGPL-2.1.
490
491File: po/nl.po
492Copyright:
493 Copyright (C) 2009 Geert Warrink <geert.warrink@onsnet.nu>
494 Copyright (C) 2009 Reinout van Schouwen <reinout@gmail.com>
495License: LGPL-2.1+
496 On Debian systems, the complete text of the LGPL-2.1 can be found in
497 /usr/share/common-licenses/LGPL-2.1.
498
499File: po/or.po
500Copyright:
501 Copyright (C) 2009 Manoj Kumar Giri <mgiri@redhat.com>
502License: LGPL-2.1+
503 On Debian systems, the complete text of the LGPL-2.1 can be found in
504 /usr/share/common-licenses/LGPL-2.1.
505
506File: po/pa.po
507Copyright:
508 Copyright (C) 2009 Amanpreet Singh Alam <aalam@users.sf.net>
509 Copyright (C) 2009 Jaswinder Singh <jsingh@redhat.com>
510 Copyright (C) 2009 A S Alam <aalam@users.sf.net>
511License: LGPL-2.1+
512 On Debian systems, the complete text of the LGPL-2.1 can be found in
513 /usr/share/common-licenses/LGPL-2.1.
514
515File: po/pl.po
516Copyright:
517 Copyright (C) 2008 Piotr Drag <piotrdrag@gmail.com>
518License: LGPL-2.1+
519 On Debian systems, the complete text of the LGPL-2.1 can be found in
520 /usr/share/common-licenses/LGPL-2.1.
521
522File: po/pt_BR.po
523Copyright:
524 Copyright (C) 2008 Fabian Affolter <fab@fedoraproject.org>
525License: LGPL-2.1+
526 On Debian systems, the complete text of the LGPL-2.1 can be found in
527 /usr/share/common-licenses/LGPL-2.1.
528
529File: po/sr.po, po/sr@latin.po
530Copyright:
531 Copyright (C) 2009 Igor Miletic (Игор Милетић) <grejigl-gnomeprevod@yahoo.ca>, 2009.
532 Copyright (C) 2009 Miloš Komarčević <kmilos@gmail.com>, 2009.
533License: LGPL-2.1+
534 On Debian systems, the complete text of the LGPL-2.1 can be found in
535 /usr/share/common-licenses/LGPL-2.1.
536
537File: po/sv.po
538Copyright:
539 Copyright (C) 2008 Daniel Nylander <po@danielnylander.se>
540License: LGPL-2.1+
541 On Debian systems, the complete text of the LGPL-2.1 can be found in
542 /usr/share/common-licenses/LGPL-2.1.
543
544File: po/ta.po
545Copyright:
546 Copyright (C) 2009 I. Felix <ifelix@redhat.com>
547License: LGPL-2.1+
548 On Debian systems, the complete text of the LGPL-2.1 can be found in
549 /usr/share/common-licenses/LGPL-2.1.
550
551File: po/te.po
552Copyright:
553 Copyright (C) 2009 Krishna Babu K <kkrothap@redhat.com>
554License: LGPL-2.1+
555 On Debian systems, the complete text of the LGPL-2.1 can be found in
556 /usr/share/common-licenses/LGPL-2.1.
557
558File: po/uk.po
559Copyright:
560 Copyright (C) 2009 Yuri Chornoivan <yurchor@ukr.net>
561License: LGPL-2.1+
562 On Debian systems, the complete text of the LGPL-2.1 can be found in
563 /usr/share/common-licenses/LGPL-2.1.
564
565File: po/zh_CN.po
566Copyright:
567 Copyright (C) 2008 闫丰刚 (sainry)<sainry@gmail.com>
568License: LGPL-2.1+
569 On Debian systems, the complete text of the LGPL-2.1 can be found in
570 /usr/share/common-licenses/LGPL-2.1.
571
572Files: debian/*
573Copyright:
574 Copyright 2006-2009 Sjoerd Simons <sjoerd@debian.org>
575 Copyright 2006-2008 CJ van den Berg <cj@vdbonline.com>
576License: GPL-2+
577 On Debian systems, the complete text of the GPL-2 can be found in
578 /usr/share/common-licenses/GPL-2.
579
580Files: src/pulsecore/cpu-*, src/pulsecore/remap*,
581 src/pulsecore/svolume_{arm,mmx,sse}.c
582Copyright:
583 Copyright 2004-2006 Lennart Poettering
584 Copyright 2009 Wim Taymans <wim.taymans@collabora.co.uk>
585License: LGPL-2.1+
586 On Debian systems, the complete text of the LGPL-2.1 can be found in
587 /usr/share/common-licenses/LGPL-2.1.
588
589
590Files: src/pulsecore/sconv_sse.c
591Copyright:
592 Copyright 2004-2006 Lennart Poettering
593 Copyright 2006 Pierre Ossman <ossman@cendio.se> for Cendio AB
594License: LGPL-2.1+
595 On Debian systems, the complete text of the LGPL-2.1 can be found in
596 /usr/share/common-licenses/LGPL-2.1.
597
598
599Files: src/pulsecore/usergroup.*
600Copyright:
601 Copyright 2009 Ted Percival
602License: LGPL-2.1+
603 On Debian systems, the complete text of the LGPL-2.1 can be found in
604 /usr/share/common-licenses/LGPL-2.1.
diff --git a/run-tests.sh b/run-tests.sh
0new file mode 100755605new file mode 100755
index 0000000..b4ce91b
--- /dev/null
+++ b/run-tests.sh
@@ -0,0 +1,84 @@
1#!/bin/sh
2#
3# Copyright (C) 2016 Canonical Ltd
4#
5# This program is free software: you can redistribute it and/or modify
6# it under the terms of the GNU General Public License version 3 as
7# published by the Free Software Foundation.
8#
9# This program is distributed in the hope that it will be useful,
10# but WITHOUT ANY WARRANTY; without even the implied warranty of
11# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12# GNU General Public License for more details.
13#
14# You should have received a copy of the GNU General Public License
15# along with this program. If not, see <http://www.gnu.org/licenses/>.
16
17set -ex
18
19image_name=ubuntu-core-16.img
20channel=stable
21spread_opts=
22force_new_image=0
23test_from_channel=0
24
25show_help() {
26 echo "Usage: run-tests.sh [OPTIONS]"
27 echo
28 echo "optional arguments:"
29 echo " --help Show this help message and exit"
30 echo " --channel=<channel> Select another channel to build the base image from (default: $channel)"
31 echo " --debug Enable verbose debugging output"
32 echo " --test-from-channel Pull snap from the specified channel instead of building it from source"
33 echo " --force-new-image Force generating a new image used for testing"
34}
35
36while [ -n "$1" ]; do
37 case "$1" in
38 --help)
39 show_help
40 exit
41 ;;
42 --channel=*)
43 channel=${1#*=}
44 shift
45 ;;
46 --test-from-channel)
47 test_from_channel=1
48 shift
49 ;;
50 --debug)
51 spread_opts="$spread_opts -vv -debug"
52 shift
53 ;;
54 --force-new-image)
55 force_new_image=1
56 shift
57 ;;
58 *)
59 echo "Unknown command: $1"
60 exit 1
61 ;;
62 esac
63done
64
65SPREAD_QEMU_PATH="$HOME/.spread/qemu"
66if [ `which spread` = /snap/bin/spread ] ; then
67 current_version=`readlink /snap/spread/current`
68 SPREAD_QEMU_PATH="$HOME/snap/spread/$current_version/.spread/qemu/"
69fi
70
71# Make sure we have a base image we use for testing
72if [ ! -e $SPREAD_QEMU_PATH/$image_name ] || [ $force_new_image -eq 1 ] ; then
73 echo "INFO: Creating new qemu test image ..."
74 (cd tests/image ; sudo ./create-image.sh $channel)
75 mkdir -p $SPREAD_QEMU_PATH
76 mv tests/image/ubuntu-core-16.img $SPREAD_QEMU_PATH/$image_name
77fi
78
79# We currently only run spread tests but we could do other things
80# here as well like running our snap-lintian tool etc.
81if [ $test_from_channel -eq 1 ] ; then
82 export SNAP_CHANNEL=$channel
83fi
84spread $spread_opts
diff --git a/snapcraft.yaml b/snapcraft.yaml
index c121988..ab7d560 100644
--- a/snapcraft.yaml
+++ b/snapcraft.yaml
@@ -1,13 +1,27 @@
1<<<<<<< snapcraft.yaml
1name: se-test-tools2name: se-test-tools
2summary: A set of tools used for testing3summary: A set of tools used for testing
3description: |4description: |
4 This snap contains a few tools used for automated testing in the5 This snap contains a few tools used for automated testing in the
5 System Enablement team of Canonical.6 System Enablement team of Canonical.
6version: 27version: 2
8=======
9name: pulseaudio
10version: 8.0-3
11summary: PulseAudio sound server
12description: |
13 PulseAudio, previously known as Polypaudio, is a sound server for POSIX and
14 WIN32 systems. It is a drop in replacement for the ESD sound server with
15 much better latency, mixing/re-sampling quality and overall architecture.
16
17 Please find the source code for this snap at:
18 https://code.launchpad.net/~snappy-hwe-team/snappy-hwe-snaps/+git/pulseaudio
19>>>>>>> snapcraft.yaml
7grade: stable20grade: stable
8confinement: strict21confinement: strict
922
10apps:23apps:
24<<<<<<< snapcraft.yaml
11 radvd:25 radvd:
12 command: usr/sbin/radvd26 command: usr/sbin/radvd
13 plugs:27 plugs:
@@ -41,3 +55,141 @@ parts:
41 - isc-dhcp-server55 - isc-dhcp-server
42 - ethtool56 - ethtool
43 - inotify-tools57 - inotify-tools
58=======
59 pulseaudio:
60 command: bin/pulseaudio
61 daemon: simple
62 slots: [service]
63 pactl:
64 command: bin/pactl
65 plugs: [client, network]
66 paplay:
67 command: bin/paplay
68 plugs: [client, home, network]
69 parec:
70 command: bin/parec
71 plugs: [client, home, network]
72 config:
73 command: bin/config
74
75slots:
76 service:
77 interface: pulseaudio
78
79plugs:
80 client:
81 interface: pulseaudio
82
83parts:
84 pulseaudio-common:
85 plugin: copy
86 files:
87 bin/pulseaudio: bin/pulseaudio
88 bin/pactl: bin/pactl
89 bin/paplay: bin/paplay
90 bin/parec: bin/parec
91 bin/config: bin/config
92 data/copyright: usr/share/doc/pulseaudio/copyright
93
94 alsa-lib:
95 plugin: autotools
96
97 source: https://git.launchpad.net/~snappy-hwe-team/snappy-hwe-snaps/+git/pulseaudio
98 source-type: git
99 source-branch: alsa-lib/xenial/1.1.0
100
101 configflags:
102 - --prefix=/usr
103 - --sysconfdir=/etc
104 - --libexec=/usr/lib
105 - --libdir=/usr/lib
106 - --localstatedir=/var
107 - --with-plugindir=/usr/lib/alsa-lib
108 - --disable-silent-rules
109 - --disable-static
110 - --disable-python
111
112 filesets:
113 libasound2:
114 - usr/lib/libasound.so*
115 - usr/lib/alsa-lib/*
116 - usr/share/alsa/*
117
118 snap:
119 - $libasound2
120
121
122 pulseaudio:
123 after:
124 - alsa-lib
125
126 plugin: autotools
127
128 source: https://git.launchpad.net/~snappy-hwe-team/snappy-hwe-snaps/+git/pulseaudio
129 source-type: git
130 source-branch: pulseaudio/8.0
131
132 build-packages:
133 - intltool
134 - libasound2-dev
135 - libdbus-1-dev
136 - libjson-c-dev
137 - libglib2.0-dev
138 - libspeexdsp-dev
139 - libbluetooth-dev
140 - libwebrtc-audio-processing-dev
141 - libltdl-dev
142 - libsndfile1-dev
143 - libx11-xcb-dev
144 - libx11-dev
145 - libtdb-dev
146 - libudev-dev
147 - libasyncns-dev
148 - libxcb1-dev
149
150 configflags:
151 - --prefix=/usr
152 - --sysconfdir=/etc
153 - --libexec=/usr/lib
154 - --libdir=/usr/lib
155 - --localstatedir=/var
156 - --enable-udev
157 - --disable-rpath
158 - --disable-orc
159 - --disable-gconf
160 - --disable-bluez4
161 - --disable-bluez5
162 - --disable-esound
163 - --disable-adrian-aec
164 - --disable-gtk3
165 - --disable-hal-compat
166 - --disable-systemd-login
167 - --without-caps
168 - --disable-webrtc-aec
169 - --disable-dbus
170 - --disable-oss-output
171 - --disable-oss-wrapper
172 - --disable-jack
173 - --disable-x11
174 - --with-system-user=root
175 - --with-system-group=root
176
177 filesets:
178 pauseaudiofiles:
179 - etc/*
180 - lib/*
181 - usr/bin/pacat
182 - usr/bin/pactl
183 - usr/bin/paplay
184 - usr/bin/parec
185 - usr/bin/pulseaudio
186 - usr/lib/libpulse-mainloop-glib.so*
187 - usr/lib/libpulse-simple.so*
188 - usr/lib/libpulse.so*
189 - usr/lib/pulse-8.0/*
190 - usr/lib/pulseaudio/*.so
191 - usr/share/pulseaudio/*
192
193 snap:
194 - $pauseaudiofiles
195>>>>>>> snapcraft.yaml
diff --git a/spread.yaml b/spread.yaml
44new file mode 100644196new file mode 100644
index 0000000..0c615ba
--- /dev/null
+++ b/spread.yaml
@@ -0,0 +1,50 @@
1#
2# Copyright (C) 2016 Canonical Ltd
3#
4# This program is free software: you can redistribute it and/or modify
5# it under the terms of the GNU General Public License version 3 as
6# published by the Free Software Foundation.
7#
8# This program is distributed in the hope that it will be useful,
9# but WITHOUT ANY WARRANTY; without even the implied warranty of
10# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11# GNU General Public License for more details.
12#
13# You should have received a copy of the GNU General Public License
14# along with this program. If not, see <http://www.gnu.org/licenses/>.
15
16project: pulseaudio
17
18environment:
19 PROJECT_PATH: /home/pulseaudio
20 TESTSLIB: $PROJECT_PATH/tests/lib
21 SNAP_NAME: pulseaudio
22 # Allow the host to pass the channel to use for the test run
23 SNAP_CHANNEL: $(HOST:echo $SNAP_CHANNEL)
24
25backends:
26 qemu:
27 systems:
28 - ubuntu-core-16:
29 username: test
30 password: test
31
32# Put this somewhere where we have read-write access
33path: /home/pulseaudio
34
35exclude:
36 - .git
37
38prepare: |
39 . $TESTSLIB/prepare-all.sh
40
41suites:
42 tests/main/:
43 summary: Full-system tests for PulseAudio
44 systems:
45 - ubuntu-core-16
46 prepare: |
47 . $TESTSLIB/prepare.sh
48 restore-each: |
49 . $TESTSLIB/restore-each.sh
50
diff --git a/tests/image/README.md b/tests/image/README.md
0new file mode 10064451new file mode 100644
index 0000000..b75b66e
--- /dev/null
+++ b/tests/image/README.md
@@ -0,0 +1,7 @@
1# Generate user password
2
3You can generate the password for the system user assertion via
4
5```
6 $ python3 -c 'import crypt; print(crypt.crypt("test", crypt.mksalt(crypt.METHOD_SHA512)))'
7```
diff --git a/tests/image/create-image.sh b/tests/image/create-image.sh
0new file mode 1007558new file mode 100755
index 0000000..3aa1d13
--- /dev/null
+++ b/tests/image/create-image.sh
@@ -0,0 +1,157 @@
1#!/bin/bash
2#
3# Copyright (C) 2016 Canonical Ltd
4#
5# This program is free software: you can redistribute it and/or modify
6# it under the terms of the GNU General Public License version 3 as
7# published by the Free Software Foundation.
8#
9# This program is distributed in the hope that it will be useful,
10# but WITHOUT ANY WARRANTY; without even the implied warranty of
11# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12# GNU General Public License for more details.
13#
14# You should have received a copy of the GNU General Public License
15# along with this program. If not, see <http://www.gnu.org/licenses/>.
16
17set -e
18
19if [ $(id -u) -ne 0 ] ; then
20 echo "ERROR: needs to be executed as root"
21 exit 1
22fi
23
24channel=stable
25if [ ! -z "$1" ] ; then
26 channel=$1
27fi
28
29snap=
30if [ ! -z "$2" ] ; then
31 snap=$2
32fi
33
34model=pc
35arch=amd64
36image_name=ubuntu-core-16.img
37ubuntu_image_extra_args=
38
39if [ ! -z "$snap" ] ; then
40 ubuntu_image_extra_args="--extra-snaps $snap"
41fi
42
43ubuntu-image \
44 --channel $channel \
45 -o $image_name \
46 --image-size 4G \
47 $ubuntu_image_extra_args \
48 $model.model
49
50kpartx -a $image_name
51sleep 0.5
52
53loop_path=`findfs LABEL=writable`
54tmp_mount=`mktemp -d`
55
56mount $loop_path $tmp_mount
57
58# Migrate all systemd units from core snap into the writable area. This
59# would be normally done on firstboot by the initramfs but we can't rely
60# on that because we are adding another file in there and that will
61# prevent the initramfs from transitioning any files.
62core_snap=$(find $tmp_mount/system-data/var/lib/snapd/snaps -name "core_*.snap")
63tmp_core=`mktemp -d`
64mount $core_snap $tmp_core
65mkdir -p $tmp_mount/system-data/etc/systemd
66cp -rav $tmp_core/etc/systemd/* \
67 $tmp_mount/system-data/etc/systemd/
68umount $tmp_core
69rm -rf $tmp_core
70
71# system-user assertion which gives us our test:test user we use to
72# log into the system
73mkdir -p $tmp_mount/system-data/var/lib/snapd/seed/assertions
74cp test-user.assertion $tmp_mount/system-data/var/lib/snapd/seed/assertions
75
76# Disable console-conf for the first boot
77mkdir -p $tmp_mount/system-data/var/lib/console-conf/
78touch $tmp_mount/system-data/var/lib/console-conf/complete
79
80# Create systemd service which is running on firstboot and sets up
81# various things for us.
82mkdir -p $tmp_mount/system-data/etc/systemd/system
83cat << 'EOF' > $tmp_mount/system-data/etc/systemd/system/devmode-firstboot.service
84[Unit]
85Description=Run devmode firstboot setup
86After=snapd.service snapd.socket
87
88[Service]
89Type=oneshot
90ExecStart=/writable/system-data/var/lib/devmode-firstboot/run.sh
91RemainAfterExit=yes
92TimeoutSec=3min
93EOF
94
95mkdir -p $tmp_mount/system-data/etc/systemd/system/multi-user.target.wants
96ln -sf /etc/systemd/system/devmode-firstboot.service \
97 $tmp_mount/system-data/etc/systemd/system/multi-user.target.wants/devmode-firstboot.service
98
99mkdir $tmp_mount/system-data/var/lib/devmode-firstboot
100cat << EOF > $tmp_mount/system-data/var/lib/devmode-firstboot/00-snapd-config.yaml
101network:
102 version: 2
103 ethernets:
104 eth0:
105 dhcp4: true
106EOF
107
108cat << 'EOF' > $tmp_mount/system-data/var/lib/devmode-firstboot/run.sh
109#!/bin/bash
110
111set -e
112
113# Don't start again if we're already done
114if [ -e /writable/system-data/var/lib/devmode-firstboot/complete ] ; then
115 exit 0
116fi
117
118echo "Start devmode-firstboot $(date -Iseconds --utc)"
119
120if [ "$(snap managed)" = "true" ]; then
121 echo "System already managed, exiting"
122 exit 0
123fi
124
125# no changes at all
126while ! snap changes ; do
127 echo "No changes yet, waiting"
128 sleep 1
129done
130
131while snap changes | grep -qE '(Do|Doing) .*Initialize system state' ; do
132 echo "Initialize system state is in progress, waiting"
133 sleep 1
134done
135
136if [ -n "$(snap known system-user)" ]; then
137 echo "Trying to create known user"
138 snap create-user --known --sudoer
139fi
140
141cp /writable/system-data/var/lib/devmode-firstboot/00-snapd-config.yaml /writable/system-data/etc/netplan
142
143# Enable console-conf again
144rm /writable/system-data/var/lib/console-conf/complete
145
146# Mark us done
147touch /writable/system-data/var/lib/devmode-firstboot/complete
148
149# Reboot the system as its now prepared for the user
150reboot
151EOF
152
153chmod +x $tmp_mount/system-data/var/lib/devmode-firstboot/run.sh
154
155umount $tmp_mount
156kpartx -d $image_name
157rm -rf $tmp_mount
diff --git a/tests/image/pc-model.json b/tests/image/pc-model.json
0new file mode 100644158new file mode 100644
index 0000000..2eb1411
--- /dev/null
+++ b/tests/image/pc-model.json
@@ -0,0 +1,11 @@
1{
2 "type": "model",
3 "authority-id": "4BKZlf4WMNBKgQfij0rftmp5BzDdVhlf",
4 "brand-id": "4BKZlf4WMNBKgQfij0rftmp5BzDdVhlf",
5 "series": "16",
6 "model": "pc",
7 "architecture": "amd64",
8 "gadget": "pc",
9 "kernel": "pc-kernel",
10 "timestamp": "2016-09-09T08:27:36+00:00"
11}
diff --git a/tests/image/pc.model b/tests/image/pc.model
0new file mode 10064412new file mode 100644
index 0000000..345b7e4
--- /dev/null
+++ b/tests/image/pc.model
@@ -0,0 +1,21 @@
1type: model
2authority-id: 4BKZlf4WMNBKgQfij0rftmp5BzDdVhlf
3series: 16
4brand-id: 4BKZlf4WMNBKgQfij0rftmp5BzDdVhlf
5model: pc
6architecture: amd64
7gadget: pc
8kernel: pc-kernel
9timestamp: 2016-09-09T08:27:36+00:00
10sign-key-sha3-384: a4qX7md6GQGNcZc_cmWPBStTq4RNCnGTzF-4usF5wFylQ-xZQej-SD6prx8Yl89O
11
12AcLBXAQAAQoABgUCWBBNTwAKCRAVoE002xqmOPH/EACWLf1UeZgICjNbzLI5bO/84LExS8iUjarG
13S7DRn8Ln5zu44pxz7UXJNjULgnU8yuKVPVWg0ij7DRvaj8tGxOMMAls1fjSRtEYR8oJFsI3jXDGw
14cLjvJG/crUxV8DgdZFlF02Kb5VtmNDXs1OE3zpPeniG19JYHaf2hDz4SRmWZe4c2MFrAt2UwI/VC
15o/209Fl3qA8p8x5EYOBycgHooHm3924NTF9mXbKSfLRgGS7YzmN4FXFyiGOTY6CRsp37XnkxGcA1
16+lyZz1X97qT/fOGVUFqHDqUZmuCs5sC3+DNonytTgKt5+7S+V+Ai45HEayD5f4gS9uscnTMTwEEJ
17VgSZRU0My+iJwFlXHaGWQe9eC37YCZ3ahBxc2SpkFffXjYhEMtTtr1vDIYCAhbc2k8aa3hPE2GUg
183pv8zs1AuZzSVX+Rp4ysMBqU23UUVP6Bmvr7ZD3E8aEUxE6O/BEA10Km5oZPqpmBfcEVO8a0yZjn
19YQxn4XzY1Nwq1d0sJIV7FEDsq9dXH9QCa4qsCH3KG3jHv32GapvLf8mpr6HSH+JmPM5kNeVugLVy
20/RUAFNu+Y4hqhpRNC8fc+UDkVBXsLDqHb5gfXnhbFIH8LvpVFR20SSkg9/Km5xC+7wcey0h8SD6/
21Eh70OPLxDkzitEn/1L/0V987dlJnhS4WpqrYfbHYwQ==
diff --git a/tests/image/test-user-assertion.json b/tests/image/test-user-assertion.json
0new file mode 10064422new file mode 100644
index 0000000..81f6beb
--- /dev/null
+++ b/tests/image/test-user-assertion.json
@@ -0,0 +1,13 @@
1{
2 "type": "system-user",
3 "authority-id": "4BKZlf4WMNBKgQfij0rftmp5BzDdVhlf",
4 "brand-id": "4BKZlf4WMNBKgQfij0rftmp5BzDdVhlf",
5 "series": ["16"],
6 "models": ["pc"],
7 "name": "Default Test User",
8 "username": "test",
9 "email": "test@localhost",
10 "password": "$6$OCvKy4w/Ppxp7IvC$WPzWiIW.4y18h9htjbOuxLZ.sjQ5M2hoSiEu3FpMU0PMdHQuQdBOqvk8p6DMdS/R/nU/rXidClD23CbSkSgp30",
11 "since": "2016-10-24T07:12:10+00:00",
12 "until": "2017-10-24T07:12:10+00:00"
13}
diff --git a/tests/image/test-user.assertion b/tests/image/test-user.assertion
0new file mode 10064414new file mode 100644
index 0000000..7ebb667
--- /dev/null
+++ b/tests/image/test-user.assertion
@@ -0,0 +1,25 @@
1type: system-user
2authority-id: 4BKZlf4WMNBKgQfij0rftmp5BzDdVhlf
3brand-id: 4BKZlf4WMNBKgQfij0rftmp5BzDdVhlf
4email: test@localhost
5models:
6 - pc
7name: Default Test User
8password: $6$OCvKy4w/Ppxp7IvC$WPzWiIW.4y18h9htjbOuxLZ.sjQ5M2hoSiEu3FpMU0PMdHQuQdBOqvk8p6DMdS/R/nU/rXidClD23CbSkSgp30
9series:
10 - 16
11since: 2016-10-24T07:12:10+00:00
12until: 2017-10-24T07:12:10+00:00
13username: test
14sign-key-sha3-384: a4qX7md6GQGNcZc_cmWPBStTq4RNCnGTzF-4usF5wFylQ-xZQej-SD6prx8Yl89O
15
16AcLBXAQAAQoABgUCWBBOJAAKCRAVoE002xqmOKaRD/0cEKWb2nbwhk+BTgOrYZHrwzjbIWTZznDh
17xCD6JWF/yr9br1vEmRz2zCNPPWZgFH9HaJ+mT/lktWIs7VVMIdwMDWYOR8P9rdWM/Jx6iyB3z0OI
18YO31zaU4XLyolv/YSj/nFXMMD+jIeE4l8j4AtCSJwd7ZS9Jz8F/RfrD8EpG0JU1F55lq8MC0mjZ4
19ul5ws8k9UiP8nA5IAG30NvvReiUGYqtdkO43eQmy88WABL95MbFsbfEk4/VduG0Gt3y/T8vDDcF6
20NJEm8L+O9IXnPBAje0Ve0NX3YtOE3CDTkYRKR7xFFJq2cJVCSvf9CsorREg4KyfagIdMKDSa5Tiq
21FzoAJTfI0ltq5cAnLImtxFKulJ+AnGUNMLrKFr1H0FGtqTZBfs/PcIxy0qY0YDXSF4/9F2PUBdQS
22tSmN6pT9t1FCGy2Rf5n3QV4e0R2JzS6Kx+vdbPMYqhssQosLU5GwlWj8UbevtphAGf8u8nLBDYWs
23MNIPi0IrPmzIewZBD05A6a8T+oHZ9dIg5SAnJ4gmz0sCzNDKarvYqLpcU1rZzu78/UypbHXDvBAt
24gnxYpD6WHR2aHSeyx3WvOp130jFco2/55M0RTEm50isO1uv2DqTn9ULkBdCrG/zOqEmZgY18ds3P
25yTaAbaIAqUe7scpAHY0a31tfnXq8cRyEX03e9g2Mrg==
diff --git a/tests/lib/prepare-all.sh b/tests/lib/prepare-all.sh
0new file mode 10064426new file mode 100644
index 0000000..e53efb4
--- /dev/null
+++ b/tests/lib/prepare-all.sh
@@ -0,0 +1,35 @@
1#!/bin/bash
2
3# We don't have to build a snap when we should use one from a
4# channel
5if [ -n "$SNAP_CHANNEL" ] ; then
6 exit 0
7fi
8
9# Setup classic snap and build the pulseaudio snap in there
10snap install --devmode --beta classic
11cat <<-EOF > /home/test/build-snap.sh
12#!/bin/sh
13set -ex
14
15# FIXME: Enable propose for now until problems with conflicting systemd
16# packages between the Ubuntu Core image ppa and the archive are fixed.
17echo "deb http://archive.ubuntu.com/ubuntu/ xenial-proposed restricted main universe" > /etc/apt/sources.list.d/ubuntu-proposed.list
18
19# Ensure we have the latest updates installed as the core snap
20# may be a bit out of date.
21apt update
22apt upgrade --yes --force-yes
23
24apt install -y --force-yes snapcraft
25cd /home/pulseaudio
26snapcraft clean
27snapcraft
28EOF
29
30chmod +x /home/test/build-snap.sh
31sudo classic /home/test/build-snap.sh
32snap remove classic
33
34# Make sure we have a snap build
35test -e /home/pulseaudio/pulseaudio_*_amd64.snap
diff --git a/tests/lib/prepare-each.sh b/tests/lib/prepare-each.sh
0new file mode 10064436new file mode 100644
index 0000000..de6816d
--- /dev/null
+++ b/tests/lib/prepare-each.sh
@@ -0,0 +1,6 @@
1SNAP_INSTALL_OPTS=
2if [ -n "$SNAP_CHANNEL" ] ; then
3 SNAP_INSTALL_OPTS="--$SNAP_CHANNEL"
4fi
5
6snap install $SNAP_INSTALL_OPTS $SNAP_NAME
diff --git a/tests/lib/prepare.sh b/tests/lib/prepare.sh
0new file mode 1006447new file mode 100644
index 0000000..60a45e9
--- /dev/null
+++ b/tests/lib/prepare.sh
@@ -0,0 +1,51 @@
1#!/bin/bash
2
3echo "Wait for firstboot change to be ready"
4while ! snap changes | grep -q "Done"; do
5 snap changes || true
6 snap change 1 || true
7 sleep 1
8done
9
10echo "Ensure fundamental snaps are still present"
11. $TESTSLIB/snap-names.sh
12for name in $gadget_name $kernel_name $core_name; do
13 if ! snap list | grep -q $name ; then
14 echo "Not all fundamental snaps are available, all-snap image not valid"
15 echo "Currently installed snaps:"
16 snap list
17 exit 1
18 fi
19done
20
21echo "Kernel has a store revision"
22snap list | grep ^${kernel_name} | grep -E " [0-9]+\s+canonical"
23
24# If we don't install pulseaudio here we get a system
25# without any network connectivity after reboot.
26if [ -n "$SNAP_CHANNEL" ] ; then
27 # Don't reinstall if we have it installed already
28 if ! snap list | grep pulseaudio ; then
29 snap install --$SNAP_CHANNEL pulseaudio
30 fi
31 echo "USING-CHANNEL"
32else
33 echo "INSTALLING-PULSEAUDIO-SNAP"
34 # Install prebuilt pulseaudio snap but first install if from
35 # the store to work around the fact that we are not allowed
36 # anymore to connect pulseaudio slot to a snap installed with
37 # --dangerous
38 snap install --beta pulseaudio
39 snap install --dangerous /home/pulseaudio/pulseaudio_*_amd64.snap
40fi
41
42# Snapshot of the current snapd state for a later restore
43if [ ! -f $SPREAD_PATH/snapd-state.tar.gz ] ; then
44 systemctl stop snapd.service snapd.socket
45 tar czf $SPREAD_PATH/snapd-state.tar.gz /var/lib/snapd
46 systemctl start snapd.socket
47fi
48
49# For debugging dump all snaps and connected slots/plugs
50snap list
51snap interfaces
diff --git a/tests/lib/restore-each.sh b/tests/lib/restore-each.sh
0new file mode 10064452new file mode 100644
index 0000000..541ba8c
--- /dev/null
+++ b/tests/lib/restore-each.sh
@@ -0,0 +1,22 @@
1#!/bin/bash
2
3. $TESTSLIB/snap-names.sh
4
5# Remove all snaps not being the core, gadget, kernel or snap we're testing
6for snap in /snap/*; do
7 snap="${snap:6}"
8 case "$snap" in
9 "bin" | "$gadget_name" | "$kernel_name" | "$core_name" | "$SNAP_NAME")
10 ;;
11 *)
12 snap remove "$snap"
13 ;;
14 esac
15done
16
17# Ensure we have the same state for snapd as we had before
18systemctl stop snapd.service snapd.socket
19rm -rf /var/lib/snapd/*
20tar xzf $SPREAD_PATH/snapd-state.tar.gz -C /
21rm -rf /root/.snap
22systemctl start snapd.service snapd.socket
diff --git a/tests/lib/snap-names.sh b/tests/lib/snap-names.sh
0new file mode 10064423new file mode 100644
index 0000000..f15b09a
--- /dev/null
+++ b/tests/lib/snap-names.sh
@@ -0,0 +1,7 @@
1#!/bin/bash
2gadget_name=$(snap list | sed -n 's/^\(pc\|pi[23]\|dragonboard\) .*/\1/p')
3kernel_name=$gadget_name-kernel
4core_name=$(snap list | awk '/^(ubuntu-)?core / {print $1; exit}')
5if [ "$kernel_name" = "pi3-kernel" ] ; then
6 kernel_name=pi2-kernel
7fi
diff --git a/tests/lib/utilities.sh b/tests/lib/utilities.sh
0new file mode 1006448new file mode 100644
index 0000000..977d045
--- /dev/null
+++ b/tests/lib/utilities.sh
@@ -0,0 +1,9 @@
1#!/bin/sh
2
3wait_for_pulseaudio() {
4 while ! systemctl status snap.pulseaudio.pulseaudio ; do
5 sleep 1
6 done
7 sleep 1
8}
9
diff --git a/tests/main/installation/task.yaml b/tests/main/installation/task.yaml
0new file mode 10064410new file mode 100644
index 0000000..2d9fb0d
--- /dev/null
+++ b/tests/main/installation/task.yaml
@@ -0,0 +1,16 @@
1summary: Test pulseaudio snap installation was successful
2
3execute: |
4 . $TESTSLIB/utilities.sh
5
6 # Service should be up an running
7 wait_for_pulseaudio
8 systemctl status snap.pulseaudio.pulseaudio | grep -Pzq ': active'
9
10 # pactl should be able to reach PulseAudio
11 /snap/bin/pulseaudio.pactl list | grep -Pzq 'Module'
12
13 # Ensure all necessary plugs/slots are connected
14 snap interfaces | grep -Pzq "pulseaudio:service +pulseaudio:client"
15 snap interfaces | grep -P "\-\ +pulseaudio:home"
16
diff --git a/tests/main/modules-loaded/task.yaml b/tests/main/modules-loaded/task.yaml
0new file mode 10064417new file mode 100644
index 0000000..e9ee7dd
--- /dev/null
+++ b/tests/main/modules-loaded/task.yaml
@@ -0,0 +1,11 @@
1summary: Test for common PuleAudio modules being loaded
2
3execute: |
4 # Check for some obvious PulseAudio modules
5 /snap/bin/pulseaudio.pactl list short | grep -Pzq 'module-device-restore'
6 /snap/bin/pulseaudio.pactl list short | grep -Pzq 'module-stream-restore'
7 /snap/bin/pulseaudio.pactl list short | grep -Pzq 'module-card-restore'
8 /snap/bin/pulseaudio.pactl list short | grep -Pzq 'module-switch-on-port-available'
9 /snap/bin/pulseaudio.pactl list short | grep -Pzq 'module-rescue-streams'
10 /snap/bin/pulseaudio.pactl list short | grep -Pzq 'module-suspend-on-idle'
11
diff --git a/tests/main/pactl/task.yaml b/tests/main/pactl/task.yaml
0new file mode 10064412new file mode 100644
index 0000000..01f93d0
--- /dev/null
+++ b/tests/main/pactl/task.yaml
@@ -0,0 +1,6 @@
1summary: Test pactl is working
2
3execute: |
4 # Does it even work?
5 /snap/bin/pulseaudio.pactl info | grep -Pzq 'Server Name: pulseaudio'
6

Subscribers

People subscribed via source and target branches

to all changes: