Merge ~kzapalowicz/snappy-hwe-snaps/+git/pulseaudio:feature/fix-runtime-issues into ~snappy-hwe-team/snappy-hwe-snaps/+git/pulseaudio:master

Proposed by Konrad Zapałowicz
Status: Merged
Approved by: Simon Fels
Approved revision: 0792791574a2772161f8f51082ceef5db7885a12
Merged at revision: c3e5e6edc7f6eb369945d7d8a0837a3dc60f2044
Proposed branch: ~kzapalowicz/snappy-hwe-snaps/+git/pulseaudio:feature/fix-runtime-issues
Merge into: ~snappy-hwe-team/snappy-hwe-snaps/+git/pulseaudio:master
Diff against target: 136 lines (+27/-11)
8 files modified
bin/pactl (+5/-0)
bin/paplay (+5/-0)
bin/parec (+5/-0)
run-tests.sh (+1/-1)
snapcraft.yaml (+3/-3)
tests/image/create-image.sh (+1/-1)
tests/lib/prepare-all.sh (+2/-1)
tests/lib/prepare.sh (+5/-5)
Reviewer Review Type Date Requested Status
System Enablement Bot continuous-integration Approve
Simon Fels Approve
Matteo Croce (community) Approve
Review via email: mp+313340@code.launchpad.net

Commit message

Fix issues related with running the snap on the target system.

The introduced changes deal with:

1.

SecComp complaining of using send syscall

2.

pactl, parec and paplay commands trying to create the /run/user/[0-9]*
which is forbidden by the AppArmor rules due to security reasons.

Description of the change

Fix issues related with running the snap on the target system.

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

LGTM, but we need to wait until the CI is fixed.

Revision history for this message
Simon Fels (morphis) :
review: Approve
Revision history for this message
System Enablement Bot (system-enablement-ci-bot) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
System Enablement Bot (system-enablement-ci-bot) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
System Enablement Bot (system-enablement-ci-bot) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
System Enablement Bot (system-enablement-ci-bot) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
System Enablement Bot (system-enablement-ci-bot) wrote :
review: Approve (continuous-integration)
Revision history for this message
System Enablement Bot (system-enablement-ci-bot) wrote :
review: Approve (continuous-integration)
Revision history for this message
System Enablement Bot (system-enablement-ci-bot) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
System Enablement Bot (system-enablement-ci-bot) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
System Enablement Bot (system-enablement-ci-bot) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
System Enablement Bot (system-enablement-ci-bot) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
System Enablement Bot (system-enablement-ci-bot) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
System Enablement Bot (system-enablement-ci-bot) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
System Enablement Bot (system-enablement-ci-bot) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Simon Fels (morphis) wrote :

The problem the CI sees here

Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 libudev-dev : Depends: libudev1 (= 229-4ubuntu13) but 229-4ubuntu13+ppa1 is to be installed
E: Unable to correct problems, you have held broken packages.

