on xenial help sign in
Fix up some packaging bits
commit42dd1395734df520b0b0021867068681cab92555 authorMichael Terry <michael.terry@canonical.com> dateMon 3 Apr 2017, 13:35 (10 years ago) parentcb092b5
9 files changed+15−146
data/unity8-dash.conf−26 data/unity8-filewatcher.conf−13 data/unity8-session+5−10 data/unity8.conf−95 data/unity8.service+4 debian/control+2 debian/rules+1−1 debian/unity8.install+1−1 plugins/Unity/Launcher/dbusinterface.cpp+2
data/unity8-dash.confdeleted−26
@@ -1,26 +0,0 @@
1−description "Unity Shell v8 Dash"
2−author "Michael Zanetti <michael.zanetti@canonical.com>"
3−
4−emits scope-ui-starting
5−
6−start on started unity8
7−stop on stopping unity8
8−
9−kill timeout 120
10−
11−# Focused app is 100 so we want to be less likely to get
12−# killed than the focused app but more than Unity8
13−
14−## FIXME
15−#oom score 50
16−
17−respawn
18−respawn limit unlimited
19−
20−env APP_ID=unity8-dash
21−
22−pre-start script
23− initctl emit scope-ui-starting
24−end script
25−
26−exec ${BINARY:-unity8-dash} $ARGS --desktop_file_hint=unity8-dash.desktop
data/unity8-filewatcher.confdeleted−13
@@ -1,13 +0,0 @@
1−description "File system watcher for unity8"
2−author "Michael Zanetti <michael.zanetti@canonical.com>"
3−
4−# This method of updating the launcher will not work in our new snappy world,
5−# neither for snaps installed in the system nor if we are running inside a snap.
6−# Plus it hardcodes the phablet user... To be replaced once bug 1630997 is
7−# fixed in ubuntu-app-launch.
8−
9−# Workaround for bug 1360208. ~ and * in one expression doesn't work currently
10−start on (file FILE=/home/phablet/.local/share/applications/*.desktop) or (file FILE=/usr/share/applications/*.desktop)
11−
12−exec dbus-send --type=method_call --dest=com.canonical.Unity.Launcher /com/canonical/Unity/Launcher com.canonical.Unity.Launcher.Refresh
13−
data/unity8-session+5−10
@@ -37,15 +37,10 @@ export UNITY_MIR_EMITS_SIGSTOP=1
3737${BINARY:-unity8} --mode=$MODE "$@" &
3838child=$!
3939
40−count=0
41−while [ $count -lt 2000 ]; do # 20 seconds
42− sleep 0.01
43− if [ $(ps --no-headers -o state $child) = "T" ]; then
44− kill -CONT $child
45− exit 0
46− fi
47− count=`expr $count + 1`
40+# Wait for SIGSTOP in child
41+while [ $(ps --no-headers -o state $child) != "T" ]; do
42+ sleep 0.1
4843done
4944
50−echo "Aborting unity8 launch: didn't hear back from Mir"
51−exit 100
45+kill -CONT $child
46+exit 0
data/unity8.confdeleted−95
@@ -1,95 +0,0 @@
1−description "Unity Shell v8"
2−author "Ricardo Mendoza <ricmm@ubuntu.com>"
3−
4−emits indicator-services-start
5−
6−start on ((xsession SESSION=ubuntu-touch) or (xsession SESSION=unity8-mir) or (xsession SESSION=unity8)) and started dbus
7−stop on desktop-end
8−
9−kill timeout 120
10−
11−#
12−# Ensure the shell always gets unthrottled touch events, so that applications
13−# who want full speed low-latency input can get it (LP: #1497105) and so that
14−# apps can use QML touch compression safely (the QML touch compression
15−# algorithm does not support nesting well - LP: #1486341, LP: #1556763 - so
16−# must be fed by the raw input event stream from Unity8).
17−#
18−env QML_NO_TOUCH_COMPRESSION=1
19−
20−respawn
21−expect stop
22−
23−# FIXME Create an autopilot test that makes sure start+stop and restart
24−# work fine at least 2 times
25−
26−pre-start script
27− # Tell unity-mir to raise SIGSTOP after we start
28− initctl set-env UNITY_MIR_EMITS_SIGSTOP=1
29−
30− # Save original value of MIR_SOCKET so that we can restore it when stopped,
31− # as we modify the variable for future jobs, including ourself.
32− initctl set-env UNITY_MIR_SOCKET=$MIR_SOCKET
33−
34− # Decide where we are going to put our own socket file
35− if [ -n "$SNAP" ]; then
36− # In snappy, we want to hard code our path because our apparmor profile
37− # only lets us put the socket in one place. And consumers expect it
38− # there.
39− MIR_SERVER_FILE=/run/user/$(id -u)/mir_socket
40− else
41− MIR_SERVER_FILE=$XDG_RUNTIME_DIR/mir_socket
42− fi
43− initctl set-env MIR_SERVER_FILE=$MIR_SERVER_FILE
44−
45− # Point all future jobs in this session to our Mir socket instead of
46− # unity-system-compositor's socket.
47− initctl set-env --global MIR_SOCKET=$MIR_SERVER_FILE
48− gdbus call --session --dest org.freedesktop.DBus --object-path /org/freedesktop/DBus --method org.freedesktop.DBus.UpdateActivationEnvironment "@a{ss} {'MIR_SOCKET': '$MIR_SERVER_FILE'}"
49−
50− # Remove the normal and trusted sockets if still there
51− if [ -S "$MIR_SERVER_FILE" ]; then
52− rm "$MIR_SERVER_FILE"
53− fi
54−
55− if [ -S "${MIR_SERVER_FILE}_trusted" ]; then
56− rm "${MIR_SERVER_FILE}_trusted"
57− fi
58−
59− initctl set-env --global MIR_SERVER_PROMPT_FILE=1
60−
61− # Disable Qt's stuttering 'touch compression' to fix scrolling smoothness
62− # issues (LP: #1486341, LP: #1556763). As a bonus, this eliminates most of
63− # the lag seen in the indicator panel pull-down (LP: #1488327) and also
64− # reduces lag seen in apps:
65− initctl set-env --global QML_NO_TOUCH_COMPRESSION=1
66−
67− # Workaround for text not rendering correctly
68− initctl set-env --global QT_ENABLE_GLYPH_CACHE_WORKAROUND=1
69−
70− if [ "$XDG_SESSION_DESKTOP" = "ubuntu-touch" ]; then
71− # On Ubuntu Touch, we currently use a trick where we auto-login the
72− # user without a LightDM greeter at all. In this case, we want to
73− # start with the lockscreen visible. Once we switch to using a
74− # proper greeter for the first login, we can remove this code path.
75− initctl set-env MODE=full-greeter
76− else
77− initctl set-env MODE=full-shell
78− fi
79−
80− # HACK! WORKAROUND FOR HALIUM MISSING UBUNTU_PLATFORM_API
81− initctl set-env --global UBUNTU_PLATFORM_API_BACKEND=test.so.3
82− initctl set-env --global UBUNTU_PLATFORM_API_SENSOR_TEST=/etc/ubuntusensors/test.sensors
83−end script
84−
85−exec ${BINARY:-unity8} --mode=$MODE $ARGS
86−
87−post-start script
88− initctl emit --no-wait indicator-services-start
89−end script
90−
91−post-stop script
92− initctl set-env --global MIR_SOCKET=$UNITY_MIR_SOCKET
93− initctl unset-env --global MIR_SERVER_PROMPT_FILE
94− initctl emit application-end
95−end script
data/unity8.service+4
@@ -3,9 +3,13 @@ Description=Unity Shell v8
33PartOf=graphical-session.target
44Requires=dbus.socket
55After=dbus.socket
6+Before=indicators.target
7+Wants=unity8-dash.service
8+Wants=indicators.target
69
710[Service]
811Type=forking
912ExecStart=/usr/bin/unity8-session
1013ExecStopPost=/usr/bin/dbus-update-activation-environment --systemd MIR_SOCKET=
1114Restart=on-failure
15+TimeoutStartSec=120
debian/control+2
@@ -6,6 +6,7 @@ Build-Depends: cmake,
66 dbus-test-runner,
77 debhelper (>= 9),
88 dh-apparmor,
9+ dh-systemd,
910 doxyqml,
1011# To allow cross-compiling to work, we also must append :native
1112# to g++ so we don't try to run arm g++
@@ -71,6 +72,7 @@ Build-Depends: cmake,
7172 qtdeclarative5-private-dev (>= 5.6),
7273 qtdeclarative5-ubuntu-content1,
7374 qtdeclarative5-ubuntu-settings-components (>= 0.11),
75+ systemd,
7476 ttf-ubuntu-font-family,
7577 xvfb,
7678Standards-Version: 3.9.4
debian/rules+1−1
@@ -9,7 +9,7 @@ export DPKG_GENSYMBOLS_CHECK_LEVEL=4
99export NO_PNG_PKG_MANGLE=1
1010
1111%:
12− dh $@ --parallel --fail-missing --with python3
12+ dh $@ --parallel --fail-missing --with python3,systemd
1313
1414override_dh_auto_configure:
1515 # Debian defines CMAKE_INSTALL_LOCALSTATEDIR as /usr/var, which is wrong.
debian/unity8.install+1−1
@@ -1,7 +1,7 @@
11debian/usr.bin.unity8-dash etc/apparmor.d
22var/lib/unity8/version
3−data/unity8-filewatcher.conf usr/share/upstart/sessions/
43data/unity8.service usr/lib/systemd/user
4+data/unity8-dash.service usr/lib/systemd/user
55data/unity8-session usr/bin
66data/devices.conf etc/ubuntu/
77data/test.sensors etc/ubuntusensors/
plugins/Unity/Launcher/dbusinterface.cpp+2
@@ -39,6 +39,8 @@ QString DBusInterface::introspect(const QString &path) const
3939 QString nodes;
4040
4141 // Add Refresh to introspect
42+ // TODO: Confirm this is still used anywhere and remove if not.
43+ // It used to be used in an upstart job when desktop fles changed.
4244 nodes = QStringLiteral("<interface name=\"com.canonical.Unity.Launcher\">"
4345 "<method name=\"Refresh\"/>"
4446 "</interface>");