1 |
relavent conversation between grant and I for public consumption..... |
2 |
|
3 |
|
4 |
[16:24] <g2boojum> The best solution I had come up with so far was to |
5 |
add ARCH, USERLAND, KERNEL, and LIBC environment variables that would |
6 |
exist in concert with KEYWORDS. Of course, that approach would mean |
7 |
listing each individually. On the other hand, having reasonable |
8 |
defaults for the various variables might make that simpler. |
9 |
[16:26] <g2boojum> I really need to think about this problem more |
10 |
systematically, but I haven't worked up the gumption to do so just yet. |
11 |
|
12 |
[16:27] <Method> but what about combinations.. ie: something works with |
13 |
linux, ppc x86, glibc; obsd, x86, obsd-libc what are the valid |
14 |
variables. Since ARCH lists x86 and ppc does portage think that obsd/ppc |
15 |
is a valid combination (but it's not in reality) |
16 |
[16:30] <Method> maybe metakeywords |
17 |
[16:31] <Method> so openbsd automatically pulls in obsd OS, all archs's |
18 |
obsd supports, obsd-libc |
19 |
[16:31] <Method> and then specific exceptions can be disabled |
20 |
|
21 |
[16:32] <g2boojum> I was thinking that an ebuild might have ARCH=~ppc if |
22 |
the ebuild is in testing for ppc using glibc/linux/gnu (which would be |
23 |
the defaults). An ebuild that is stable on default x86-obsd might have |
24 |
ARCH=x86 USERLAND=bsd KERNEL=obsd (w/ libc=openbsd the default for that |
25 |
profile), or some such. *Shrug* Like I said, it still needs more thinking. |
26 |
[16:33] <g2boojum> I also think the idea of metakeywords is going to be |
27 |
important, since a package that works on one bsd may work on all (in |
28 |
which case we want to use a single bsd USERLAND flag, or some such), or |
29 |
it may not (in which case freebsd might need to be specified somewhere). |
30 |
Ugh. |
31 |
|
32 |
[16:35] <Method> yea... it's complex and 90% of the devs aren't going to |
33 |
understand it so it needs to be robust and not overly sensitive |
34 |
|
35 |
|
36 |
Grant Goodyear wrote: |
37 |
> Dear all, |
38 |
> I've attached a GLEP that I've submitted that describes one method to |
39 |
> handle the potential explosion of new keywords that will arise as we |
40 |
> improve Gentoo support for non-linux systems. I have no doubt that my |
41 |
> proposal is deeply flawed, so constructive suggestions will be greatly |
42 |
> appreciated. |
43 |
> |
44 |
> Thanks, |
45 |
> g2boojum |
46 |
> |
47 |
> |
48 |
> ------------------------------------------------------------------------ |
49 |
> |
50 |
> GLEP: 22 |
51 |
> Title: New "keyword" system to incorporate various userlands/kernels/archs |
52 |
> Version: $Revision: 1.1 $ |
53 |
> Last-Modified: $Date: 2004/03/07 02:20:32 $ |
54 |
> Author: Grant Goodyear <g2boojum@g.o> |
55 |
> Status: Draft |
56 |
> Type: Standards Track |
57 |
> Content-Type: text/x-rst |
58 |
> Created: 6-Mar-2004 |
59 |
> Post-History: 6-Mar-2004 |
60 |
> |
61 |
> Credits |
62 |
> ======= |
63 |
> |
64 |
> This GLEP originated from the concerns that Daniel Robbins had with |
65 |
> the *x86obsd* keyword, and his desire to make the KEYWORDS variable more |
66 |
> "feature-rich". Drobbins' original idea was that we should |
67 |
> allow compound |
68 |
> keywords such as gnu/x86, gnu/ppc, and macos/ppc (which would be explicit |
69 |
> versions of the more familiar x86, ppc, and macos keywords). Method noted |
70 |
> that userland/arch failed to capture the full range of possibilities (what |
71 |
> about a GNU userland on a BSD kernel+libc?), and |
72 |
> the issue has languished due to a lack of reasonable solutions. |
73 |
> |
74 |
> Abstract |
75 |
> ======== |
76 |
> |
77 |
> As Gentoo branches out to support non-Linux and non-GNU systems (such |
78 |
> as Hurd or the \*BSDs), the potential for an "explosion" of possible |
79 |
> keywords becomes rather large, since each |
80 |
> new userland/kernel/arch/whatever |
81 |
> combination would require a new keyword. |
82 |
> This GLEP proposes replacing the current |
83 |
> KEYWORDS variable with four variables, ARCH, USERNAME, KERNEL, and LIBC, |
84 |
> along with sensible defaults to keep the new system manageable. |
85 |
> |
86 |
> Motivation |
87 |
> ========== |
88 |
> |
89 |
> Since the beginning, Gentoo Linux has been conceived as a "metadistribution" |
90 |
> that combines remarkable flexibility with sensible defaults and exceptional |
91 |
> maintainablilty. The goal of the Gentoo-Alt_ project has been to extend that |
92 |
> flexibility to include systems other than GNU/Linux. For example, the author |
93 |
> of this GLEP has been working to create a version_ of Gentoo that uses |
94 |
> OpenBSD_ as the underlying kernel, userland, and libc. OpenBSD_ supports |
95 |
> a variety of different architectures, so, in principle, we would need a new |
96 |
> *openbsd-arch* keyword for each supported architecture. In fact, the situation |
97 |
> is even more complicated, because the Gentoo-Alt_ project would eventually |
98 |
> like |
99 |
> to support the option of "mixing-and-matching" GNU/\*BSD/whatever userlands |
100 |
> and libcs irrespective of the underlying kernel. (Debian_, for example |
101 |
> has a similar BSD project_, except that they have replaced the |
102 |
> BSD userland with a GNU userland.) The net result is that we would need |
103 |
> keywords that specified all possible permutations of arch, userland, kernel |
104 |
> and libc. Not fun. |
105 |
> |
106 |
> .. _Gentoo-Alt: http://www.gentoo.org/proj/en/gentoo-alt/index.xml |
107 |
> .. _OpenBSD: http://www.openbsd.com |
108 |
> .. _version: http://www.gentoo.org/proj/en/gentoo-alt/bsd/index.xml |
109 |
> .. _Debian: http://www.debian.org |
110 |
> .. _project: http://www.debian.org/ports/netbsd/ |
111 |
> |
112 |
> Specification |
113 |
> ============= |
114 |
> |
115 |
> New Variables |
116 |
> ------------- |
117 |
> |
118 |
> I suggest that we replace the single KEYWORDS variable in ebuilds |
119 |
> with four separate variables: ARCH, USERLAND, LIBC, and KERNEL. |
120 |
> |
121 |
> ARCH: |
122 |
> x86, amd64, cobalt, mips64, arm, hppa, ia64, ppc64, sparc |
123 |
> USERLAND: |
124 |
> gnu, bsd |
125 |
> LIBC: |
126 |
> glibc, openbsd, freebsd, netbsd, macosx |
127 |
> KERNEL: |
128 |
> linux, selinux, openbsd, freebsd, netbsd, macosx |
129 |
> |
130 |
> (The above examples are not meant to be complete. Hurd, for example |
131 |
> is not included because I know very little about Hurd.) |
132 |
> For each variable the standard "-,-\*,~" prefixes would be allowed. |
133 |
> Similarly, `/etc/make.conf` would have ACCEPT_ARCH, ACCEPT_USERLAND, |
134 |
> ACCEPT_LIBC, and ACCEPT_KERNEL variables. |
135 |
> |
136 |
> Reasonable Defaults |
137 |
> ------------------- |
138 |
> |
139 |
> To keep this system manageable, we need sensible defaults. An ebuild |
140 |
> that has missing USERLAND, KERNEL, or LIBC variables is provided |
141 |
> with implicit USERLAND="gnu", KERNEL="linux", and/or LIBC="glibc" |
142 |
> variables. However, once a variable is explicitly added (such as |
143 |
> KERNEL="openbsd"), the default is no longer assumed. That is, |
144 |
> one would need KERNEL="openbsd linux" if the ebuild is stable on |
145 |
> both openbsd and linux kernels. |
146 |
> |
147 |
> The ARCH variable, on the other hand, does *not* have a default, per se. |
148 |
> Instead, if no ARCH variable exists then portage would automatically |
149 |
> add the ebuild's KEYWORD entries to ARCH. Thus, all current ebuilds |
150 |
> would still work without changes, allowing for a gradual transition |
151 |
> to the new system as the new variables are needed. |
152 |
> |
153 |
> Profiles |
154 |
> -------- |
155 |
> |
156 |
> Along with an explosion of keywords comes a concomitant explosion |
157 |
> of potential profiles. The good news is that profiles show up only |
158 |
> in a single directory, so an explosion there is easier to contain. |
159 |
> I suggest an arch-kernel-userland-libc-version naming scheme, with |
160 |
> the kernel-userland-libc terms defaulting to linux-gnu-glibc if |
161 |
> absent. (Yes, Chemists do tend to be fond of systematic naming |
162 |
> systems.) |
163 |
> |
164 |
> 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. |
170 |
> |
171 |
> Rationale |
172 |
> ========= |
173 |
> |
174 |
> The proposed new "keywording" 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. |
179 |
> |
180 |
> Implementation |
181 |
> ============== |
182 |
> |
183 |
> Implementation of this GLEP would divide into adding |
184 |
> Portage functionality to support the new system and |
185 |
> modifying ebuilds to |
186 |
> comply with the new system. |
187 |
> The Portage support involves hacking Portage |
188 |
> to assemble and check a four-state |
189 |
> arch-userland-kernel-libc variable instead of the simpler |
190 |
> KEYWORD variable. One might quibble over algorithmic issues, but |
191 |
> the actual concept is pretty straightforward. Rewriting ebuilds, |
192 |
> on the other hand, is a massive undertaking. Fortunately, it is |
193 |
> also a process that can be done over whatever length of time is |
194 |
> required, since "legacy" ebuilds should work with no changes. |
195 |
> |
196 |
> |
197 |
> Backwards Compatibility |
198 |
> ======================= |
199 |
> |
200 |
> Backwards compatibility has already been addressed in some detail, |
201 |
> with the stated goal being a system that would leave all current |
202 |
> ebuilds in a still-functioning state after the portage modifications |
203 |
> have been made. However, we are already using an ARCH variable for |
204 |
> some arcane purpose in Portage, and that issue would still need to |
205 |
> be resolved. |
206 |
> |
207 |
> |
208 |
> Copyright |
209 |
> ========= |
210 |
> |
211 |
> This document is licensed under the Creative Commons - Attribution / Share |
212 |
> Alike license. (http://creativecommons.org/licenses/by-sa/1.0) |
213 |
|
214 |
|
215 |
-- |
216 |
gentoo-dev@g.o mailing list |