Gentoo Archives: gentoo-commits

From: "Fabian Groffen (grobian)" <grobian@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo commit in xml/htdocs/proj/en/gentoo-alt/prefix: bootstrap-solaris.xml
Date: Thu, 21 Feb 2008 17:14:01
Message-Id: E1JSEzd-0000dp-3w@stork.gentoo.org
1 grobian 08/02/21 17:13:57
2
3 Modified: bootstrap-solaris.xml
4 Log:
5 Update the Solaris bootstrap guide into a working one
6
7 Revision Changes Path
8 1.22 xml/htdocs/proj/en/gentoo-alt/prefix/bootstrap-solaris.xml
9
10 file : http://sources.gentoo.org/viewcvs.py/gentoo/xml/htdocs/proj/en/gentoo-alt/prefix/bootstrap-solaris.xml?rev=1.22&view=markup
11 plain: http://sources.gentoo.org/viewcvs.py/gentoo/xml/htdocs/proj/en/gentoo-alt/prefix/bootstrap-solaris.xml?rev=1.22&content-type=text/plain
12 diff : http://sources.gentoo.org/viewcvs.py/gentoo/xml/htdocs/proj/en/gentoo-alt/prefix/bootstrap-solaris.xml?r1=1.21&r2=1.22
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.21
18 retrieving revision 1.22
19 diff -u -r1.21 -r1.22
20 --- bootstrap-solaris.xml 9 Jan 2008 18:27:45 -0000 1.21
21 +++ bootstrap-solaris.xml 21 Feb 2008 17:13:56 -0000 1.22
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.21 2008/01/09 18:27:45 grobian Exp $ -->
26 +<!-- $Header: /var/cvsroot/gentoo/xml/htdocs/proj/en/gentoo-alt/prefix/bootstrap-solaris.xml,v 1.22 2008/02/21 17:13:56 grobian Exp $ -->
27
28 <guide link="/proj/en/gentoo-alt/prefix/bootstrap-solaris.xml" lang="en">
29 <title>Gentoo Prefixed Portage Bootstrap Process for Solaris</title>
30 @@ -19,8 +19,8 @@
31 <!-- See http://creativecommons.org/licenses/by-sa/2.5 -->
32 <license/>
33
34 - <version>1.5</version>
35 - <date>2008-01-09</date>
36 + <version>1.6</version>
37 + <date>2008-02-21</date>
38
39 <chapter>
40 <title>Bootstrapping on Solaris 10</title>
41 @@ -40,7 +40,8 @@
42 "Spartan" platforms to bootstrap on, and for sure not as easy
43 as for instance a Linux distribution or Mac OS X. However,
44 don't despair when things go wrong, it's just known to be
45 - hard(er), but not impossible.
46 + hard(er), but not impossible. Feel free to ask in the
47 + <c>gentoo-alt</c> IRC channel, or mailing list.
48 </p>
49 </body>
50 </section><!-- }}} -->
51 @@ -60,8 +61,8 @@
52 </note>
53 <p>
54 The first step is to choose a path to install into. We refer
55 - to this path as "prefix path", stored in the variable
56 - <c>EPREFIX</c>. Some suggestion for your prefix path is
57 + to this path as "Prefix path", stored in the variable
58 + <c>EPREFIX</c>. Some suggestion for your Prefix path is
59 <path>$HOME/gentoo</path>.
60 Whatever you chose, make sure you set it in your environment:
61 </p>
62 @@ -73,7 +74,7 @@
63 instead.
64 </note>
65 <p>
66 - Next, add the following paths in your soon to be prefix to
67 + Next, add the following paths in your soon to be Prefix to
68 your <c>PATH</c> environment.
69 <path>$EPREFIX/bin</path>,
70 <path>$EPREFIX/usr/bin</path>,
71 @@ -87,7 +88,7 @@
72 <path>/usr/sfw/i386-sun-solaris2.10/bin</path>,
73 <path>/usr/bin</path> and <path>/bin</path>.
74 </p>
75 - <pre caption="Add prefix and utility paths to your PATH">
76 + <pre caption="Add Prefix and utility paths to your PATH">
77 $ <i>export PATH="$EPREFIX/usr/bin:$EPREFIX/bin:$EPREFIX/tmp/usr/bin:$EPREFIX/tmp/bin:/usr/sfw/bin:/usr/sfw/i386-sun-solaris2.10/bin:/usr/bin:/bin"</i>
78 </pre>
79 <note>Solaris 10/Sparc users need
80 @@ -142,15 +143,17 @@
81 many errors and warnings you might see during emerging.
82 </p>
83 <pre caption="emerge sed">
84 -$ <i>emerge --oneshot "=sys-apps/sed-4.1.4*"</i>
85 +$ <i>emerge --oneshot sed</i>
86 </pre>
87 <p>
88 - Next, we emerge the <c>bash</c> shell and its dependency
89 - ncurses. <c>bash</c> is used extensively within portage and
90 - other applications.
91 + Next, we emerge the <c>bash</c> shell Portage heavily relies
92 + on. The same holds for <c>wget</c>, the download manager.
93 + Since its dependencies cannot be compiled at this stage,
94 + we ignore those for the moment.
95 </p>
96 - <pre caption="emerge bash">
97 -$ <i>emerge --oneshot bash</i>
98 + <pre caption="emerge bash and wget">
99 +$ <i>emerge --oneshot "&lt;bash-3.2_p33"</i>
100 +$ <i>emerge --oneshot --nodeps wget</i>
101 </pre>
102 <note>
103 It is safe to ignore the "1 config files in XXX need updating"
104 @@ -159,120 +162,67 @@
105 <p>
106 Now, we will emerge a compiler which will use the gnu linker.
107 This is a requirement for many packages that follow in the
108 - bootstrap process. The gcc compiler shipped by Sun uses the
109 - Solaris native linker, which is as "Spartan" as the whole
110 - system. The packages to emerge include the <c>baselayout</c>
111 - package. Some, if not many, scripts and tools within a Gentoo
112 - system assume the availability of the <c>baselayout</c>
113 - package for all communication using the Gentoo colour scheme.
114 + bootstrap process, in particular Perl. The gcc compiler
115 + shipped by Sun uses the Solaris native linker, which is as
116 + "Spartan" as the whole system. The packages to emerge include
117 + the <c>baselayout</c> package. Some, if not many, scripts and
118 + tools within a Gentoo system assume the availability of the
119 + <c>baselayout</c> package for all communication using the
120 + Gentoo colour scheme.
121 </p>
122 <pre caption="emerge linker and compiler">
123 -$ <i>emerge --oneshot --nodeps sys-devel/m4</i>
124 -$ <i>emerge --oneshot --nodeps sys-apps/baselayout-prefix</i>
125 -$ <i>emerge --oneshot --nodeps sys-devel/flex</i>
126 -$ <i>emerge --oneshot --nodeps sys-devel/binutils-config</i>
127 -$ <i>emerge --oneshot --nodeps sys-devel/binutils</i>
128 -$ <i>emerge --oneshot --nodeps sys-devel/gcc-config</i>
129 -$ <i>emerge --oneshot --nodeps sys-devel/gcc</i>
130 - </pre>
131 - <p>
132 - We continue getting some autotools stuff into our prefix.
133 - </p>
134 - <pre caption="emerge autotools">
135 -$ <i>emerge --oneshot --nodeps "=autoconf-2.1*" "=autoconf-2.6*" "autoconf-wrapper"</i>
136 -$ <i>emerge --oneshot --nodeps "=automake-1.4*" "=automake-1.5*" "=automake-1.6*" "=automake-1.7*" "=automake-1.8*" "automake-wrapper"</i>
137 - </pre>
138 - <note><c>>=automake-1.9</c> and <c>libtool</c> are not (yet)
139 - installed at this stage.</note>
140 - <p>
141 - Next, we have to get some tools in order to finalise getting
142 - the autotools in our prefix. Because we installed <c>wget</c>
143 - in a temporary location, let's not forget to install it
144 - properly by emerging it now:
145 - </p>
146 - <pre caption="emerge wget">
147 -$ <i>env USE="-ssl" emerge --oneshot --nodeps wget</i>
148 - </pre>
149 - <p>
150 - After this we can emerge texinfo, which <c>automake-1.9</c>
151 - needs.
152 - </p>
153 - <pre caption="emerge texinfo">
154 -$ <i>emerge --oneshot --nodeps help2man texinfo</i>
155 - </pre>
156 - <p>
157 - Now we can finish installing the autotools:
158 - </p>
159 - <pre caption="finalise emerge autotools">
160 -$ <i>emerge --oneshot --nodeps "=automake-1.9*" "=automake-1.10*"</i>
161 -$ <i>emerge --oneshot --nodeps libtool</i>
162 - </pre>
163 - <p>
164 - Now we have some decent autotooling stuff around, we can get
165 - some decent core utilities in our prefix. First we have to
166 - upgrade to a newer binutils though, or we may encounter
167 - "multiply defined symbols" on sparcv9 systems.
168 - </p>
169 - <pre caption="emerge coreutils">
170 -$ <i>emerge --oneshot --nodeps sys-devel/binutils</i>
171 -$ <i>emerge --oneshot --nodeps sys-apps/coreutils</i>
172 - </pre>
173 - <p>
174 - Same goes for GNU patch.
175 - </p>
176 - <pre caption="emerge patch">
177 -$ <i>emerge --oneshot patch</i>
178 - </pre>
179 - <p>
180 - Finally we emerge python and some other utilities in our
181 - prefix. These are the remaining packages that we temporarily
182 - installed to bootstrap our system.
183 - </p>
184 - <pre caption="emerge remaining temporarily installed packages">
185 -$ <i>emerge --oneshot --nodeps python</i>
186 -$ <i>emerge --oneshot --nodeps findutils</i>
187 -$ <i>emerge --oneshot --nodeps tar</i>
188 -$ <i>emerge --oneshot --nodeps grep</i>
189 -$ <i>emerge --oneshot --nodeps make</i>
190 -$ <i>emerge --oneshot --nodeps bison</i>
191 +$ <i>emerge --oneshot m4</i>
192 +$ <i>emerge --oneshot --nodeps baselayout-prefix</i>
193 +$ <i>emerge --oneshot --nodeps flex</i>
194 +$ <i>emerge --oneshot --nodeps binutils-config</i>
195 +$ <i>emerge --oneshot --nodeps binutils</i>
196 +$ <i>emerge --oneshot --nodeps gcc-config</i>
197 +$ <i>emerge --oneshot --nodeps gcc</i>
198 + </pre>
199 + <p>
200 + We continue getting more tools in our Prefix. We no longer
201 + ignore dependencies, so a lot of packages will be emerged at
202 + this stage. Slowly our Prefix gets more robust as we progress
203 + here.
204 + </p>
205 + <pre caption="emerge several tools">
206 +$ <i>emerge --oneshot coreutils</i>
207 +$ <i>emerge --oneshot findutils</i>
208 +$ <i>emerge --oneshot tar</i>
209 +$ <i>emerge --oneshot grep</i>
210 $ <i>emerge --oneshot gawk</i>
211 +$ <i>emerge --oneshot patch</i>
212 +$ <i>emerge --oneshot make</i>
213 </pre>
214 <p>
215 - Before we continue to emerge all ebuilds from <c>system</c>,
216 - we first install <c>portage</c>. We need to overwrite the
217 - version that was installed by the bootstrap script.
218 - Installing a new portage will make sure it uses the tools
219 - provided by the prefix, and forget about the temporary
220 - installed tools.
221 + Now we have a good bunch of programs that Portage needs, we
222 + can replace the bootstrapped Portage by a properly installed
223 + one, using portage itself. Also here a few dependencies are
224 + first emerged, such as the language Portage is written in:
225 + <c>python</c>. We need to temporarily tell Portage that the
226 + bootstrapped Portage can be overwritten.
227 </p>
228 <pre caption="emerge portage">
229 -$ <i>env FEATURES="-collision-protect" emerge --oneshot --nodeps portage</i>
230 +$ <i>env FEATURES="-collision-protect" emerge --oneshot portage</i>
231 </pre>
232 <p>
233 - Now we're about to start the big work, we remove the temporary
234 - directory and its use as we got it all in our prefix now.
235 + Now we have emerged everything we bootstrapped before, we
236 + remove the temporary directory and its use as it is no longer
237 + necessary.
238 </p>
239 <pre caption="remove tmp directory">
240 $ <i>rm -Rf $EPREFIX/tmp/*</i>
241 $ <i>hash -r</i>
242 </pre>
243 <p>
244 - Next, we do the real work where all packages get reemerged in
245 - such an order that they make use of packages in the prefix
246 - itself.
247 + Before we do any further merges, we are going to update our
248 + tree. Since snapshots in Prefix are actually (anonymous) SVN
249 + checkouts of the tree, we need <c>subversion</c> to update it.
250 </p>
251 - <pre caption="emerge system">
252 -$ <i>env USE="berkdb" emerge -e system</i>
253 + <pre caption="emerge subversion">
254 +$ <i>emerge --oneshot subversion</i>
255 </pre>
256 <p>
257 - This will happily install a lot of stuff and reinstall what
258 - you emerged before. This is necessary to avoid compilation
259 - failures due to dependencies.
260 - </p>
261 - <p>
262 - We can now update the tree. Since snapshots now are actually
263 - (anonymous) SVN checkouts of the tree, we can immediately use
264 - SVN commands on the tree instead of checking a tree out first.
265 Because Portage knows how to deal with the SVN tree, and the
266 bootstrap script has set a correct <c>SYNC</c> variable in
267 your <path>etc/make.conf</path>, updating the tree is done
268 @@ -282,25 +232,33 @@
269 $ <i>emerge --sync</i>
270 </pre>
271 <p>
272 - To really do this properly, after emerging <c>system</c>, one
273 - should re-emerge <c>system</c>, because now all packages can
274 - be compiled with all tools from the prefix, instead of based
275 - on tools in the system root. Before you do though, this is
276 - the good time to set your general <c>USE</c>-flags, such as
277 - <c>nls</c> to get localised messages in
278 - <path>$EPREFIX/etc/make.conf</path>. In that file, you
279 - can also set <c>CFLAGS</c> for your compilation. Be
280 - conservative with <c>CFLAGS</c>! Note that the code below is
281 - an example, and is meant for inspiration only.
282 + Next, we let Portage emerge all packages that complete a
283 + system install that we eventually need to finalise this Prefix
284 + installation.
285 + </p>
286 + <pre caption="emerge system">
287 +$ <i>emerge -u system</i>
288 + </pre>
289 + <p>
290 + Now is a good time to set the preferences for our soon to be
291 + Prefix. This includes customisations such as general
292 + <c>USE</c>-flags, <c>CFLAGS</c> and <c>MAKEOPTS</c> in
293 + <path>$EPREFIX/etc/make.conf</path>. Be conservative with
294 + <c>CFLAGS</c>! Note that the code below is an example, and is
295 + meant for inspiration only.
296 </p>
297 - <pre caption="Customising the prefix installation - example">
298 + <pre caption="Customising the Prefix installation - example">
299 $ <i>echo 'USE="unicode nls"' >> $EPREFIX/etc/make.conf</i>
300 $ <i>echo 'CFLAGS="-O2 -pipe"' >> $EPREFIX/etc/make.conf</i>
301 $ <i>echo 'CXXFLAGS="${CFLAGS}"' >> $EPREFIX/etc/make.conf</i>
302 </pre>
303 <p>
304 - Since we're about to rebuild our system for the last time, we
305 - can unset all hacks we made to help the bootstrap process.
306 + Since we have everything in place for a self-catered rebuild,
307 + we can unset all hacks we made to help the bootstrap process,
308 + and start the final stage to install the Prefix system. This
309 + final stage recompiles everything in the system, but now all
310 + packages can be compiled with tools from the Prefix, instead
311 + of those from the host system.
312 </p>
313 <pre caption="Unsetting LDFLAGS and CPPFLAGS variables">
314 $ <i>unset LDFLAGS</i>
315 @@ -312,9 +270,9 @@
316 <c>CPPFLAGS</c>.
317 </note>
318 <p>
319 - After <c>system</c> has emerged successfully, your prefix will
320 + After <c>system</c> has emerged successfully, your Prefix will
321 be set up properly, and you can emerge the whichever tools you
322 - choose from the prefix tree.
323 + choose from the Prefix tree.
324 </p>
325 </body>
326 </section><!-- }}} -->
327 @@ -323,8 +281,8 @@
328 <title>Using the Prefix</title>
329 <body>
330 <p>
331 - To use your bootstrapped prefix environment, you best start a
332 - shell from the prefix, such that your path and other
333 + To use your bootstrapped Prefix environment, you best start a
334 + shell from the Prefix, such that your path and other
335 environment variables are set correctly. To facilitate in
336 this, a small helper script can be created by the bootstrap
337 script.
338 @@ -337,8 +295,8 @@
339 After running this, a script <c>startprefix</c> will be
340 present in <c>$EPREFIX</c>. You can freely move the script to
341 e.g. your homedir for convenience. Running the script will
342 - drop you into a prefix shell, where for example <c>emerge</c>
343 - is directly at your disposal. Enjoy your prefix!
344 + drop you into a Prefix shell, where for example <c>emerge</c>
345 + is directly at your disposal. Enjoy your Prefix!
346 </p>
347 </body>
348 </section>
349
350
351
352 --
353 gentoo-commits@l.g.o mailing list