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

Diff of /xml/htdocs/proj/en/glep/glep-0060.txt

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 1.1 Revision 1.10
1GLEP: 60 1GLEP: 60
2Title: Manifest2 filetypes 2Title: Manifest2 filetypes
3Version: $Revision: 1.1 $ 3Version: $Revision: 1.10 $
4Last-Modified: $Date: 2008/10/21 23:30:47 $ 4Last-Modified: $Date: 2010/04/07 21:34:24 $
5Author: Robin Hugh Johnson <robbat2@gentoo.org> 5Author: Robin Hugh Johnson <robbat2@gentoo.org>
6Status: Draft 6Status: Draft
7Type: Standards Track 7Type: Standards Track
8Content-Type: text/x-rst 8Content-Type: text/x-rst
9Requires: 44 9Requires: 44
10Created: November 2007 10Created: November 2007
11Updated: June 2008, July 2008 11Updated: June 2008, July 2008, October 2008, January 2010
12Updates: 44 12Updates: 44
13Post-History: December 2009, January 2010
13 14
14Abstract 15Abstract
15======== 16========
16Clarification of the Manifest2 [GLEP44] specification, including new types to 17Clarification of the Manifest2 [GLEP44] specification, including new types to
17help in the tree-signing specification. 18help in the tree-signing specification.
20========== 21==========
21[GLEP44] was not entirely clear on the usage of filetype specifiers. 22[GLEP44] was not entirely clear on the usage of filetype specifiers.
22This document serves to provide some of the internal logic used by 23This document serves to provide some of the internal logic used by
23Portage at the point of writing, as well as adding new types to cover 24Portage at the point of writing, as well as adding new types to cover
24the rest of the tree, for the purposes of tree-signing coverage. 25the rest of the tree, for the purposes of tree-signing coverage.
26
27This GLEP is not mandatory for the tree-signing specification, but
28instead aims to clarify the usage of the Manifest2 filetype specifiers,
29and note which types signify files that are allowed to be missing from
30the tree (e.g. a user excluding a package or category). As such, it is
31also able to stand on it's own.
25 32
26Specification 33Specification
27============= 34=============
28General 35General
29------- 36-------
32unless stated otherwise in the following sections. The Manifest file 39unless stated otherwise in the following sections. The Manifest file
33must not contain an entry for itself. 40must not contain an entry for itself.
34 41
35Excluded files 42Excluded files
36-------------- 43--------------
37When generating or validating a Manifest, or commiting to a version 44When generating or validating a Manifest, or committing to a version
38control system, the package manager should endeavour to ignore files 45control system, the package manager should endeavour to ignore files
39created by a version control system, backup files from text editors. A 46created by a version control system, backup files from text editors. A
40non-exhaustive list is suggested here: CVS/, .svn/, .bzr/, .git/, .hg/, 47non-exhaustive list is suggested here: ``CVS/``, ``.svn/``, ``.bzr/``,
41.#*, *.rej, *.orig, *.bak, *~. 48``.git/``, ``.hg/``, ``.#*``, ``*.rej``, ``*.orig``, ``*.bak``, ``*~``.
42 49
43Additionally, for a transitional Manifest1->Manifest2 system, old-style 50Additionally, for a transitional Manifest1->Manifest2 system, old-style
44digest files located in a 'files/' directory, may be excluded from 51digest files located in a 'files/' directory, may be excluded from
45Manifest2 generation, or included with a type of MISC. 52Manifest2 generation, or included with a type of MISC.
46 53
91 98
92 99
93New filetypes: 100New filetypes:
94-------------- 101--------------
95_INFO (new, abstract) 102_INFO (new, abstract)
96~~~~~~~~~~~~~~~~~~~~~~~~~ 103~~~~~~~~~~~~~~~~~~~~~
97- This is the functionality of the old AUX, but does not include the 104- This is the functionality of the old AUX, but does not include the
98 implicit 'files/' prefix in the path, and is verified relative to the 105 implicit 'files/' prefix in the path, and is verified relative to the
99 working directory instead of $FILESDIR. 106 working directory instead of $FILESDIR.
100- The modification or absence of a file listed as a _INFO-derived type 107- The modification or absence of a file listed as a _INFO-derived type
101 is not an error unless the package manager is attempting to be strict. 108 is not an error unless the package manager is attempting to be strict.
102 109
103_CRIT (new, abstract) 110_CRIT (new, abstract)
104~~~~~~~~~~~~~~~~~~~~~~~~~ 111~~~~~~~~~~~~~~~~~~~~~
105- _CRIT is based off the _INFO type. 112- _CRIT is based off the _INFO type.
106- The modification or absence of a file listed as a _CRIT-derived type 113- The modification or absence of a file listed as a _CRIT-derived type
107 must be treated as an error. 114 MUST be treated as an error.
108 115
109EBUILD 116EBUILD
110~~~~~~ 117~~~~~~
111- Now derived from _CRIT. 118- Now derived from _CRIT.
112- Otherwise unchanged. 119- Otherwise unchanged.
124MANIFEST (new) 131MANIFEST (new)
125~~~~~~~~~~~~~~ 132~~~~~~~~~~~~~~
126- The MANIFEST type is explicitly to cover all nested Manifest files. 133- The MANIFEST type is explicitly to cover all nested Manifest files.
127- During validation, this serves as an indicator that the package 134- During validation, this serves as an indicator that the package
128 manager may need to check subtree Manifest file. 135 manager may need to check subtree Manifest file.
129- A missing MANIFEST file may be treated as a minor (eg excluding an 136- A missing MANIFEST file may be treated as a minor (e.g. excluding an
130 entire category) or critical validation failure. 137 entire category) or critical validation failure.
131- The failure should be considered as critical only if files that would 138- The failure should be considered as critical only if files that would
132 be directly covered by this Manifest are missing. Deletion of a 139 be directly covered by this Manifest are missing. Deletion of a
133 category-level Manifest while preserving the packages is forbidden. 140 category-level Manifest while preserving the packages is forbidden.
134 Deletion of an entire category is not. 141 Deletion of an entire category is not.
135 142
136ECLASS (new) 143ECLASS (new)
137~~~~~~~~~~~~ 144~~~~~~~~~~~~
138- uses _CRIT. 145- uses _CRIT.
139- This type shall be used for all eclasses only. 146- This type shall be used for all eclasses only.
140- TODO: What about patches etc under eclasses/? Probably EXEC?
141 147
142DATA (new) 148DATA (new)
143~~~~~~~~~~ 149~~~~~~~~~~
144- uses _CRIT. 150- uses _CRIT.
145- The DATA type shall be used for all files that directly affect the 151- The DATA type shall be used for all files that directly affect the
147 153
148EXEC (new) 154EXEC (new)
149~~~~~~~~~~ 155~~~~~~~~~~
150- uses _CRIT. 156- uses _CRIT.
151- If the file gets sourced, executed, or causes a change (patches) in 157- If the file gets sourced, executed, or causes a change (patches) in
152 how something is sourced or execututed, it belongs in the EXEC 158 how something is sourced or executed, it belongs in the EXEC
153 filetype. 159 filetype.
154- This filetype should be used for the scripts directories of a 160- This filetype should be used for the scripts directories of a
155 repository for important files. 161 repository for important files.
162- This filetype is not limited to being used in the files/
163 subdirectory.
156 164
157UNKNOWN (new) 165OTHER (new)
158~~~~~~~~~~~~~ 166~~~~~~~~~~~
159- uses _CRIT. 167- uses _CRIT.
160- All other files that are not covered by another type should be 168- All other files that are not covered by another type should be
161 considered as 'UNKNOWN'. 169 considered as 'OTHER'.
170- Any further new filetypes should be introduced to subtract files
171 from the 'OTHER' set.
172- If a package manager runs into a unknown Manifest2 type, it should
173 be treated as 'OTHER'.
162 174
163On Bloat 175On Bloat
164-------- 176--------
165If repeated use of a common path prefix is considered a bloat problem, a 177If repeated use of a common path prefix is considered a bloat problem, a
166Manifest file should be added inside the common directory, however this 178Manifest file should be added inside the common directory, however this
167should not be done blindly, as bloat by inodes is more significant for 179should not be done blindly, as bloat by inodes is more significant for
168the majority of use cases. 180the majority of use cases. See also [GLEP58] on size reductions of
181Manifests.
169 182
170Chosing a filetype 183Chosing a filetype
171------------------ 184------------------
1721. matches Manifest 1851. matches ``Manifest``
173 => MANIFEST, stop. 186 => MANIFEST, stop.
1742. matches *.ebuild 1872. matches ``*.ebuild``
175 => EBUILD, stop. 188 => EBUILD, stop.
1763. matches *.eclass 1893. matches ``*.eclass``
177 => ECLASS, stop. 190 => ECLASS, stop.
1784. listed in SRC_URI 1914. listed in SRC_URI
179 => DIST, stop. 192 => DIST, stop.
1805. matches files/* 1935. matches ``files/*``
181 => AUX, continue [see note]. 194 => AUX, continue [see note].
1826. matches {*.sh,*.bashrc,*.patch,...} 1956. matches any of ``*.sh``, ``*.bashrc``, ``*.patch``, ...
183 => EXEC, stop. 196 => EXEC, stop.
1847. matches {metadata/cache/*,profiles/,package.*,use.mask*,...} 1977. matches any of ``metadata/cache/*``, ``profiles/``, ``package.*``, ``use.mask*``, ...
185 => DATA, stop. 198 => DATA, stop.
1868. matches {ChangeLog,metadata.xml,*.desc,...} 1998. matches any of ``ChangeLog``, ``metadata.xml``, ``*.desc``, ...
187 => MISC, stop. 200 => MISC, stop.
1889. not matched by any other rule 2019. not matched by any other rule
189 => UNKNOWN, stop. 202 => OTHER, stop.
190 203
191The logic behind 5, 6, 7 is ensuring that every item that by it's 204The logic behind 5, 6, 7 is ensuring that every item that by it's
192presence or absense may be dangerous should always be treated strictly. 205presence or absence may be dangerous should always be treated strictly.
193(Consider epatch given a directory of patches ${FILESDIR}/${PV}/, where 206(Consider epatch given a directory of patches ``${FILESDIR}/${PV}/``,
194it blindly includes them, or alternatively, the package.mask file or a 207where it blindly includes them, or alternatively, the package.mask file
195profile being altered/missing). 208or a profile being altered/missing).
209
210The above lists of file patterns are not intended to be exhaustive,
211but merely demonstrative.
196 212
197Note: The AUX entries should only be generated if we are generating a 213Note: The AUX entries should only be generated if we are generating a
198compatible Manifest that supports older versions of Portage. They should 214compatible Manifest that supports older versions of Portage. They should
199be generated along with the new type. 215be generated along with the new type.
200 216
202======================= 218=======================
203For generation of existing package Manifests, the AUX entries must 219For generation of existing package Manifests, the AUX entries must
204continue to be present for the standard Portage deprecation cycle. 220continue to be present for the standard Portage deprecation cycle.
205The new entries may be included already in all Manifest files, as they 221The new entries may be included already in all Manifest files, as they
206will be ignored by older Portage versions. Over time, ECLASS, DATA, 222will be ignored by older Portage versions. Over time, ECLASS, DATA,
207EXEC, UNKNOWN may replace the existing AUX type. 223EXEC, OTHER may replace the existing AUX type.
208 224
209The adoption of this proposal does also affect [GLEPxx+1] as part of 225The adoption of this proposal does also affect [GLEP58] as part of
210this GLEP series, however this GLEP was an offset of the research in 226this GLEP series, however this GLEP was an offset of the research in
211that GLEP. 227that GLEP.
212 228
213Thanks to 229Thanks to
214========= 230=========
215I'd like to thank the following people for input on this GLEP. 231I'd like to thank the following people for input on this GLEP.
216- Marius Mauch (genone) & Zac Medico (zmedico): Portage Manifest2 232- Marius Mauch (genone) & Zac Medico (zmedico): Portage Manifest2
217 233
218References 234References
219========== 235==========
220.. [#GLEP44] Mauch, M. (2005) GLEP44 - Manifest2 format. 236.. [GLEP44] Mauch, M. (2005) GLEP44 - Manifest2 format.
221 http://www.gentoo.org/proj/en/glep/glep-0044.html 237 http://www.gentoo.org/proj/en/glep/glep-0044.html
238
239.. [GLEP58] Security of distribution of Gentoo software - Infrastructure to User distribution - MetaManifest
240 http://www.gentoo.org/proj/en/glep/glep-0058.html
222 241
223Copyright 242Copyright
224========= 243=========
225Copyright (c) 2007 by Robin Hugh Johnson. This material may be 244Copyright (c) 2007-2010 by Robin Hugh Johnson. This material may be
226distributed only subject to the terms and conditions set forth in the 245distributed only subject to the terms and conditions set forth in the
227Open Publication License, v1.0. 246Open Publication License, v1.0.
228 247
229vim: tw=72 ts=2 expandtab: 248.. vim: tw=72 ts=2 expandtab:

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.10

  ViewVC Help
Powered by ViewVC 1.1.20