on xenial help sign in
Fix up some packaging bits
42dd139Michael Terry
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
37${BINARY:-unity8} --mode=$MODE "$@" &
37${BINARY:-unity8} --mode=$MODE "$@" &
38child=$!
38child=$!
39
39
40−count=0
40+# Wait for SIGSTOP in child
41−while [ $count -lt 2000 ]; do # 20 seconds
42− sleep 0.01
43− if [ $(ps --no-headers -o state $child) = "T" ]; then
41+while [ $(ps --no-headers -o state $child) != "T" ]; do
44− kill -CONT $child
42+ sleep 0.1
45− exit 0
46− fi
47− count=`expr $count + 1`
48done
43done
49
44
50−echo "Aborting unity8 launch: didn't hear back from Mir"
45+kill -CONT $child
51−exit 100
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
3PartOf=graphical-session.target
3PartOf=graphical-session.target
4Requires=dbus.socket
4Requires=dbus.socket
5After=dbus.socket
5After=dbus.socket
6+Before=indicators.target
7+Wants=unity8-dash.service
8+Wants=indicators.target
6
9
7[Service]
10[Service]
8Type=forking
11Type=forking
9ExecStart=/usr/bin/unity8-session
12ExecStart=/usr/bin/unity8-session
10ExecStopPost=/usr/bin/dbus-update-activation-environment --systemd MIR_SOCKET=
13ExecStopPost=/usr/bin/dbus-update-activation-environment --systemd MIR_SOCKET=
11Restart=on-failure
14Restart=on-failure
15+TimeoutStartSec=120
debian/control+2
@@ -6,6 +6,7 @@ Build-Depends: cmake,
6 dbus-test-runner,
6 dbus-test-runner,
7 debhelper (>= 9),
7 debhelper (>= 9),
8 dh-apparmor,
8 dh-apparmor,
9+ dh-systemd,
9 doxyqml,
10 doxyqml,
10# To allow cross-compiling to work, we also must append :native
11# To allow cross-compiling to work, we also must append :native
11# to g++ so we don't try to run arm g++
12# to g++ so we don't try to run arm g++
@@ -71,6 +72,7 @@ Build-Depends: cmake,
71 qtdeclarative5-private-dev (>= 5.6),
72 qtdeclarative5-private-dev (>= 5.6),
72 qtdeclarative5-ubuntu-content1,
73 qtdeclarative5-ubuntu-content1,
73 qtdeclarative5-ubuntu-settings-components (>= 0.11),
74 qtdeclarative5-ubuntu-settings-components (>= 0.11),
75+ systemd,
74 ttf-ubuntu-font-family,
76 ttf-ubuntu-font-family,
75 xvfb,
77 xvfb,
76Standards-Version: 3.9.4
78Standards-Version: 3.9.4
debian/rules+1−1
@@ -9,7 +9,7 @@ export DPKG_GENSYMBOLS_CHECK_LEVEL=4
9export NO_PNG_PKG_MANGLE=1
9export NO_PNG_PKG_MANGLE=1
10
10
11%:
11%:
12− dh $@ --parallel --fail-missing --with python3
12+ dh $@ --parallel --fail-missing --with python3,systemd
13
13
14override_dh_auto_configure:
14override_dh_auto_configure:
15 # Debian defines CMAKE_INSTALL_LOCALSTATEDIR as /usr/var, which is wrong.
15 # Debian defines CMAKE_INSTALL_LOCALSTATEDIR as /usr/var, which is wrong.
debian/unity8.install+1−1
@@ -1,7 +1,7 @@
1debian/usr.bin.unity8-dash etc/apparmor.d
1debian/usr.bin.unity8-dash etc/apparmor.d
2var/lib/unity8/version
2var/lib/unity8/version
3−data/unity8-filewatcher.conf usr/share/upstart/sessions/
4data/unity8.service usr/lib/systemd/user
3data/unity8.service usr/lib/systemd/user
4+data/unity8-dash.service usr/lib/systemd/user
5data/unity8-session usr/bin
5data/unity8-session usr/bin
6data/devices.conf etc/ubuntu/
6data/devices.conf etc/ubuntu/
7data/test.sensors etc/ubuntusensors/
7data/test.sensors etc/ubuntusensors/
plugins/Unity/Launcher/dbusinterface.cpp+2
@@ -39,6 +39,8 @@ QString DBusInterface::introspect(const QString &path) const
39 QString nodes;
39 QString nodes;
40
40
41 // Add Refresh to introspect
41 // 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.
42 nodes = QStringLiteral("<interface name=\"com.canonical.Unity.Launcher\">"
44 nodes = QStringLiteral("<interface name=\"com.canonical.Unity.Launcher\">"
43 "<method name=\"Refresh\"/>"
45 "<method name=\"Refresh\"/>"
44 "</interface>");
46 "</interface>");