1 |
On Thu, 2005-12-15 at 10:57 -0600, Mikey wrote: |
2 |
> On Thursday 15 December 2005 09:58, Eric Edgar spammed: |
3 |
> |
4 |
> > You also have to concider that you were doing things incorrectly. We |
5 |
> > only have so much time in the day and have to go after the low hanging |
6 |
> > fruit first per say. While you are correct that something is wrong in |
7 |
> > the tree the initial results did not indicate that. |
8 |
> |
9 |
> It took me a few iterations to understand how the tool is _supposed_ to be |
10 |
> used. At no place in the documentation does it clearly explain that the |
11 |
> syntax of stage4/use: does not migrate to stage2/use:, for example, or that |
12 |
> USE flags are NOT to be used anywhere but stage4, or that USE flags are not |
13 |
> to go into the envscript. There is one generic stage example, which has |
14 |
> been subsequently changed to explain that cflags and such only apply on |
15 |
> stage2, but no mention of use flags and so on. I assumed that: |
16 |
|
17 |
The templates for stage2 and stage3 don't list stage?/use. Those are |
18 |
the documentation for the specs, so it is mentioned in the documentation |
19 |
pretty explicitly. |
20 |
|
21 |
I think the problem was that you assumed. |
22 |
|
23 |
> "The catalyst tool is intended to be used by those who wish to create their |
24 |
> own customized versions of Gentoo Linux, or their own customized LiveCDs. |
25 |
> Our goal is to make catalyst a powerful tool that's a pleasure to use, and |
26 |
> to ensure that the code we write is maintainable and of high-quality." |
27 |
> |
28 |
> ..meant that the tool was intended to be used to create customized versions, |
29 |
> what I didn't understand was the customization only applies in very limited |
30 |
> ways to stage4... |
31 |
|
32 |
No. You can completely customize your lower stages, it just needs to be |
33 |
done within the confines of what portage allows. This means you need a |
34 |
profile to make modifications. Since stage4 allows you to do things |
35 |
beyond the "system" target, it can be customized outside of a profile. |
36 |
This is a limitation in portage which will not be worked around in |
37 |
catalyst simply because I 100% agree with the limitation. |
38 |
|
39 |
> So I have had to learn the hard way and have had to bug the hell out of you |
40 |
> guys. I would be glad to work on some of the documentation after wrapping |
41 |
> my mind around it more completely :) |
42 |
|
43 |
I am working on the documentation. Right now, catalyst 1.x is the |
44 |
stable tree. Anything and everything in catalyst 2.x is still pretty |
45 |
dynamic, as we are working in final features and bug fixes before |
46 |
release. I'll be working on the documentation a bit more as time |
47 |
permits once 2.0 final is released. |
48 |
|
49 |
> > put out a new gentoo cd. There are only 2 main developers working on |
50 |
> > catalyst at the moment, Myself and wolf31o2. |
51 |
> |
52 |
> Geez, no wonder the fuse is kinda short. I had no idea it was only you two. |
53 |
|
54 |
Until I brought rocket on as a developer, it was just myself maintaining |
55 |
code that I had inherited, and the original developers were no longer |
56 |
with the project. Catalyst has come a long way since I took it over, |
57 |
and it still has a long way to go. |
58 |
|
59 |
> > from my standpoint I have seen you as quite firm in your convictions |
60 |
> > that you were right. I agree that the stage1 bug you posted is valid, |
61 |
> > but you could have also performed the few requested steps to follow |
62 |
> > wolf31o2's suggestions. |
63 |
> |
64 |
> After making a few boneheaded mistakes I did follow Chris's suggestions, and |
65 |
> arrived at the same results. I also understood that the actual problem is |
66 |
> not caused by those mistakes. Stage1 is the only stage that installs into |
67 |
> a separate ROOT as far as I can tell. Catalyst is not taking into account |
68 |
> the order that portage.grab_stacked() and portage.stack_lists() is |
69 |
> returning package lists in. Glibc requires headers to be installed first. |
70 |
|
71 |
No. The problem was 100% a problem in the tree which has been fixed |
72 |
(now). |
73 |
|
74 |
> The solution is either to hack portage to always sort lists that involve |
75 |
> the toolchain correctly, or to account for it in catalyst. I have never |
76 |
|
77 |
Portage handles all dependencies for a reason. The toolchain on Gentoo |
78 |
is not static. What if you're using catalyst to build a Gentoo/FreeBSD |
79 |
target? What if you're using it to build a hardened uclibc MIPS target? |
80 |
|
81 |
> coded in python, so I don't quite know how to implement the solution, but I |
82 |
> do have a guess at what the solution is. Push any toolchain package to the |
83 |
> top (or bottom, whichever) of the buildpkgs array in their proper order, |
84 |
> don't rely on portage.grab_stacked() or portage.stack_lists() to order it |
85 |
> correctly because it does not gracefully take into account the install is |
86 |
> happening in a different ROOT. The DEPEND check in the glibc ebuild is |
87 |
> looking for headers in the running system, not what is installed in ROOT, |
88 |
> so it does not see it as a dependency that needs to be installed first. |
89 |
|
90 |
See above. |
91 |
|
92 |
> <rant>As an anal purist, I believe the toolchain should be installed first |
93 |
> and in the proper order explicitly one package at a time instead of in a |
94 |
> stacked list. To do otherwise is heaping problems on yourself on down the |
95 |
> road if you ask me. You also avoid this weird dependency problem when |
96 |
> installing into a ROOT.</rant> |
97 |
|
98 |
We cannot enforce an order on an arbitrary set of packages. That is |
99 |
portage's job. The problem that you were hitting was due to a bug in |
100 |
the glibc ebuild which has been resolved. |
101 |
|
102 |
> > Making a new profile is really very easy to do and with catalysts |
103 |
> > portage_overlay features quite painless to do. It works just like an |
104 |
> > overlay on a host gentoo system. I can understand that it might have |
105 |
> > sounded difficult or time consuming to follow the recommendation but a |
106 |
> > better course of action from you would have been how can I do this .. or |
107 |
> > how do you guys do this. If it sounds like it sucks for you maybe it |
108 |
> > sucks for us too, but we just havent had the time to code a simpler way |
109 |
> > yet. We are not out to make anyones life difficult, remember we are |
110 |
> > volunteers here with limited time. |
111 |
> |
112 |
> Can you put profiles in overlays? Duh, that would be much easier. |
113 |
|
114 |
Yes. You can even inherit from the profiles in the live tree. A |
115 |
portage overlay is a complete overlay. You can provide any files you |
116 |
require. |
117 |
|
118 |
> > you are also missing the fact that the profile stays consistent from one |
119 |
> > stage to the next. custom use flags in a spec file can and will very |
120 |
> > easily be missed or dropped or typoed etc. It really is a better design |
121 |
> > choice to do it with profiles. |
122 |
> |
123 |
> Call this a feature request, or a suggestion. |
124 |
> |
125 |
> Allow cflags, chosts, cxxflags, FEATURES, and use flags in only ONE place - |
126 |
> stage2. Stage2 can generate the entire make.conf that will be used through |
127 |
> any future stages, including the user specified USE flags. Stage2 runs the |
128 |
> bootstrap.sh, which correctly throws out non-applicable USE flags, so it is |
129 |
> not a problem, all the catalyst developers would have to do is count on |
130 |
> bootstrap.sh to work correctly. |
131 |
|
132 |
Most of this is done, except there are specific reasons for not doing as |
133 |
you suggest. For example, a stage1 can use differing FEATURES from a |
134 |
stage2. This is expected. I will not ever allow customization of USE |
135 |
flags in the lower stages (stages 1 through 3) as it breaks the static |
136 |
concept of what each stage means. The idea of a stage3 is it is a stage |
137 |
that follows the profile's "system" target *to the letter* with *no |
138 |
changes* in it. Allowing for changes breaks this concept and will never |
139 |
be accepted into catalyst. |
140 |
|
141 |
> From that point forward every stage done by catalyst uses the USE flags |
142 |
> generated in step 2 and never changes. If a USE flag breaks the install, |
143 |
> it would have broken during the install in stage4 anyway. This would |
144 |
> greatly simplify everything in my opinion. |
145 |
|
146 |
No. A USE flag can break the "system" target but not break beyond that |
147 |
point. This means a USE flag may be safe during the creation of a |
148 |
stage4 tarball but not during a stage3 tarball. Why? Because during |
149 |
the creation of stages 1 though 3 we only have a limited set of packages |
150 |
and even those packages are compiled and configured in minimal ways. |
151 |
Until we reach the "system" target we do not have a guaranteed working |
152 |
complete system to work with. |
153 |
|
154 |
> Stage1 would continue to be the proper place to sanitize the build to |
155 |
> pre-selected cflags and use flags, etc... |
156 |
> |
157 |
> Am I crazy, or what? |
158 |
|
159 |
You said it, not I. ;] |
160 |
|
161 |
Remember that we've been using catalyst for more than 2 years now to do |
162 |
releases and have seen what can happen. Most of the restrictions that |
163 |
currently exist in catalyst were not there when we first started using |
164 |
it and have been added because they allow breakages and are generally |
165 |
not safe. We didn't set out to arbitrarily restrict building. It |
166 |
happened over time due to limitations in portage as we discovered them. |
167 |
|
168 |
> > You assume that its a simple thing to compile a tool chain in order. |
169 |
> > But what you miss is the fact that upstream developers consistently |
170 |
> > change how things are done. We have coded catalyst the best way for us. |
171 |
> > Using profiles allows us to leverage other developers time in the tree |
172 |
> > to catch a majority of the issues for us. They can help reorganize the |
173 |
> > way things are built if necessary via a profile. Otherwise we would be |
174 |
> > constantly updating our spec files and never know exactly what was going |
175 |
> > on. |
176 |
> |
177 |
> It _is_ a simple thing to bootstrap a toolchain in order. The order has |
178 |
> always been the exact same and probably always will be. binutils, gcc, |
179 |
> headers, glibc. Repeat, using tools from previous step. This is the |
180 |
|
181 |
Except for uclibc... or libc on *BSD... or Mac OS... or Solaris... |
182 |
remember that "Gentoo" is more than just Linux/glibc. |
183 |
|
184 |
> _only_ way as far as I know to do it correctly, and to do it correctly |
185 |
> every time, and to be absolutely certain it has been done correctly. It |
186 |
> has been this way for over 10 years if I recall correctly, it is linux |
187 |
> system building 101. |
188 |
|
189 |
As a tool, catalyst utilizes portage for determining all building. If |
190 |
the portage tree is broken, it is broken. It isn't catalyst's place to |
191 |
sanitize it. It is the Gentoo developers' job as a whole to do so. A |
192 |
"Gentoo" toolchain can be any number of various combinations of things. |
193 |
It doesn't have to stick to the Linux kernel/GNU userland model that |
194 |
other distributions maintain. |
195 |
|
196 |
-- |
197 |
Chris Gianelloni |
198 |
Release Engineering - Strategic Lead |
199 |
x86 Architecture Team |
200 |
Games - Developer |
201 |
Gentoo Linux |