on xenial help sign in
Merge ~lool/unity8/drop-setcap-conf.

Drop unity8-setcap.conf as this breaks desktop installs (no boot-hook event is emitted, boot stalls); add maintscript snippet to rm_conffile on upgrades; this boot-hook is now shipped under a different name in lxc-android-config.

commit1a5672eaff862c104f539058bec74a7793a2cfb0 authorLoïc Minier <loic.minier@ubuntu.com> dateThu 17 Oct 2013, 01:05 (13 years ago) parent2f1d7f10082426
3 files changed+1−33
data/unity8-setcap.conf−32 debian/unity8.install−1 debian/unity8.maintscript+1
data/unity8-setcap.confdeleted−32
@@ -1,32 +0,0 @@
1−# unity8-setcap - ugly hacks to arrange for /usr/bin/unity8 to have CAP_SYS_RESOURCE
2−
3−# XXX replace me with some root-helper to gain CAP_SYS_RESOURCE XXX
4−
5−author "Loïc Minier <loic.minier@ubuntu.com>"
6−description "Ugly hacks to arrange for /usr/bin/unity8 to have CAP_SYS_RESOURCE"
7−
8−# start when first boot-hooks event is emitted and before lightdm (lightdm
9−# starts ubuntu-touch-session which starts unity8); note that /run is
10−# guaranteeds to be be there because lightdm starts on filesystem
11−start on boot-hooks and starting lightdm
12−
13−# NOT a task as otherwise this would block restarting lightdm
14−
15−env RUNDIR=/run/unity8-setcap
16−
17−# work needs to be done in pre-start as this really is a job with nothing to
18−# start
19−pre-start script
20− if [ ! -e "$RUNDIR" ]; then
21− mkdir "$RUNDIR"
22− # /run is noexec, hence mounting another tmpfs exec
23− # NB: unity8 is 35K; 512K should be enough for everyone
24− mount -o rw,nosuid,nodev,exec,relatime,mode=755,size=512k -t tmpfs tmpfs "$RUNDIR"
25− cp -a /usr/bin/unity8 "$RUNDIR"
26− setcap CAP_SYS_RESOURCE=+ep "$RUNDIR/unity8"
27− # bind-mount this back as unity8 checks dirname(argv[0]'s) == /usr to
28− # decide whether it's installed or not
29− mount --bind "$RUNDIR/unity8" /usr/bin/unity8
30− fi
31−end script
32−
debian/unity8.install−1
@@ -14,4 +14,3 @@ usr/share/unity8/Shell.qml
1414usr/share/unity8/SideStage
1515usr/share/unity8/graphics
1616data/unity8.conf usr/share/upstart/sessions/
17−data/unity8-setcap.conf etc/init/boot-hooks/
debian/unity8.maintscriptnew file+1
@@ -0,0 +1 @@
1+rm_conffile /etc/init/boot-hooks/unity8-setcap.conf