1 |
grobian 12/08/26 19:50:46 |
2 |
|
3 |
Modified: bootstrap-solaris.xml |
4 |
Log: |
5 |
use stage{1,2,3} in bootstrap instructions |
6 |
|
7 |
Revision Changes Path |
8 |
1.98 xml/htdocs/proj/en/gentoo-alt/prefix/bootstrap-solaris.xml |
9 |
|
10 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo/xml/htdocs/proj/en/gentoo-alt/prefix/bootstrap-solaris.xml?rev=1.98&view=markup |
11 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo/xml/htdocs/proj/en/gentoo-alt/prefix/bootstrap-solaris.xml?rev=1.98&content-type=text/plain |
12 |
diff : http://sources.gentoo.org/viewvc.cgi/gentoo/xml/htdocs/proj/en/gentoo-alt/prefix/bootstrap-solaris.xml?r1=1.97&r2=1.98 |
13 |
|
14 |
Index: bootstrap-solaris.xml |
15 |
=================================================================== |
16 |
RCS file: /var/cvsroot/gentoo/xml/htdocs/proj/en/gentoo-alt/prefix/bootstrap-solaris.xml,v |
17 |
retrieving revision 1.97 |
18 |
retrieving revision 1.98 |
19 |
diff -u -r1.97 -r1.98 |
20 |
--- bootstrap-solaris.xml 11 Aug 2012 13:30:14 -0000 1.97 |
21 |
+++ bootstrap-solaris.xml 26 Aug 2012 19:50:46 -0000 1.98 |
22 |
@@ -1,6 +1,6 @@ |
23 |
<?xml version="1.0" encoding="UTF-8"?> |
24 |
<!DOCTYPE guide SYSTEM "/dtd/guide.dtd"> |
25 |
-<!-- $Header: /var/cvsroot/gentoo/xml/htdocs/proj/en/gentoo-alt/prefix/bootstrap-solaris.xml,v 1.97 2012/08/11 13:30:14 grobian Exp $ --> |
26 |
+<!-- $Header: /var/cvsroot/gentoo/xml/htdocs/proj/en/gentoo-alt/prefix/bootstrap-solaris.xml,v 1.98 2012/08/26 19:50:46 grobian Exp $ --> |
27 |
|
28 |
<guide link="/proj/en/gentoo-alt/prefix/bootstrap-solaris.xml" lang="en"> |
29 |
<title>Gentoo Prefix Bootstrap Process for UNIX-like systems</title> |
30 |
@@ -19,8 +19,8 @@ |
31 |
<!-- See http://creativecommons.org/licenses/by-sa/2.5 --> |
32 |
<license/> |
33 |
|
34 |
- <version>1.67</version> |
35 |
- <date>2012-08-07</date> |
36 |
+ <version>1.68</version> |
37 |
+ <date>2012-08-26</date> |
38 |
|
39 |
<chapter> |
40 |
<title>Bootstrapping</title> |
41 |
@@ -49,14 +49,18 @@ |
42 |
default, e.g. make sure your shell doesn't automatically load |
43 |
any environment variables that setup those repositories. |
44 |
Think of <c>PATH</c>, <c>CFFLAGS</c>, <c>CFLAGS</c>, |
45 |
- <c>LDFLAGS</c> and the always harmful <c>LD_LIBRARY_PATH</c>. |
46 |
+ <c>LDFLAGS</c>, <c>PKG_CONFIG_PATH</c> and the always harmful |
47 |
+ <c>LD_LIBRARY_PATH</c>. |
48 |
This is important, because Prefix tends to be very sensitive |
49 |
about this. Afterall, it's whole purpose is to provide all of |
50 |
those tools by itself without external help! |
51 |
</p> |
52 |
<p> |
53 |
- If you happen to run into troubles, don't despair. Feel free |
54 |
- to ask in the <c>gentoo-prefix</c> IRC channel, or mailing list |
55 |
+ If you happen to run into trouble, don't despair |
56 |
+ (immediately). Feel free to ask in the <c>gentoo-prefix</c> |
57 |
+ IRC channel, or <uri |
58 |
+ link="http://archives.gentoo.org/gentoo-alt">gentoo-alt |
59 |
+ mailing list</uri>. |
60 |
</p> |
61 |
<note> |
62 |
IMPORTANT: Gentoo Prefix does NOT require root-privileges. |
63 |
@@ -173,190 +177,62 @@ |
64 |
From the directory where the bootstrap script was stored execute |
65 |
the following commands: |
66 |
</p> |
67 |
- <pre caption="Use the bootstrap script"> |
68 |
+ <pre caption="Use the bootstrap script for stage1"> |
69 |
$ <i>chmod 755 bootstrap-prefix.sh</i> |
70 |
-$ <i>./bootstrap-prefix.sh $EPREFIX/tmp make</i> |
71 |
-$ <i>./bootstrap-prefix.sh $EPREFIX/tmp wget</i> |
72 |
-$ <i>./bootstrap-prefix.sh $EPREFIX/tmp sed</i> |
73 |
-$ <i>./bootstrap-prefix.sh $EPREFIX/tmp m4</i> |
74 |
-$ <i>./bootstrap-prefix.sh $EPREFIX/tmp bison</i> |
75 |
-$ <i>./bootstrap-prefix.sh $EPREFIX/tmp coreutils</i> |
76 |
-$ <i>./bootstrap-prefix.sh $EPREFIX/tmp findutils</i> |
77 |
-$ <i>./bootstrap-prefix.sh $EPREFIX/tmp tar</i> |
78 |
-$ <i>./bootstrap-prefix.sh $EPREFIX/tmp patch</i> |
79 |
-$ <i>./bootstrap-prefix.sh $EPREFIX/tmp grep</i> |
80 |
-$ <i>./bootstrap-prefix.sh $EPREFIX/tmp gawk</i> |
81 |
-$ <i>./bootstrap-prefix.sh $EPREFIX/tmp bash</i> |
82 |
-$ <i>./bootstrap-prefix.sh $EPREFIX/tmp zlib</i> |
83 |
-$ <i>./bootstrap-prefix.sh $EPREFIX/tmp python</i> |
84 |
+$ <i>./bootstrap-prefix.sh $EPREFIX/tmp stage1</i> |
85 |
</pre> |
86 |
<note> |
87 |
- Please note that all tools are installed in |
88 |
- <path>$EPREFIX/tmp</path>! |
89 |
+ Please note the usage of <path>$EPREFIX/tmp</path>! |
90 |
</note> |
91 |
<p> |
92 |
- Now that we have some minimal tools to run <c>emerge</c>, |
93 |
- let's setup the <path>$EPREFIX</path> |
94 |
- directory, download a Portage tree snapshot, unpack it and |
95 |
- download and install Portage. Afterwards the script will try |
96 |
- to setup some sane defaults, watch closely if it reported to |
97 |
- be successful in this. If it doesn't, your system is not yet |
98 |
- recognised, and manual intervention to continue is necessary. |
99 |
- </p> |
100 |
- <pre caption="bootstrap Portage"> |
101 |
-$ <i>./bootstrap-prefix.sh $EPREFIX tree</i> |
102 |
-$ <i>./bootstrap-prefix.sh $EPREFIX portage</i> |
103 |
- </pre> |
104 |
- <p> |
105 |
- Because we installed some new applications, most notably |
106 |
- Portage, we will instruct bash to reconsider all paths we |
107 |
- have: |
108 |
+ The stage1 should have installed some basic packages |
109 |
+ necessary to run Portage, without Portage's help. When stage1 |
110 |
+ finished successfully, a Portage can be installed. |
111 |
</p> |
112 |
- <pre caption="rehash in bash"> |
113 |
-$ <i>hash -r</i> |
114 |
- </pre> |
115 |
- <note> |
116 |
- tcsh users can use the <c>rehash</c> command. |
117 |
- </note> |
118 |
<p> |
119 |
- We continue adding some necessary tools which will slowly make |
120 |
- the just born Prefix less fragile. |
121 |
+ The Portage tree installed by default is a known to be good |
122 |
+ snapshot. This can, however, for various reasons not be |
123 |
+ good enough, in which case the lastest snapshot available can |
124 |
+ be used instead. Only use this when you have problems with |
125 |
+ the known to be good snapshot. If you want to use the lastest |
126 |
+ snapshot when bootstrapping, export LATEST_TREE_YES=1 in |
127 |
+ your environment before running the following: |
128 |
</p> |
129 |
- <pre caption="emerge sed"> |
130 |
-$ <i>emerge --oneshot sed</i> |
131 |
+ <pre caption="bootstrap Portage and its tree"> |
132 |
+$ <i>./bootstrap-prefix.sh $EPREFIX stage2</i> |
133 |
</pre> |
134 |
<p> |
135 |
- Next, we emerge the <c>bash</c> shell Portage heavily relies |
136 |
- on. |
137 |
+ We continue with emerging some of the core toolchain packages |
138 |
+ that make sure we compile and link everything taking the |
139 |
+ Prefix into account. Next to that this step emerges the full |
140 |
+ set of applications and that Portage needs and removes the |
141 |
+ tools installed by stage1. It finishes things by getting an |
142 |
+ up-to-date tree (removing any hacks stage2 applied to the |
143 |
+ activated profile) and emerging everything in the |
144 |
+ <c>system</c> set. |
145 |
</p> |
146 |
- <pre caption="emerge bash"> |
147 |
-$ <i>emerge --oneshot --nodeps bash</i> (avoid deps that install scripts with shebang /bin/sh) |
148 |
- </pre> |
149 |
- <p> |
150 |
- Now, we will emerge a compiler which will use the gnu linker. |
151 |
- This is a requirement for many packages that follow in the |
152 |
- bootstrap process, in particular Perl. The packages to emerge |
153 |
- include the <c>baselayout-prefix</c> package. Some, if not |
154 |
- many, scripts and tools within a Gentoo system assume the |
155 |
- availability of the <c>baselayout-prefix</c> package for all |
156 |
- communication using the Gentoo colour scheme. |
157 |
- </p> |
158 |
- <pre caption="emerge toolchain pre-requisites"> |
159 |
-$ <i>emerge --oneshot --nodeps sys-apps/baselayout-prefix</i> |
160 |
-$ <i>emerge --oneshot --nodeps app-arch/xz-utils</i> |
161 |
-$ <i>emerge --oneshot --nodeps sys-devel/m4</i> |
162 |
-$ <i>emerge --oneshot --nodeps sys-devel/flex</i> |
163 |
-$ <i>emerge --oneshot --nodeps sys-devel/bison</i> |
164 |
-$ <i>emerge --oneshot --nodeps sys-devel/binutils-config</i> |
165 |
-$ <i>emerge --oneshot --nodeps sys-devel/gcc-config</i> |
166 |
- </pre> |
167 |
- <p> |
168 |
- Non Mac OS X users can immediately continue here with the |
169 |
- toolchain, and skip the bit below about Xcode. |
170 |
- <e>Mac OS X users need to skip this step, and perform the step |
171 |
- below instead.</e> |
172 |
- </p> |
173 |
- <pre caption="Non Mac OS X: emerge GNU linker and compiler"> |
174 |
-$ <i>emerge --oneshot --nodeps sys-devel/binutils</i> |
175 |
-$ <i>emerge --oneshot --nodeps "=sys-devel/gcc-4.2*"</i> |
176 |
+ <pre caption="bootstrap a self-hosted Portage"> |
177 |
+$ <i>./bootstrap-prefix.sh $EPREFIX stage3</i> |
178 |
</pre> |
179 |
<p> |
180 |
- <e>If you're not on Mac OS X, you can skip this step.</e> |
181 |
- Due to different versions of Xcode, the following step |
182 |
- requires some close watch to the output of <c>gcc |
183 |
- --version</c>. If the first line reports a version <e> |
184 |
- 4.2.1</e>, the latest binutils-apple needs to be emerged, |
185 |
- otherwise, version should report <e>4.0.1</e> and |
186 |
- <c>=binutils-apple-3.2</c> must be emerged. |
187 |
- </p> |
188 |
- <pre caption="Mac OS X: emerge Apple linker and GNU/Apple compiler"> |
189 |
-$ <i>emerge --oneshot --nodeps "=sys-devel/binutils-apple-3.2"</i> (for gcc 4.0.1) |
190 |
-$ <i>emerge --oneshot --nodeps sys-devel/binutils-apple</i> (for gcc 4.2.1) |
191 |
-$ <i>emerge --oneshot --nodeps sys-devel/gcc-apple</i> |
192 |
- </pre> |
193 |
- <p> |
194 |
- We continue getting more tools in our Prefix. We no longer |
195 |
- ignore dependencies all the time, so a lot of packages will be |
196 |
- emerged at this stage. Slowly our Prefix gets more robust as |
197 |
- we progress here. |
198 |
- </p> |
199 |
- <pre caption="emerge several tools"> |
200 |
-$ <i>emerge --oneshot sys-apps/coreutils</i> |
201 |
-$ <i>emerge --oneshot sys-apps/findutils</i> |
202 |
-$ <i>emerge --oneshot '<app-arch/tar-1.26-r1'</i> |
203 |
-$ <i>emerge --oneshot sys-apps/grep</i> |
204 |
-$ <i>emerge --oneshot sys-devel/patch</i> |
205 |
-$ <i>emerge --oneshot sys-apps/gawk</i> |
206 |
-$ <i>emerge --oneshot sys-devel/make</i> |
207 |
-$ <i>emerge --oneshot sys-libs/zlib</i> |
208 |
-$ <i>emerge --oneshot --nodeps sys-apps/file</i> |
209 |
-$ <i>emerge --oneshot --nodeps app-admin/eselect</i> |
210 |
-$ <i>emerge --oneshot app-misc/pax-utils</i> |
211 |
-$ <i>emerge --oneshot "<net-misc/wget-1.13.4-r1"</i> (until we fix #393277) |
212 |
-$ <i>emerge --oneshot virtual/os-headers</i> |
213 |
- </pre> |
214 |
- <p> |
215 |
- Now we have a good bunch of programs that Portage needs, we |
216 |
- can replace the bootstrapped Portage by a properly installed |
217 |
- one, using Portage itself. Also here a few dependencies are |
218 |
- first emerged, such as the language Portage is written in: |
219 |
- <c>python</c>. We need to temporarily tell Portage that the |
220 |
- bootstrapped Portage can be overwritten. |
221 |
- </p> |
222 |
- <pre caption="emerge portage"> |
223 |
-$ <i>env FEATURES="-collision-protect" emerge --oneshot sys-apps/portage</i> |
224 |
- </pre> |
225 |
- <p> |
226 |
- Now we have emerged everything we bootstrapped before, we |
227 |
- remove the temporary directory and its use as it is no longer |
228 |
- necessary. |
229 |
+ Because we installed some new applications, most notably |
230 |
+ Portage, we will instruct bash to reconsider all paths we |
231 |
+ have: |
232 |
</p> |
233 |
- <pre caption="remove tmp directory"> |
234 |
-$ <i>rm -Rf $EPREFIX/tmp/*</i> |
235 |
+ <pre caption="rehash in bash"> |
236 |
$ <i>hash -r</i> |
237 |
</pre> |
238 |
- <p> |
239 |
- Before we do any further merges, we are going to update our |
240 |
- tree. Updating the tree is done using: |
241 |
- </p> |
242 |
- <pre caption="Updating the tree"> |
243 |
-$ <i>emerge --sync</i> |
244 |
- </pre> |
245 |
<note> |
246 |
- If you're behind a firewall that blocks rsync traffic, you can |
247 |
- try to run <c>${EPREFIX}/usr/bin/emerge-webrsync</c> instead. |
248 |
+ tcsh users can use the <c>rehash</c> command. |
249 |
</note> |
250 |
<p> |
251 |
- Before we can finish emerging the system set, we need to work |
252 |
- around a circular dependency of <c>gcc</c> on <c>mpc</c>, and |
253 |
- <c>mpc</c> on <c>gcc</c>. Since Mac OS X systems use |
254 |
- <c>gcc-apple</c>, this step is not necessary for them. |
255 |
- <e>Mac OS X users should skip this step.</e> |
256 |
- </p> |
257 |
- <pre caption="Non Mac OS X: emerge an older mpc"> |
258 |
-$ <i>emerge --oneshot "<dev-libs/mpc-0.9"</i> |
259 |
- </pre> |
260 |
- <p> |
261 |
- Next, we let Portage emerge all packages that complete a |
262 |
- system install that we eventually need to finalise this Prefix |
263 |
- installation. |
264 |
- </p> |
265 |
- <pre caption="emerge system"> |
266 |
-$ <i>env USE=-git emerge -u system</i> |
267 |
- </pre> |
268 |
- <p> |
269 |
- Now is a good time to set the preferences for our soon to be |
270 |
- Prefix. This includes customisations such as general |
271 |
- <c>USE</c>-flags, <c>CFLAGS</c> and <c>MAKEOPTS</c> in |
272 |
+ Now is a good time to set the preferences for your Prefix. |
273 |
+ This includes customisations such as general <c>USE</c>-flags, |
274 |
+ <c>CFLAGS</c> and <c>MAKEOPTS</c> in |
275 |
<path>$EPREFIX/etc/portage/make.conf</path>. Be conservative with |
276 |
- <c>CFLAGS</c>! Note that the code below is an example, and is |
277 |
- meant for inspiration only. |
278 |
+ <c>CFLAGS</c>! The stage3 function already sed some moderate |
279 |
+ defaults. |
280 |
</p> |
281 |
- <pre caption="Customising the Prefix installation - example"> |
282 |
-$ <i>echo 'USE="unicode nls"' >> $EPREFIX/etc/portage/make.conf</i> |
283 |
-$ <i>echo 'CFLAGS="-O2 -pipe"' >> $EPREFIX/etc/portage/make.conf</i> |
284 |
-$ <i>echo 'CXXFLAGS="${CFLAGS}"' >> $EPREFIX/etc/portage/make.conf</i> |
285 |
- </pre> |
286 |
<note> |
287 |
You can consider adding CPU-specific tuning flags to |
288 |
<c>CFLAGS</c>. If you don't know what your CPU is, or what |
289 |
@@ -375,26 +251,6 @@ |
290 |
value breaks things. |
291 |
</note> |
292 |
<p> |
293 |
- For non Mac OS X users, it is likely that you emerged a newer |
294 |
- GCC than the 4.2 version we used during the bootstrap. Since |
295 |
- we reinstall all packages, we like to take advantage of this |
296 |
- newer GCC. By default, this newer GCC will not be enabled. |
297 |
- Check the output of <c>gcc-config -l</c>, and make sure that |
298 |
- the newest compiler is selected (marked by an asterisk). |
299 |
- Another GCC can be selected by running <c>gcc-config |
300 |
- <number></c>. |
301 |
- </p> |
302 |
- <pre caption="activating the most recent compiler"> |
303 |
-$ <i>gcc-config -l</i> |
304 |
- [1] i386-pc-solaris2.10-4.2.4 * |
305 |
- [2] i386-pc-solaris2.10-4.5.3 |
306 |
-$ <i>gcc-config 2</i> |
307 |
- * Switching native-compiler to i386-pc-solaris2.10-4.5.3 ... |
308 |
-$ <i>gcc-config -l</i> |
309 |
- [1] i386-pc-solaris2.10-4.2.4 |
310 |
- [2] i386-pc-solaris2.10-4.5.3 * |
311 |
- </pre> |
312 |
- <p> |
313 |
Since we have everything in place for a self-catered rebuild, |
314 |
we can start the final stage to install the Prefix system. |
315 |
This final stage recompiles everything in the system, but now |