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
=== modified file 'debian/changelog'
--- debian/changelog 2016-07-11 22:05:34 +0000
+++ debian/changelog 2016-07-20 16:52:23 +0000
@@ -1,3 +1,19 @@
1update-notifier (3.171) UNRELEASED; urgency=medium
2
3 * debian/update-notifier-cds.conf:
4 - use a valid variable to get the device name
5 * debian/systemd, debian/update-notifier.install,links,crash:
6 - convert the crash, unicast and release jobs to systemd
7 * debian/systemd/update-notifier-cds.override,
8 debian/systemd/update-notifier-hp-firmware.override,
9 debian/update-notifier.install:
10 - disable the cd-upgrade and hp-firware jobs under systemd,
11 they are not important and need more work
12 * src/avahi.c, src/update.c, src/update-notifier.h,
13 - use /run instead of /var/run
14
15 -- Sebastien Bacher <seb128@ubuntu.com> Wed, 20 Jul 2016 17:29:30 +0200
16
1update-notifier (3.170) yakkety; urgency=medium17update-notifier (3.170) yakkety; urgency=medium
218
3 * data/apt_check.py: use pkg.get_fullname() instead of pkg.name so that19 * data/apt_check.py: use pkg.get_fullname() instead of pkg.name so that
420
=== added directory 'debian/systemd'
=== added file 'debian/systemd/unicast-local-avahi.override'
--- debian/systemd/unicast-local-avahi.override 1970-01-01 00:00:00 +0000
+++ debian/systemd/unicast-local-avahi.override 2016-07-20 16:52:23 +0000
@@ -0,0 +1,1 @@
1manual
02
=== added file 'debian/systemd/unicast-local-avahi.path'
--- debian/systemd/unicast-local-avahi.path 1970-01-01 00:00:00 +0000
+++ debian/systemd/unicast-local-avahi.path 2016-07-20 16:52:23 +0000
@@ -0,0 +1,6 @@
1[Unit]
2Description=Path trigger for Avahi .local domain notifications
3PartOf=graphical-session.target
4
5[Path]
6PathChanged=/run/avahi-daemon/disabled-for-unicast-local
07
=== added file 'debian/systemd/unicast-local-avahi.service'
--- debian/systemd/unicast-local-avahi.service 1970-01-01 00:00:00 +0000
+++ debian/systemd/unicast-local-avahi.service 2016-07-20 16:52:23 +0000
@@ -0,0 +1,6 @@
1[Unit]
2Description=Notification regarding avahi disabled due to .local domain
3
4[Service]
5ExecStart=/usr/lib/update-notifier/local-avahi-notification
6Type=oneshot
07
=== added file 'debian/systemd/update-notifier-cds.override'
--- debian/systemd/update-notifier-cds.override 1970-01-01 00:00:00 +0000
+++ debian/systemd/update-notifier-cds.override 2016-07-20 16:52:23 +0000
@@ -0,0 +1,1 @@
1manual
02
=== added file 'debian/systemd/update-notifier-crash.override'
--- debian/systemd/update-notifier-crash.override 1970-01-01 00:00:00 +0000
+++ debian/systemd/update-notifier-crash.override 2016-07-20 16:52:23 +0000
@@ -0,0 +1,1 @@
1manual
02
=== added file 'debian/systemd/update-notifier-crash.path'
--- debian/systemd/update-notifier-crash.path 1970-01-01 00:00:00 +0000
+++ debian/systemd/update-notifier-crash.path 2016-07-20 16:52:23 +0000
@@ -0,0 +1,6 @@
1[Unit]
2Description=Path trigger for Apport crash notifications
3PartOf=graphical-session.target
4
5[Path]
6PathChanged=/var/crash/
07
=== added file 'debian/systemd/update-notifier-crash.service'
--- debian/systemd/update-notifier-crash.service 1970-01-01 00:00:00 +0000
+++ debian/systemd/update-notifier-crash.service 2016-07-20 16:52:23 +0000
@@ -0,0 +1,7 @@
1[Unit]
2Description=Notification regarding a crash report
3PartOf=graphical-session.target
4
5[Service]
6ExecStart=/usr/lib/update-notifier/update-notifier-crash
7Type=oneshot
08
=== added file 'debian/systemd/update-notifier-hp-firmware.override'
--- debian/systemd/update-notifier-hp-firmware.override 1970-01-01 00:00:00 +0000
+++ debian/systemd/update-notifier-hp-firmware.override 2016-07-20 16:52:23 +0000
@@ -0,0 +1,1 @@
1manual
02
=== added file 'debian/systemd/update-notifier-release.override'
--- debian/systemd/update-notifier-release.override 1970-01-01 00:00:00 +0000
+++ debian/systemd/update-notifier-release.override 2016-07-20 16:52:23 +0000
@@ -0,0 +1,1 @@
1manual
02
=== added file 'debian/systemd/update-notifier-release.path'
--- debian/systemd/update-notifier-release.path 1970-01-01 00:00:00 +0000
+++ debian/systemd/update-notifier-release.path 2016-07-20 16:52:23 +0000
@@ -0,0 +1,6 @@
1[Unit]
2Description=Path trigger for new release of Ubuntu notifications
3PartOf=graphical-session.target
4
5[Path]
6PathChanged=/var/lib/ubuntu-release-upgrader/release-upgrade-available
07
=== added file 'debian/systemd/update-notifier-release.service'
--- debian/systemd/update-notifier-release.service 1970-01-01 00:00:00 +0000
+++ debian/systemd/update-notifier-release.service 2016-07-20 16:52:23 +0000
@@ -0,0 +1,7 @@
1[Unit]
2Description=Notification regarding a new release of Ubuntu
3PartOf=graphical-session.target
4
5[Service]
6ExecStart=/usr/lib/ubuntu-release-upgrader/check-new-release-gtk
7Type=oneshot
08
=== modified file 'debian/unicast-local-avahi.conf'
--- debian/unicast-local-avahi.conf 2013-04-02 16:57:34 +0000
+++ debian/unicast-local-avahi.conf 2016-07-20 16:52:23 +0000
@@ -2,7 +2,7 @@
2author "Brian Murray <brian@ubuntu.com>"2author "Brian Murray <brian@ubuntu.com>"
33
4start on (4start on (
5 file FILE=/var/run/avahi-daemon/disabled-for-unicast-local EVENT=create5 file FILE=/run/avahi-daemon/disabled-for-unicast-local EVENT=create
6)6)
77
88
99
=== modified file 'debian/update-notifier-cds.conf'
--- debian/update-notifier-cds.conf 2015-01-20 09:34:45 +0000
+++ debian/update-notifier-cds.conf 2016-07-20 16:52:23 +0000
@@ -13,7 +13,7 @@
13DATE=$(date)13DATE=$(date)
14echo "$DATE CD found at $DEVNAME"14echo "$DATE CD found at $DEVNAME"
15sleep 1015sleep 10
16MOUNTPOINT=$(printf $(awk "{if (\$1 == \"$D\") {print \$2}}" /proc/mounts ))16MOUNTPOINT=$(printf $(awk "{if (\$1 == \"$DEVNAME\") {print \$2}}" /proc/mounts ))
17echo "CD mounted at $MOUNTPOINT"17echo "CD mounted at $MOUNTPOINT"
18if [ -L "$MOUNTPOINT/ubuntu" ] || [ -e "$MOUNTPOINT/cdromupgrade" ]18if [ -L "$MOUNTPOINT/ubuntu" ] || [ -e "$MOUNTPOINT/cdromupgrade" ]
19then19then
2020
=== added file 'debian/update-notifier-crash'
--- debian/update-notifier-crash 1970-01-01 00:00:00 +0000
+++ debian/update-notifier-crash 2016-07-20 16:52:23 +0000
@@ -0,0 +1,13 @@
1#!/bin/sh
2set -e
3
4if /usr/share/apport/apport-checkreports; then
5 /usr/share/apport/apport-gtk
6else
7 if /usr/share/apport/apport-checkreports --system; then
8 if groups | grep -qE "sudo|admin" ; then
9 /usr/lib/update-notifier/system-crash-notification
10 fi
11 fi
12fi
13
014
=== modified file 'debian/update-notifier.install'
--- debian/update-notifier.install 2013-06-04 17:06:19 +0000
+++ debian/update-notifier.install 2016-07-20 16:52:23 +0000
@@ -10,8 +10,23 @@
10usr/bin/distro-cd-updater usr/lib/update-notifier/10usr/bin/distro-cd-updater usr/lib/update-notifier/
11usr/bin/local-avahi-notification usr/lib/update-notifier/11usr/bin/local-avahi-notification usr/lib/update-notifier/
12usr/bin/system-crash-notification usr/lib/update-notifier/12usr/bin/system-crash-notification usr/lib/update-notifier/
13# upstart jobs
13debian/update-notifier-cds.conf usr/share/upstart/sessions/14debian/update-notifier-cds.conf usr/share/upstart/sessions/
14debian/update-notifier-hp-firmware.conf usr/share/upstart/sessions/15debian/update-notifier-hp-firmware.conf usr/share/upstart/sessions/
15debian/unicast-local-avahi.conf usr/share/upstart/sessions/16debian/unicast-local-avahi.conf usr/share/upstart/sessions/
16debian/update-notifier-release.conf usr/share/upstart/sessions/17debian/update-notifier-release.conf usr/share/upstart/sessions/
17debian/update-notifier-crash.conf usr/share/upstart/sessions/18debian/update-notifier-crash.conf usr/share/upstart/sessions/
19#systemd units
20debian/systemd/update-notifier-crash.path usr/lib/systemd/user
21debian/systemd/update-notifier-crash.service usr/lib/systemd/user
22debian/update-notifier-crash usr/lib/update-notifier/
23debian/systemd/unicast-local-avahi.path usr/lib/systemd/user
24debian/systemd/unicast-local-avahi.service usr/lib/systemd/user
25debian/systemd/update-notifier-release.path usr/lib/systemd/user
26debian/systemd/update-notifier-release.service usr/lib/systemd/user
27# disable upstart job under systemd sessions
28debian/systemd/unicast-local-avahi.override usr/share/upstart/systemd-session/upstart/
29debian/systemd/update-notifier-crash.override usr/share/upstart/systemd-session/upstart/
30debian/systemd/update-notifier-hp-firmware.override usr/share/upstart/systemd-session/upstart/
31debian/systemd/update-notifier-release.override usr/share/upstart/systemd-session/upstart/
32debian/systemd/update-notifier-cds.override usr/share/upstart/systemd-session/upstart/
1833
=== added file 'debian/update-notifier.links'
--- debian/update-notifier.links 1970-01-01 00:00:00 +0000
+++ debian/update-notifier.links 2016-07-20 16:52:23 +0000
@@ -0,0 +1,3 @@
1usr/lib/systemd/user/update-notifier-crash.path usr/lib/systemd/user/graphical-session.target.wants/update-notifier-crash.path
2usr/lib/systemd/user/unicast-local-avahi.path usr/lib/systemd/user/graphical-session.target.wants/unicast-local-avahi.path
3usr/lib/systemd/user/update-notifier-release.path usr/lib/systemd/user/graphical-session.target.wants/update-notifier-release.path
04
=== modified file 'src/avahi.c'
--- src/avahi.c 2015-09-08 05:29:07 +0000
+++ src/avahi.c 2016-07-20 16:52:23 +0000
@@ -37,7 +37,7 @@
37 bindtextdomain(GETTEXT_PACKAGE, PACKAGE_LOCALE_DIR);37 bindtextdomain(GETTEXT_PACKAGE, PACKAGE_LOCALE_DIR);
38 bind_textdomain_codeset(GETTEXT_PACKAGE, "UTF-8");38 bind_textdomain_codeset(GETTEXT_PACKAGE, "UTF-8");
39 textdomain(GETTEXT_PACKAGE);39 textdomain(GETTEXT_PACKAGE);
40 if (g_file_test ("/var/run/avahi-daemon/disabled-for-unicast-local", G_FILE_TEST_EXISTS)) {40 if (g_file_test ("/run/avahi-daemon/disabled-for-unicast-local", G_FILE_TEST_EXISTS)) {
41 show_notification();41 show_notification();
42 return 0;42 return 0;
43 } else43 } else
4444
=== modified file 'src/update-notifier.h'
--- src/update-notifier.h 2013-06-25 17:47:48 +0000
+++ src/update-notifier.h 2016-07-20 16:52:23 +0000
@@ -44,7 +44,7 @@
44#define CRASHREPORT_HELPER "/usr/share/apport/apport-checkreports"44#define CRASHREPORT_HELPER "/usr/share/apport/apport-checkreports"
45#define CRASHREPORT_REPORT_APP "/usr/share/apport/apport-gtk"45#define CRASHREPORT_REPORT_APP "/usr/share/apport/apport-gtk"
46#define CRASHREPORT_DIR "/var/crash/"46#define CRASHREPORT_DIR "/var/crash/"
47#define UNICAST_LOCAL_AVAHI_FILE "/var/run/avahi-daemon/disabled-for-unicast-local"47#define UNICAST_LOCAL_AVAHI_FILE "/run/avahi-daemon/disabled-for-unicast-local"
4848
49// security update autolaunch minimal time (12h)49// security update autolaunch minimal time (12h)
50#define AUTOLAUNCH_MINIMAL_SECURITY_INTERVAL 12*60*6050#define AUTOLAUNCH_MINIMAL_SECURITY_INTERVAL 12*60*60
5151
=== modified file 'src/update.c'
--- src/update.c 2016-05-25 14:40:44 +0000
+++ src/update.c 2016-07-20 16:52:23 +0000
@@ -612,7 +612,7 @@
612 612
613 g_debug_update("%s returned %i (security: %i)", UPGRADE_CHECKER, priv->num_upgrades, priv->num_security);613 g_debug_update("%s returned %i (security: %i)", UPGRADE_CHECKER, priv->num_upgrades, priv->num_security);
614614
615 if (stat("/var/run/reboot-required", &buf) == 0) {615 if (stat("/run/reboot-required", &buf) == 0) {
616 priv->reboot_pending = TRUE;616 priv->reboot_pending = TRUE;
617 g_debug_update("A reboot is currently pending.");617 g_debug_update("A reboot is currently pending.");
618 }618 }

Subscribers

People subscribed via source and target branches

to all changes: