/[gentoo]/xml/htdocs/proj/en/glep/glep-0022.html
Gentoo

Contents of /xml/htdocs/proj/en/glep/glep-0022.html

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1 - (show annotations) (download) (as text)
Sun Mar 7 02:22:01 2004 UTC (10 years, 1 month ago) by g2boojum
Branch: MAIN
File MIME type: text/html
Adding a new GLEP.

1 <?xml version="1.0" encoding="utf-8" ?>
2 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
4 <!--
5 This HTML is auto-generated. DO NOT EDIT THIS FILE! If you are writing a new
6 PEP, see http://www.python.org/peps/pep-0001.html for instructions and links
7 to templates. DO NOT USE THIS HTML FILE AS YOUR TEMPLATE!
8 -->
9 <head>
10 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
11 <meta name="generator" content="Docutils 0.3.0: http://docutils.sourceforge.net/" />
12 <title>GLEP 22 -- New "keyword" system to incorporate various userlands/kernels/archs</title>
13 <link rel="stylesheet" href="tools/glep.css" type="text/css" />
14 </head>
15 <body bgcolor="white">
16 <table class="navigation" cellpadding="0" cellspacing="0"
17 width="100%" border="0">
18 <tr><td class="navicon" width="150" height="35">
19 <a href="http://www.gentoo.org/" title="Gentoo Linux Home Page">
20 <img src="http://www.gentoo.org/images/gentoo-new.gif" alt="[Gentoo]"
21 border="0" width="150" height="35" /></a></td>
22 <td class="textlinks" align="left">
23 [<b><a href="http://www.gentoo.org/">Gentoo Linux Home</a></b>]
24 [<b><a href="http://www.gentoo.org/proj/en/glep">GLEP Index</a></b>]
25 [<b><a href="http://www.gentoo.org/proj/en/glep/glep-0022.txt">GLEP Source</a></b>]
26 </td></tr></table>
27 <div class="document">
28 <table class="rfc2822 field-list" frame="void" rules="none">
29 <col class="field-name" />
30 <col class="field-body" />
31 <tbody valign="top">
32 <tr class="field"><th class="field-name">GLEP:</th><td class="field-body">22</td>
33 </tr>
34 <tr class="field"><th class="field-name">Title:</th><td class="field-body">New &quot;keyword&quot; system to incorporate various userlands/kernels/archs</td>
35 </tr>
36 <tr class="field"><th class="field-name">Version:</th><td class="field-body">1.1</td>
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.cgi/xml/htdocs/proj/en/glep/glep-0022.txt?cvsroot=gentoo">2004/03/07 02:20:32</a></td>
39 </tr>
40 <tr class="field"><th class="field-name">Author:</th><td class="field-body">Grant Goodyear &lt;g2boojum&#32;&#97;t&#32;gentoo.org&gt;</td>
41 </tr>
42 <tr class="field"><th class="field-name">Status:</th><td class="field-body">Draft</td>
43 </tr>
44 <tr class="field"><th class="field-name">Type:</th><td class="field-body">Standards Track</td>
45 </tr>
46 <tr class="field"><th class="field-name">Content-Type:</th><td class="field-body"><a class="reference" href="glep-0002.html">text/x-rst</a></td>
47 </tr>
48 <tr class="field"><th class="field-name">Created:</th><td class="field-body">6-Mar-2004</td>
49 </tr>
50 <tr class="field"><th class="field-name">Post-History:</th><td class="field-body">6-Mar-2004</td>
51 </tr>
52 </tbody>
53 </table>
54 <hr />
55 <div class="contents topic" id="contents">
56 <p class="topic-title"><a name="contents">Contents</a></p>
57 <ul class="simple">
58 <li><a class="reference" href="#credits" id="id14" name="id14">Credits</a></li>
59 <li><a class="reference" href="#abstract" id="id15" name="id15">Abstract</a></li>
60 <li><a class="reference" href="#motivation" id="id16" name="id16">Motivation</a></li>
61 <li><a class="reference" href="#specification" id="id17" name="id17">Specification</a><ul>
62 <li><a class="reference" href="#new-variables" id="id18" name="id18">New Variables</a></li>
63 <li><a class="reference" href="#reasonable-defaults" id="id19" name="id19">Reasonable Defaults</a></li>
64 <li><a class="reference" href="#profiles" id="id20" name="id20">Profiles</a></li>
65 </ul>
66 </li>
67 <li><a class="reference" href="#rationale" id="id21" name="id21">Rationale</a></li>
68 <li><a class="reference" href="#implementation" id="id22" name="id22">Implementation</a></li>
69 <li><a class="reference" href="#backwards-compatibility" id="id23" name="id23">Backwards Compatibility</a></li>
70 <li><a class="reference" href="#id1" id="id24" name="id24">References</a></li>
71 <li><a class="reference" href="#copyright" id="id25" name="id25">Copyright</a></li>
72 </ul>
73 </div>
74 <div class="section" id="credits">
75 <h1><a class="toc-backref" href="#id14" name="credits">Credits</a></h1>
76 <p>This GLEP originated from the concerns that Daniel Robbins had with
77 the <em>x86obsd</em> keyword, and his desire to make the KEYWORDS variable more
78 &quot;feature-rich&quot;. Drobbins' original idea was that we should
79 allow compound
80 keywords such as gnu/x86, gnu/ppc, and macos/ppc (which would be explicit
81 versions of the more familiar x86, ppc, and macos keywords). Method noted
82 that userland/arch failed to capture the full range of possibilities (what
83 about a GNU userland on a BSD kernel+libc?), and
84 the issue has languished due to a lack of reasonable solutions.</p>
85 </div>
86 <div class="section" id="abstract">
87 <h1><a class="toc-backref" href="#id15" name="abstract">Abstract</a></h1>
88 <p>As Gentoo branches out to support non-Linux and non-GNU systems (such
89 as Hurd or the *BSDs), the potential for an &quot;explosion&quot; of possible
90 keywords becomes rather large, since each
91 new userland/kernel/arch/whatever
92 combination would require a new keyword.
93 This GLEP proposes replacing the current
94 KEYWORDS variable with four variables, ARCH, USERNAME, KERNEL, and LIBC,
95 along with sensible defaults to keep the new system manageable.</p>
96 </div>
97 <div class="section" id="motivation">
98 <h1><a class="toc-backref" href="#id16" name="motivation">Motivation</a></h1>
99 <p>Since the beginning, Gentoo Linux has been conceived as a &quot;metadistribution&quot;
100 that combines remarkable flexibility with sensible defaults and exceptional
101 maintainablilty. The goal of the <a class="reference" href="http://www.gentoo.org/proj/en/gentoo-alt/index.xml">Gentoo-Alt</a> <a class="footnote-reference" href="#id2" id="id3" name="id3">[1]</a> project has been to extend that
102 flexibility to include systems other than GNU/Linux. For example, the author
103 of this GLEP has been working to create a <a class="reference" href="http://www.gentoo.org/proj/en/gentoo-alt/bsd/index.xml">version</a> <a class="footnote-reference" href="#id8" id="id9" name="id9">[3]</a> of Gentoo that uses
104 <a class="reference" href="http://www.openbsd.com">OpenBSD</a> <a class="footnote-reference" href="#id5" id="id6" name="id6">[2]</a> as the underlying kernel, userland, and libc. <a class="reference" href="http://www.openbsd.com">OpenBSD</a> <a class="footnote-reference" href="#id5" id="id7" name="id7">[2]</a> supports
105 a variety of different architectures, so, in principle, we would need a new
106 <em>openbsd-arch</em> keyword for each supported architecture. In fact, the situation
107 is even more complicated, because the <a class="reference" href="http://www.gentoo.org/proj/en/gentoo-alt/index.xml">Gentoo-Alt</a> <a class="footnote-reference" href="#id2" id="id4" name="id4">[1]</a> project would eventually
108 like
109 to support the option of &quot;mixing-and-matching&quot; GNU/*BSD/whatever userlands
110 and libcs irrespective of the underlying kernel. (<a class="reference" href="http://www.debian.org">Debian</a> <a class="footnote-reference" href="#id10" id="id11" name="id11">[4]</a>, for example
111 has a similar BSD <a class="reference" href="http://www.debian.org/ports/netbsd/">project</a> <a class="footnote-reference" href="#id12" id="id13" name="id13">[5]</a>, except that they have replaced the
112 BSD userland with a GNU userland.) The net result is that we would need
113 keywords that specified all possible permutations of arch, userland, kernel
114 and libc. Not fun.</p>
115 </div>
116 <div class="section" id="specification">
117 <h1><a class="toc-backref" href="#id17" name="specification">Specification</a></h1>
118 <div class="section" id="new-variables">
119 <h2><a class="toc-backref" href="#id18" name="new-variables">New Variables</a></h2>
120 <p>I suggest that we replace the single KEYWORDS variable in ebuilds
121 with four separate variables: ARCH, USERLAND, LIBC, and KERNEL.</p>
122 <blockquote>
123 <dl>
124 <dt>ARCH: </dt>
125 <dd>x86, amd64, cobalt, mips64, arm, hppa, ia64, ppc64, sparc</dd>
126 <dt>USERLAND: </dt>
127 <dd>gnu, bsd</dd>
128 <dt>LIBC: </dt>
129 <dd>glibc, openbsd, freebsd, netbsd, macosx</dd>
130 <dt>KERNEL: </dt>
131 <dd>linux, selinux, openbsd, freebsd, netbsd, macosx</dd>
132 </dl>
133 </blockquote>
134 <p>(The above examples are not meant to be complete. Hurd, for example
135 is not included because I know very little about Hurd.)
136 For each variable the standard &quot;-,-*,~&quot; prefixes would be allowed.
137 Similarly, <cite>/etc/make.conf</cite> would have ACCEPT_ARCH, ACCEPT_USERLAND,
138 ACCEPT_LIBC, and ACCEPT_KERNEL variables.</p>
139 </div>
140 <div class="section" id="reasonable-defaults">
141 <h2><a class="toc-backref" href="#id19" name="reasonable-defaults">Reasonable Defaults</a></h2>
142 <p>To keep this system manageable, we need sensible defaults. An ebuild
143 that has missing USERLAND, KERNEL, or LIBC variables is provided
144 with implicit USERLAND=&quot;gnu&quot;, KERNEL=&quot;linux&quot;, and/or LIBC=&quot;glibc&quot;
145 variables. However, once a variable is explicitly added (such as
146 KERNEL=&quot;openbsd&quot;), the default is no longer assumed. That is,
147 one would need KERNEL=&quot;openbsd linux&quot; if the ebuild is stable on
148 both openbsd and linux kernels.</p>
149 <p>The ARCH variable, on the other hand, does <em>not</em> have a default, per se.
150 Instead, if no ARCH variable exists then portage would automatically
151 add the ebuild's KEYWORD entries to ARCH. Thus, all current ebuilds
152 would still work without changes, allowing for a gradual transition
153 to the new system as the new variables are needed.</p>
154 </div>
155 <div class="section" id="profiles">
156 <h2><a class="toc-backref" href="#id20" name="profiles">Profiles</a></h2>
157 <p>Along with an explosion of keywords comes a concomitant explosion
158 of potential profiles. The good news is that profiles show up only
159 in a single directory, so an explosion there is easier to contain.
160 I suggest an arch-kernel-userland-libc-version naming scheme, with
161 the kernel-userland-libc terms defaulting to linux-gnu-glibc if
162 absent. (Yes, Chemists do tend to be fond of systematic naming
163 systems.)</p>
164 <p>One drawback to having a large number of profiles is that maintainance
165 becomes a significant problem. In fact, one could reasonably argue
166 that the current number of profiles is already too many to be
167 easily maintained. One proposal that has been raised to simplify
168 matters is the idea of stackable, or cascading, profiles, so that
169 only differences between profiles would have to be maintained.</p>
170 </div>
171 </div>
172 <div class="section" id="rationale">
173 <h1><a class="toc-backref" href="#id21" name="rationale">Rationale</a></h1>
174 <p>The proposed new &quot;keywording&quot; system is far from elegant, which is
175 a substantial drawback. On the other hand, it is simple, it requires
176 relatively minor changes (albeit ones that eventually would impact
177 every ebuild in the portage tree), and the changes can be implemented
178 gradually over time.</p>
179 </div>
180 <div class="section" id="implementation">
181 <h1><a class="toc-backref" href="#id22" name="implementation">Implementation</a></h1>
182 <p>Implementation of this GLEP would divide into adding
183 Portage functionality to support the new system and
184 modifying ebuilds to
185 comply with the new system.
186 The Portage support involves hacking Portage
187 to assemble and check a four-state
188 arch-userland-kernel-libc variable instead of the simpler
189 KEYWORD variable. One might quibble over algorithmic issues, but
190 the actual concept is pretty straightforward. Rewriting ebuilds,
191 on the other hand, is a massive undertaking. Fortunately, it is
192 also a process that can be done over whatever length of time is
193 required, since &quot;legacy&quot; ebuilds should work with no changes.</p>
194 </div>
195 <div class="section" id="backwards-compatibility">
196 <h1><a class="toc-backref" href="#id23" name="backwards-compatibility">Backwards Compatibility</a></h1>
197 <p>Backwards compatibility has already been addressed in some detail,
198 with the stated goal being a system that would leave all current
199 ebuilds in a still-functioning state after the portage modifications
200 have been made. However, we are already using an ARCH variable for
201 some arcane purpose in Portage, and that issue would still need to
202 be resolved.</p>
203 </div>
204 <div class="section" id="id1">
205 <h1><a class="toc-backref" href="#id24" name="id1">References</a></h1>
206 <table class="footnote" frame="void" id="id2" rules="none">
207 <colgroup><col class="label" /><col /></colgroup>
208 <tbody valign="top">
209 <tr><td class="label"><a name="id2">[1]</a></td><td><em>(<a class="fn-backref" href="#id3">1</a>, <a class="fn-backref" href="#id4">2</a>)</em> <a class="reference" href="http://www.gentoo.org/proj/en/gentoo-alt/index.xml">http://www.gentoo.org/proj/en/gentoo-alt/index.xml</a></td></tr>
210 </tbody>
211 </table>
212 <table class="footnote" frame="void" id="id5" rules="none">
213 <colgroup><col class="label" /><col /></colgroup>
214 <tbody valign="top">
215 <tr><td class="label"><a name="id5">[2]</a></td><td><em>(<a class="fn-backref" href="#id6">1</a>, <a class="fn-backref" href="#id7">2</a>)</em> <a class="reference" href="http://www.openbsd.com">http://www.openbsd.com</a></td></tr>
216 </tbody>
217 </table>
218 <table class="footnote" frame="void" id="id8" rules="none">
219 <colgroup><col class="label" /><col /></colgroup>
220 <tbody valign="top">
221 <tr><td class="label"><a class="fn-backref" href="#id9" name="id8">[3]</a></td><td><a class="reference" href="http://www.gentoo.org/proj/en/gentoo-alt/bsd/index.xml">http://www.gentoo.org/proj/en/gentoo-alt/bsd/index.xml</a></td></tr>
222 </tbody>
223 </table>
224 <table class="footnote" frame="void" id="id10" rules="none">
225 <colgroup><col class="label" /><col /></colgroup>
226 <tbody valign="top">
227 <tr><td class="label"><a class="fn-backref" href="#id11" name="id10">[4]</a></td><td><a class="reference" href="http://www.debian.org">http://www.debian.org</a></td></tr>
228 </tbody>
229 </table>
230 <table class="footnote" frame="void" id="id12" rules="none">
231 <colgroup><col class="label" /><col /></colgroup>
232 <tbody valign="top">
233 <tr><td class="label"><a class="fn-backref" href="#id13" name="id12">[5]</a></td><td><a class="reference" href="http://www.debian.org/ports/netbsd/">http://www.debian.org/ports/netbsd/</a></td></tr>
234 </tbody>
235 </table>
236 </div>
237 <div class="section" id="copyright">
238 <h1><a class="toc-backref" href="#id25" name="copyright">Copyright</a></h1>
239 <p>This document is licensed under the Creative Commons - Attribution / Share
240 Alike license. (<a class="reference" href="http://creativecommons.org/licenses/by-sa/1.0">http://creativecommons.org/licenses/by-sa/1.0</a>)</p>
241 </div>
242 </div>
243
244 <hr class="footer"/>
245 <div class="footer">
246 <a class="reference" href="glep-0022.txt">View document source</a>.
247 Generated on: 2004-03-07 02:20 UTC.
248 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.
249 </div>
250 </body>
251 </html>

  ViewVC Help
Powered by ViewVC 1.1.20