1 |
Shinkan wrote: |
2 |
> > Hm, what is ports version? Do you mean the portage snapshot? That |
3 |
> > can be set in the spec files though? |
4 |
> |
5 |
> I wanted to say for instance "gcc-3.4.3" and not "current gcc". |
6 |
> Because I want some targets to be built against a specific version |
7 |
> of glibc. |
8 |
|
9 |
No problem. Just specify the versions you want in your stage2. Of |
10 |
course you need those ebuilds somewhere, but that can easily be in an |
11 |
overlay. |
12 |
|
13 |
|
14 |
> > > I really don't want to build a profile because they're hard to |
15 |
> > > maintain in a wide use scheme, and because that's overkill. |
16 |
> > |
17 |
> > Would it not work to put a profile in /etc/catalyst/mytarget/profile |
18 |
> > and give a relative path like ../../../etc/catalyst/mytarget/profile |
19 |
> > in the catalyst spec file? |
20 |
> |
21 |
> I thought about that. But : |
22 |
> 1) That's a dirty hack. What if gentoo decides to put profiles in |
23 |
> /usr/portage/boringstuffs/profiles/ ? |
24 |
> They can because of official transparent "eselect profile" way of |
25 |
> selecting a profile. |
26 |
|
27 |
I agree it's a bit of a hack. But it will work very well until you |
28 |
upgrade catalyst, at which point you should probably be prepared to |
29 |
review your spec files anyway. |
30 |
|
31 |
|
32 |
> 2) Each of my target can be different. WCS, we have one profile per |
33 |
> target, per architecture, per type of target... per version. |
34 |
|
35 |
I don't quite understand this, since you haven't given very many |
36 |
details about what you want to do. |
37 |
|
38 |
|
39 |
> I want my target build env to be self-containing, so I don't want |
40 |
> 10K profiles moving around my host tree. |
41 |
> Plus, I lost profiles parenting if I put things in |
42 |
> /etc/catalyst/mytarget/ |
43 |
|
44 |
Can profiles be in an overlay by the way? In that case you don't have |
45 |
to mess with symlinks at all, and could still use inheritance. |
46 |
|
47 |
|
48 |
> > > I must rebuild all (yeah, cache is there but...), |
49 |
> > |
50 |
> > But what? I find that the most time is spent in the rsync, done |
51 |
> > first for a catalyst stage. Binpkgs install very quickly. |
52 |
> |
53 |
> I would have to audit catalyst code to tell cache won't break some |
54 |
> of my needs. |
55 |
|
56 |
catalyst does not implement any caching of it's own. The caching is |
57 |
all done by emerge, and can be used fine also without catalyst. |
58 |
|
59 |
|
60 |
> Because I will do nasty things on the portage tree. |
61 |
|
62 |
Then you must expect everything to break. |
63 |
|
64 |
|
65 |
> I don't want catalyst to think it can "pick a bin in a cache" |
66 |
> (that's sound funny isn't it ?), but in fact ebuild with same |
67 |
> version has changed because of some patches I applied. |
68 |
|
69 |
This is not proper use of portage and ebuilds. Please read a bit |
70 |
about how version numbers are handled in ebuilds. If you make local |
71 |
additions to an upstream version you shall append -r1 to the ebuild |
72 |
version. Next local change to same upstream version shall be -r2, and |
73 |
so on. |
74 |
|
75 |
|
76 |
> Cache is really a killing feat of catalyst, but I can't afford it |
77 |
> for my things. I fear the cache. |
78 |
|
79 |
I think you should learn how it works instead, so that you can take |
80 |
full advantage of it. |
81 |
|
82 |
If you create proper ebuilds and follow the rules for ebuild |
83 |
versioning, you will find that the cache works wonderfully well. |
84 |
|
85 |
(Again, the "cache" is simply emerge --usepkg --buildpkg.) |
86 |
|
87 |
|
88 |
> > "system" is not a great term. Yes, your stage4 will not have a |
89 |
> > build environment, so the next catalyst run will take a little |
90 |
> > longer. Maybe that's a big problem in your scenario, but if you |
91 |
> > can live with that, I don't see a problem. |
92 |
> |
93 |
> I don't want my "stage4" to have a build env. I want my stage4 to |
94 |
> be very minimal. |
95 |
|
96 |
Yes, I know this. Please read again what I wrote. |
97 |
|
98 |
Your stage4 will not have a build environment. |
99 |
|
100 |
|
101 |
> I would expect catalyst to do this in fact : |
102 |
> 1) Take a official stage3. |
103 |
> 2) Build a build env with this stage3. Build env would have |
104 |
> specified arch/gcc/libc/binutils version, and portage with a |
105 |
> specified tree. |
106 |
> 3) From this build env, catalyst would build a target with JUST the |
107 |
> packages I specified, so the target would be totally empty at |
108 |
> begining. |
109 |
> Then I would like the kernel comp on build env, and image cped to my target. |
110 |
> Then I would like catalyst to emerge kernel dependant packages to my target. |
111 |
> Then I would be done with a "stage4", which is my target. |
112 |
> 4) Then my target could be put on a live cd with some more mechanic |
113 |
> catalyst already offers. |
114 |
> For all step there would be a spec file, and possibility to specify |
115 |
> each dest dirs. |
116 |
|
117 |
No. |
118 |
|
119 |
You would start by creating a stage1 or stage2 spec file. stage1 |
120 |
might not be neccessary, stage2 may be enough. |
121 |
|
122 |
A stage2 spec file starts from a stage1 tarball. |
123 |
A stage2 spec file makes catalyst build toolchain and libc. |
124 |
|
125 |
A stage3 spec file starts from the stage2 tarball produced above. |
126 |
A stage3 spec file normally installs some basic packages. Your stage3 |
127 |
may in fact be a no-op. But stuff like iproute2 could be here. |
128 |
|
129 |
A stage4 spec file starts from the stage3 tarball produced above. |
130 |
A stage4 spec file normally installs anything beyond the basic |
131 |
system, and cleans out all unwanted things. The stage4 also builds a |
132 |
kernel. |
133 |
|
134 |
Since all your stages would be minimal, there is not a lot of |
135 |
cleaning, so re-running the stage4 will also not take very long time. |
136 |
|
137 |
In the profile and in most if not all stage spec files you will |
138 |
specify the packages you want for that stage. |
139 |
|
140 |
|
141 |
> I confirm in my case it would work. I build on amd64, I target x86 |
142 |
> and amd64, but with different glibc bases. |
143 |
|
144 |
That's ok. I admit that this would need different sets of spec files |
145 |
for catalyst, but you'd also need different scripts if doing it |
146 |
manually. |
147 |
|
148 |
|
149 |
> > I insist on catalyst because it takes care of a good deal of things |
150 |
> > that have to be done manually otherwise - documentation, filesystem |
151 |
> > overlay, create binpkgs, create tarball, create iso.. |
152 |
> |
153 |
> I really liked catalyst when I read it spec examples. |
154 |
> After dealing a little with basic scenarios and totally outdated |
155 |
> examples, I started to find that I had needs it can't answer. |
156 |
|
157 |
This is why I wrote earlier that I think you should make some |
158 |
experiments and see for yourself what it can do. catalyst is not |
159 |
really a very advanced tool - it just collects all the small tasks in |
160 |
a single utility, which makes it very handy. |
161 |
|
162 |
|
163 |
> What I miss the most is the "I will just have to write 2 spec files |
164 |
> per target, YAY !!!" dream, and the "I take care of the Live CD |
165 |
> boring stuffs". |
166 |
|
167 |
You'll have to do a bit more than that, but not too much. 5 or so |
168 |
spec files, including the one for the CD. Create the profile, the |
169 |
configuration files that you want of course. In any case you also |
170 |
have to create an overlay for local ebuilds. I find layman very easy |
171 |
to work with. There's an XML file for my overlay at |
172 |
http://stuge.se/overlay.xml |
173 |
|
174 |
|
175 |
> Catalyst should provide a "solar glasses stuffed cowboy" mode, |
176 |
> where it could act as an evolved spec-files base cross |
177 |
> compiler/emerger, and where we could build from nothing. |
178 |
|
179 |
I guess this is kind of what I proposed. Create a new target type or |
180 |
types, other than stage1..4 and livecd1,2, which do not start from a |
181 |
source stage, but start from an empty directory. But someone has to |
182 |
do it, and I think releng are pretty busy doing their own job. |
183 |
(catalyst is their tool.) |
184 |
|
185 |
|
186 |
//Peter |