| 1 | GLEP: 60 |
1 | GLEP: 60 |
| 2 | Title: Manifest2 filetypes |
2 | Title: Manifest2 filetypes |
| 3 | Version: $Revision: 1.6 $ |
3 | Version: $Revision: 1.10 $ |
| 4 | Last-Modified: $Date: 2010/01/13 00:54:50 $ |
4 | Last-Modified: $Date: 2010/04/07 21:34:24 $ |
| 5 | Author: Robin Hugh Johnson <robbat2@gentoo.org> |
5 | Author: Robin Hugh Johnson <robbat2@gentoo.org> |
| 6 | Status: Draft |
6 | Status: Draft |
| 7 | Type: Standards Track |
7 | Type: Standards Track |
| 8 | Content-Type: text/x-rst |
8 | Content-Type: text/x-rst |
| 9 | Requires: 44 |
9 | Requires: 44 |
| 10 | Created: November 2007 |
10 | Created: November 2007 |
| 11 | Updated: June 2008, July 2008, October 2008, January 2010 |
11 | Updated: June 2008, July 2008, October 2008, January 2010 |
| 12 | Updates: 44 |
12 | Updates: 44 |
| 13 | Post-History: December 2009 |
13 | Post-History: December 2009, January 2010 |
| 14 | |
14 | |
| 15 | Abstract |
15 | Abstract |
| 16 | ======== |
16 | ======== |
| 17 | Clarification of the Manifest2 [#GLEP44] specification, including new types to |
17 | Clarification of the Manifest2 [GLEP44] specification, including new types to |
| 18 | help in the tree-signing specification. |
18 | help in the tree-signing specification. |
| 19 | |
19 | |
| 20 | Motivation |
20 | Motivation |
| 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. |
| 23 | This document serves to provide some of the internal logic used by |
23 | This document serves to provide some of the internal logic used by |
| 24 | Portage at the point of writing, as well as adding new types to cover |
24 | Portage at the point of writing, as well as adding new types to cover |
| 25 | the rest of the tree, for the purposes of tree-signing coverage. |
25 | the rest of the tree, for the purposes of tree-signing coverage. |
|
|
26 | |
|
|
27 | This GLEP is not mandatory for the tree-signing specification, but |
|
|
28 | instead aims to clarify the usage of the Manifest2 filetype specifiers, |
|
|
29 | and note which types signify files that are allowed to be missing from |
|
|
30 | the tree (e.g. a user excluding a package or category). As such, it is |
|
|
31 | also able to stand on it's own. |
| 26 | |
32 | |
| 27 | Specification |
33 | Specification |
| 28 | ============= |
34 | ============= |
| 29 | General |
35 | General |
| 30 | ------- |
36 | ------- |
| … | |
… | |
| 33 | unless stated otherwise in the following sections. The Manifest file |
39 | unless stated otherwise in the following sections. The Manifest file |
| 34 | must not contain an entry for itself. |
40 | must not contain an entry for itself. |
| 35 | |
41 | |
| 36 | Excluded files |
42 | Excluded files |
| 37 | -------------- |
43 | -------------- |
| 38 | When generating or validating a Manifest, or commiting to a version |
44 | When generating or validating a Manifest, or committing to a version |
| 39 | control system, the package manager should endeavour to ignore files |
45 | control system, the package manager should endeavour to ignore files |
| 40 | created by a version control system, backup files from text editors. A |
46 | created by a version control system, backup files from text editors. A |
| 41 | non-exhaustive list is suggested here: ``CVS/``, ``.svn/``, ``.bzr/``, |
47 | non-exhaustive list is suggested here: ``CVS/``, ``.svn/``, ``.bzr/``, |
| 42 | ``.git/``, ``.hg/``, ``.#*``, ``*.rej``, ``*.orig``, ``*.bak``, ``*~``. |
48 | ``.git/``, ``.hg/``, ``.#*``, ``*.rej``, ``*.orig``, ``*.bak``, ``*~``. |
| 43 | |
49 | |
| … | |
… | |
| 125 | MANIFEST (new) |
131 | MANIFEST (new) |
| 126 | ~~~~~~~~~~~~~~ |
132 | ~~~~~~~~~~~~~~ |
| 127 | - The MANIFEST type is explicitly to cover all nested Manifest files. |
133 | - The MANIFEST type is explicitly to cover all nested Manifest files. |
| 128 | - During validation, this serves as an indicator that the package |
134 | - During validation, this serves as an indicator that the package |
| 129 | manager may need to check subtree Manifest file. |
135 | manager may need to check subtree Manifest file. |
| 130 | - 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 |
| 131 | entire category) or critical validation failure. |
137 | entire category) or critical validation failure. |
| 132 | - 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 |
| 133 | be directly covered by this Manifest are missing. Deletion of a |
139 | be directly covered by this Manifest are missing. Deletion of a |
| 134 | category-level Manifest while preserving the packages is forbidden. |
140 | category-level Manifest while preserving the packages is forbidden. |
| 135 | Deletion of an entire category is not. |
141 | Deletion of an entire category is not. |
| … | |
… | |
| 147 | |
153 | |
| 148 | EXEC (new) |
154 | EXEC (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. |
| 156 | - This filetype is not limited to being used in the files/ |
162 | - This filetype is not limited to being used in the files/ |
| 157 | subdirectory. |
163 | subdirectory. |
| … | |
… | |
| 169 | On Bloat |
175 | On Bloat |
| 170 | -------- |
176 | -------- |
| 171 | If repeated use of a common path prefix is considered a bloat problem, a |
177 | If repeated use of a common path prefix is considered a bloat problem, a |
| 172 | Manifest file should be added inside the common directory, however this |
178 | Manifest file should be added inside the common directory, however this |
| 173 | should not be done blindly, as bloat by inodes is more significant for |
179 | should not be done blindly, as bloat by inodes is more significant for |
| 174 | the majority of use cases. See also [#GLEP58] on size reductions of |
180 | the majority of use cases. See also [GLEP58] on size reductions of |
| 175 | Manifests. |
181 | Manifests. |
| 176 | |
182 | |
| 177 | Chosing a filetype |
183 | Chosing a filetype |
| 178 | ------------------ |
184 | ------------------ |
| 179 | 1. matches ``Manifest`` |
185 | 1. matches ``Manifest`` |
| … | |
… | |
| 194 | => MISC, stop. |
200 | => MISC, stop. |
| 195 | 9. not matched by any other rule |
201 | 9. not matched by any other rule |
| 196 | => OTHER, stop. |
202 | => OTHER, stop. |
| 197 | |
203 | |
| 198 | The logic behind 5, 6, 7 is ensuring that every item that by it's |
204 | The logic behind 5, 6, 7 is ensuring that every item that by it's |
| 199 | presence or absense may be dangerous should always be treated strictly. |
205 | presence or absence may be dangerous should always be treated strictly. |
| 200 | (Consider epatch given a directory of patches ``${FILESDIR}/${PV}/``, |
206 | (Consider epatch given a directory of patches ``${FILESDIR}/${PV}/``, |
| 201 | where it blindly includes them, or alternatively, the package.mask file |
207 | where it blindly includes them, or alternatively, the package.mask file |
| 202 | or a profile being altered/missing). |
208 | or a profile being altered/missing). |
| 203 | |
209 | |
| 204 | The above lists of file patterns are not intended to be exhaustive, |
210 | The above lists of file patterns are not intended to be exhaustive, |
| … | |
… | |
| 214 | continue to be present for the standard Portage deprecation cycle. |
220 | continue to be present for the standard Portage deprecation cycle. |
| 215 | The new entries may be included already in all Manifest files, as they |
221 | The new entries may be included already in all Manifest files, as they |
| 216 | will be ignored by older Portage versions. Over time, ECLASS, DATA, |
222 | will be ignored by older Portage versions. Over time, ECLASS, DATA, |
| 217 | EXEC, OTHER may replace the existing AUX type. |
223 | EXEC, OTHER may replace the existing AUX type. |
| 218 | |
224 | |
| 219 | The adoption of this proposal does also affect [#GLEP58] as part of |
225 | The adoption of this proposal does also affect [GLEP58] as part of |
| 220 | this GLEP series, however this GLEP was an offset of the research in |
226 | this GLEP series, however this GLEP was an offset of the research in |
| 221 | that GLEP. |
227 | that GLEP. |
| 222 | |
228 | |
| 223 | Thanks to |
229 | Thanks to |
| 224 | ========= |
230 | ========= |
| 225 | I'd like to thank the following people for input on this GLEP. |
231 | I'd like to thank the following people for input on this GLEP. |
| 226 | - Marius Mauch (genone) & Zac Medico (zmedico): Portage Manifest2 |
232 | - Marius Mauch (genone) & Zac Medico (zmedico): Portage Manifest2 |
| 227 | |
233 | |
| 228 | References |
234 | References |
| 229 | ========== |
235 | ========== |
| 230 | .. [#GLEP44] Mauch, M. (2005) GLEP44 - Manifest2 format. |
236 | .. [GLEP44] Mauch, M. (2005) GLEP44 - Manifest2 format. |
| 231 | 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 |
| 232 | |
241 | |
| 233 | Copyright |
242 | Copyright |
| 234 | ========= |
243 | ========= |
| 235 | Copyright (c) 2007 by Robin Hugh Johnson. This material may be |
244 | Copyright (c) 2007-2010 by Robin Hugh Johnson. This material may be |
| 236 | distributed only subject to the terms and conditions set forth in the |
245 | distributed only subject to the terms and conditions set forth in the |
| 237 | Open Publication License, v1.0. |
246 | Open Publication License, v1.0. |
| 238 | |
247 | |
| 239 | vim: tw=72 ts=2 expandtab: |
248 | .. vim: tw=72 ts=2 expandtab: |