on xenial help sign in
Uses UNITY_MIR_EMITS_SIGSTOP according to https://code.launchpad.net/~cimi/unity-mir/unity-mir.stop-server_wizard

Cleans also MIR env vars after stopping the upstart job

commit2e3badc4cefb108a3c0d06d7f5f110c8561b794d authorAndrea Cimitan <andrea.cimitan@gmail.com> dateTue 29 Apr 2014, 15:19 (12 years ago) parenta14b4bb4eac437
4 files changed+18−3
data/unity8.conf+8 debian/changelog+7 debian/control+1−1 tests/autopilot/unity8/shell/tests/test_upstart.py+2−2
data/unity8.conf+8
@@ -12,6 +12,9 @@ respawn
1212expect stop
1313
1414pre-start script
15+ # Tell unity-mir to raise SIGSTOP after we start
16+ initctl set-env UNITY_MIR_EMITS_SIGSTOP=1
17+
1518 if [ -n "$MIR_SOCKET" ]; then
1619 if [ -z "$UNITY_MIR_SOCKET" ]; then
1720 # Save original value of MIR_SOCKET in case we are restarted,
@@ -46,3 +49,8 @@ pre-start script
4649end script
4750
4851exec ${BINARY:-unity8} $ARGS
52+
53+post-stop script
54+ initctl set-env --global MIR_SOCKET=$UNITY_MIR_SOCKET
55+ initctl unset-env --global UNITY_MIR_SOCKET
56+end script
debian/changelog+7
@@ -1,3 +1,10 @@
1+unity8 (7.86-0ubuntu1) UNRELEASED; urgency=medium
2+
3+ [ Andrea Cimitan ]
4+ * Update upstart job to reflect latest unity-mir changes
5+
6+ -- Andrea Cimitan <andrea.cimitan@gmail.com> Tue, 29 Apr 2014 09:13:06 +0100
7+
18unity8 (7.85+14.04.20140416-0ubuntu1) trusty; urgency=low
29
310 [ Albert Astals ]
debian/control+1−1
@@ -72,7 +72,7 @@ Architecture: any
7272Provides: indicator-renderer,
7373Depends: gsettings-desktop-schemas,
7474 libglib2.0-bin,
75− libunity-mir1,
75+ libunity-mir1 (>= 0.4),
7676 qmenumodel-qml (>= 0.2.7),
7777 qtdeclarative5-dee-plugin,
7878 qtdeclarative5-gsettings1.0,
tests/autopilot/unity8/shell/tests/test_upstart.py+2−2
@@ -82,7 +82,7 @@ class UpstartIntegrationTests(UnityTestCase):
8282 ))
8383
8484 def test_no_sigstop(self):
85− self.patch_environment("UPSTART_JOB", "foo")
85+ self.patch_environment("UNITY_MIR_EMITS_SIGSTOP", "")
8686 self._launch_unity()
8787 self._set_proxy()
8888
@@ -91,7 +91,7 @@ class UpstartIntegrationTests(UnityTestCase):
9191 logger.debug("Unity loaded and ready.")
9292
9393 def test_expect_sigstop(self):
94− self.patch_environment("UPSTART_JOB", "unity8")
94+ self.patch_environment("UNITY_MIR_EMITS_SIGSTOP", "1")
9595 self._launch_unity()
9696 self.assertThat(lambda: os.WIFSTOPPED(self._get_status()), Eventually(Equals(True)), "Unity8 should raise SIGSTOP when ready")
9797