|
|
[Gentoo Linux Home] [GLEP Index] [GLEP Source] |
| GLEP: | 42 |
|---|---|
| Title: | Critical News Reporting |
| Version: | 1.14 |
| Author: | Ciaran McCreesh <ciaranm at gentoo.org>, Stephen Bennett <spb at gentoo.org>, Zach Medico <zmedico at gentoo.org> |
| Last-Modified: | 2010/02/22 11:38:26 |
| Status: | Final |
| Type: | Standards Track |
| Content-Type: | text/x-rst |
| Created: | 31-Oct-2005 |
| Post-History: | 1-Nov-2005, 5-Nov-2005, 7-Nov-2005, 11-Dec-2005, 13-Dec-2005, 18-Dec-2005, 5-Jan-2006, 2-Mar-2006, 6-Mar-2006, 12-Jun-2006, 5-Sep-2006 |
Contents
This GLEP proposes a new way of informing users about important updates and news related to the tree.
Although most package updates are clean and require little user action, occasionally an upgrade requires user intervention. Recent examples of the latter include the gcc-3.4 stabilisation on x86 and the mysql-4.1 database format changes.
There are currently several ways of delivering important news items to our users, none of them particularly effective:
A more reliable way of getting news of critical updates out to users is required to avoid repeats of various prior upgrade debacles. This GLEP proposes a solution based around pushing news items out to the user via the rsync tree.
Important
This GLEP does not seek to replace or modify einfo messages which are displayed post-install. That is a separate issue which is handled by elog [1].
An adequate solution must meet all of the following requirements:
The following characteristics would be desirable:
News items are published and delivered to users as follows:
The following extensions to Portage are required:
These extensions are assumed during the following specification.
Each news item will have a unique identifier. This identifier will be in the form yyyy-mm-dd-short-name, where yyyy is the year (e.g. 2005), mm is the month (01 through 12) and dd is the day of the month (01 through 31). The short-name is a very short name describing the news item (e.g. yoursql-updates), consisting only of the characters a-z, 0-9, + (plus), - (hyphen) and _ (underscore).
Each news item will be represented by a directory whose name is the same as the news item's identifier.
The directory will contain a file named yyyy-mm-dd-short-name.en.txt, which contains the text of the news item, in English, in the format described below.
If a news item is translated, other files named yyyy-mm-dd-short-name.xx.txt (where xx is the ISO 639 [11] two letter country code, and the date remains the same as the original news item) will also be provided. However, only the English version of a news item is authoritative. This anglocentricity is justified by precedent [8].
A news item file is a text file, encoded using UTF-8 [14] for compatibility with and for the same reasons as existing Gentoo documentation [2] and the tree [7].
News items must be signed with a detached GPG signature.:
gpg --armour --detach-sign ????-??-??-*.??.txt
This GLEP does not specify the type or strength of signature to be used, nor does it discuss how, if at all, a centralised keychain will be provided. These issues should be handled as part of the signing policy discussions.
A news item file's content will consist of an RFC 822 style header [13] followed by the main body of the message as plain text. This GLEP defines various optional and mandatory headers. Future GLEPs may propose new headers — tools handling these news items must ignore any unrecognised header.
The following headers describe the purpose and format of the news item:
The following headers are used for filtering:
Note
When performing package moves, developers must also update any relevant Display-If-Installed headers in news files.
The algorithm used to determine whether a news item is 'relevant' is as follows:
In particular, if no Display-If- header is specified, a news item will be relevant for all users.
This algorithm was chosen because it makes conditions like "display this news item for YourSQL users who are on sparc or x86-obsd relatively simple to specify — it is believed that these kinds of condition are far more likely to occur than "display this news item for people using YourSQL, or for people on sparc or x86-obsd" or "display these news items for people who use YourSQL and who are on both sparc and x86-obsd".
The header section must be followed by a blank line, then the main body of the text.
The text body should be wrapped at 72 characters. No fancy formatting or tab characters should be used — the news item may be being displayed directly to a terminal. Paragraphs should be separated by a blank line.
Hyperlinks may be used to refer to further information (for example, an upgrade guide). However, the main body of the news item should be descriptive and not simply a "read this link" text. It is assumed that the user will have access to a web browser somewhere, but not necessarily on the box which is being administrated — this will be the case on many servers and routers, for example.
This hypothetical news item [18] could be used for an upgrade to the YourSQL database format which breaks forward compatibility.
There have been complaints regarding the comprehensibility of some upgrade notices and news items in the past. This is understandable — not every Gentoo developer speaks English as a first language. However, for the sake of clarity, professionalism and avoiding making us look like prats, it is important that any language problems be corrected before inflicting a news item upon end users.
Thus, at least 72 hours before a proposed news item is committed, it must be posted to the gentoo-dev mailing list and Cc:ed to pr@gentoo.org (exceptions may be made in exceptional circumstances). Any complaints — for example regarding wording, clarity or accuracy — must be addressed before the news item goes live.
News items must only be for important changes that may cause serious upgrade or compatibility problems. Ordinary upgrade messages and non-critical news items should remain in einfo notices. The importance of the message to its intended audience should be justified with the proposal.
Important
The filtering system means that it is appropriate to send out news items which are aimed at users of an uncommon package or architecture. Thus, the justification should be in the form "this message is important to YourSQL users because ...", not "YourSQL is important because ...".
News items are to be made available via the standard rsync tree. This removes any need for polling of a remote source.
A new repository will be created for news items. The type (CVS or Subversion), location and access controls on this repository are beyond the scope of this GLEP.
Note
A previous draft of this GLEP instead used the main gentoo-x86 tree. This was changed following advice from Infrastructure [12]. Both solutions have the same end result.
This repository will contain directories named yyyy/, where yyyy is the current year. This separation will help keep news items more manageable.
The contents of this repository will automatically be merged with the main rsync tree, placing the items in a metadata/news/ directory. The method used for merging these items and the frequency at which it will occur is beyond the scope of this GLEP; a similar setup is already used for merging GLSAs into the rsync tree.
The main rsync tree will not use the yyyy/ subdirectory layout. The news item directories will all be immediately under the metadata/news/ directory.
Whenever relevant unread news items are found, the package manager will create a file named /var/lib/gentoo/news/news-${repoid}.unread (if it does not already exist) and append the news item identifier (eg 2005-11-01-yoursql-updates) on a new line.
All news item related files should be root owned and in the portage group with the group write (and, for directories, execute) bits set. News files should be world readable.
Notification that new relevant news items will be displayed via the emerge tool in a similar way to the existing "configuration files need updating" messages:
* Important: there are 5 unread news items. * Type emerge --help news to learn how to read news files.
Checks for new news messages should be displayed:
The package manager does not need to know how to launch the user's choice of news client. This is consistent with the way configuration file updates are handled.
The package manager may use a timestamp check file to avoid having to process news items unnecessarily.
The package manager must keep track of news items that have already been added to the unread list to avoid repeatedly marking a deleted news item. This could be handled via a news-${repoid}.skip file containing the IDs of news items that have already been added to a news-${repoid}.unread file, but this method is not required by this GLEP.
Users who really don't care about news items can use rsync_excludes to filter out the metadata/news/ directory.
Once a news item is marked for reading, third party tools (or traditional core Unix tools) can be used to display and view the news files.
When a news item is read, its name should be removed from the news-${repoid}.unread file. If a news client acts as an interactive reader rather than a gateway, it should then add the name to a news-${repoid}.read file in the same directory with the same file format.
An eselect [3] module shall be created as the 'suggested' display tool; other display tools (for example, a news to email forwarder, which would be ideal for users who sync on a cron) are left as options for those who desire them.
News items can be removed (by removing the news file from the main tree) when they are no longer relevant, if they are made obsolete by a future news item or after a long period of time. This is the same as the method used for updates entries.
It would be simple to convert these news items into the format used for news items on the Gentoo website or posts for the gentoo-announce mailing list.
There is an existing automated tool [4] for posting GLSAs to the forums. A similar tool can be used for these news items.
Backwards compatibility is not a concern here. Existing tools will simply ignore the news/ directory.
A reference implementation of the required package manager support can be found in Paludis [15], along with a reference newsreader implemented as an eselect module [16].
The idea behind notifying users of news updates via Portage comes from Stuart Herbert [17].
Thanks to Lance Albertson, Stephen Bennett, Donnie Berkholz, Grant Goodyear, Brian Harring, Marius Mauch, Dan Meltzer, Jason Stubbs, Paul de Vrieze and Alec Warner for input. Some of the ideas presented here are theirs, others go completely against their suggestions.
| [1] | Bugzilla Bug 11359 "[NEW FEATURE] pkg_postinst/pkg_preinst ewarn/einfo logging", https://bugs.gentoo.org/show_bug.cgi?id=11359 |
| [2] | Gentoo XML Guide, Daniel Robbins et al., http://www.gentoo.org/doc/en/xml-guide.xml |
| [3] | eselect modular framework for configuration and administration utilities, http://www.gentoo.org/proj/en/eselect/index.xml |
| [4] | Forums user GLSA, http://forums.gentoo.org/profile.php?mode=viewprofile&u=55648 |
| [5] | (1, 2) Forums thread "Gentoo Apache2 Config Change Idiocy", http://forums.gentoo.org/viewtopic-t-384368.html |
| [6] | GLEP 22: "New "keyword" system to incorporate various userlands/kernels/archs", Grant Goodyear, http://www.gentoo.org/proj/en/glep/glep-0022.html |
| [7] | GLEP 31: "Character Sets for Portage Tree Items", Ciaran McCreesh, http://www.gentoo.org/proj/en/glep/glep-0031.html |
| [8] | GLEP 34: "Per-Category metadata.xml Files", Ciaran McCreesh, http://www.gentoo.org/proj/en/glep/glep-0034.html |
| [9] | GLEP 36: "Subversion/CVS for Gentoo Hosted Projects", Aaron Walker, http://www.gentoo.org/proj/en/glep/glep-0036.html |
| [10] | GLEP 45: "GLEP date format", Henrik Brix Andersen, http://www.gentoo.org/proj/en/glep/glep-0045.html |
| [11] | ISO 639 "Code for the representation of names of languages" |
| [12] | "Re: [gentoo-dev] GLEP ??: Critical News Reporting", Lance Albertson, http://marc.theaimsgroup.com/?l=gentoo-dev&m=113111585907703&w=2 |
| [13] | RFC 822 "Standard for the format of ARPA Internet text messages" |
| [14] | RFC 3629: "UTF-8, a transformation format of ISO 10646" http://www.ietf.org/rfc/rfc3629.txt |
| [15] | Paludis homepage, http://paludis.berlios.de |
| [16] | news.eselect, http://svn.berlios.de/svnroot/repos/paludis/trunk/eselect/news.eselect |
| [17] | "Favouring an automatic news mechanism", Stuart Herbert, http://stu.gnqs.org/diary/gentoo.php/2005/10/28/favouring_an_automatic_news_mechanism |
| [18] | glep-0042-extras/example-news-item.txt |
This document has been placed in the public domain.