Merge lp:~seb128/update-notifier/systemd into lp:update-notifier/ubuntu

Proposed by Sebastien Bacher
Status: Merged
Merge reported by: Sebastien Bacher
Merged at revision: not available
Proposed branch: lp:~seb128/update-notifier/systemd
Merge into: lp:update-notifier/ubuntu
Diff against target: 241 lines (+95/-5)
20 files modified
debian/changelog (+16/-0)
debian/systemd/unicast-local-avahi.override (+1/-0)
debian/systemd/unicast-local-avahi.path (+6/-0)
debian/systemd/unicast-local-avahi.service (+6/-0)
debian/systemd/update-notifier-cds.override (+1/-0)
debian/systemd/update-notifier-crash.override (+1/-0)
debian/systemd/update-notifier-crash.path (+6/-0)
debian/systemd/update-notifier-crash.service (+7/-0)
debian/systemd/update-notifier-hp-firmware.override (+1/-0)
debian/systemd/update-notifier-release.override (+1/-0)
debian/systemd/update-notifier-release.path (+6/-0)
debian/systemd/update-notifier-release.service (+7/-0)
debian/unicast-local-avahi.conf (+1/-1)
debian/update-notifier-cds.conf (+1/-1)
debian/update-notifier-crash (+13/-0)
debian/update-notifier.install (+15/-0)
debian/update-notifier.links (+3/-0)
src/avahi.c (+1/-1)
src/update-notifier.h (+1/-1)
src/update.c (+1/-1)
To merge this branch: bzr merge lp:~seb128/update-notifier/systemd
Reviewer Review Type Date Requested Status
Martin Pitt Approve
Ubuntu Core Development Team Pending
Review via email: mp+300634@code.launchpad.net

Commit message

  * debian/update-notifier-cds.conf:
    - use a valid variable to get the device name
  * debian/systemd, debian/update-notifier.install,links,crash:
    - convert the crash, unicast and release jobs to systemd
  * debian/systemd/update-notifier-cds.override,
    debian/systemd/update-notifier-hp-firmware.override,
    debian/update-notifier.install:
    - disable the cd-upgrade and hp-firware jobs under systemd,
      they are not important and need more work

Description of the change

  * debian/update-notifier-cds.conf:
    - use a valid variable to get the device name
  * debian/systemd, debian/update-notifier.install,links,crash:
    - convert the crash, unicast and release jobs to systemd
  * debian/systemd/update-notifier-cds.override,
    debian/systemd/update-notifier-hp-firmware.override,
    debian/update-notifier.install:
    - disable the cd-upgrade and hp-firware jobs under systemd,
      they are not important and need more work

To post a comment you must log in.
Revision history for this message
Martin Pitt (pitti) wrote :

Looks mostly good, thanks for working on this! I found some nitpicks.

review: Needs Fixing
lp:~seb128/update-notifier/systemd updated
882. By Sebastien Bacher

tweak the systems jobs to fix the issues pointed in the review
* src/avahi.c, src/update.c, src/update-notifier.h,
  - use /run instead of /var/run

Revision history for this message
Sebastien Bacher (seb128) wrote :

thanks for the review, updated version up for review!

Revision history for this message
Martin Pitt (pitti) wrote :

