/[gentoo]/xml/htdocs/proj/en/glep/glep-0042.txt
Gentoo

Contents of /xml/htdocs/proj/en/glep/glep-0042.txt

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.4 - (hide annotations) (download)
Sun Dec 11 01:38:18 2005 UTC (8 years, 4 months ago) by ciaranm
Branch: MAIN
Changes since 1.3: +194 -272 lines
File MIME type: text/plain
New glep 42 draft

1 g2boojum 1.1 GLEP: 42
2     Title: Critical News Reporting
3 ciaranm 1.4 Version: $Revision: $
4 g2boojum 1.1 Author: Ciaran McCreesh <ciaranm@gentoo.org>
5 ciaranm 1.4 Last-Modified: $Date: $
6 g2boojum 1.1 Status: Draft
7     Type: Standards Track
8     Content-Type: text/x-rst
9 ciaranm 1.3 Created: 31-Oct-2005
10 ciaranm 1.4 Post-History: 1-Nov-2005, 5-Nov-2005, 7-Nov-2005, 11-Dec-2005
11 g2boojum 1.1
12     Abstract
13     ========
14    
15     This GLEP proposes a new way of informing users about important updates and news
16     regarding tree-related items.
17    
18     Motivation
19     ==========
20    
21 ciaranm 1.4 Although most package updates are clean and require little user action,
22     occasionally an upgrade requires user intervention during the upgrade process.
23     Recent examples of the latter include the ``gcc-3.4`` stabilisation on ``x86``
24     and the ``mysql-5`` database format changes.
25    
26     There are currently several ways of delivering important news items to our
27     users, none of them particularly effective:
28 g2boojum 1.1
29     * Gentoo Weekly News
30 ciaranm 1.4 * The ``gentoo-announce``, ``gentoo-user`` and ``gentoo-dev`` mailing lists
31 g2boojum 1.1 * The Gentoo Forums
32     * The main Gentoo website
33     * RSS feeds of Gentoo news
34    
35     A more reliable way of getting news of critical updates out to users is required
36     to avoid repeats of the various recent upgrade debacles. This GLEP proposes a
37     solution based around pushing news items out to the user via the ``rsync`` tree.
38    
39 ciaranm 1.4 .. Important:: This GLEP does not seek to replace or modify ``einfo`` messages
40     which are displayed post-install. That is a separate issue which is handled
41     by ``elog`` [#bug-11359]_.
42    
43 g2boojum 1.1 Requirements
44     ============
45    
46     An adequate solution must meet all of the following requirements:
47    
48     Preemptive
49 ciaranm 1.4 Users should be told of changes *before* they break a system, not after the
50     damage has already been done. Ideally, the system administrator would be
51     given ample warning to plan difficult upgrades and changes, rather than only
52     being told just before action is necessary.
53 g2boojum 1.1
54     No user subscription required
55 ciaranm 1.4 It has already been demonstrated [#forums-apache2]_ that many users do not
56 g2boojum 1.1 read the ``gentoo-announce`` mailing list or ``RSS`` feeds. A solution which
57     requires subscription has no advantage over current methods.
58    
59     No user monitoring required
60 ciaranm 1.4 It has already been demonstrated [#forums-apache2]_ that many users do not
61 g2boojum 1.1 read news items posted to the Gentoo website, or do not read news items
62     until it is too late. A solution that relies upon active monitoring of a
63     particular source has no advantage over current methods.
64    
65     Relevant
66     System administrators who do not use a particular package should not have to
67     read news items which affect purely that package. Some news items may be of
68     relevance to most or all users, but those that are not should not be forced
69     upon users unnecessarily.
70    
71     Lightweight
72     It is not reasonable to expect all users to have an MTA, web browser, email
73     client, cron daemon or text processing suite available on their system.
74 ciaranm 1.4 Users must not be forced to install unreasonable extra software to be able
75     to read news items.
76 g2boojum 1.1
77     No privacy violations
78     Users of the solution should not be required to provide information about
79     their systems (for example, IP addresses or installed packages).
80    
81     Multiple delivery method support
82     Some users may wish to view news items via email, some via a terminal and
83     some via a web browser. A solution should either support all of these
84 ciaranm 1.4 methods or (better still) make it simple to write clients for displaying
85 g2boojum 1.1 news items in different ways.
86    
87     The following characteristics would be desirable:
88    
89     Internationalisable
90     Being able to provide messages in multiple languages may be beneficial.
91    
92     Quality control
93     There should be some way to ensure that badly written or irrelevant messages
94 ciaranm 1.4 are not sent out, for example by inexperienced developers or those whose
95     English language skills are below par.
96 g2boojum 1.1
97     Simple for developers
98     Posting news items should be as simple as is reasonably possible.
99    
100     Simple for users
101     Reading relevant news items should be as simple as is reasonably possible.
102    
103     Compatibility with existing and future news sources
104     A news system would ideally be able to be integrated with existing news
105     sources (for example, Forums, GWN, the main Gentoo website) without
106     excessive difficulty. Similarly, easy interoperation with any future news
107     sources should not be precluded.
108    
109     Specification
110     =============
111    
112     Overview
113     --------
114    
115     News items are published and delivered to users as follows:
116    
117 ciaranm 1.4 1. A news item is written. The format to be used is described below.
118    
119 g2boojum 1.1 2. The news item is reviewed, following the process described in
120     `News Item Quality Control`_.
121 ciaranm 1.4
122 g2boojum 1.1 3. The news item is committed to a CVS (or Subversion [#glep-36]_) repository.
123     From here, it is merged with the rsync tree. This is described in `News Item
124     Distribution`_.
125 ciaranm 1.4
126     4. Users fetch the news item when they sync. This ensures that the news items in
127 g2boojum 1.1 question are pushed to the user before the user accidentally makes an
128     unwanted change. No changes to the existing rsync process are required by
129     this GLEP.
130 ciaranm 1.4
131     5. The package manager filters the news item and, if it is relevant, marks the
132     news item for reading. The package manager should also display a notice
133     informing the user that there are unread news items.
134    
135     6. The news item is handled by the user's choice of news item reader. See `News
136 g2boojum 1.1 Item Clients`_.
137    
138 ciaranm 1.4 News Item Identities
139     --------------------
140    
141     Each news item will have a unique identifier. This identifier will be in the
142     form ``yyyy-mm-dd-short-name``, where ``yyyy`` is the year (e.g. ``2005``),
143     ``mm`` is the month (``01`` through ``12``) and dd is the day of the month
144     (``01`` through ``31``). The ``short-name`` is a very short name describing the
145     news item (e.g. ``yoursql-updates``), consisting only of the characters ``a-z``,
146     ``0-9`` and ``-`` (hyphen).
147    
148     News Item Directories
149 g2boojum 1.1 ---------------------
150    
151 ciaranm 1.4 Each news item will be represented by a directory whose name is the same as the
152     news item's identifier.
153    
154     The directory will contain a file named ``yyyy-mm-dd-short-name.en.txt``, which
155     contains the text of the news item, in English, in the format described below.
156    
157     If a news item is translated, other files named ``yyyy-mm-dd-short-name.xx.txt``
158     (where ``xx`` is the ISO 639 [#iso-639]_ two letter country code) will also be
159     provided. However, only the English version of a news item is authoritative.
160     This anglocentricity is justified by precedent [#glep-34]_.
161    
162     News Item Files
163     ---------------
164    
165     A news item file is a text file, encoded using UTF-8 [#rfc-3629]_ for
166     compatibility with and for the same reasons as existing Gentoo documentation
167     [#docs-policy]_ and the tree [#glep-31]_.
168 g2boojum 1.1
169 ciaranm 1.4 News items should be signed with a detached GPG signature: ::
170    
171     gpg --armour --detach-sign ????-??-??-*.??.txt
172    
173     A news item file's content will consist of an RFC 822 style header [#rfc-822]_
174 g2boojum 1.1 followed by the main body of the message as plain text. This GLEP defines
175 ciaranm 1.4 various optional and mandatory headers. Future GLEPs may propose new headers —
176 g2boojum 1.1 tools handling these news items must ignore any unrecognised header.
177    
178     News Item Headers
179     '''''''''''''''''
180    
181     The following headers describe the purpose and format of the news item:
182    
183     ``Title:``
184     A short (maximum 44 characters) descriptive title. Mandatory.
185 ciaranm 1.4
186 g2boojum 1.1 ``Author:``
187     Author's name and email address, in the form ``Real Name <email@address>``.
188 ciaranm 1.4 Mandatory; multiple author headers may be specified if appropriate.
189    
190 g2boojum 1.1 ``Translator:``
191 ciaranm 1.4 For translated news items, the translator's name and email address. Multiple
192     translator headers may be specified if appropriate.
193    
194 g2boojum 1.1 ``Content-Type:``
195     Must be ``text/plain``. Mandatory.
196 ciaranm 1.4
197 g2boojum 1.1 ``Posted:``
198 ciaranm 1.4 Date of posting, in ``dd-mmm-yyyy`` format (e.g. 14-Aug-2001) for
199     compatibility with GLEP 1 [#glep-1]_. UTC time in ``hh-mm-ss +0000`` format
200     may also be included. Mandatory.
201    
202     ``Revision:``
203 g2boojum 1.1 Initially 1. Incremented every time a non-trivial change is made. Changes
204     which require a re-read of the news item should instead use a new news item
205 ciaranm 1.4 file. Mandatory.
206    
207 g2boojum 1.1 ``News-Item-Format:``
208     Must be ``1.0``. Future revisions to the format may increment the minor
209     number for backwards-compatible changes, or the major number for major
210     changes.
211    
212 ciaranm 1.4 The following headers are used for filtering:
213 g2boojum 1.1
214     ``Display-If-Installed:``
215     A dependency atom or simple package name (for example,
216     ``<dev-lang/php-5_alpha`` or ``net-www/apache``). If the user has the
217     package specified installed, the news item should be displayed.
218    
219     ``Display-If-Keyword:``
220 ciaranm 1.4 A keyword [#glep-22]_ name, for example ``mips`` or ``x86-fbsd``. If the
221     user is on the keyword in question, the news item should be displayed.
222 g2boojum 1.1
223     ``Display-If-Profile:``
224 ciaranm 1.4 A profile path, for example ``default-linux/sparc/sparc64/server``. Standard
225     shell GLOB wildcards may be used. If the user is using the exact profile in
226     question, the news item should be displayed. This header may be used to
227     replace ``deprecated`` files in the future.
228    
229     .. Note:: When performing package moves, developers must also update any
230     relevant ``Display-If-Installed`` headers in news files.
231    
232     The algorithm used to determine whether a news item is 'relevant' is as
233     follows:
234    
235     * For each ``Display-If-`` header type which occurs at least once:
236    
237     + The news item is not relevant if none of the headers of this type are
238     successfully matched.
239    
240     * Otherwise the news item is relevant.
241    
242     In particular, if no ``Display-If-`` header is specified, a news item will be
243     relevant for all users.
244    
245     This algorithm was chosen because it makes conditions like "display this news
246     item for ``YourSQL`` users who are on ``sparc`` or ``x86-obsd`` relatively
247     simple to specify — it is believed that these kinds of condition are far more
248     likely to occur than "display this news item for people using ``YourSQL``, or
249     for people on ``sparc`` or ``x86-obsd``\" or "display these news items for
250     people who use ``YourSQL`` and who are on both ``sparc`` and ``x86-obsd``\".
251 g2boojum 1.1
252     News Item Body
253     ''''''''''''''
254    
255     The header section must be followed by a blank line, then the main body of the
256     text.
257    
258     The text body should be wrapped at 72 characters. No fancy formatting or tab
259 ciaranm 1.4 characters should be used — the news item may be being displayed directly to a
260 ciaranm 1.2 terminal. Paragraphs should be separated by a blank line.
261 g2boojum 1.1
262     Hyperlinks may be used to refer to further information (for example, an upgrade
263     guide). However, the main body of the news item should be descriptive and not
264     simply a "read this link" text. It is assumed that the user will have access to
265     a web browser *somewhere*, but not necessarily on the box which is being
266 ciaranm 1.4 administrated — this will be the case on may servers and routers, for example.
267 g2boojum 1.1
268     Example News Item
269     '''''''''''''''''
270    
271 ciaranm 1.4 `This hypothetical news item`__ could be used for an upgrade to the
272     ``YourSQL`` database format which breaks forward compatibility.
273 g2boojum 1.1
274 ciaranm 1.4 .. __: glep-0042-extras/example-news-item.txt
275 g2boojum 1.1
276     News Item Quality Control
277     -------------------------
278    
279     There have been complaints regarding the comprehensibility of some upgrade
280 ciaranm 1.4 notices and news items in the past. This is understandable — not every Gentoo
281     developer speaks English as a first language. However, for the sake of clarity,
282     professionalism and avoiding making us look like prats, it is important that any
283     language problems be corrected before inflicting a news item upon end users.
284    
285     Thus, at least 72 hours before a proposed news item is committed, it must be
286     posted to the ``gentoo-dev`` mailing list and ``Cc:``\ed to ``pr@gentoo.org``
287     (exceptions may be made in exceptional circumstances). Any complaints — for
288     example regarding wording, clarity or accuracy — **must** be addressed before
289     the news item goes live.
290    
291     .. Note:: A previous draft of this GLEP allowed news items to be sent to
292     ``gentoo-core`` instead of ``gentoo-dev``. It is possible that a situation
293     may arise where this will be necessary (for example, a security update which
294     must break backwards compatibility and which cannot be revealed to the public
295     before a given date).
296 g2boojum 1.1
297     News items must only be for **important** changes that may cause serious upgrade
298     or compatibility problems. Ordinary upgrade messages and non-critical news items
299     should remain in ``einfo`` notices. The importance of the message to its
300     intended audience should be justified with the proposal.
301    
302     .. Important:: The filtering system means that it is appropriate to send out
303     news items which are aimed at users of an uncommon package or architecture.
304     Thus, the justification should be in the form "this message is important to
305     YourSQL users because ...", not "YourSQL is important because ...".
306    
307     News Item Distribution
308     ----------------------
309    
310     Server Side
311     '''''''''''
312    
313 ciaranm 1.4 News items are to be made available via the standard rsync tree. This removes
314     any need for polling of a remote source.
315 g2boojum 1.1
316     A new repository will be created for news items. The type (CVS or Subversion),
317     location and access controls on this repository are beyond the scope of this
318     GLEP.
319    
320     .. Note:: A previous draft of this GLEP instead used the main ``gentoo-x86``
321     tree. This was changed following advice from Infrastructure
322     [#ramereth-repo]_. Both solutions have the same end result.
323    
324 ciaranm 1.4 This repository will contain directories named ``yyyy/mm/``, where ``yyyy`` is
325 g2boojum 1.1 the current year and ``mm`` is the current month number (01 for January through
326     12 for December). This separation will help keep news items more manageable.
327    
328     The contents of this repository will automatically be merged with the main rsync
329 ciaranm 1.4 tree, placing the items in a ``metadata/news/`` directory. The method used for
330     merging these items is beyond the scope of this GLEP — a similar setup is
331 g2boojum 1.1 already used for merging GLSAs into the rsync tree.
332    
333 ciaranm 1.4 The main rsync tree will **not** use the ``yyyy/mm/`` subdirectory layout.
334 g2boojum 1.1
335     Client Side
336     '''''''''''
337    
338 ciaranm 1.4 Whenever relevant unread news items are found, the package manager will create a
339     file named ``/var/lib/portage/news/news.unread`` (if it does not already exist)
340     and append the news item identifier (eg ``2005-11-01-yoursql-updates``) on a new
341     line.
342    
343     .. Note:: Future changes to Portage involving support for multiple repositories
344     may require one news list per repository. Assuming repositories have some
345     kind of unique identifier, this file could be named ``news-repoid.unread``.
346 g2boojum 1.1
347     Notification that new relevant news items will be displayed via the
348     ``emerge`` tool in a similar way to the existing "configuration files need
349     updating" messages:
350    
351     ::
352    
353     * Important: there are 5 unread news items.
354     * Type emerge --help news to learn how to read news files.
355    
356 ciaranm 1.4 Checks for new news messages should be displayed:
357 g2boojum 1.1
358 ciaranm 1.4 * After an ``emerge sync``
359     * After an ``emerge --pretend``
360     * Before an ``emerge <target>`` (which may also include a red warning message)
361    
362     The package manager may use a timestamp check file to avoid having to process
363     news items unnecessarily.
364    
365     The package manager must keep track of news items that have already been added
366     to the unread list to avoid repeatedly marking a deleted news item. This could
367     be handled via a ``news.skip`` file, but implementation is not specified by this
368     GLEP.
369 g2boojum 1.1
370     Users who really don't care about news items can use ``rsync_excludes`` to
371 ciaranm 1.4 filter out the ``metadata/news/`` directory.
372 g2boojum 1.1
373     News Item Clients
374     -----------------
375    
376 ciaranm 1.4 Once a news item is marked for reading, third party tools (or traditional core
377     Unix tools) can be used to display and view the news files.
378    
379     When a news item is read, its name should be removed from the ``news.unread``
380     file. News clients may add the name to a ``news.read`` file in the same
381     directory with the same file format.
382    
383     An ``eselect`` [#eselect]_ module shall be created as the 'suggested' display
384     tool; other display tools (for example, a news to email forwarder, which would
385     be ideal for users who sync on a ``cron``) are left as options for those who
386     desire them.
387 g2boojum 1.1
388     News Item Removal
389     -----------------
390    
391     News items can be removed (by removing the news file from the main tree) when
392     they are no longer relevant, if they are made obsolete by a future news item or
393     after a long period of time. This is the same as the method used for ``updates``
394     entries.
395    
396     Integration with Existing Systems
397     =================================
398    
399 ciaranm 1.4 It would be simple to convert these news items into the format used for news
400 g2boojum 1.1 items on the Gentoo website or posts for the ``gentoo-announce`` mailing list.
401    
402     There is an existing automated tool [#forums-glsa]_ for posting GLSAs to the
403     forums. A similar tool can be used for these news items.
404    
405     Backwards Compatibility
406     =======================
407    
408     Backwards compatibility is not a concern here. Existing tools will simply ignore
409     the ``news/`` directory.
410    
411     Reference Implementation
412     ========================
413    
414     Portage Code
415     ------------
416    
417     TODO
418    
419     Simple ``eselect`` News Client
420     ------------------------------
421    
422 ciaranm 1.4 TODO Removed until the exact format details are figured out.
423 g2boojum 1.1
424     Simple News to Mail Forwarder
425     -----------------------------
426    
427 ciaranm 1.4 TODO Removed until the exact format details are figured out.
428 g2boojum 1.1
429     Credits
430     =======
431    
432     The idea behind notifying users of news updates via Portage comes from Stuart
433     Herbert [#stuart-blog]_.
434    
435 ciaranm 1.4 Thanks to Lance Albertson, Stephen Bennett, Donnie Berkholz, Grant Goodyear,
436     Brian Harring, Dan Meltzer, Jason Stubbs, Paul de Vrieze and Alec Warner for
437     input. Some of the ideas presented here are theirs, others go completely
438     against their suggestions.
439    
440     Example Files
441     =============
442    
443     TODO Removed until the exact format details are figured out.
444 g2boojum 1.1
445     References
446     ==========
447    
448 ciaranm 1.4 .. [#bug-11359] Bugzilla Bug 11359
449     "[NEW FEATURE] pkg_postinst/pkg_preinst ewarn/einfo logging",
450     https://bugs.gentoo.org/show_bug.cgi?id=11359
451 g2boojum 1.1 .. [#docs-policy] Gentoo XML Guide, Daniel Robbins et al.,
452     http://www.gentoo.org/doc/en/xml-guide.xml
453     .. [#eselect] eselect modular framework for configuration and
454     administration utilities,
455     http://www.gentoo.org/proj/en/eselect/index.xml
456     .. [#forums-glsa] Forums user GLSA,
457     http://forums.gentoo.org/profile.php?mode=viewprofile&u=55648
458 ciaranm 1.4 .. [#forums-apache2] Forums thread "Gentoo Apache2 Config Change Idiocy",
459 g2boojum 1.1 http://forums.gentoo.org/viewtopic-t-384368.html
460 ciaranm 1.4 .. [#glep-1] GLEP 1: "GLEP Purpose and Guidelines", Grant Goodyear,
461     http://www.gentoo.org/proj/en/glep/glep-0001.html
462 g2boojum 1.1 .. [#glep-22] GLEP 22: "New "keyword" system to incorporate various
463     userlands/kernels/archs", Grant Goodyear,
464     http://www.gentoo.org/proj/en/glep/glep-0022.html
465     .. [#glep-31] GLEP 31: "Character Sets for Portage Tree Items", Ciaran
466     McCreesh,
467     http://www.gentoo.org/proj/en/glep/glep-0031.html
468     .. [#glep-34] GLEP 34: "Per-Category metadata.xml Files", Ciaran McCreesh,
469     http://www.gentoo.org/proj/en/glep/glep-0034.html
470     .. [#glep-36] GLEP 36: "Subversion/CVS for Gentoo Hosted Projects", Aaron
471     Walker,
472     http://www.gentoo.org/proj/en/glep/glep-0036.html
473     .. [#iso-639] ISO 639 "Code for the representation of names of languages"
474     .. [#ramereth-repo] "Re: [gentoo-dev] GLEP ??: Critical News Reporting", Lance
475     Albertson,
476     http://marc.theaimsgroup.com/?l=gentoo-dev&m=113111585907703&w=2
477     .. [#rfc-822] RFC 822 "Standard for the format of ARPA Internet text messages"
478 ciaranm 1.4 .. [#rfc-3629] RFC 3629: "UTF-8, a transformation format of ISO 10646"
479     http://www.ietf.org/rfc/rfc3629.txt
480 g2boojum 1.1 .. [#stuart-blog] "Favouring an automatic news mechanism", Stuart Herbert,
481     http://stu.gnqs.org/diary/gentoo.php/2005/10/28/favouring_an_automatic_news_mechanism
482    
483     Copyright
484     =========
485    
486     This document has been placed in the public domain.
487    
488     .. vim: set tw=80 fileencoding=utf-8 spell spelllang=en et :

  ViewVC Help
Powered by ViewVC 1.1.20