--- xml/htdocs/proj/en/glep/glep-0042.html 2005/12/11 01:38:18 1.4 +++ xml/htdocs/proj/en/glep/glep-0042.html 2006/03/06 03:12:58 1.11 @@ -8,9 +8,252 @@ --> - + GLEP 42 -- Critical News Reporting - + @@ -32,76 +275,72 @@ - + - + - + - +
Title:Critical News Reporting
Version:$Revision: 1.4 $
Version:1.9
Author:Ciaran McCreesh <ciaranm at gentoo.org>
Last-Modified:$Date: 2005/12/11 01:38:18 $
Last-Modified:2006/03/06 03:12:08
Status:Draft
Type:Standards Track
Content-Type:text/x-rst
Content-Type:text/x-rst
Created:31-Oct-2005
Post-History:1-Nov-2005, 5-Nov-2005, 7-Nov-2005, 11-Dec-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

-
-

Contents

+
+

Contents

-
-

Abstract

+
+

Abstract

This GLEP proposes a new way of informing users about important updates and news -regarding tree-related items.

+related to the tree.

-
-

Motivation

+
+

Motivation

Although most package updates are clean and require little user action, -occasionally an upgrade requires user intervention during the upgrade process. -Recent examples of the latter include the gcc-3.4 stabilisation on x86 -and the mysql-5 database format changes.

+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:

    @@ -110,9 +349,10 @@
  • The Gentoo Forums
  • The main Gentoo website
  • RSS feeds of Gentoo news
  • +
  • einfo and ewarn messages in pkg_setup or pkg_postinst

A more reliable way of getting news of critical updates out to users is required -to avoid repeats of the various recent upgrade debacles. This GLEP proposes a +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

@@ -121,8 +361,8 @@ by elog [1].

-
-

Requirements

+
+

Requirements

An adequate solution must meet all of the following requirements:

Preemptive
@@ -132,7 +372,7 @@ being told just before action is necessary.
No user subscription required
It has already been demonstrated [5] that many users do not -read the gentoo-announce mailing list or RSS feeds. A solution which +read the gentoo-announce mailing list or RSS feeds. A solution that requires subscription has no advantage over current methods.
No user monitoring required
It has already been demonstrated [5] that many users do not @@ -177,16 +417,16 @@ sources should not be precluded.
-
-

Specification

-
-

Overview

+
+

Specification

+
+

Overview

News items are published and delivered to users as follows:

  1. A news item is written. The format to be used is described below.
  2. The news item is reviewed, following the process described in News Item Quality Control.
  3. -
  4. The news item is committed to a CVS (or Subversion [10]) repository. +
  5. The news item is committed to a CVS (or Subversion [9]) repository. From here, it is merged with the rsync tree. This is described in News Item Distribution.
  6. Users fetch the news item when they sync. This ensures that the news items in @@ -200,41 +440,68 @@ Item Clients.
-
-

News Item Identities

+
+

Required Portage Enhancements

+

The following extensions to Portage are required:

+
    +
  • Every repository (including overlays) will require a unique identifier. It is +assumed that an identifier will be a string consisting of characters from +a to z, A to Z, 0 to 9, + (plus), - (hyphen) +_ (underscore).
  • +
  • Portage must provide a way for external programs to obtain a list of all +repository identifiers for a given system. It is assumed that this will be in +the form of a portageq command (e.g. portageq get_repo_ids).
  • +
  • Portage must provide a way for external programs to obtain the base path for +a repository with a given ID. It is assumed that this will be in the form of +a portageq command (e.g. portageq get_repo_root gentoo-x86).
  • +
  • Portage must extend portageq has_version to support restrictions to a +given repository ID.
  • +
  • Portage must extend portageq to implement a command which returns whether +or not the profile used for a given repository ID is exactly the given profile +(e.g. portageq profile_used default-linux/sparc/sparc64/2004.3 +gentoo-x86).
  • +
+

These extensions are assumed during the following specification.

+
+
+

News Item Identities

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 and - (hyphen).

+0-9, + (plus), - (hyphen) and _ (underscore).

-
-

News Item Directories

+
+

News Item Directories

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) will also be -provided. However, only the English version of a news item is authoritative. -This anglocentricity is justified by precedent [9].

+(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].

-
-

News Item Files

+
+

News Item Files

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 [8].

-

News items should be signed with a detached GPG signature:

