Merge lp:~seb128/hud/systemd into lp:hud

Proposed by Sebastien Bacher on 2016-10-26
Status: Merged
Approved by: Martin Pitt on 2016-10-26
Approved revision: 407
Merged at revision: 407
Proposed branch: lp:~seb128/hud/systemd
Merge into: lp:hud
Diff against target: 189 lines (+39/-64)
10 files modified
data/CMakeLists.txt (+18/-32)
data/com.canonical.hud.service.in (+2/-1)
data/dbus-activation-hack.sh.in (+0/-15)
data/hud.conf.in (+0/-8)
data/hud.service.in (+8/-0)
data/window-stack-bridge.conf.in (+0/-6)
data/window-stack-bridge.service.in (+7/-0)
debian/control (+2/-1)
debian/hud.install (+1/-1)
debian/hud.links (+1/-0)
To merge this branch: bzr merge lp:~seb128/hud/systemd
Reviewer Review Type Date Requested Status
Martin Pitt 2016-10-26 Approve on 2016-10-26
Review via email: mp+309330@code.launchpad.net

Commit Message

Switch the user session to systemd. Remove the dbus activation hacks and
the upstart jobs since the only session using those the hud is unity
which is the one migrating to systemd

Description of the Change

Switch the user session to systemd. Remove the dbus activation hacks and
the upstart jobs since the only session using those the hud is unity
which is the one migrating to systemd

To post a comment you must log in.
Martin Pitt (pitti) wrote :

Previously reviewed/approved: https://code.launchpad.net/~seb128/hud/systemd-for-session/+merge/300430

