| … | |
… | |
| 31 | <tbody valign="top"> |
31 | <tbody valign="top"> |
| 32 | <tr class="field"><th class="field-name">GLEP:</th><td class="field-body">47</td> |
32 | <tr class="field"><th class="field-name">GLEP:</th><td class="field-body">47</td> |
| 33 | </tr> |
33 | </tr> |
| 34 | <tr class="field"><th class="field-name">Title:</th><td class="field-body">Creating 'safe' environment variables</td> |
34 | <tr class="field"><th class="field-name">Title:</th><td class="field-body">Creating 'safe' environment variables</td> |
| 35 | </tr> |
35 | </tr> |
| 36 | <tr class="field"><th class="field-name">Version:</th><td class="field-body">1.1</td> |
36 | <tr class="field"><th class="field-name">Version:</th><td class="field-body">1.3</td> |
| 37 | </tr> |
37 | </tr> |
| 38 | <tr class="field"><th class="field-name">Last-Modified:</th><td class="field-body"><a class="reference" href="http://www.gentoo.org/cgi-bin/viewcvs/xml/htdocs/proj/en/glep/glep-0047.txt?cvsroot=gentoo">2006/02/09 21:42:57</a></td> |
38 | <tr class="field"><th class="field-name">Last-Modified:</th><td class="field-body"><a class="reference" href="http://www.gentoo.org/cgi-bin/viewcvs/xml/htdocs/proj/en/glep/glep-0047.txt?cvsroot=gentoo">2006/02/12 19:57:57</a></td> |
| 39 | </tr> |
39 | </tr> |
| 40 | <tr class="field"><th class="field-name">Author:</th><td class="field-body">Diego Pettenò, Fabian Groffen</td> |
40 | <tr class="field"><th class="field-name">Author:</th><td class="field-body">Diego Pettenò, Fabian Groffen</td> |
| 41 | </tr> |
41 | </tr> |
| 42 | <tr class="field"><th class="field-name">Status:</th><td class="field-body">Draft</td> |
42 | <tr class="field"><th class="field-name">Status:</th><td class="field-body">Draft</td> |
| 43 | </tr> |
43 | </tr> |
| … | |
… | |
| 136 | suffices, can keep that keyword. Since this doesn't change anything to |
136 | suffices, can keep that keyword. Since this doesn't change anything to |
| 137 | the current situation in the tree, it is considered to be a big |
137 | the current situation in the tree, it is considered to be a big |
| 138 | advantage over the 4-tuple keyword from GLEP 22. This GLEP is an |
138 | advantage over the 4-tuple keyword from GLEP 22. This GLEP is an |
| 139 | official specification of the syntax of the keyword.</p> |
139 | official specification of the syntax of the keyword.</p> |
| 140 | <p>Keywords will consist out of two parts separated by a hyphen ('-'). The |
140 | <p>Keywords will consist out of two parts separated by a hyphen ('-'). The |
| 141 | left hand part of the keyword 2-tuple is the architecture, such as |
141 | part up to the first hyphen from the left of the keyword 2-tuple is the |
| 142 | ppc64, sparc and x86. The right hand part indicates the operating |
142 | architecture, such as ppc64, sparc and x86. Allowed characters for the |
|
|
143 | architecture name are in <tt class="literal"><span class="pre">a-z0-9</span></tt>. The remaining part on the right of |
|
|
144 | the first hyphen from the left indicates the operating system or |
| 143 | system or distribution, such as linux, macos, darwin, obsd, etc. If the |
145 | distribution, such as linux, macos, darwin, obsd, et-cetera. If the |
| 144 | right hand part is omitted, it implies the operating system/distribution |
146 | right hand part is omitted, it implies the operating system/distribution |
| 145 | type is Gentoo GNU/Linux. In such case the hyphen is also omitted. |
147 | type is Gentoo GNU/Linux. In such case the hyphen is also omitted, and |
| 146 | Examples of such keywords are ppc-darwin and x86. This is fully |
148 | the keyword consists of solely the architecture. The operating system |
| 147 | compatible with the current use of keywords in the tree.</p> |
149 | or distribution name can consist out of characters in <tt class="literal"><span class="pre">a-zA-Z0-9_+:-</span></tt>. |
|
|
150 | Please note that the hyphen is an allowed character, and therefore the |
|
|
151 | separation of the two fields in the keyword is only determinable by |
|
|
152 | scanning for the first hyphen character from the start of the keyword |
|
|
153 | string. Examples of keywords following this specification are |
|
|
154 | ppc-darwin and x86. This is fully compatible with the current use of |
|
|
155 | keywords in the tree.</p> |
| 148 | <p>The variables <tt class="literal"><span class="pre">ELIBC</span></tt>, <tt class="literal"><span class="pre">KERNEL</span></tt> and <tt class="literal"><span class="pre">ARCH</span></tt> are currently set in |
156 | <p>The variables <tt class="literal"><span class="pre">ELIBC</span></tt>, <tt class="literal"><span class="pre">KERNEL</span></tt> and <tt class="literal"><span class="pre">ARCH</span></tt> are currently set in |
| 149 | the profiles when other than their defaults for a GNU/Linux system. |
157 | the profiles when other than their defaults for a GNU/Linux system. |
| 150 | They can as such easily be overridden and defined by the user. To |
158 | They can as such easily be overridden and defined by the user. To |
| 151 | prevent this from happening, the variables should be auto filled by |
159 | prevent this from happening, the variables should be auto filled by |
| 152 | Portage itself, based on the <tt class="literal"><span class="pre">CHOST</span></tt> variable. While the <tt class="literal"><span class="pre">CHOST</span></tt> |
160 | Portage itself, based on the <tt class="literal"><span class="pre">CHOST</span></tt> variable. While the <tt class="literal"><span class="pre">CHOST</span></tt> |
| … | |
… | |
| 201 | *-*-darwin* -> KERNEL="Darwin" ELIBC="Darwin" |
209 | *-*-darwin* -> KERNEL="Darwin" ELIBC="Darwin" |
| 202 | *-*-netbsd* -> KERNEL="NetBSD" ELIBC="NetBSD" |
210 | *-*-netbsd* -> KERNEL="NetBSD" ELIBC="NetBSD" |
| 203 | *-*-solaris* -> KERNEL="Solaris" ELIBC="Solaris" |
211 | *-*-solaris* -> KERNEL="Solaris" ELIBC="Solaris" |
| 204 | </pre> |
212 | </pre> |
| 205 | <p>A way to achieve this is proposed by Mike Frysinger, which |
213 | <p>A way to achieve this is proposed by Mike Frysinger, which |
| 206 | suggests to have a env-map file, for instance filled with:</p> |
214 | suggests to have an env-map file, for instance filled with:</p> |
| 207 | <pre class="literal-block"> |
215 | <pre class="literal-block"> |
| 208 | % cat env-map |
216 | % cat env-map |
| 209 | *-linux-* KERNEL=linux |
217 | *-linux-* KERNEL=linux |
| 210 | *-gnu ELIBC=glibc |
218 | *-gnu ELIBC=glibc |
| 211 | x86_64-* ARCH=amd64 |
219 | x86_64-* ARCH=amd64 |
| … | |
… | |
| 288 | </div> |
296 | </div> |
| 289 | |
297 | |
| 290 | <hr class="footer" /> |
298 | <hr class="footer" /> |
| 291 | <div class="footer"> |
299 | <div class="footer"> |
| 292 | <a class="reference" href="glep-0047.txt">View document source</a>. |
300 | <a class="reference" href="glep-0047.txt">View document source</a>. |
| 293 | Generated on: 2006-02-11 21:38 UTC. |
301 | Generated on: 2006-02-12 19:59 UTC. |
| 294 | Generated by <a class="reference" href="http://docutils.sourceforge.net/">Docutils</a> from <a class="reference" href="http://docutils.sourceforge.net/rst.html">reStructuredText</a> source. |
302 | Generated by <a class="reference" href="http://docutils.sourceforge.net/">Docutils</a> from <a class="reference" href="http://docutils.sourceforge.net/rst.html">reStructuredText</a> source. |
| 295 | </div> |
303 | </div> |
| 296 | </body> |
304 | </body> |
| 297 | </html> |
305 | </html> |
| 298 | |
306 | |