/[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.7
1GLEP: 60 1GLEP: 60
2Title: Manifest2 filetypes 2Title: Manifest2 filetypes
3Version: $Revision: 1.1 $ 3Version: $Revision: 1.7 $
4Last-Modified: $Date: 2008/10/21 23:30:47 $ 4Last-Modified: $Date: 2010/01/13 03:26:53 $
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
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.
18 19
19Motivation 20Motivation
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.
25 26
26Specification 27Specification
32unless stated otherwise in the following sections. The Manifest file 33unless stated otherwise in the following sections. The Manifest file
33must not contain an entry for itself. 34must not contain an entry for itself.
34 35
35Excluded files 36Excluded files
36-------------- 37--------------
37When generating or validating a Manifest, or commiting to a version 38When generating or validating a Manifest, or committing to a version
38control system, the package manager should endeavour to ignore files 39control system, the package manager should endeavour to ignore files
39created by a version control system, backup files from text editors. A 40created by a version control system, backup files from text editors. A
40non-exhaustive list is suggested here: CVS/, .svn/, .bzr/, .git/, .hg/, 41non-exhaustive list is suggested here: ``CVS/``, ``.svn/``, ``.bzr/``,
41.#*, *.rej, *.orig, *.bak, *~. 42``.git/``, ``.hg/``, ``.#*``, ``*.rej``, ``*.orig``, ``*.bak``, ``*~``.
42 43
43Additionally, for a transitional Manifest1->Manifest2 system, old-style 44Additionally, for a transitional Manifest1->Manifest2 system, old-style
44digest files located in a 'files/' directory, may be excluded from 45digest files located in a 'files/' directory, may be excluded from
45Manifest2 generation, or included with a type of MISC. 46Manifest2 generation, or included with a type of MISC.
46 47
91 92
92 93
93New filetypes: 94New filetypes:
94-------------- 95--------------
95_INFO (new, abstract) 96_INFO (new, abstract)
96~~~~~~~~~~~~~~~~~~~~~~~~~ 97~~~~~~~~~~~~~~~~~~~~~
97- This is the functionality of the old AUX, but does not include the 98- 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 99 implicit 'files/' prefix in the path, and is verified relative to the
99 working directory instead of $FILESDIR. 100 working directory instead of $FILESDIR.
100- The modification or absence of a file listed as a _INFO-derived type 101- 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. 102 is not an error unless the package manager is attempting to be strict.
102 103
103_CRIT (new, abstract) 104_CRIT (new, abstract)
104~~~~~~~~~~~~~~~~~~~~~~~~~ 105~~~~~~~~~~~~~~~~~~~~~
105- _CRIT is based off the _INFO type. 106- _CRIT is based off the _INFO type.
106- The modification or absence of a file listed as a _CRIT-derived type 107- The modification or absence of a file listed as a _CRIT-derived type
107 must be treated as an error. 108 MUST be treated as an error.
108 109
109EBUILD 110EBUILD
110~~~~~~ 111~~~~~~
111- Now derived from _CRIT. 112- Now derived from _CRIT.
112- Otherwise unchanged. 113- Otherwise unchanged.
124MANIFEST (new) 125MANIFEST (new)
125~~~~~~~~~~~~~~ 126~~~~~~~~~~~~~~
126- The MANIFEST type is explicitly to cover all nested Manifest files. 127- The MANIFEST type is explicitly to cover all nested Manifest files.
127- During validation, this serves as an indicator that the package 128- During validation, this serves as an indicator that the package
128 manager may need to check subtree Manifest file. 129 manager may need to check subtree Manifest file.
129- A missing MANIFEST file may be treated as a minor (eg excluding an 130- A missing MANIFEST file may be treated as a minor (e.g. excluding an
130 entire category) or critical validation failure. 131 entire category) or critical validation failure.
131- The failure should be considered as critical only if files that would 132- The failure should be considered as critical only if files that would
132 be directly covered by this Manifest are missing. Deletion of a 133 be directly covered by this Manifest are missing. Deletion of a
133 category-level Manifest while preserving the packages is forbidden. 134 category-level Manifest while preserving the packages is forbidden.
134 Deletion of an entire category is not. 135 Deletion of an entire category is not.
135 136
136ECLASS (new) 137ECLASS (new)
137~~~~~~~~~~~~ 138~~~~~~~~~~~~
138- uses _CRIT. 139- uses _CRIT.
139- This type shall be used for all eclasses only. 140- This type shall be used for all eclasses only.
140- TODO: What about patches etc under eclasses/? Probably EXEC?
141 141
142DATA (new) 142DATA (new)
143~~~~~~~~~~ 143~~~~~~~~~~
144- uses _CRIT. 144- uses _CRIT.
145- The DATA type shall be used for all files that directly affect the 145- The DATA type shall be used for all files that directly affect the
147 147
148EXEC (new) 148EXEC (new)
149~~~~~~~~~~ 149~~~~~~~~~~
150- uses _CRIT. 150- uses _CRIT.
151- If the file gets sourced, executed, or causes a change (patches) in 151- If the file gets sourced, executed, or causes a change (patches) in
152 how something is sourced or execututed, it belongs in the EXEC 152 how something is sourced or executed, it belongs in the EXEC
153 filetype. 153 filetype.
154- This filetype should be used for the scripts directories of a 154- This filetype should be used for the scripts directories of a
155 repository for important files. 155 repository for important files.
156- This filetype is not limited to being used in the files/
157 subdirectory.
156 158
157UNKNOWN (new) 159OTHER (new)
158~~~~~~~~~~~~~ 160~~~~~~~~~~~
159- uses _CRIT. 161- uses _CRIT.
160- All other files that are not covered by another type should be 162- All other files that are not covered by another type should be
161 considered as 'UNKNOWN'. 163 considered as 'OTHER'.
164- Any further new filetypes should be introduced to subtract files
165 from the 'OTHER' set.
166- If a package manager runs into a unknown Manifest2 type, it should
167 be treated as 'OTHER'.
162 168
163On Bloat 169On Bloat
164-------- 170--------
165If repeated use of a common path prefix is considered a bloat problem, a 171If repeated use of a common path prefix is considered a bloat problem, a
166Manifest file should be added inside the common directory, however this 172Manifest file should be added inside the common directory, however this
167should not be done blindly, as bloat by inodes is more significant for 173should not be done blindly, as bloat by inodes is more significant for
168the majority of use cases. 174the majority of use cases. See also [#GLEP58] on size reductions of
175Manifests.
169 176
170Chosing a filetype 177Chosing a filetype
171------------------ 178------------------
1721. matches Manifest 1791. matches ``Manifest``
173 => MANIFEST, stop. 180 => MANIFEST, stop.
1742. matches *.ebuild 1812. matches ``*.ebuild``
175 => EBUILD, stop. 182 => EBUILD, stop.
1763. matches *.eclass 1833. matches ``*.eclass``
177 => ECLASS, stop. 184 => ECLASS, stop.
1784. listed in SRC_URI 1854. listed in SRC_URI
179 => DIST, stop. 186 => DIST, stop.
1805. matches files/* 1875. matches ``files/*``
181 => AUX, continue [see note]. 188 => AUX, continue [see note].
1826. matches {*.sh,*.bashrc,*.patch,...} 1896. matches any of ``*.sh``, ``*.bashrc``, ``*.patch``, ...
183 => EXEC, stop. 190 => EXEC, stop.
1847. matches {metadata/cache/*,profiles/,package.*,use.mask*,...} 1917. matches any of ``metadata/cache/*``, ``profiles/``, ``package.*``, ``use.mask*``, ...
185 => DATA, stop. 192 => DATA, stop.
1868. matches {ChangeLog,metadata.xml,*.desc,...} 1938. matches any of ``ChangeLog``, ``metadata.xml``, ``*.desc``, ...
187 => MISC, stop. 194 => MISC, stop.
1889. not matched by any other rule 1959. not matched by any other rule
189 => UNKNOWN, stop. 196 => OTHER, stop.
190 197
191The logic behind 5, 6, 7 is ensuring that every item that by it's 198The 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. 199presence or absence may be dangerous should always be treated strictly.
193(Consider epatch given a directory of patches ${FILESDIR}/${PV}/, where 200(Consider epatch given a directory of patches ``${FILESDIR}/${PV}/``,
194it blindly includes them, or alternatively, the package.mask file or a 201where it blindly includes them, or alternatively, the package.mask file
195profile being altered/missing). 202or a profile being altered/missing).
203
204The above lists of file patterns are not intended to be exhaustive,
205but merely demonstrative.
196 206
197Note: The AUX entries should only be generated if we are generating a 207Note: The AUX entries should only be generated if we are generating a
198compatible Manifest that supports older versions of Portage. They should 208compatible Manifest that supports older versions of Portage. They should
199be generated along with the new type. 209be generated along with the new type.
200 210
202======================= 212=======================
203For generation of existing package Manifests, the AUX entries must 213For generation of existing package Manifests, the AUX entries must
204continue to be present for the standard Portage deprecation cycle. 214continue to be present for the standard Portage deprecation cycle.
205The new entries may be included already in all Manifest files, as they 215The new entries may be included already in all Manifest files, as they
206will be ignored by older Portage versions. Over time, ECLASS, DATA, 216will be ignored by older Portage versions. Over time, ECLASS, DATA,
207EXEC, UNKNOWN may replace the existing AUX type. 217EXEC, OTHER may replace the existing AUX type.
208 218
209The adoption of this proposal does also affect [GLEPxx+1] as part of 219The adoption of this proposal does also affect [#GLEP58] as part of
210this GLEP series, however this GLEP was an offset of the research in 220this GLEP series, however this GLEP was an offset of the research in
211that GLEP. 221that GLEP.
212 222
213Thanks to 223Thanks to
214========= 224=========
220.. [#GLEP44] Mauch, M. (2005) GLEP44 - Manifest2 format. 230.. [#GLEP44] Mauch, M. (2005) GLEP44 - Manifest2 format.
221 http://www.gentoo.org/proj/en/glep/glep-0044.html 231 http://www.gentoo.org/proj/en/glep/glep-0044.html
222 232
223Copyright 233Copyright
224========= 234=========
225Copyright (c) 2007 by Robin Hugh Johnson. This material may be 235Copyright (c) 2007-2010 by Robin Hugh Johnson. This material may be
226distributed only subject to the terms and conditions set forth in the 236distributed only subject to the terms and conditions set forth in the
227Open Publication License, v1.0. 237Open Publication License, v1.0.
228 238
229vim: tw=72 ts=2 expandtab: 239vim: tw=72 ts=2 expandtab:

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

  ViewVC Help
Powered by ViewVC 1.1.20