+[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.

-
-

News Item Headers

+
+

News Item Headers

The following headers describe the purpose and format of the news item:

Title:
@@ -248,13 +515,14 @@
Content-Type:
Must be text/plain. Mandatory.
Posted:
-
Date of posting, in dd-mmm-yyyy format (e.g. 14-Aug-2001) for -compatibility with GLEP 1 [6]. UTC time in hh-mm-ss +0000 format -may also be included. Mandatory.
+
Date of posting, in yyyy-mm-dd format (e.g. 2005-12-18) for +compatibility with GLEP 45 [10]. Translations should use the date +of the original news item. Mandatory.
Revision:
-
Initially 1. Incremented every time a non-trivial change is made. Changes -which require a re-read of the news item should instead use a new news item -file. Mandatory.
+
Initially 1. Should be incremented every time a change is made to the news +item. Changes that require a re-read of the news item (i.e., most changes +that are not spelling or formatting related) should instead use a new news +item. Mandatory.
News-Item-Format:
Must be 1.0. Future revisions to the format may increment the minor number for backwards-compatible changes, or the major number for major @@ -263,17 +531,18 @@

The following headers are used for filtering:

Display-If-Installed:
-
A dependency atom or simple package name (for example, -<dev-lang/php-5_alpha or net-www/apache). If the user has the -package specified installed, the news item should be displayed.
+
A dependency atom (for example, <dev-lang/php-5_alpha or +net-www/apache). If the user has the package specified installed from +the repository from which the news item was obtained, the news item should +be displayed.
Display-If-Keyword:
-
A keyword [7] name, for example mips or x86-fbsd. If the +
A keyword [6] name, for example mips or x86-fbsd. If the user is on the keyword in question, the news item should be displayed.
Display-If-Profile:
-
A profile path, for example default-linux/sparc/sparc64/server. Standard -shell GLOB wildcards may be used. If the user is using the exact profile in -question, the news item should be displayed. This header may be used to -replace deprecated files in the future.
+
A profile path, for example default-linux/sparc/sparc64/server. If the +user is using the exact profile in question, the news item should be +displayed. This header may be used to replace deprecated files in the +future.

Note

@@ -299,8 +568,8 @@ 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".

-
-

News Item Body

+
+

News Item Body

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 @@ -310,16 +579,16 @@ 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 may servers and routers, for example.

+administrated — this will be the case on many servers and routers, for example.

-
-

Example News Item

+
+

Example News Item

This hypothetical news item [16] could be used for an upgrade to the YourSQL database format which breaks forward compatibility.

-
-

News Item Quality Control

+
+

News Item Quality Control

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, @@ -330,14 +599,6 @@ (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.

-
-

Note

-

A previous draft of this GLEP allowed news items to be sent to -gentoo-core instead of gentoo-dev. It is possible that a situation -may arise where this will be necessary (for example, a security update which -must break backwards compatibility and which cannot be revealed to the public -before a given date).

-

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 @@ -350,10 +611,10 @@ YourSQL users because ...", not "YourSQL is important because ...".

-
-

News Item Distribution

-
-

Server Side

+
+

News Item Distribution

+
+

Server Side

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), @@ -370,22 +631,22 @@ 12 for December). 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 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/mm/ subdirectory layout.

+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/mm/ subdirectory layout. The +news item directories will all be immediately under the metadata/news/ +directory.

-
-

Client Side

+
+

Client Side

Whenever relevant unread news items are found, the package manager will create a -file named /var/lib/portage/news/news.unread (if it does not already exist) -and append the news item identifier (eg 2005-11-01-yoursql-updates) on a new -line.

-
-

Note

-

Future changes to Portage involving support for multiple repositories -may require one news list per repository. Assuming repositories have some -kind of unique identifier, this file could be named news-repoid.unread.

-
+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:

@@ -399,78 +660,75 @@
  • After an emerge --pretend
  • Before an emerge <target> (which may also include a red warning message)
  • +

    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.skip file, but implementation is not specified by this -GLEP.

    +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.

    -
    -

    News Item Clients

    +
    +

    News Item Clients

    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.unread -file. News clients may add the name to a news.read file in the same -directory with the same file format.

    +

    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 Item Removal

    +
    +

    News Item Removal

    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.

    -
    -

    Integration with Existing Systems

    +
    +

    Integration with Existing Systems

    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

    +
    +

    Backwards Compatibility

    Backwards compatibility is not a concern here. Existing tools will simply ignore the news/ directory.

    -
    -

    Reference Implementation

    -
    -

    Portage Code

    + -
    -

    Simple eselect News Client

    -

    TODO Removed until the exact format details are figured out.

    -
    -
    -

    Simple News to Mail Forwarder

    -

    TODO Removed until the exact format details are figured out.

    -
    -
    -
    -

    Credits

    +
    +

    Credits

    The idea behind notifying users of news updates via Portage comes from Stuart Herbert [15].

    Thanks to Lance Albertson, Stephen Bennett, Donnie Berkholz, Grant Goodyear, -Brian Harring, 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.

    -
    -
    -

    Example Files

    -

    TODO Removed until the exact format details are figured out.

    +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.

    -
    -

    References

    +
    +

    Example Files

    +
    +
    example-news-item.txt
    +
    An example news item.
    +
    +
    +
    +

    References

    @@ -508,17 +766,10 @@ http://forums.gentoo.org/viewtopic-t-384368.html
    - - - - - -
    [6]GLEP 1: "GLEP Purpose and Guidelines", Grant Goodyear, -http://www.gentoo.org/proj/en/glep/glep-0001.html
    - @@ -526,7 +777,7 @@
    [7]GLEP 22: "New "keyword" system to incorporate various +
    [6]GLEP 22: "New "keyword" system to incorporate various userlands/kernels/archs", Grant Goodyear, http://www.gentoo.org/proj/en/glep/glep-0022.html
    - @@ -534,18 +785,25 @@
    [8]GLEP 31: "Character Sets for Portage Tree Items", Ciaran +
    [7]GLEP 31: "Character Sets for Portage Tree Items", Ciaran McCreesh, http://www.gentoo.org/proj/en/glep/glep-0031.html
    -
    [9]GLEP 34: "Per-Category metadata.xml Files", Ciaran McCreesh, +
    [8]GLEP 34: "Per-Category metadata.xml Files", Ciaran McCreesh, http://www.gentoo.org/proj/en/glep/glep-0034.html
    -
    [10]GLEP 36: "Subversion/CVS for Gentoo Hosted Projects", Aaron +
    [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
    @@ -587,8 +845,8 @@
    -