/[gentoo]/xml/htdocs/proj/en/glep/glep-0060.html
Gentoo

Contents of /xml/htdocs/proj/en/glep/glep-0060.html

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.9 - (hide annotations) (download) (as text)
Sun Jan 31 09:56:08 2010 UTC (4 years, 8 months ago) by robbat2
Branch: MAIN
Changes since 1.8: +5 -4 lines
File MIME type: text/html
Update HTML.

1 cardoe 1.1 <?xml version="1.0" encoding="utf-8" ?>
2     <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3     <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
4    
5     <head>
6     <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
7 robbat2 1.5 <meta name="generator" content="Docutils 0.6: http://docutils.sourceforge.net/" />
8 cardoe 1.1 <title>GLEP 60 -- Manifest2 filetypes</title>
9     <link rel="stylesheet" href="tools/glep.css" type="text/css" /></head>
10     <body bgcolor="white">
11     <table class="navigation" cellpadding="0" cellspacing="0"
12     width="100%" border="0">
13     <tr><td class="navicon" width="150" height="35">
14     <a href="http://www.gentoo.org/" title="Gentoo Linux Home Page">
15     <img src="http://www.gentoo.org/images/gentoo-new.gif" alt="[Gentoo]"
16     border="0" width="150" height="35" /></a></td>
17     <td class="textlinks" align="left">
18     [<b><a href="http://www.gentoo.org/">Gentoo Linux Home</a></b>]
19     [<b><a href="http://www.gentoo.org/proj/en/glep">GLEP Index</a></b>]
20     [<b><a href="http://www.gentoo.org/proj/en/glep/glep-0060.txt">GLEP Source</a></b>]
21     </td></tr></table>
22     <table class="rfc2822 docutils field-list" frame="void" rules="none">
23     <col class="field-name" />
24     <col class="field-body" />
25     <tbody valign="top">
26     <tr class="field"><th class="field-name">GLEP:</th><td class="field-body">60</td>
27     </tr>
28     <tr class="field"><th class="field-name">Title:</th><td class="field-body">Manifest2 filetypes</td>
29     </tr>
30 robbat2 1.9 <tr class="field"><th class="field-name">Version:</th><td class="field-body">1.9</td>
31 cardoe 1.1 </tr>
32 robbat2 1.9 <tr class="field"><th class="field-name">Last-Modified:</th><td class="field-body"><a class="reference external" href="http://www.gentoo.org/cgi-bin/viewcvs.cgi/xml/htdocs/proj/en/glep/glep-0060.txt?cvsroot=gentoo">2010/01/31 09:55:43</a></td>
33 cardoe 1.1 </tr>
34     <tr class="field"><th class="field-name">Author:</th><td class="field-body">Robin Hugh Johnson &lt;robbat2&#32;&#97;t&#32;gentoo.org&gt;</td>
35     </tr>
36     <tr class="field"><th class="field-name">Status:</th><td class="field-body">Draft</td>
37     </tr>
38     <tr class="field"><th class="field-name">Type:</th><td class="field-body">Standards Track</td>
39     </tr>
40     <tr class="field"><th class="field-name">Content-Type:</th><td class="field-body"><a class="reference external" href="glep-0002.html">text/x-rst</a></td>
41     </tr>
42     <tr class="field"><th class="field-name">Requires:</th><td class="field-body"><a class="reference external" href="http://www.gentoo.org/proj/en/glepglep-0044.html">44</a></td>
43     </tr>
44     <tr class="field"><th class="field-name">Created:</th><td class="field-body">November 2007</td>
45     </tr>
46 robbat2 1.5 <tr class="field"><th class="field-name">Updated:</th><td class="field-body">June 2008, July 2008, October 2008, January 2010</td>
47 cardoe 1.1 </tr>
48     <tr class="field"><th class="field-name">Updates:</th><td class="field-body">44</td>
49     </tr>
50 robbat2 1.7 <tr class="field"><th class="field-name">Post-History:</th><td class="field-body">December 2009, January 2010</td>
51 robbat2 1.3 </tr>
52 cardoe 1.1 </tbody>
53     </table>
54     <hr />
55     <div class="contents topic" id="contents">
56     <p class="topic-title first">Contents</p>
57     <ul class="simple">
58 robbat2 1.3 <li><a class="reference internal" href="#abstract" id="id4">Abstract</a></li>
59     <li><a class="reference internal" href="#motivation" id="id5">Motivation</a></li>
60     <li><a class="reference internal" href="#specification" id="id6">Specification</a><ul>
61     <li><a class="reference internal" href="#general" id="id7">General</a></li>
62     <li><a class="reference internal" href="#excluded-files" id="id8">Excluded files</a></li>
63     <li><a class="reference internal" href="#existing-filetypes" id="id9">Existing filetypes:</a><ul>
64     <li><a class="reference internal" href="#aux" id="id10">AUX</a></li>
65     <li><a class="reference internal" href="#ebuild" id="id11">EBUILD</a></li>
66     <li><a class="reference internal" href="#dist" id="id12">DIST</a></li>
67     <li><a class="reference internal" href="#misc" id="id13">MISC</a></li>
68     </ul>
69     </li>
70     <li><a class="reference internal" href="#new-filetypes" id="id14">New filetypes:</a><ul>
71     <li><a class="reference internal" href="#info-new-abstract" id="id15">_INFO (new, abstract)</a></li>
72     <li><a class="reference internal" href="#crit-new-abstract" id="id16">_CRIT (new, abstract)</a></li>
73     <li><a class="reference internal" href="#id1" id="id17">EBUILD</a></li>
74     <li><a class="reference internal" href="#id2" id="id18">DIST</a></li>
75     <li><a class="reference internal" href="#id3" id="id19">MISC</a></li>
76     <li><a class="reference internal" href="#manifest-new" id="id20">MANIFEST (new)</a></li>
77     <li><a class="reference internal" href="#eclass-new" id="id21">ECLASS (new)</a></li>
78     <li><a class="reference internal" href="#data-new" id="id22">DATA (new)</a></li>
79     <li><a class="reference internal" href="#exec-new" id="id23">EXEC (new)</a></li>
80 robbat2 1.4 <li><a class="reference internal" href="#other-new" id="id24">OTHER (new)</a></li>
81 robbat2 1.3 </ul>
82     </li>
83     <li><a class="reference internal" href="#on-bloat" id="id25">On Bloat</a></li>
84     <li><a class="reference internal" href="#chosing-a-filetype" id="id26">Chosing a filetype</a></li>
85     </ul>
86     </li>
87     <li><a class="reference internal" href="#backwards-compatibility" id="id27">Backwards Compatibility</a></li>
88     <li><a class="reference internal" href="#thanks-to" id="id28">Thanks to</a></li>
89     <li><a class="reference internal" href="#references" id="id29">References</a></li>
90     <li><a class="reference internal" href="#copyright" id="id30">Copyright</a></li>
91 cardoe 1.1 </ul>
92     </div>
93     <div class="section" id="abstract">
94 robbat2 1.3 <h1><a class="toc-backref" href="#id4">Abstract</a></h1>
95     <p>Clarification of the Manifest2 [#GLEP44] specification, including new types to
96 cardoe 1.1 help in the tree-signing specification.</p>
97     </div>
98     <div class="section" id="motivation">
99 robbat2 1.3 <h1><a class="toc-backref" href="#id5">Motivation</a></h1>
100     <p>[#GLEP44] was not entirely clear on the usage of filetype specifiers.
101 cardoe 1.1 This document serves to provide some of the internal logic used by
102     Portage at the point of writing, as well as adding new types to cover
103     the rest of the tree, for the purposes of tree-signing coverage.</p>
104 robbat2 1.7 <p>This GLEP is not mandatory for the tree-signing specification, but
105     instead aims to clarify the usage of the Manifest2 filetype specifiers,
106     and note which types signify files that are allowed to be missing from
107 robbat2 1.9 the tree (e.g. a user excluding a package or category). As such, it is
108     also able to stand on it's own.</p>
109 cardoe 1.1 </div>
110     <div class="section" id="specification">
111 robbat2 1.3 <h1><a class="toc-backref" href="#id6">Specification</a></h1>
112 cardoe 1.1 <div class="section" id="general">
113 robbat2 1.3 <h2><a class="toc-backref" href="#id7">General</a></h2>
114 cardoe 1.1 <p>For any given directory with a Manifest file, every file located in that
115     directory, or a sub-directory must be listed in that Manifest file,
116     unless stated otherwise in the following sections. The Manifest file
117     must not contain an entry for itself.</p>
118     </div>
119     <div class="section" id="excluded-files">
120 robbat2 1.3 <h2><a class="toc-backref" href="#id8">Excluded files</a></h2>
121 robbat2 1.6 <p>When generating or validating a Manifest, or committing to a version
122 cardoe 1.1 control system, the package manager should endeavour to ignore files
123     created by a version control system, backup files from text editors. A
124 robbat2 1.5 non-exhaustive list is suggested here: <tt class="docutils literal">CVS/</tt>, <tt class="docutils literal">.svn/</tt>, <tt class="docutils literal">.bzr/</tt>,
125     <tt class="docutils literal">.git/</tt>, <tt class="docutils literal">.hg/</tt>, <tt class="docutils literal">.#*</tt>, <tt class="docutils literal">*.rej</tt>, <tt class="docutils literal">*.orig</tt>, <tt class="docutils literal">*.bak</tt>, <tt class="docutils literal">*~</tt>.</p>
126 cardoe 1.1 <p>Additionally, for a transitional Manifest1-&gt;Manifest2 system, old-style
127     digest files located in a 'files/' directory, may be excluded from
128     Manifest2 generation, or included with a type of MISC.</p>
129     <p>Under strict security conditions, the exclusion list may be ignored
130     during validation if the existence of a file would be considered a
131     security risk.</p>
132     </div>
133     <div class="section" id="existing-filetypes">
134 robbat2 1.3 <h2><a class="toc-backref" href="#id9">Existing filetypes:</a></h2>
135 cardoe 1.1 <div class="section" id="aux">
136 robbat2 1.3 <h3><a class="toc-backref" href="#id10">AUX</a></h3>
137 cardoe 1.1 <ul class="simple">
138     <li>The AUX type is used for all items under the 'files' subdirectory.</li>
139     <li>They should be verified relative to $FILESDIR.</li>
140     <li>The string 'files/' is left out of the Manifest line.</li>
141     <li>The absence of a file mentioned by AUX must be treated as an error.</li>
142     <li>The AUX type is intended to denote potentially executable content
143     (either directly or indirectly), that must be treated an error if
144     modified or absent.</li>
145     </ul>
146     </div>
147     <div class="section" id="ebuild">
148 robbat2 1.3 <h3><a class="toc-backref" href="#id11">EBUILD</a></h3>
149 cardoe 1.1 <ul class="simple">
150     <li>The EBUILD type is used solely for files ending in .ebuild, or other
151     suffixes as defined by the EAPI.</li>
152     <li>The files are located in the same directory as the Manifest file.</li>
153     <li>The modification or absence of a file mentioned by EBUILD must be
154     treated as an error.</li>
155     </ul>
156     </div>
157     <div class="section" id="dist">
158 robbat2 1.3 <h3><a class="toc-backref" href="#id12">DIST</a></h3>
159 cardoe 1.1 <ul class="simple">
160     <li>The DIST type is used for distfiles</li>
161     <li>They may be found directly via the $DISTDIR setting of the package
162     manager.</li>
163     <li>During simple verification of a Manifest, a missing DIST file should
164     not be consider as a validation error (it is however a failure to
165     fetch or unpack).</li>
166     </ul>
167     </div>
168     <div class="section" id="misc">
169 robbat2 1.3 <h3><a class="toc-backref" href="#id13">MISC</a></h3>
170 cardoe 1.1 <ul class="simple">
171     <li>The MISC type covers all remaining files in a directory.</li>
172     <li>MISC is intended to mark all content that was not used in
173     some way that directly affected execution of the package manager.</li>
174     <li>This includes metadata.xml and ChangeLog entries, and any other purely
175     informational content.</li>
176     <li>MISC entries where the file is missing may optionally be ignored as by
177     non-strict package managers.</li>
178     <li>It should be possible to install a package while all MISC entries have
179     been deleted from the tree.</li>
180     </ul>
181     </div>
182     </div>
183     <div class="section" id="new-filetypes">
184 robbat2 1.3 <h2><a class="toc-backref" href="#id14">New filetypes:</a></h2>
185 cardoe 1.1 <div class="section" id="info-new-abstract">
186 robbat2 1.3 <h3><a class="toc-backref" href="#id15">_INFO (new, abstract)</a></h3>
187 cardoe 1.1 <ul class="simple">
188     <li>This is the functionality of the old AUX, but does not include the
189     implicit 'files/' prefix in the path, and is verified relative to the
190     working directory instead of $FILESDIR.</li>
191     <li>The modification or absence of a file listed as a _INFO-derived type
192     is not an error unless the package manager is attempting to be strict.</li>
193     </ul>
194     </div>
195     <div class="section" id="crit-new-abstract">
196 robbat2 1.3 <h3><a class="toc-backref" href="#id16">_CRIT (new, abstract)</a></h3>
197 cardoe 1.1 <ul class="simple">
198     <li>_CRIT is based off the _INFO type.</li>
199     <li>The modification or absence of a file listed as a _CRIT-derived type
200 robbat2 1.5 MUST be treated as an error.</li>
201 cardoe 1.1 </ul>
202     </div>
203 robbat2 1.3 <div class="section" id="id1">
204     <h3><a class="toc-backref" href="#id17">EBUILD</a></h3>
205 cardoe 1.1 <ul class="simple">
206     <li>Now derived from _CRIT.</li>
207     <li>Otherwise unchanged.</li>
208     </ul>
209     </div>
210 robbat2 1.3 <div class="section" id="id2">
211     <h3><a class="toc-backref" href="#id18">DIST</a></h3>
212 cardoe 1.1 <ul class="simple">
213     <li>Now derived from _CRIT.</li>
214     <li>Otherwise unchanged.</li>
215     </ul>
216     </div>
217 robbat2 1.3 <div class="section" id="id3">
218     <h3><a class="toc-backref" href="#id19">MISC</a></h3>
219 cardoe 1.1 <ul class="simple">
220     <li>Now derived from _INFO.</li>
221     <li>Otherwise unchanged.</li>
222     </ul>
223     </div>
224     <div class="section" id="manifest-new">
225 robbat2 1.3 <h3><a class="toc-backref" href="#id20">MANIFEST (new)</a></h3>
226 cardoe 1.1 <ul class="simple">
227     <li>The MANIFEST type is explicitly to cover all nested Manifest files.</li>
228     <li>During validation, this serves as an indicator that the package
229     manager may need to check subtree Manifest file.</li>
230 robbat2 1.6 <li>A missing MANIFEST file may be treated as a minor (e.g. excluding an
231 cardoe 1.1 entire category) or critical validation failure.</li>
232     <li>The failure should be considered as critical only if files that would
233     be directly covered by this Manifest are missing. Deletion of a
234     category-level Manifest while preserving the packages is forbidden.
235     Deletion of an entire category is not.</li>
236     </ul>
237     </div>
238     <div class="section" id="eclass-new">
239 robbat2 1.3 <h3><a class="toc-backref" href="#id21">ECLASS (new)</a></h3>
240 cardoe 1.1 <ul class="simple">
241     <li>uses _CRIT.</li>
242     <li>This type shall be used for all eclasses only.</li>
243     </ul>
244     </div>
245     <div class="section" id="data-new">
246 robbat2 1.3 <h3><a class="toc-backref" href="#id22">DATA (new)</a></h3>
247 cardoe 1.1 <ul class="simple">
248     <li>uses _CRIT.</li>
249     <li>The DATA type shall be used for all files that directly affect the
250     package manager, such as metadata/cache/* and profiles/.</li>
251     </ul>
252     </div>
253     <div class="section" id="exec-new">
254 robbat2 1.3 <h3><a class="toc-backref" href="#id23">EXEC (new)</a></h3>
255 cardoe 1.1 <ul class="simple">
256     <li>uses _CRIT.</li>
257     <li>If the file gets sourced, executed, or causes a change (patches) in
258 robbat2 1.6 how something is sourced or executed, it belongs in the EXEC
259 cardoe 1.1 filetype.</li>
260     <li>This filetype should be used for the scripts directories of a
261     repository for important files.</li>
262 robbat2 1.5 <li>This filetype is not limited to being used in the files/
263     subdirectory.</li>
264 cardoe 1.1 </ul>
265     </div>
266 robbat2 1.4 <div class="section" id="other-new">
267     <h3><a class="toc-backref" href="#id24">OTHER (new)</a></h3>
268 cardoe 1.1 <ul class="simple">
269     <li>uses _CRIT.</li>
270     <li>All other files that are not covered by another type should be
271 robbat2 1.4 considered as 'OTHER'.</li>
272 robbat2 1.5 <li>Any further new filetypes should be introduced to subtract files
273     from the 'OTHER' set.</li>
274     <li>If a package manager runs into a unknown Manifest2 type, it should
275     be treated as 'OTHER'.</li>
276 cardoe 1.1 </ul>
277     </div>
278     </div>
279     <div class="section" id="on-bloat">
280 robbat2 1.3 <h2><a class="toc-backref" href="#id25">On Bloat</a></h2>
281 cardoe 1.1 <p>If repeated use of a common path prefix is considered a bloat problem, a
282     Manifest file should be added inside the common directory, however this
283     should not be done blindly, as bloat by inodes is more significant for
284 robbat2 1.5 the majority of use cases. See also [#GLEP58] on size reductions of
285     Manifests.</p>
286 cardoe 1.1 </div>
287     <div class="section" id="chosing-a-filetype">
288 robbat2 1.3 <h2><a class="toc-backref" href="#id26">Chosing a filetype</a></h2>
289 cardoe 1.1 <ol class="arabic">
290     <li><dl class="first docutils">
291 robbat2 1.5 <dt>matches <tt class="docutils literal">Manifest</tt></dt>
292 cardoe 1.1 <dd><p class="first last">=&gt; MANIFEST, stop.</p>
293     </dd>
294     </dl>
295     </li>
296     <li><dl class="first docutils">
297 robbat2 1.5 <dt>matches <tt class="docutils literal">*.ebuild</tt></dt>
298 robbat2 1.3 <dd><p class="first last">=&gt; EBUILD, stop.</p>
299 cardoe 1.1 </dd>
300     </dl>
301     </li>
302     <li><dl class="first docutils">
303 robbat2 1.5 <dt>matches <tt class="docutils literal">*.eclass</tt></dt>
304 robbat2 1.3 <dd><p class="first last">=&gt; ECLASS, stop.</p>
305 cardoe 1.1 </dd>
306     </dl>
307     </li>
308     <li><dl class="first docutils">
309     <dt>listed in SRC_URI</dt>
310     <dd><p class="first last">=&gt; DIST, stop.</p>
311     </dd>
312     </dl>
313     </li>
314     <li><dl class="first docutils">
315 robbat2 1.5 <dt>matches <tt class="docutils literal">files/*</tt></dt>
316 cardoe 1.1 <dd><p class="first last">=&gt; AUX, continue [see note].</p>
317     </dd>
318     </dl>
319     </li>
320     <li><dl class="first docutils">
321 robbat2 1.5 <dt>matches any of <tt class="docutils literal">*.sh</tt>, <tt class="docutils literal">*.bashrc</tt>, <tt class="docutils literal">*.patch</tt>, ...</dt>
322 cardoe 1.1 <dd><p class="first last">=&gt; EXEC, stop.</p>
323     </dd>
324     </dl>
325     </li>
326     <li><dl class="first docutils">
327 robbat2 1.5 <dt>matches any of <tt class="docutils literal">metadata/cache/*</tt>, <tt class="docutils literal">profiles/</tt>, <tt class="docutils literal">package.*</tt>, <tt class="docutils literal">use.mask*</tt>, ...</dt>
328 cardoe 1.1 <dd><p class="first last">=&gt; DATA, stop.</p>
329     </dd>
330     </dl>
331     </li>
332     <li><dl class="first docutils">
333 robbat2 1.5 <dt>matches any of <tt class="docutils literal">ChangeLog</tt>, <tt class="docutils literal">metadata.xml</tt>, <tt class="docutils literal">*.desc</tt>, ...</dt>
334 cardoe 1.1 <dd><p class="first last">=&gt; MISC, stop.</p>
335     </dd>
336     </dl>
337     </li>
338     <li><dl class="first docutils">
339     <dt>not matched by any other rule</dt>
340 robbat2 1.4 <dd><p class="first last">=&gt; OTHER, stop.</p>
341 cardoe 1.1 </dd>
342     </dl>
343     </li>
344     </ol>
345     <p>The logic behind 5, 6, 7 is ensuring that every item that by it's
346 robbat2 1.6 presence or absence may be dangerous should always be treated strictly.
347 robbat2 1.3 (Consider epatch given a directory of patches <tt class="docutils literal"><span class="pre">${FILESDIR}/${PV}/</span></tt>,
348     where it blindly includes them, or alternatively, the package.mask file
349     or a profile being altered/missing).</p>
350 robbat2 1.5 <p>The above lists of file patterns are not intended to be exhaustive,
351     but merely demonstrative.</p>
352 cardoe 1.1 <p>Note: The AUX entries should only be generated if we are generating a
353     compatible Manifest that supports older versions of Portage. They should
354     be generated along with the new type.</p>
355     </div>
356     </div>
357     <div class="section" id="backwards-compatibility">
358 robbat2 1.3 <h1><a class="toc-backref" href="#id27">Backwards Compatibility</a></h1>
359 cardoe 1.1 <p>For generation of existing package Manifests, the AUX entries must
360     continue to be present for the standard Portage deprecation cycle.
361     The new entries may be included already in all Manifest files, as they
362     will be ignored by older Portage versions. Over time, ECLASS, DATA,
363 robbat2 1.4 EXEC, OTHER may replace the existing AUX type.</p>
364 robbat2 1.3 <p>The adoption of this proposal does also affect [#GLEP58] as part of
365 cardoe 1.1 this GLEP series, however this GLEP was an offset of the research in
366     that GLEP.</p>
367     </div>
368     <div class="section" id="thanks-to">
369 robbat2 1.3 <h1><a class="toc-backref" href="#id28">Thanks to</a></h1>
370 cardoe 1.1 <p>I'd like to thank the following people for input on this GLEP.
371     - Marius Mauch (genone) &amp; Zac Medico (zmedico): Portage Manifest2</p>
372     </div>
373     <div class="section" id="references">
374 robbat2 1.3 <h1><a class="toc-backref" href="#id29">References</a></h1>
375 cardoe 1.1 <table class="docutils footnote" frame="void" id="glep44" rules="none">
376     <colgroup><col class="label" /><col /></colgroup>
377     <tbody valign="top">
378     <tr><td class="label">[1]</td><td>Mauch, M. (2005) GLEP44 - Manifest2 format.
379     <a class="reference external" href="http://www.gentoo.org/proj/en/glep/glep-0044.html">http://www.gentoo.org/proj/en/glep/glep-0044.html</a></td></tr>
380     </tbody>
381     </table>
382     </div>
383     <div class="section" id="copyright">
384 robbat2 1.3 <h1><a class="toc-backref" href="#id30">Copyright</a></h1>
385 robbat2 1.6 <p>Copyright (c) 2007-2010 by Robin Hugh Johnson. This material may be
386 cardoe 1.1 distributed only subject to the terms and conditions set forth in the
387     Open Publication License, v1.0.</p>
388     <p>vim: tw=72 ts=2 expandtab:</p>
389     </div>
390    
391     </div>
392     <div class="footer">
393     <hr class="footer" />
394     <a class="reference external" href="glep-0060.txt">View document source</a>.
395 robbat2 1.9 Generated on: 2010-01-31 09:56 UTC.
396 cardoe 1.1 Generated by <a class="reference external" href="http://docutils.sourceforge.net/">Docutils</a> from <a class="reference external" href="http://docutils.sourceforge.net/rst.html">reStructuredText</a> source.
397    
398     </div>
399     </body>
400     </html>

  ViewVC Help
Powered by ViewVC 1.1.20