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

Parent Directory Parent Directory | Revision Log Revision Log

Revision 1.12 - (show annotations) (download)
Tue Sep 5 20:36:38 2006 UTC (12 years, 6 months ago) by g2boojum
Branch: MAIN
Changes since 1.11: +3 -3 lines
File MIME type: text/plain
update post dates

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

  ViewVC Help
Powered by ViewVC 1.1.20