Thanks, looks great now! Just one more nitpick about LP refs in the changelog.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'debian/changelog'
2--- debian/changelog 2016-07-11 22:05:34 +0000
3+++ debian/changelog 2016-07-20 16:52:23 +0000
4@@ -1,3 +1,19 @@
5+update-notifier (3.171) UNRELEASED; urgency=medium
6+
7+ * debian/update-notifier-cds.conf:
8+ - use a valid variable to get the device name
9+ * debian/systemd, debian/update-notifier.install,links,crash:
10+ - convert the crash, unicast and release jobs to systemd
11+ * debian/systemd/update-notifier-cds.override,
12+ debian/systemd/update-notifier-hp-firmware.override,
13+ debian/update-notifier.install:
14+ - disable the cd-upgrade and hp-firware jobs under systemd,
15+ they are not important and need more work
16+ * src/avahi.c, src/update.c, src/update-notifier.h,
17+ - use /run instead of /var/run
18+
19+ -- Sebastien Bacher <seb128@ubuntu.com> Wed, 20 Jul 2016 17:29:30 +0200
20+
21 update-notifier (3.170) yakkety; urgency=medium
22
23 * data/apt_check.py: use pkg.get_fullname() instead of pkg.name so that
24
25=== added directory 'debian/systemd'
26=== added file 'debian/systemd/unicast-local-avahi.override'
27--- debian/systemd/unicast-local-avahi.override 1970-01-01 00:00:00 +0000
28+++ debian/systemd/unicast-local-avahi.override 2016-07-20 16:52:23 +0000
29@@ -0,0 +1,1 @@
30+manual
31
32=== added file 'debian/systemd/unicast-local-avahi.path'
33--- debian/systemd/unicast-local-avahi.path 1970-01-01 00:00:00 +0000
34+++ debian/systemd/unicast-local-avahi.path 2016-07-20 16:52:23 +0000
35@@ -0,0 +1,6 @@
36+[Unit]
37+Description=Path trigger for Avahi .local domain notifications
38+PartOf=graphical-session.target
39+
40+[Path]
41+PathChanged=/run/avahi-daemon/disabled-for-unicast-local
42
43=== added file 'debian/systemd/unicast-local-avahi.service'
44--- debian/systemd/unicast-local-avahi.service 1970-01-01 00:00:00 +0000
45+++ debian/systemd/unicast-local-avahi.service 2016-07-20 16:52:23 +0000
46@@ -0,0 +1,6 @@
47+[Unit]
48+Description=Notification regarding avahi disabled due to .local domain
49+
50+[Service]
51+ExecStart=/usr/lib/update-notifier/local-avahi-notification
52+Type=oneshot
53
54=== added file 'debian/systemd/update-notifier-cds.override'
55--- debian/systemd/update-notifier-cds.override 1970-01-01 00:00:00 +0000
56+++ debian/systemd/update-notifier-cds.override 2016-07-20 16:52:23 +0000
57@@ -0,0 +1,1 @@
58+manual
59
60=== added file 'debian/systemd/update-notifier-crash.override'
61--- debian/systemd/update-notifier-crash.override 1970-01-01 00:00:00 +0000
62+++ debian/systemd/update-notifier-crash.override 2016-07-20 16:52:23 +0000
63@@ -0,0 +1,1 @@
64+manual
65
66=== added file 'debian/systemd/update-notifier-crash.path'
67--- debian/systemd/update-notifier-crash.path 1970-01-01 00:00:00 +0000
68+++ debian/systemd/update-notifier-crash.path 2016-07-20 16:52:23 +0000
69@@ -0,0 +1,6 @@
70+[Unit]
71+Description=Path trigger for Apport crash notifications
72+PartOf=graphical-session.target
73+
74+[Path]
75+PathChanged=/var/crash/
76
77=== added file 'debian/systemd/update-notifier-crash.service'
78--- debian/systemd/update-notifier-crash.service 1970-01-01 00:00:00 +0000
79+++ debian/systemd/update-notifier-crash.service 2016-07-20 16:52:23 +0000
80@@ -0,0 +1,7 @@
81+[Unit]
82+Description=Notification regarding a crash report
83+PartOf=graphical-session.target
84+
85+[Service]
86+ExecStart=/usr/lib/update-notifier/update-notifier-crash
87+Type=oneshot
88
89=== added file 'debian/systemd/update-notifier-hp-firmware.override'
90--- debian/systemd/update-notifier-hp-firmware.override 1970-01-01 00:00:00 +0000
91+++ debian/systemd/update-notifier-hp-firmware.override 2016-07-20 16:52:23 +0000
92@@ -0,0 +1,1 @@
93+manual
94
95=== added file 'debian/systemd/update-notifier-release.override'
96--- debian/systemd/update-notifier-release.override 1970-01-01 00:00:00 +0000
97+++ debian/systemd/update-notifier-release.override 2016-07-20 16:52:23 +0000
98@@ -0,0 +1,1 @@
99+manual
100
101=== added file 'debian/systemd/update-notifier-release.path'
102--- debian/systemd/update-notifier-release.path 1970-01-01 00:00:00 +0000
103+++ debian/systemd/update-notifier-release.path 2016-07-20 16:52:23 +0000
104@@ -0,0 +1,6 @@
105+[Unit]
106+Description=Path trigger for new release of Ubuntu notifications
107+PartOf=graphical-session.target
108+
109+[Path]
110+PathChanged=/var/lib/ubuntu-release-upgrader/release-upgrade-available
111
112=== added file 'debian/systemd/update-notifier-release.service'
113--- debian/systemd/update-notifier-release.service 1970-01-01 00:00:00 +0000
114+++ debian/systemd/update-notifier-release.service 2016-07-20 16:52:23 +0000
115@@ -0,0 +1,7 @@
116+[Unit]
117+Description=Notification regarding a new release of Ubuntu
118+PartOf=graphical-session.target
119+
120+[Service]
121+ExecStart=/usr/lib/ubuntu-release-upgrader/check-new-release-gtk
122+Type=oneshot
123
124=== modified file 'debian/unicast-local-avahi.conf'
125--- debian/unicast-local-avahi.conf 2013-04-02 16:57:34 +0000
126+++ debian/unicast-local-avahi.conf 2016-07-20 16:52:23 +0000
127@@ -2,7 +2,7 @@
128 author "Brian Murray <brian@ubuntu.com>"
129
130 start on (
131- file FILE=/var/run/avahi-daemon/disabled-for-unicast-local EVENT=create
132+ file FILE=/run/avahi-daemon/disabled-for-unicast-local EVENT=create
133 )
134
135
136
137=== modified file 'debian/update-notifier-cds.conf'
138--- debian/update-notifier-cds.conf 2015-01-20 09:34:45 +0000
139+++ debian/update-notifier-cds.conf 2016-07-20 16:52:23 +0000
140@@ -13,7 +13,7 @@
141 DATE=$(date)
142 echo "$DATE CD found at $DEVNAME"
143 sleep 10
144-MOUNTPOINT=$(printf $(awk "{if (\$1 == \"$D\") {print \$2}}" /proc/mounts ))
145+MOUNTPOINT=$(printf $(awk "{if (\$1 == \"$DEVNAME\") {print \$2}}" /proc/mounts ))
146 echo "CD mounted at $MOUNTPOINT"
147 if [ -L "$MOUNTPOINT/ubuntu" ] || [ -e "$MOUNTPOINT/cdromupgrade" ]
148 then
149
150=== added file 'debian/update-notifier-crash'
151--- debian/update-notifier-crash 1970-01-01 00:00:00 +0000
152+++ debian/update-notifier-crash 2016-07-20 16:52:23 +0000
153@@ -0,0 +1,13 @@
154+#!/bin/sh
155+set -e
156+
157+if /usr/share/apport/apport-checkreports; then
158+ /usr/share/apport/apport-gtk
159+else
160+ if /usr/share/apport/apport-checkreports --system; then
161+ if groups | grep -qE "sudo|admin" ; then
162+ /usr/lib/update-notifier/system-crash-notification
163+ fi
164+ fi
165+fi
166+
167
168=== modified file 'debian/update-notifier.install'
169--- debian/update-notifier.install 2013-06-04 17:06:19 +0000
170+++ debian/update-notifier.install 2016-07-20 16:52:23 +0000
171@@ -10,8 +10,23 @@
172 usr/bin/distro-cd-updater usr/lib/update-notifier/
173 usr/bin/local-avahi-notification usr/lib/update-notifier/
174 usr/bin/system-crash-notification usr/lib/update-notifier/
175+# upstart jobs
176 debian/update-notifier-cds.conf usr/share/upstart/sessions/
177 debian/update-notifier-hp-firmware.conf usr/share/upstart/sessions/
178 debian/unicast-local-avahi.conf usr/share/upstart/sessions/
179 debian/update-notifier-release.conf usr/share/upstart/sessions/
180 debian/update-notifier-crash.conf usr/share/upstart/sessions/
181+#systemd units
182+debian/systemd/update-notifier-crash.path usr/lib/systemd/user
183+debian/systemd/update-notifier-crash.service usr/lib/systemd/user
184+debian/update-notifier-crash usr/lib/update-notifier/
185+debian/systemd/unicast-local-avahi.path usr/lib/systemd/user
186+debian/systemd/unicast-local-avahi.service usr/lib/systemd/user
187+debian/systemd/update-notifier-release.path usr/lib/systemd/user
188+debian/systemd/update-notifier-release.service usr/lib/systemd/user
189+# disable upstart job under systemd sessions
190+debian/systemd/unicast-local-avahi.override usr/share/upstart/systemd-session/upstart/
191+debian/systemd/update-notifier-crash.override usr/share/upstart/systemd-session/upstart/
192+debian/systemd/update-notifier-hp-firmware.override usr/share/upstart/systemd-session/upstart/
193+debian/systemd/update-notifier-release.override usr/share/upstart/systemd-session/upstart/
194+debian/systemd/update-notifier-cds.override usr/share/upstart/systemd-session/upstart/
195
196=== added file 'debian/update-notifier.links'
197--- debian/update-notifier.links 1970-01-01 00:00:00 +0000
198+++ debian/update-notifier.links 2016-07-20 16:52:23 +0000
199@@ -0,0 +1,3 @@
200+usr/lib/systemd/user/update-notifier-crash.path usr/lib/systemd/user/graphical-session.target.wants/update-notifier-crash.path
201+usr/lib/systemd/user/unicast-local-avahi.path usr/lib/systemd/user/graphical-session.target.wants/unicast-local-avahi.path
202+usr/lib/systemd/user/update-notifier-release.path usr/lib/systemd/user/graphical-session.target.wants/update-notifier-release.path
203
204=== modified file 'src/avahi.c'
205--- src/avahi.c 2015-09-08 05:29:07 +0000
206+++ src/avahi.c 2016-07-20 16:52:23 +0000
207@@ -37,7 +37,7 @@
208 bindtextdomain(GETTEXT_PACKAGE, PACKAGE_LOCALE_DIR);
209 bind_textdomain_codeset(GETTEXT_PACKAGE, "UTF-8");
210 textdomain(GETTEXT_PACKAGE);
211- if (g_file_test ("/var/run/avahi-daemon/disabled-for-unicast-local", G_FILE_TEST_EXISTS)) {
212+ if (g_file_test ("/run/avahi-daemon/disabled-for-unicast-local", G_FILE_TEST_EXISTS)) {
213 show_notification();
214 return 0;
215 } else
216
217=== modified file 'src/update-notifier.h'
218--- src/update-notifier.h 2013-06-25 17:47:48 +0000
219+++ src/update-notifier.h 2016-07-20 16:52:23 +0000
220@@ -44,7 +44,7 @@
221 #define CRASHREPORT_HELPER "/usr/share/apport/apport-checkreports"
222 #define CRASHREPORT_REPORT_APP "/usr/share/apport/apport-gtk"
223 #define CRASHREPORT_DIR "/var/crash/"
224-#define UNICAST_LOCAL_AVAHI_FILE "/var/run/avahi-daemon/disabled-for-unicast-local"
225+#define UNICAST_LOCAL_AVAHI_FILE "/run/avahi-daemon/disabled-for-unicast-local"
226
227 // security update autolaunch minimal time (12h)
228 #define AUTOLAUNCH_MINIMAL_SECURITY_INTERVAL 12*60*60
229
230=== modified file 'src/update.c'
231--- src/update.c 2016-05-25 14:40:44 +0000
232+++ src/update.c 2016-07-20 16:52:23 +0000
233@@ -612,7 +612,7 @@
234
235 g_debug_update("%s returned %i (security: %i)", UPGRADE_CHECKER, priv->num_upgrades, priv->num_security);
236
237- if (stat("/var/run/reboot-required", &buf) == 0) {
238+ if (stat("/run/reboot-required", &buf) == 0) {
239 priv->reboot_pending = TRUE;
240 g_debug_update("A reboot is currently pending.");
241 }

Subscribers

People subscribed via source and target branches

to all changes: