Merge lp:~rbalint/update-notifier/updates-available-world-readable into lp:update-notifier/ubuntu

Proposed by Balint Reczey
Status: Merged
Approved by: Balint Reczey
Approved revision: 979
Merged at revision: 976
Proposed branch: lp:~rbalint/update-notifier/updates-available-world-readable
Merge into: lp:update-notifier/ubuntu
Diff against target: 96 lines (+33/-1)
7 files modified
data/Makefile.am (+1/-1)
data/notify-updates-outdated (+19/-0)
data/update-motd-updates-available (+1/-0)
debian/90-updates-available (+2/-0)
debian/changelog (+8/-0)
debian/update-notifier-common.install (+1/-0)
po/POTFILES.in (+1/-0)
To merge this branch: bzr merge lp:~rbalint/update-notifier/updates-available-world-readable
Reviewer Review Type Date Requested Status
Julian Andres Klode Approve
Review via email: mp+373021@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Julian Andres Klode (juliank) wrote :

lgtm, octal modes are a bit hard to read, but ok, whatevs.

review: Approve
Revision history for this message
Balint Reczey (rbalint) wrote :

fixed to +r

978. By Balint Reczey

Make /var/lib/update-notifier/updates-available world-readable

LP: #1844704

979. By Balint Reczey

Update changelog

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'data/Makefile.am'
2--- data/Makefile.am 2017-09-29 14:37:12 +0000
3+++ data/Makefile.am 2019-09-20 12:40:30 +0000
4@@ -16,7 +16,7 @@
5 helper_SCRIPTS = apt_check.py apt-cdrom-check cddistupgrader update-motd-reboot-required update-motd-updates-available update-motd-fsck-at-reboot update-motd-hwe-eol backend_helper.py package-data-downloader package-system-locked
6
7 notifydir = $(datadir)/update-notifier
8-notify_SCRIPTS = notify-reboot-required
9+notify_SCRIPTS = notify-reboot-required notify-updates-outdated
10 notify_in_files = package-data-downloads-failed.in package-data-downloads-failed-permanently.in
11 notify_DATA = $(notify_in_files:.in=)
12
13
14=== added file 'data/notify-updates-outdated'
15--- data/notify-updates-outdated 1970-01-01 00:00:00 +0000
16+++ data/notify-updates-outdated 2019-09-20 12:40:30 +0000
17@@ -0,0 +1,19 @@
18+#!/bin/sh
19+
20+# we do not include ". gettext.sh" here because:
21+# a) it breaks if its not available
22+# b) the string we have here does not need it (because it has no vars)
23+eval_gettext() {
24+ if [ -x /usr/bin/gettext ]; then
25+ echo $(gettext "$1")
26+ else
27+ echo "$1"
28+ fi
29+}
30+export TEXTDOMAIN=update-notifier
31+export TEXTDOMAINDIR=/usr/share/locale
32+
33+# Print the message
34+echo ""
35+eval_gettext "The list of available updates is more than a week old."
36+eval_gettext "To check for new updates run: sudo apt update"
37
38=== modified file 'data/update-motd-updates-available'
39--- data/update-motd-updates-available 2016-04-04 21:56:09 +0000
40+++ data/update-motd-updates-available 2019-09-20 12:40:30 +0000
41@@ -56,4 +56,5 @@
42 echo ""
43 } > "$tmpfile"
44 mv "$tmpfile" "$stamp"
45+ chmod +r "$stamp"
46 fi
47
48=== modified file 'debian/90-updates-available'
49--- debian/90-updates-available 2015-11-13 11:18:56 +0000
50+++ debian/90-updates-available 2019-09-20 12:40:30 +0000
51@@ -3,3 +3,5 @@
52 stamp="/var/lib/update-notifier/updates-available"
53
54 [ ! -r "$stamp" ] || cat "$stamp"
55+
56+find $stamp -newermt 'now-7 days' 2> /dev/null | grep -q -m 1 '.' || /usr/share/update-notifier/notify-updates-outdated
57
58=== modified file 'debian/changelog'
59--- debian/changelog 2019-09-11 15:29:50 +0000
60+++ debian/changelog 2019-09-20 12:40:30 +0000
61@@ -1,3 +1,11 @@
62+update-notifier (3.192.27) UNRELEASED; urgency=medium
63+
64+ * Notify user about stale updates information in motd (LP: #1842159)
65+ * Make /var/lib/update-notifier/updates-available world-readable
66+ (LP: #1844704)
67+
68+ -- Balint Reczey <rbalint@ubuntu.com> Thu, 19 Sep 2019 17:57:46 +0200
69+
70 update-notifier (3.192.26) eoan; urgency=medium
71
72 * data/apt_check.py: modify wording and output regarding ESM support.
73
74=== modified file 'debian/update-notifier-common.install'
75--- debian/update-notifier-common.install 2016-08-05 22:00:54 +0000
76+++ debian/update-notifier-common.install 2019-09-20 12:40:30 +0000
77@@ -8,6 +8,7 @@
78 debian/98-fsck-at-reboot etc/update-motd.d
79 usr/share/polkit-1/actions/com.ubuntu.update-notifier.policy
80 usr/share/update-notifier/notify-reboot-required
81+usr/share/update-notifier/notify-updates-outdated
82 usr/share/update-notifier/package-data-downloads-failed
83 usr/share/update-notifier/package-data-downloads-failed-permanently
84 usr/lib/update-notifier/
85
86=== modified file 'po/POTFILES.in'
87--- po/POTFILES.in 2019-03-12 15:10:45 +0000
88+++ po/POTFILES.in 2019-09-20 12:40:30 +0000
89@@ -3,6 +3,7 @@
90 # *grumpf* [type=] does not work because intltool-update does not
91 # know about anything but the types available in intltool-extract --help
92 [type=gettext/Shell] data/notify-reboot-required
93+[type=gettext/Shell] data/notify-updates-outdated
94 data/apt_check.py
95 data/apt-cdrom-check
96 data/cddistupgrader

Subscribers

People subscribed via source and target branches

to all changes: