From mboxrd@z Thu Jan 1 00:00:00 1970
Return-Path:
- If you happen to run into troubles, don't despair. Feel free
- to ask in the
+$ chmod 755 bootstrap-prefix.sh -$ ./bootstrap-prefix.sh $EPREFIX/tmp make -$ ./bootstrap-prefix.sh $EPREFIX/tmp wget -$ ./bootstrap-prefix.sh $EPREFIX/tmp sed -$ ./bootstrap-prefix.sh $EPREFIX/tmp m4 -$ ./bootstrap-prefix.sh $EPREFIX/tmp bison -$ ./bootstrap-prefix.sh $EPREFIX/tmp coreutils -$ ./bootstrap-prefix.sh $EPREFIX/tmp findutils -$ ./bootstrap-prefix.sh $EPREFIX/tmp tar -$ ./bootstrap-prefix.sh $EPREFIX/tmp patch -$ ./bootstrap-prefix.sh $EPREFIX/tmp grep -$ ./bootstrap-prefix.sh $EPREFIX/tmp gawk -$ ./bootstrap-prefix.sh $EPREFIX/tmp bash -$ ./bootstrap-prefix.sh $EPREFIX/tmp zlib -$ ./bootstrap-prefix.sh $EPREFIX/tmp python +$ ./bootstrap-prefix.sh $EPREFIX/tmp stage1- Please note that all tools are installed in - $EPREFIX/tmp ! + Please note the usage of$EPREFIX/tmp !- Now that we have some minimal tools to run
-emerge , - let's setup the$EPREFIX - directory, download a Portage tree snapshot, unpack it and - download and install Portage. Afterwards the script will try - to setup some sane defaults, watch closely if it reported to - be successful in this. If it doesn't, your system is not yet - recognised, and manual intervention to continue is necessary. --$ ./bootstrap-prefix.sh $EPREFIX tree -$ ./bootstrap-prefix.sh $EPREFIX portage --- Because we installed some new applications, most notably - Portage, we will instruct bash to reconsider all paths we - have: + The stage1 should have installed some basic packages + necessary to run Portage, without Portage's help. When stage1 + finished successfully, a Portage can be installed.
--$ hash -r --- tcsh users can use the rehash command. -- We continue adding some necessary tools which will slowly make - the just born Prefix less fragile. + The Portage tree installed by default is a known to be good + snapshot. This can, however, for various reasons not be + good enough, in which case the lastest snapshot available can + be used instead. Only use this when you have problems with + the known to be good snapshot. If you want to use the lastest + snapshot when bootstrapping, export LATEST_TREE_YES=1 in + your environment before running the following:
--$ emerge --oneshot sed ++$ ./bootstrap-prefix.sh $EPREFIX stage2- Next, we emerge the
-bash shell Portage heavily relies - on. + We continue with emerging some of the core toolchain packages + that make sure we compile and link everything taking the + Prefix into account. Next to that this step emerges the full + set of applications and that Portage needs and removes the + tools installed by stage1. It finishes things by getting an + up-to-date tree (removing any hacks stage2 applied to the + activated profile) and emerging everything in the +system set.-$ emerge --oneshot --nodeps bash (avoid deps that install scripts with shebang /bin/sh) --- Now, we will emerge a compiler which will use the gnu linker. - This is a requirement for many packages that follow in the - bootstrap process, in particular Perl. The packages to emerge - include the
-baselayout-prefix package. Some, if not - many, scripts and tools within a Gentoo system assume the - availability of thebaselayout-prefix package for all - communication using the Gentoo colour scheme. --$ emerge --oneshot --nodeps sys-apps/baselayout-prefix -$ emerge --oneshot --nodeps app-arch/xz-utils -$ emerge --oneshot --nodeps sys-devel/m4 -$ emerge --oneshot --nodeps sys-devel/flex -$ emerge --oneshot --nodeps sys-devel/bison -$ emerge --oneshot --nodeps sys-devel/binutils-config -$ emerge --oneshot --nodeps sys-devel/gcc-config --- Non Mac OS X users can immediately continue here with the - toolchain, and skip the bit below about Xcode. -
-Mac OS X users need to skip this step, and perform the step - below instead. --$ emerge --oneshot --nodeps sys-devel/binutils -$ emerge --oneshot --nodeps "=sys-devel/gcc-4.2*" ++$ ./bootstrap-prefix.sh $EPREFIX stage3-
-If you're not on Mac OS X, you can skip this step. - Due to different versions of Xcode, the following step - requires some close watch to the output ofgcc - --version . If the first line reports a version- 4.2.1 , the latest binutils-apple needs to be emerged, - otherwise, version should report4.0.1 and -=binutils-apple-3.2 must be emerged. --$ emerge --oneshot --nodeps "=sys-devel/binutils-apple-3.2" (for gcc 4.0.1) -$ emerge --oneshot --nodeps sys-devel/binutils-apple (for gcc 4.2.1) -$ emerge --oneshot --nodeps sys-devel/gcc-apple --- We continue getting more tools in our Prefix. We no longer - ignore dependencies all the time, so a lot of packages will be - emerged at this stage. Slowly our Prefix gets more robust as - we progress here. -
--$ emerge --oneshot sys-apps/coreutils -$ emerge --oneshot sys-apps/findutils -$ emerge --oneshot '<app-arch/tar-1.26-r1' -$ emerge --oneshot sys-apps/grep -$ emerge --oneshot sys-devel/patch -$ emerge --oneshot sys-apps/gawk -$ emerge --oneshot sys-devel/make -$ emerge --oneshot sys-libs/zlib -$ emerge --oneshot --nodeps sys-apps/file -$ emerge --oneshot --nodeps app-admin/eselect -$ emerge --oneshot app-misc/pax-utils -$ emerge --oneshot "<net-misc/wget-1.13.4-r1" (until we fix #393277) -$ emerge --oneshot virtual/os-headers --- Now we have a good bunch of programs that Portage needs, we - can replace the bootstrapped Portage by a properly installed - one, using Portage itself. Also here a few dependencies are - first emerged, such as the language Portage is written in: -
-python . We need to temporarily tell Portage that the - bootstrapped Portage can be overwritten. --$ env FEATURES="-collision-protect" emerge --oneshot sys-apps/portage --- Now we have emerged everything we bootstrapped before, we - remove the temporary directory and its use as it is no longer - necessary. + Because we installed some new applications, most notably + Portage, we will instruct bash to reconsider all paths we + have:
--$ rm -Rf $EPREFIX/tmp/* +$ hash -r-- Before we do any further merges, we are going to update our - tree. Updating the tree is done using: -
--$ emerge --sync -- If you're behind a firewall that blocks rsync traffic, you can - try to run ${EPREFIX}/usr/bin/emerge-webrsync instead. + tcsh users can use therehash command.- Before we can finish emerging the system set, we need to work - around a circular dependency of
-gcc onmpc , and -mpc ongcc . Since Mac OS X systems use -gcc-apple , this step is not necessary for them. -Mac OS X users should skip this step. --$ emerge --oneshot "<dev-libs/mpc-0.9" --- Next, we let Portage emerge all packages that complete a - system install that we eventually need to finalise this Prefix - installation. -
--$ env USE=-git emerge -u system --- Now is a good time to set the preferences for our soon to be - Prefix. This includes customisations such as general -
-USE -flags,CFLAGS andMAKEOPTS in + Now is a good time to set the preferences for your Prefix. + This includes customisations such as generalUSE -flags, +CFLAGS andMAKEOPTS in$EPREFIX/etc/portage/make.conf . Be conservative with -CFLAGS ! Note that the code below is an example, and is - meant for inspiration only. +CFLAGS ! The stage3 function already sed some moderate + defaults.-$ echo 'USE="unicode nls"' >> $EPREFIX/etc/portage/make.conf -$ echo 'CFLAGS="-O2 -pipe"' >> $EPREFIX/etc/portage/make.conf -$ echo 'CXXFLAGS="${CFLAGS}"' >> $EPREFIX/etc/portage/make.conf -You can consider adding CPU-specific tuning flags to CFLAGS . If you don't know what your CPU is, or what @@ -375,26 +251,6 @@ value breaks things.- For non Mac OS X users, it is likely that you emerged a newer - GCC than the 4.2 version we used during the bootstrap. Since - we reinstall all packages, we like to take advantage of this - newer GCC. By default, this newer GCC will not be enabled. - Check the output of
-gcc-config -l , and make sure that - the newest compiler is selected (marked by an asterisk). - Another GCC can be selected by runninggcc-config - <number> . --$ gcc-config -l - [1] i386-pc-solaris2.10-4.2.4 * - [2] i386-pc-solaris2.10-4.5.3 -$ gcc-config 2 - * Switching native-compiler to i386-pc-solaris2.10-4.5.3 ... -$ gcc-config -l - [1] i386-pc-solaris2.10-4.2.4 - [2] i386-pc-solaris2.10-4.5.3 * --Since we have everything in place for a self-catered rebuild, we can start the final stage to install the Prefix system. This final stage recompiles everything in the system, but now