/[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.4 Revision 1.8
1GLEP: 60 1GLEP: 60
2Title: Manifest2 filetypes 2Title: Manifest2 filetypes
3Version: $Revision: 1.4 $ 3Version: $Revision: 1.8 $
4Last-Modified: $Date: 2010/01/13 00:35:49 $ 4Last-Modified: $Date: 2010/01/31 07:56:58 $
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, October 2008 11Updated: June 2008, July 2008, October 2008, January 2010
12Updates: 44 12Updates: 44
13Post-History: 13Post-History: December 2009, January 2010
14 14
15Abstract 15Abstract
16======== 16========
17Clarification of the Manifest2 [#GLEP44] specification, including new types to 17Clarification of the Manifest2 [#GLEP44] specification, including new types to
18help in the tree-signing specification. 18help in the tree-signing specification.
21========== 21==========
22[#GLEP44] was not entirely clear on the usage of filetype specifiers. 22[#GLEP44] was not entirely clear on the usage of filetype specifiers.
23This document serves to provide some of the internal logic used by 23This document serves to provide some of the internal logic used by
24Portage 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
25the 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).
26 31
27Specification 32Specification
28============= 33=============
29General 34General
30------- 35-------
33unless stated otherwise in the following sections. The Manifest file 38unless stated otherwise in the following sections. The Manifest file
34must not contain an entry for itself. 39must not contain an entry for itself.
35 40
36Excluded files 41Excluded files
37-------------- 42--------------
38When generating or validating a Manifest, or commiting to a version 43When generating or validating a Manifest, or committing to a version
39control system, the package manager should endeavour to ignore files 44control system, the package manager should endeavour to ignore files
40created by a version control system, backup files from text editors. A 45created by a version control system, backup files from text editors. A
41non-exhaustive list is suggested here: ``CVS/``, ``.svn/``, ``.bzr/``, 46non-exhaustive list is suggested here: ``CVS/``, ``.svn/``, ``.bzr/``,
42``.git/``, ``.hg/``, ``.#*``, ``*.rej``, ``*.orig``, ``*.bak``, ``*~``. 47``.git/``, ``.hg/``, ``.#*``, ``*.rej``, ``*.orig``, ``*.bak``, ``*~``.
43 48
103 108
104_CRIT (new, abstract) 109_CRIT (new, abstract)
105~~~~~~~~~~~~~~~~~~~~~ 110~~~~~~~~~~~~~~~~~~~~~
106- _CRIT is based off the _INFO type. 111- _CRIT is based off the _INFO type.
107- The modification or absence of a file listed as a _CRIT-derived type 112- The modification or absence of a file listed as a _CRIT-derived type
108 must be treated as an error. 113 MUST be treated as an error.
109 114
110EBUILD 115EBUILD
111~~~~~~ 116~~~~~~
112- Now derived from _CRIT. 117- Now derived from _CRIT.
113- Otherwise unchanged. 118- Otherwise unchanged.
125MANIFEST (new) 130MANIFEST (new)
126~~~~~~~~~~~~~~ 131~~~~~~~~~~~~~~
127- The MANIFEST type is explicitly to cover all nested Manifest files. 132- The MANIFEST type is explicitly to cover all nested Manifest files.
128- During validation, this serves as an indicator that the package 133- During validation, this serves as an indicator that the package
129 manager may need to check subtree Manifest file. 134 manager may need to check subtree Manifest file.
130- A missing MANIFEST file may be treated as a minor (eg excluding an 135- A missing MANIFEST file may be treated as a minor (e.g. excluding an
131 entire category) or critical validation failure. 136 entire category) or critical validation failure.
132- The failure should be considered as critical only if files that would 137- The failure should be considered as critical only if files that would
133 be directly covered by this Manifest are missing. Deletion of a 138 be directly covered by this Manifest are missing. Deletion of a
134 category-level Manifest while preserving the packages is forbidden. 139 category-level Manifest while preserving the packages is forbidden.
135 Deletion of an entire category is not. 140 Deletion of an entire category is not.
136 141
137ECLASS (new) 142ECLASS (new)
138~~~~~~~~~~~~ 143~~~~~~~~~~~~
139- uses _CRIT. 144- uses _CRIT.
140- This type shall be used for all eclasses only. 145- This type shall be used for all eclasses only.
141- TODO: What about patches etc under eclasses/? Probably EXEC?
142 146
143DATA (new) 147DATA (new)
144~~~~~~~~~~ 148~~~~~~~~~~
145- uses _CRIT. 149- uses _CRIT.
146- The DATA type shall be used for all files that directly affect the 150- The DATA type shall be used for all files that directly affect the
148 152
149EXEC (new) 153EXEC (new)
150~~~~~~~~~~ 154~~~~~~~~~~
151- uses _CRIT. 155- uses _CRIT.
152- If the file gets sourced, executed, or causes a change (patches) in 156- If the file gets sourced, executed, or causes a change (patches) in
153 how something is sourced or execututed, it belongs in the EXEC 157 how something is sourced or executed, it belongs in the EXEC
154 filetype. 158 filetype.
155- This filetype should be used for the scripts directories of a 159- This filetype should be used for the scripts directories of a
156 repository for important files. 160 repository for important files.
161- This filetype is not limited to being used in the files/
162 subdirectory.
157 163
158OTHER (new) 164OTHER (new)
159~~~~~~~~~~~ 165~~~~~~~~~~~
160- uses _CRIT. 166- uses _CRIT.
161- All other files that are not covered by another type should be 167- All other files that are not covered by another type should be
162 considered as 'OTHER'. 168 considered as 'OTHER'.
169- Any further new filetypes should be introduced to subtract files
170 from the 'OTHER' set.
171- If a package manager runs into a unknown Manifest2 type, it should
172 be treated as 'OTHER'.
163 173
164On Bloat 174On Bloat
165-------- 175--------
166If repeated use of a common path prefix is considered a bloat problem, a 176If repeated use of a common path prefix is considered a bloat problem, a
167Manifest file should be added inside the common directory, however this 177Manifest file should be added inside the common directory, however this
168should not be done blindly, as bloat by inodes is more significant for 178should not be done blindly, as bloat by inodes is more significant for
169the majority of use cases. 179the majority of use cases. See also [#GLEP58] on size reductions of
180Manifests.
170 181
171Chosing a filetype 182Chosing a filetype
172------------------ 183------------------
1731. matches Manifest 1841. matches ``Manifest``
174 => MANIFEST, stop. 185 => MANIFEST, stop.
1752. matches ``*.ebuild`` 1862. matches ``*.ebuild``
176 => EBUILD, stop. 187 => EBUILD, stop.
1773. matches ``*.eclass`` 1883. matches ``*.eclass``
178 => ECLASS, stop. 189 => ECLASS, stop.
188 => MISC, stop. 199 => MISC, stop.
1899. not matched by any other rule 2009. not matched by any other rule
190 => OTHER, stop. 201 => OTHER, stop.
191 202
192The logic behind 5, 6, 7 is ensuring that every item that by it's 203The logic behind 5, 6, 7 is ensuring that every item that by it's
193presence or absense may be dangerous should always be treated strictly. 204presence or absence may be dangerous should always be treated strictly.
194(Consider epatch given a directory of patches ``${FILESDIR}/${PV}/``, 205(Consider epatch given a directory of patches ``${FILESDIR}/${PV}/``,
195where it blindly includes them, or alternatively, the package.mask file 206where it blindly includes them, or alternatively, the package.mask file
196or a profile being altered/missing). 207or a profile being altered/missing).
208
209The above lists of file patterns are not intended to be exhaustive,
210but merely demonstrative.
197 211
198Note: The AUX entries should only be generated if we are generating a 212Note: The AUX entries should only be generated if we are generating a
199compatible Manifest that supports older versions of Portage. They should 213compatible Manifest that supports older versions of Portage. They should
200be generated along with the new type. 214be generated along with the new type.
201 215
221.. [#GLEP44] Mauch, M. (2005) GLEP44 - Manifest2 format. 235.. [#GLEP44] Mauch, M. (2005) GLEP44 - Manifest2 format.
222 http://www.gentoo.org/proj/en/glep/glep-0044.html 236 http://www.gentoo.org/proj/en/glep/glep-0044.html
223 237
224Copyright 238Copyright
225========= 239=========
226Copyright (c) 2007 by Robin Hugh Johnson. This material may be 240Copyright (c) 2007-2010 by Robin Hugh Johnson. This material may be
227distributed only subject to the terms and conditions set forth in the 241distributed only subject to the terms and conditions set forth in the
228Open Publication License, v1.0. 242Open Publication License, v1.0.
229 243
230vim: tw=72 ts=2 expandtab: 244vim: tw=72 ts=2 expandtab:

Legend:
Removed from v.1.4  
changed lines
  Added in v.1.8

  ViewVC Help
Powered by ViewVC 1.1.20