1 |
On Sun, Dec 18, 2005 at 04:15:45AM +0000, Ciaran McCreesh wrote: |
2 |
> Here we go again... Changes: |
3 |
> |
4 |
> * We're now supporting overlays, multiple repositories and magic flying |
5 |
> chickens. To do this, we're shoving a whole load of new requirements |
6 |
> onto Portage. Said requirements are documented under `Required Portage |
7 |
> Enhancements`_. I now expect to get heavily flamed by a different set |
8 |
> of Portage developers. |
9 |
|
10 |
You forgot the magic mushroom badgers and snake. |
11 |
|
12 |
|
13 |
> * Change to yyyy-mm-dd for GLEP 45 compatibility. Rereremove the |
14 |
> timestamp on the Posted: header. |
15 |
> |
16 |
> * Tweak Display-If-{Profile,Installed} to work with multiple |
17 |
> repositories. |
18 |
> |
19 |
> * Use ${repoid} rather than magic-chicken for news-*.* files. |
20 |
|
21 |
Drop the magic-chicken crap (especially in light of your comments |
22 |
about 'professional' news inline in the glep). |
23 |
|
24 |
Killjoy maybe, but it detracts from the point of the glep. |
25 |
|
26 |
> * Be specific on how news-repoid.skip can work. |
27 |
|
28 |
Still haven't gotten into specifics, merely a different bit of hand |
29 |
waving. |
30 |
|
31 |
|
32 |
> You are encouraged to reply to this thread saying "I agree with ciaranm |
33 |
> that repository IDs should not be allowed to contain spaces". |
34 |
> |
35 |
> TODO: ferringb wants spaces added to the first item on the list. I don't, |
36 |
> because it makes repo id -> filename mappings nasty. |
37 |
> |
38 |
> * Every repository (including overlays) will require a unique identifier. It is |
39 |
> assumed that an identifier will be a string consisting of characters from |
40 |
> ``a`` to ``z``, ``A`` to ``Z``, ``0`` to ``9``, ``+`` (plus), ``-`` (hyphen), |
41 |
> ``:`` (colon) and ``_`` (underscore). |
42 |
|
43 |
Not really. Just requires your code to be space safe. |
44 |
|
45 |
You write good code, right? Especially since you need to keep our |
46 |
path handling safe for osx (/volumes) and for users who do strange |
47 |
things? |
48 |
|
49 |
The news handling crap should be able to take spaces- remember the |
50 |
comments about user aliasing of repostory ID's down the line. I don't |
51 |
care if the actual metadata/repo_id lacks spaces, but the handling |
52 |
code must be able to take spaces, as such the requirement that spaces |
53 |
not be used is arbitrary and uneeded. |
54 |
|
55 |
|
56 |
> * Portage must provide a way for external programs to obtain a list of all |
57 |
> repository identifiers for a given system. It is assumed that this will be in |
58 |
> the form of a ``portageq`` command (e.g. ``portageq get_repo_ids``). |
59 |
> |
60 |
> * Portage must provide a way for external programs to obtain the base path for |
61 |
> a repository with a given ID. It is assumed that this will be in the form of |
62 |
> a ``portageq`` command (e.g. ``portageq get_repo_root gentoo-x86``). |
63 |
> |
64 |
> * Portage must extend ``portageq has_version`` to support restrictions to a |
65 |
> given repository ID. |
66 |
> |
67 |
> * Portage must extend ``portageq`` to implement a command which returns whether |
68 |
> or not the profile used for a given repository ID matches a certain base path |
69 |
> (e.g. ``portageq profile_used default-linux/sparc/sparc64/2004.3 gentoo-x86``). |
70 |
|
71 |
profile_in_use, maybe. |
72 |
|
73 |
|
74 |
> These extensions are assumed during the following specification. |
75 |
> |
76 |
> News Item Identities |
77 |
> -------------------- |
78 |
> |
79 |
> Each news item will have a unique identifier. This identifier will be in the |
80 |
> form ``yyyy-mm-dd-short-name``, where ``yyyy`` is the year (e.g. ``2005``), |
81 |
> ``mm`` is the month (``01`` through ``12``) and dd is the day of the month |
82 |
> (``01`` through ``31``). The ``short-name`` is a very short name describing the |
83 |
> news item (e.g. ``yoursql-updates``), consisting only of the characters ``a-z``, |
84 |
> ``0-9``, ``+`` (plus), ``:`` (colon), ``-`` (hyphen) and ``_`` (underscore). |
85 |
> |
86 |
> News Item Directories |
87 |
> --------------------- |
88 |
> |
89 |
> Each news item will be represented by a directory whose name is the same as the |
90 |
> news item's identifier. |
91 |
> |
92 |
> The directory will contain a file named ``yyyy-mm-dd-short-name.en.txt``, which |
93 |
> contains the text of the news item, in English, in the format described below. |
94 |
> |
95 |
> If a news item is translated, other files named ``yyyy-mm-dd-short-name.xx.txt`` |
96 |
> (where ``xx`` is the ISO 639 [#iso-639]_ two letter country code) will also be |
97 |
> provided. However, only the English version of a news item is authoritative. |
98 |
> This anglocentricity is justified by precedent [#glep-34]_. |
99 |
> |
100 |
> News Item Files |
101 |
> --------------- |
102 |
> |
103 |
> A news item file is a text file, encoded using UTF-8 [#rfc-3629]_ for |
104 |
> compatibility with and for the same reasons as existing Gentoo documentation |
105 |
> [#docs-policy]_ and the tree [#glep-31]_. |
106 |
> |
107 |
> News items should be signed with a detached GPG signature: :: |
108 |
|
109 |
why should vs must? |
110 |
Should leaves open the possibility for a tree compromise and a news |
111 |
item with Very Bad(tm) instructions stuck into it. |
112 |
|
113 |
Moving towards getting the whole tree signed, introducing new |
114 |
components that aren't required signed works against that. |
115 |
|
116 |
> News Item Headers |
117 |
> ''''''''''''''''' |
118 |
> |
119 |
> The following headers describe the purpose and format of the news item: |
120 |
> |
121 |
> ``Title:`` |
122 |
> A short (maximum 44 characters) descriptive title. Mandatory. |
123 |
> |
124 |
> ``Author:`` |
125 |
> Author's name and email address, in the form ``Real Name <email@address>``. |
126 |
> Mandatory; multiple author headers may be specified if appropriate. |
127 |
> |
128 |
> ``Translator:`` |
129 |
> For translated news items, the translator's name and email address. Multiple |
130 |
> translator headers may be specified if appropriate. |
131 |
> |
132 |
> ``Content-Type:`` |
133 |
> Must be ``text/plain``. Mandatory. |
134 |
> |
135 |
> ``Posted:`` |
136 |
> Date of posting, in ``yyyy-mm-dd`` format (e.g. 2005-12-18) for |
137 |
> compatibility with GLEP 45 [#glep-45]_. Mandatory. |
138 |
> |
139 |
> ``Revision:`` |
140 |
> Initially 1. Incremented every time a non-trivial change is made. Changes |
141 |
> which require a re-read of the news item should instead use a new news item |
142 |
> file. Mandatory. |
143 |
non-trivial changes that don't require a re-read sounds like a |
144 |
contradiction. Clarify, especially since portage will mark this as |
145 |
read _once_ and only once. |
146 |
|
147 |
> The following headers are used for filtering: |
148 |
> |
149 |
> ``Display-If-Installed:`` |
150 |
> A dependency atom or simple package name (for example, |
151 |
|
152 |
Drop the 'simple package name'; it still is an atom. |
153 |
|
154 |
> ``<dev-lang/php-5_alpha`` or ``net-www/apache``). If the user has the |
155 |
> package specified installed from the repository from which the news item was |
156 |
> obtained, the news item should be displayed. |
157 |
|
158 |
This isn't incredibly useful if ranged versions are ever introduced. |
159 |
Ammending the glep for that seems stupid, looser language might be |
160 |
wise. |
161 |
|
162 |
> ``Display-If-Keyword:`` |
163 |
> A keyword [#glep-22]_ name, for example ``mips`` or ``x86-fbsd``. If the |
164 |
> user is on the keyword in question, the news item should be displayed. |
165 |
> |
166 |
> ``Display-If-Profile:`` |
167 |
> A profile path, for example ``default-linux/sparc/sparc64/server``. If the |
168 |
> user is using the exact profile in question, or a subprofile of this |
169 |
> profile, the news item should be displayed. This header may be used to |
170 |
> replace ``deprecated`` files in the future. |
171 |
> |
172 |
> .. Note:: When performing package moves, developers must also update any |
173 |
|
174 |
> relevant ``Display-If-Installed`` headers in news files. |
175 |
Grounds for someone to get off their ass and do some work, but this |
176 |
should be automated in some fashion- specifically detection of it |
177 |
(auto-updating won't work with signing). |
178 |
|
179 |
> The algorithm used to determine whether a news item is 'relevant' is as |
180 |
> follows: |
181 |
> |
182 |
> * For each ``Display-If-`` header type which occurs at least once: |
183 |
> |
184 |
> + The news item is not relevant if none of the headers of this type are |
185 |
> successfully matched. |
186 |
> |
187 |
> * Otherwise the news item is relevant. |
188 |
> |
189 |
> In particular, if no ``Display-If-`` header is specified, a news item will be |
190 |
> relevant for all users. |
191 |
|
192 |
implementation issue= be aware this must be cached. No caching == |
193 |
slowing down portage pissing off users. |
194 |
|
195 |
All news items *will* need to be cached in some format here- just |
196 |
because the keyword isn't what the user is running at the time of |
197 |
sync, doesn't mean that the keyword won't be used for ROOT!="/" cross |
198 |
compilation. |
199 |
|
200 |
That's an implementation note, but I'm bringing it up since the time |
201 |
to do the filter/cache instantiation is during portage initialization |
202 |
(yes it sucks, but your stuck with stable)... so start thinking about |
203 |
ways to make it fast, since python -c'import portage' is the slowest |
204 |
part of portage queries |
205 |
|
206 |
|
207 |
> News Item Quality Control |
208 |
> ------------------------- |
209 |
> |
210 |
> There have been complaints regarding the comprehensibility of some upgrade |
211 |
> notices and news items in the past. This is understandable ??? not every Gentoo |
212 |
|
213 |
'???' ? |
214 |
|
215 |
> .. Note:: A previous draft of this GLEP allowed news items to be sent to |
216 |
> ``gentoo-core`` instead of ``gentoo-dev``. It is possible that a situation |
217 |
> may arise where this will be necessary (for example, a security update which |
218 |
> must break backwards compatibility and which cannot be revealed to the public |
219 |
> before a given date). |
220 |
|
221 |
Drop that and just state that -core doesn't fly sans security |
222 |
consideration; referencing one of the previous 5 versions isn't needed |
223 |
(yes it's minor, but it's uneeded info). |
224 |
|
225 |
> Server Side |
226 |
> ''''''''''' |
227 |
> |
228 |
> News items are to be made available via the standard rsync tree. This removes |
229 |
> any need for polling of a remote source. |
230 |
> |
231 |
> A new repository will be created for news items. The type (CVS or Subversion), |
232 |
> location and access controls on this repository are beyond the scope of this |
233 |
> GLEP. |
234 |
|
235 |
We generate a tree every 30 minutes. You aiming for every update, or |
236 |
for less frequent (once an hour fex)? |
237 |
|
238 |
Matters due to the fact rsync tree generation has a window it must not |
239 |
overrun- minor but continuing the "lets be explicit" goal of yours. |
240 |
|
241 |
|
242 |
> This repository will contain directories named ``yyyy/mm/``, where ``yyyy`` is |
243 |
> the current year and ``mm`` is the current month number (01 for January through |
244 |
> 12 for December). This separation will help keep news items more manageable. |
245 |
> |
246 |
> The contents of this repository will automatically be merged with the main rsync |
247 |
> tree, placing the items in a ``metadata/news/`` directory. The method used for |
248 |
> merging these items is beyond the scope of this GLEP ??? a similar setup is |
249 |
> already used for merging GLSAs into the rsync tree. |
250 |
> |
251 |
> The main rsync tree will **not** use the ``yyyy/mm/`` subdirectory layout. |
252 |
|
253 |
What shall it use? Again, be explicit. |
254 |
|
255 |
|
256 |
> Client Side |
257 |
> ''''''''''' |
258 |
> |
259 |
> Whenever relevant unread news items are found, the package manager will create a |
260 |
> file named ``/var/lib/gentoo/news/news-repoid.unread`` (if it does not |
261 |
-file named ``/var/lib/gentoo/news/news-repoid.unread`` (if it does not |
262 |
+file named ``/var/lib/gentoo/news/news-${repoid}.unread`` (if it does not |
263 |
|
264 |
Clearer at a first read though imo. |
265 |
|
266 |
> already exist) and append the news item identifier (eg |
267 |
> ``2005-11-01-yoursql-updates``) on a new line. |
268 |
|
269 |
Implementation details, but this handling will need to be integrated |
270 |
into portage (eg, no external scripts). External scripts will slow |
271 |
things down (shell overhead/fork/exec), plus portage is going to have |
272 |
to query this cruft already for the notifications on emerge targets |
273 |
(no we're not execing everytime for that either ;) |
274 |
|
275 |
> Checks for new news messages should be displayed: |
276 |
> |
277 |
> * After an ``emerge sync`` |
278 |
> * After an ``emerge --pretend`` |
279 |
> * Before an ``emerge <target>`` (which may also include a red warning message) |
280 |
> * Before an ``emerge --ask <target>`` sequence |
281 |
|
282 |
ask is superfluous, nuke it. |
283 |
|
284 |
You haven't stated how the 'package manager' will trigger the user's |
285 |
reader of choice for these targets. Should also extend this to allow |
286 |
a way to disable any news notices, lest someone's cronjob get hung |
287 |
displaying news (feature or not, it's needed). |
288 |
|
289 |
|
290 |
> The package manager must keep track of news items that have already been added |
291 |
> to the unread list to avoid repeatedly marking a deleted news item. This could |
292 |
> be handled via a ``news-repoid.skip`` file containing the IDs of news items that |
293 |
> have already been added to a ``news-repoid.unread`` file, but this method is not |
294 |
> required by this GLEP. |
295 |
|
296 |
Specifics. |
297 |
|
298 |
|
299 |
> Once a news item is marked for reading, third party tools (or traditional core |
300 |
> Unix tools) can be used to display and view the news files. |
301 |
> |
302 |
> When a news item is read, its name should be removed from the |
303 |
> ``news-repoid.unread`` file. If a news client acts as an interactive reader |
304 |
> rather than a gateway, it should then add the name to a ``news-repoid.read`` |
305 |
> file in the same directory with the same file format. |
306 |
|
307 |
implementation issue; you need locking on this. If portage has to |
308 |
farm out to the users reader of choice, then it needs to lock the file |
309 |
to keep readers/writers from screwing with each other. |
310 |
|
311 |
Flock preferably, since it's faster then resorting to hardlink |
312 |
trickery (yes this may be harder for shell crap, but so it goes since |
313 |
hardlink locking sucks). |
314 |
|
315 |
|
316 |
> News Item Removal |
317 |
> ----------------- |
318 |
> |
319 |
> News items can be removed (by removing the news file from the main tree) when |
320 |
> they are no longer relevant, if they are made obsolete by a future news item or |
321 |
> after a long period of time. This is the same as the method used for ``updates`` |
322 |
> entries. |
323 |
|
324 |
implementation issue; updating unread/skip crap so it doesn't bloat is |
325 |
required, but time frame also matters (crap sync resulting in news |
326 |
getting removed, yet it still being valid, just missing from the local |
327 |
tree). |
328 |
|
329 |
> Integration with Existing Systems |
330 |
> ================================= |
331 |
> |
332 |
> It would be simple to convert these news items into the format used for news |
333 |
> items on the Gentoo website or posts for the ``gentoo-announce`` mailing list. |
334 |
> |
335 |
> There is an existing automated tool [#forums-glsa]_ for posting GLSAs to the |
336 |
> forums. A similar tool can be used for these news items. |
337 |
|
338 |
Pawned it off on someone, or something you'll be doing? |
339 |
|
340 |
~harring |