Merge lp:~xnox/ubuntu/vivid/upstart/fix-rotate-logs into lp:ubuntu/vivid/upstart

Proposed by Dimitri John Ledkov
Status: Merged
Merged at revision: 1598
Proposed branch: lp:~xnox/ubuntu/vivid/upstart/fix-rotate-logs
Merge into: lp:ubuntu/vivid/upstart
Diff against target: 68 lines (+25/-7)
3 files modified
debian/changelog (+11/-0)
debian/control (+2/-2)
debian/upstart-bin.upstart.cron.daily (+12/-5)
To merge this branch: bzr merge lp:~xnox/ubuntu/vivid/upstart/fix-rotate-logs
Reviewer Review Type Date Requested Status
Martin Pitt Needs Information
James Hunt Pending
Ubuntu branches Pending
Review via email: mp+246052@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Martin Pitt (pitti) wrote :

Looks good to me, thanks!

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

BTW, how does emitting ":sys:*" events go along with https://code.launchpad.net/~xnox/upstart/no-classes/+merge/245948 ? I thought they should drop the :sys prefix now?

review: Needs Information
Revision history for this message
Dimitri John Ledkov (xnox) wrote :

@pitti:
I'm going for a mix here.
udev-bridge is moving from system-init -> session-init, thus dropping :sys: prefix.
local-bridge will stay running under system-init (either systemd or upstart), thus will keep :sys: prefix
rotate-logs emitage moved from system-init -> session-init, thus dropps :sys: prefix.

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 2014-11-29 11:39:41 +0000
3+++ debian/changelog 2015-01-11 01:30:11 +0000
4@@ -1,3 +1,14 @@
5+upstart (1.13.2-0ubuntu6) UNRELEASED; urgency=medium
6+
7+ * debian/upstart-bin.upstart.cron.daily: Emit ":sys:rotate-logs" event
8+ direct into session init, by-passing system upstart & session
9+ event-bridge. This way session logs will be rotated, even upstart is
10+ not system init.
11+ * debian/control: make upstart-monitor & upstart-dconf-bridge be
12+ installable with just session init, upstart-bin.
13+
14+ -- Dimitri John Ledkov <dimitri.j.ledkov@linux.intel.com> Sun, 11 Jan 2015 01:15:34 +0000
15+
16 upstart (1.13.2-0ubuntu5) vivid; urgency=medium
17
18 * debian/xsession.d/99upstart: Add support for GNOME Flashback
19
20=== modified file 'debian/control'
21--- debian/control 2014-11-20 06:57:48 +0000
22+++ debian/control 2015-01-11 01:30:11 +0000
23@@ -48,7 +48,7 @@
24 Architecture: all
25 Section: utils
26 Priority: optional
27-Depends: ${shlibs:Depends}, ${misc:Depends}, ${python3:Depends}, upstart (>= 1.7), python3-dbus
28+Depends: ${shlibs:Depends}, ${misc:Depends}, ${python3:Depends}, upstart-bin (>= 1.7), python3-dbus
29 Recommends: python3-gi
30 Description: event monitor for upstart
31 This package contains a utility that may be run both as a
32@@ -60,7 +60,7 @@
33 Architecture: any
34 Section: utils
35 Priority: optional
36-Depends: ${shlibs:Depends}, ${misc:Depends}, ${python3:Depends}, upstart (>= 1.10)
37+Depends: ${shlibs:Depends}, ${misc:Depends}, ${python3:Depends}, upstart-bin (>= 1.10)
38 Description: DConf bridge for upstart
39 This package contains a bridge that allows upstart jobs to react when
40 DConf/gsettings keys are changed.
41
42=== modified file 'debian/upstart-bin.upstart.cron.daily'
43--- debian/upstart-bin.upstart.cron.daily 2014-09-30 08:58:51 +0000
44+++ debian/upstart-bin.upstart.cron.daily 2015-01-11 01:30:11 +0000
45@@ -1,11 +1,18 @@
46 #!/bin/sh
47-# Emit an Upstart system event, that will propagate to the Session Inits
48-# via the upstart-event-bridge(8), requesting that the Session Inits
49-# rotate their logs.
50+
51+# For each Upstart Session Init, emit ":sys:rotate-logs" events, requesting
52+# that the# session Inits rotate their logs. There is no user-daily
53+# cron.
54+#
55+# Doing it this way does not rely on System Upstart, nor
56+# upstart-event-bridge(8) running in the Session Init.
57 #
58 # Note that system-level Upstart logs are handled separately using a
59 # logrotate script.
60
61-/sbin/initctl version >/dev/null 2>&1 || exit 0
62+[ -x /sbin/initctl ] || exit 0
63
64-/sbin/initctl emit rotate-logs
65+for session in /run/user/*/upstart/sessions/*
66+do
67+ env $(cat $session) /sbin/initctl emit :sys:rotate-logs >/dev/null 2>&1 || true
68+done

Subscribers

People subscribed via source and target branches