This just drops the changelog. LGTM, thanks!

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'data/CMakeLists.txt'
2--- data/CMakeLists.txt 2013-11-08 09:03:30 +0000
3+++ data/CMakeLists.txt 2016-10-26 09:59:14 +0000
4@@ -31,36 +31,22 @@
5 )
6
7 ###########################
8-# Upstart Job
9+# Systemd Unit
10 ###########################
11
12-set(HUD_UPSTART
13-"${CMAKE_CURRENT_BINARY_DIR}/hud.conf"
14-)
15-
16-set(pkglibexecdir "${CMAKE_INSTALL_FULL_LIBEXECDIR}/hud")
17-configure_file("hud.conf.in"
18- "${HUD_UPSTART}"
19- @ONLY
20-)
21-
22-install(
23-FILES
24-"${HUD_UPSTART}"
25-DESTINATION "${CMAKE_INSTALL_DATADIR}/upstart/sessions"
26-)
27-
28-set(pkglibexecdir "${CMAKE_INSTALL_FULL_LIBEXECDIR}/hud")
29-configure_file("dbus-activation-hack.sh.in"
30- "${CMAKE_CURRENT_BINARY_DIR}/dbus-activation-hack.sh"
31- @ONLY
32-)
33-
34-install(
35-PROGRAMS
36-"${CMAKE_CURRENT_BINARY_DIR}/dbus-activation-hack.sh"
37-DESTINATION
38-"${CMAKE_INSTALL_FULL_LIBEXECDIR}/hud"
39+# where to install
40+pkg_get_variable(SYSTEMD_USER_DIR systemd systemduserunitdir)
41+message (STATUS "${SYSTEMD_USER_DIR} is the systemd user unit file install dir")
42+
43+set(pkglibexecdir "${CMAKE_INSTALL_FULL_LIBEXECDIR}/hud")
44+configure_file("hud.service.in"
45+ "hud.service"
46+ @ONLY
47+)
48+
49+install(
50+FILES "${CMAKE_CURRENT_BINARY_DIR}/hud.service"
51+DESTINATION "${SYSTEMD_USER_DIR}"
52 )
53
54 ###########################
55@@ -68,14 +54,14 @@
56 ###########################
57
58 configure_file(
59- "window-stack-bridge.conf.in"
60- "window-stack-bridge.conf"
61+ "window-stack-bridge.service.in"
62+ "window-stack-bridge.service"
63 @ONLY
64 )
65
66 install(
67- FILES "${CMAKE_CURRENT_BINARY_DIR}/window-stack-bridge.conf"
68- DESTINATION "${CMAKE_INSTALL_DATADIR}/upstart/sessions"
69+ FILES "${CMAKE_CURRENT_BINARY_DIR}/window-stack-bridge.service"
70+ DESTINATION "${SYSTEMD_USER_DIR}"
71 )
72
73 ###########################
74
75=== modified file 'data/com.canonical.hud.service.in'
76--- data/com.canonical.hud.service.in 2013-06-10 17:33:58 +0000
77+++ data/com.canonical.hud.service.in 2016-10-26 09:59:14 +0000
78@@ -1,3 +1,4 @@
79 [D-BUS Service]
80 Name=com.canonical.hud
81-Exec=@pkglibexecdir@/dbus-activation-hack.sh
82+Exec=@pkglibexecdir@/hud-service
83+SystemdService=hud.service
84
85=== removed file 'data/dbus-activation-hack.sh.in'
86--- data/dbus-activation-hack.sh.in 2013-10-08 20:19:53 +0000
87+++ data/dbus-activation-hack.sh.in 1970-01-01 00:00:00 +0000
88@@ -1,15 +0,0 @@
89-#!/bin/sh
90-
91-# This is a quick hack to make it so that DBus activation works as the
92-# DBus daemon holds onto the PID until the name gets registered. So we
93-# need the PID to exist until then. 10 seconds should be more that enough
94-# time for the service to register the name.
95-#
96-# This can go away if we get DBus Activation for Upstart
97-
98-if [ "x$UPSTART_SESSION" != "x" ]; then
99- start hud
100- sleep 10
101-else
102- @pkglibexecdir@/hud-service
103-fi
104
105=== removed file 'data/hud.conf.in'
106--- data/hud.conf.in 2014-09-15 15:49:21 +0000
107+++ data/hud.conf.in 1970-01-01 00:00:00 +0000
108@@ -1,8 +0,0 @@
109-description "Unity HUD"
110-
111-# Currently started by the dbus service file
112-# start on dbus-activation com.canonical.hud
113-stop on desktop-end
114-start on started dbus and ((xsession SESSION=ubuntu-touch) or (xsession SESSION=ubuntu-touch-surfaceflinger) or (xsession SESSION=ubuntu))
115-
116-exec @pkglibexecdir@/hud-service
117
118=== added file 'data/hud.service.in'
119--- data/hud.service.in 1970-01-01 00:00:00 +0000
120+++ data/hud.service.in 2016-10-26 09:59:14 +0000
121@@ -0,0 +1,8 @@
122+[Unit]
123+Description=Unity HUD
124+PartOf=graphical-session.target
125+
126+[Service]
127+Type=dbus
128+BusName=com.canonical.hud
129+ExecStart=@pkglibexecdir@/hud-service
130
131=== removed file 'data/window-stack-bridge.conf.in'
132--- data/window-stack-bridge.conf.in 2014-09-15 15:53:16 +0000
133+++ data/window-stack-bridge.conf.in 1970-01-01 00:00:00 +0000
134@@ -1,6 +0,0 @@
135-description "Window Stack Bridge"
136-
137-start on started dbus
138-stop on desktop-end
139-
140-exec @pkglibexecdir@/window-stack-bridge
141
142=== added file 'data/window-stack-bridge.service.in'
143--- data/window-stack-bridge.service.in 1970-01-01 00:00:00 +0000
144+++ data/window-stack-bridge.service.in 2016-10-26 09:59:14 +0000
145@@ -0,0 +1,7 @@
146+[Unit]
147+Description=Window Stack Bridge
148+PartOf=graphical-session.target
149+
150+[Service]
151+ExecStart=@pkglibexecdir@/window-stack-bridge
152+Restart=on-failure
153
154=== modified file 'debian/control'
155--- debian/control 2015-08-20 13:44:43 +0000
156+++ debian/control 2016-10-26 09:59:14 +0000
157@@ -2,7 +2,7 @@
158 Section: gnome
159 Priority: optional
160 Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com>
161-Build-Depends: cmake,
162+Build-Depends: cmake (>= 3.4),
163 debhelper (>= 9),
164 gnome-common,
165 gobject-introspection,
166@@ -27,6 +27,7 @@
167 python-setuptools,
168 qtbase5-dev,
169 qtdbustest-runner,
170+ systemd,
171 valac,
172 xvfb,
173 Standards-Version: 3.9.4
174
175=== modified file 'debian/hud.install'
176--- debian/hud.install 2013-06-10 17:36:43 +0000
177+++ debian/hud.install 2016-10-26 09:59:14 +0000
178@@ -3,4 +3,4 @@
179 usr/lib/*/hud
180 usr/share/dbus-1
181 usr/share/glib-2.0
182-usr/share/upstart/sessions
183+usr/lib/systemd
184
185=== added file 'debian/hud.links'
186--- debian/hud.links 1970-01-01 00:00:00 +0000
187+++ debian/hud.links 2016-10-26 09:59:14 +0000
188@@ -0,0 +1,1 @@
189+usr/lib/systemd/user/window-stack-bridge.service usr/lib/systemd/user/ubuntu-session.target.wants/window-stack-bridge.service

Subscribers

People subscribed via source and target branches