MaverickUpdateNotifierRefactor

Differences between revisions 1 and 2
Revision 1 as of 2010-05-03 15:59:58
Size: 2613
Editor: eth0
Comment:
Revision 2 as of 2010-06-30 13:13:47
Size: 2348
Editor: p5B09E0B7
Comment:
Deletions are marked like this. Additions are marked like this.
Line 5: Line 5:
 * '''Contributors''':
 * '''Packages affected''':
 * '''Contributors''': MichaelVogt, ScottJamesRemnant
 * '''Packages affected''': update-notifier, upstart
Line 10: Line 10:
This should provide an overview of the issue/functionality/change proposed here. Focus here on what will actually be DONE, summarising that so that other people don't have to read the whole spec. See also CategorySpec for examples.

== Release Note ==

This section should include a paragraph describing the end-user impact of this change. It is meant to be included in the release notes of the first release in which it is implemented. (Not all of these will actually be included in the release notes, at the release manager's discretion; but writing them is a useful exercise.)

It is mandatory.
update-notifier has grown to do much more than just update notifications. Because it is always available in the session and is small and easy to extend it got a lot of features that are outside of its core. Therefore it should be refactored/replaced.
Line 20: Line 14:
This should cover the _why_: why is this change being proposed, what justifies it, where we see this justified.

== User stories ==

== Assumptions ==
When upstart provides support to run as the user in the user session it much better
to move the features that update-notifier is doing to upstart events.
Line 28: Line 19:
You can have subsections that better describe specific parts of the issue. In order to replace update-notifier as the app that runs permanently in
the session the following features are needed.
Line 30: Line 22:
== Implementation == === General ===
Line 32: Line 24:
This section should describe a plan of action (the "how") to implement the changes discussed. Could include subsections like: Needs to be able to know if the user has a X session.
Line 34: Line 26:
=== UI Changes === Ideally can test if the user is part of a special group (like
admin). This can be done in the script itself too, but its of
course cheaper if it can be checked in the upstart script.
Line 36: Line 30:
Should cover changes required to the UI, or specific UI that is required to implement this Throttle would be nice, i.e. not running a script more often than
every 5 min even if a condition happens more frequently (but is
absolutly not important).
Line 38: Line 34:
=== Code Changes === Some stuff (like check for pending updates) needs to be run on session
login and then when certain events happen. I guess its fine to just
have two job files for this.
Line 40: Line 38:
Code changes should include an overview of what needs to change, and in some cases even the specific details. === File/directory monitoring ===
Line 42: Line 40:
=== Migration === When dpkg was run the following file is touched:
 /var/lib/update-notifier/dpkg-run-stamp"
When apt-get update was run:
 /var/lib/apt/periodic/update-success-stamp
When a file in the hooks directory changes:
 /var/lib/update-notifier/user.d/
On reboot required:
 /var/run/reboot-required
On new crashreports:
 /var/crash/
On new avahi warning
 /var/run/avahi-daemon/disabled-for-unicast-local
Line 44: Line 53:
Include:
 * data migration, if any
 * redirects from old URLs to new ones, if any
 * how users will be pointed to the new way of doing things, if necessary.
=== Hardware monitoring ===
Line 49: Line 55:
== Test/Demo Plan == When a CD/usb-stick is inserted, run a action (currently uses gdu and
the "device-changed" signal there.
Line 51: Line 58:
It's important that we are able to test new features, and demonstrate them to users. Use this section to describe a short plan that anybody can follow that demonstrates the feature is working. This can then be used during testing, and to show off after release. Please add an entry to http://testcases.qa.ubuntu.com/Coverage/NewFeatures for tracking test coverage. === Periodic events ===
Line 53: Line 60:
This need not be added or completed until the specification is nearing beta. The maverick update-notifier checks for a new release every 48h by
running a small script.
Line 55: Line 63:
== Unresolved issues == === act on uevents ===
Line 57: Line 65:
This should highlight any issues that should be addressed in further specifications, and not problems with the specification itself; since any specification with problems cannot be approved. The firmware loader acts on idVendor=03f0, idProduct="??17" for hp
printer firmware or on g_udev_device_get_property (device, "FIRMWARE")
Line 59: Line 68:
== BoF agenda and discussion ==
Line 61: Line 69:
Use this section to take notes during the BoF; if you keep it in the approved spec, use it for summarising what was discussed and note any options that were rejected.

Summary

update-notifier has grown to do much more than just update notifications. Because it is always available in the session and is small and easy to extend it got a lot of features that are outside of its core. Therefore it should be refactored/replaced.

Rationale

When upstart provides support to run as the user in the user session it much better to move the features that update-notifier is doing to upstart events.

Design

In order to replace update-notifier as the app that runs permanently in the session the following features are needed.

General

Needs to be able to know if the user has a X session.

Ideally can test if the user is part of a special group (like admin). This can be done in the script itself too, but its of course cheaper if it can be checked in the upstart script.

Throttle would be nice, i.e. not running a script more often than every 5 min even if a condition happens more frequently (but is absolutly not important).

Some stuff (like check for pending updates) needs to be run on session login and then when certain events happen. I guess its fine to just have two job files for this.

File/directory monitoring

When dpkg was run the following file is touched:

  • /var/lib/update-notifier/dpkg-run-stamp"

When apt-get update was run:

  • /var/lib/apt/periodic/update-success-stamp

When a file in the hooks directory changes:

  • /var/lib/update-notifier/user.d/

On reboot required:

  • /var/run/reboot-required

On new crashreports:

  • /var/crash/

On new avahi warning

  • /var/run/avahi-daemon/disabled-for-unicast-local

Hardware monitoring

When a CD/usb-stick is inserted, run a action (currently uses gdu and the "device-changed" signal there.

Periodic events

The maverick update-notifier checks for a new release every 48h by running a small script.

act on uevents

The firmware loader acts on idVendor=03f0, idProduct="??17" for hp printer firmware or on g_udev_device_get_property (device, "FIRMWARE")


CategorySpec

FoundationsTeam/Specs/MaverickUpdateNotifierRefactor (last edited 2010-10-14 18:43:43 by 99-156-85-10)