is caused by the ubuntu-image ppa (https://launchpad.net/~snappy-dev/+archive/ubuntu/image/+packages) which has a different version of systemd. 229-4ubuntu13 (xenial-updates) vs. 229-4ubuntu13+ppa1 (ubuntu-image ppa). As 229-4ubuntu13+ppa1 sorts lower than 229-4ubuntu13 but is installed in the rootfs the classic snaps creates this leads to the error seen above.

As we can safely update from 229-4ubuntu13+ppa1 to 229-4ubuntu13 (both include the same fix) and additional

$ apt upgrade --yes --force-yes

in the script should solve this problem.

Revision history for this message
System Enablement Bot (system-enablement-ci-bot) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
System Enablement Bot (system-enablement-ci-bot) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
System Enablement Bot (system-enablement-ci-bot) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
System Enablement Bot (system-enablement-ci-bot) wrote :
review: Approve (continuous-integration)
Revision history for this message
System Enablement Bot (system-enablement-ci-bot) wrote :
review: Approve (continuous-integration)
Revision history for this message
System Enablement Bot (system-enablement-ci-bot) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
System Enablement Bot (system-enablement-ci-bot) wrote :
review: Approve (continuous-integration)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
diff --git a/bin/pactl b/bin/pactl
index ad5e799..97e23b2 100755
--- a/bin/pactl
+++ b/bin/pactl
@@ -14,6 +14,11 @@
14# You should have received a copy of the GNU General Public License14# 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/>.15# along with this program. If not, see <http://www.gnu.org/licenses/>.
1616
17if [ $(id -u) -ne 0 ]; then
18 echo "This script must be run as root" 1>&2
19 exit 1
20fi
21
17export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$SNAP/usr/lib/pulseaudio:$SNAP/usr/lib/pulse-8.0/modules/22export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$SNAP/usr/lib/pulseaudio:$SNAP/usr/lib/pulse-8.0/modules/
18export PULSE_CLIENTCONFIG=$SNAP/etc/pulse/client.conf23export PULSE_CLIENTCONFIG=$SNAP/etc/pulse/client.conf
19export HOME=$SNAP_DATA/home24export HOME=$SNAP_DATA/home
diff --git a/bin/paplay b/bin/paplay
index 4f83d77..a132d51 100755
--- a/bin/paplay
+++ b/bin/paplay
@@ -14,6 +14,11 @@
14# You should have received a copy of the GNU General Public License14# 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/>.15# along with this program. If not, see <http://www.gnu.org/licenses/>.
1616
17if [ $(id -u) -ne 0 ]; then
18 echo "This script must be run as root" 1>&2
19 exit 1
20fi
21
17export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$SNAP/usr/lib/pulseaudio:$SNAP/usr/lib/pulse-8.0/modules/22export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$SNAP/usr/lib/pulseaudio:$SNAP/usr/lib/pulse-8.0/modules/
18export PULSE_CLIENTCONFIG=$SNAP/etc/pulse/client.conf23export PULSE_CLIENTCONFIG=$SNAP/etc/pulse/client.conf
19export HOME=$SNAP_DATA/home24export HOME=$SNAP_DATA/home
diff --git a/bin/parec b/bin/parec
index 0c1cafd..269e0f8 100755
--- a/bin/parec
+++ b/bin/parec
@@ -14,6 +14,11 @@
14# You should have received a copy of the GNU General Public License14# 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/>.15# along with this program. If not, see <http://www.gnu.org/licenses/>.
1616
17if [ $(id -u) -ne 0 ]; then
18 echo "This script must be run as root" 1>&2
19 exit 1
20fi
21
17export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$SNAP/usr/lib/pulseaudio:$SNAP/usr/lib/pulse-8.0/modules/22export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$SNAP/usr/lib/pulseaudio:$SNAP/usr/lib/pulse-8.0/modules/
18export PULSE_CLIENTCONFIG=$SNAP/etc/pulse/client.conf23export PULSE_CLIENTCONFIG=$SNAP/etc/pulse/client.conf
19export HOME=$SNAP_DATA/home24export HOME=$SNAP_DATA/home
diff --git a/run-tests.sh b/run-tests.sh
index f2e9079..b4ce91b 100755
--- a/run-tests.sh
+++ b/run-tests.sh
@@ -17,7 +17,7 @@
17set -ex17set -ex
1818
19image_name=ubuntu-core-16.img19image_name=ubuntu-core-16.img
20channel=candidate20channel=stable
21spread_opts=21spread_opts=
22force_new_image=022force_new_image=0
23test_from_channel=023test_from_channel=0
diff --git a/snapcraft.yaml b/snapcraft.yaml
index abb0b5f..8568c89 100644
--- a/snapcraft.yaml
+++ b/snapcraft.yaml
@@ -18,13 +18,13 @@ apps:
18 slots: [service]18 slots: [service]
19 pactl:19 pactl:
20 command: bin/pactl20 command: bin/pactl
21 plugs: [client]21 plugs: [client, network]
22 paplay:22 paplay:
23 command: bin/paplay23 command: bin/paplay
24 plugs: [client,home]24 plugs: [client, home, network]
25 parec:25 parec:
26 command: bin/parec26 command: bin/parec
27 plugs: [client]27 plugs: [client, home, network]
28 config:28 config:
29 command: bin/config29 command: bin/config
3030
diff --git a/tests/image/create-image.sh b/tests/image/create-image.sh
index e3c36e0..3aa1d13 100755
--- a/tests/image/create-image.sh
+++ b/tests/image/create-image.sh
@@ -21,7 +21,7 @@ if [ $(id -u) -ne 0 ] ; then
21 exit 121 exit 1
22fi22fi
2323
24channel=candidate24channel=stable
25if [ ! -z "$1" ] ; then25if [ ! -z "$1" ] ; then
26 channel=$126 channel=$1
27fi27fi
diff --git a/tests/lib/prepare-all.sh b/tests/lib/prepare-all.sh
index e3178fd..a65d357 100644
--- a/tests/lib/prepare-all.sh
+++ b/tests/lib/prepare-all.sh
@@ -6,12 +6,13 @@ if [ -n "$SNAP_CHANNEL" ] ; then
6 exit 06 exit 0
7fi7fi
88
9# Setup classic snap and build the network-manager snap in there9# Setup classic snap and build the pulseaudio snap in there
10snap install --devmode --beta classic10snap install --devmode --beta classic
11cat <<-EOF > /home/test/build-snap.sh11cat <<-EOF > /home/test/build-snap.sh
12#!/bin/sh12#!/bin/sh
13set -ex13set -ex
14apt update14apt update
15apt upgrade --yes --force-yes
15apt install -y --force-yes snapcraft16apt install -y --force-yes snapcraft
16cd /home/pulseaudio17cd /home/pulseaudio
17snapcraft clean18snapcraft clean
diff --git a/tests/lib/prepare.sh b/tests/lib/prepare.sh
index 4b360b5..60a45e9 100644
--- a/tests/lib/prepare.sh
+++ b/tests/lib/prepare.sh
@@ -31,12 +31,12 @@ if [ -n "$SNAP_CHANNEL" ] ; then
31 echo "USING-CHANNEL"31 echo "USING-CHANNEL"
32else32else
33 echo "INSTALLING-PULSEAUDIO-SNAP"33 echo "INSTALLING-PULSEAUDIO-SNAP"
34 # Install prebuilt pulseaudio snap34 # 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
35 snap install --dangerous /home/pulseaudio/pulseaudio_*_amd64.snap39 snap install --dangerous /home/pulseaudio/pulseaudio_*_amd64.snap
36 # As we have a snap which we build locally its unasserted and therefor
37 # we don't have any snap-declarations in place and need to manually
38 # connect all plugs.
39 snap connect pulseaudio:client pulseaudio:service
40fi40fi
4141
42# Snapshot of the current snapd state for a later restore42# Snapshot of the current snapd state for a later restore

Subscribers

People subscribed via source and target branches