mirror of
https://git.linuxfromscratch.org/lfs.git
synced 2025-06-23 13:49:37 +01:00
Internal markup reworking to fix the extraneous whitespace problem in the "tidy generated" web site pages. Essentially replace all ocurrences of <para><screen> with <screen> (and of course the matching closing tags).
git-svn-id: http://svn.linuxfromscratch.org/LFS/trunk/BOOK@2958 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689
This commit is contained in:
parent
1a7aecc611
commit
21ba4e3570
chapter01
chapter02
chapter03
chapter04
chapter05
adding-user.xmlbash-inst.xmlbinutils-pass1-inst.xmlbinutils-pass2-inst.xmlbzip2-inst.xmlchapter05.xmlcoreutils-inst.xmlcreatingstage1dir.xmldejagnu-inst.xmldiffutils-inst.xmlexpect-inst.xmlfindutils-inst.xmlgawk-inst.xmlgcc-pass1-inst.xmlgcc-pass2-inst.xmlgettext-inst.xmlglibc-inst.xmlgrep-inst.xmlgzip-inst.xmlintroduction.xmlkernelheaders-inst.xmllockingglibc.xmlmake-inst.xmlncurses-inst.xmlpatch-inst.xmlperl-inst.xmlsed-inst.xmlsetting-environment.xmltar-inst.xmltcl-inst.xmltexinfo-inst.xmlutillinux-inst.xml
chapter06
adjustingtoolchain.xmlautoconf-inst.xmlautomake-inst.xmlbash-inst.xmlbasic-net.xmlbinutils-inst.xmlbison-inst.xmlbootscripts-inst.xmlbzip2-inst.xmlchangingowner.xmlchroot.xmlconfig-glibc.xmlconfig-keyboard.xmlconfig-shadowpwd.xmlconfig-sysklogd.xmlconfig-sysvinit.xmlconfig-vim.xmlcoreutils-inst.xmlcreate-password.xmlcreate-utmp.xmlcreatefiles.xmlcreatingdirs.xmldiffutils-inst.xmle2fsprogs-inst.xmled-inst.xmlfile-inst.xmlfindutils-inst.xmlflex-inst.xmlgawk-inst.xmlgcc-2953-inst.xmlgcc-inst.xmlgettext-inst.xmlglibc-inst.xmlgrep-inst.xmlgroff-inst.xmlgrub-inst.xmlgzip-inst.xmlinetutils-inst.xmlkbd-inst.xmlkernel-inst.xmlless-inst.xmllfs-utils-inst.xmllibtool-inst.xmlm4-inst.xmlmake-inst.xmlmakedev-inst.xmlman-inst.xmlmanpages-inst.xmlmodutils-inst.xmlmountproc.xmlncurses-inst.xmlnettools-inst.xmlpatch-inst.xmlperl-inst.xmlprocinfo-inst.xmlprocps-inst.xmlpsmisc-inst.xmlpwdgroup.xmlrevisedchroot.xmlsed-inst.xmlshadowpwd-inst.xmlsysklogd-inst.xml
@ -5,7 +5,7 @@
|
||||
<para>To make things easy to follow, there are a number of conventions used
|
||||
throughout the book. Following are some examples:</para>
|
||||
|
||||
<para><screen><userinput>./configure --prefix=/usr</userinput></screen></para>
|
||||
<screen><userinput>./configure --prefix=/usr</userinput></screen>
|
||||
|
||||
<blockquote><para>This form of text is designed to be typed exactly
|
||||
as seen unless otherwise noted in the surrounding text. It is also used
|
||||
@ -31,12 +31,12 @@ what to type.</para></blockquote>
|
||||
book and to external pages such as HOWTOs, download locations and
|
||||
websites.</para></blockquote>
|
||||
|
||||
<para><screen><userinput>cat > $LFS/etc/group << "EOF"</userinput>
|
||||
<screen><userinput>cat > $LFS/etc/group << "EOF"</userinput>
|
||||
root:x:0:
|
||||
bin:x:1:
|
||||
......
|
||||
<userinput>EOF</userinput>
|
||||
</screen></para>
|
||||
</screen>
|
||||
|
||||
<blockquote><para>This type of section is used mainly when creating
|
||||
configuration files. The first command (in bold) tells the system to create
|
||||
|
@ -20,7 +20,7 @@ commands entered in a shell, or in a file edited or created.</para>
|
||||
This way $LFS can be entered literally instead of replacing it with
|
||||
/mnt/lfs. This is accomplished by running: </para>
|
||||
|
||||
<para><screen><userinput>export LFS=/mnt/lfs</userinput></screen></para>
|
||||
<screen><userinput>export LFS=/mnt/lfs</userinput></screen>
|
||||
|
||||
<para>Now, if you are told to run a command such as
|
||||
<userinput>./configure --prefix=$LFS/tools</userinput>, then you may type it
|
||||
|
@ -53,7 +53,7 @@ the ./configure script and the make run can be useful. Don't blindly
|
||||
include the whole thing but on the other hand, don't include too little.
|
||||
As an example, here is some screen output from make:</para>
|
||||
|
||||
<para><screen>gcc -DALIASPATH=\"/mnt/lfs/usr/share/locale:.\"
|
||||
<screen>gcc -DALIASPATH=\"/mnt/lfs/usr/share/locale:.\"
|
||||
-DLOCALEDIR=\"/mnt/lfs/usr/share/locale\" -DLIBDIR=\"/mnt/lfs/usr/lib\"
|
||||
-DINCLUDEDIR=\"/mnt/lfs/usr/include\" -DHAVE_CONFIG_H -I. -I.
|
||||
-g -O2 -c getopt1.c
|
||||
@ -67,7 +67,7 @@ make[2]: *** [make] Error 1
|
||||
make[2]: Leaving directory `/lfs/tmp/make-3.79.1'
|
||||
make[1]: *** [all-recursive] Error 1
|
||||
make[1]: Leaving directory `/lfs/tmp/make-3.79.1'
|
||||
make: *** [all-recursive-am] Error 2</screen></para>
|
||||
make: *** [all-recursive-am] Error 2</screen>
|
||||
|
||||
<para>In this case, many people just include the bottom section where it
|
||||
says <screen>make [2]: *** [make] Error 1</screen> and onwards. This
|
||||
|
@ -11,7 +11,7 @@ url="&blfs-root;view/stable/postlfs/filesystems.html"/>.</para>
|
||||
|
||||
<para>To create an ext2 file system on the LFS partition run the following:</para>
|
||||
|
||||
<para><screen><userinput>mke2fs /dev/xxx</userinput></screen></para>
|
||||
<screen><userinput>mke2fs /dev/xxx</userinput></screen>
|
||||
|
||||
<para>Replace <filename>xxx</filename> with the name of the LFS partition
|
||||
(something like <filename>hda5</filename>).</para>
|
||||
@ -20,7 +20,7 @@ url="&blfs-root;view/stable/postlfs/filesystems.html"/>.</para>
|
||||
swap partition too (also known as formatting, like you did above with
|
||||
<userinput>mke2fs</userinput>) by running:</para>
|
||||
|
||||
<para><screen><userinput>mkswap /dev/yyy</userinput></screen></para>
|
||||
<screen><userinput>mkswap /dev/yyy</userinput></screen>
|
||||
|
||||
<para>Replace <filename>yyy</filename> with the name of the swap
|
||||
partition.</para>
|
||||
|
@ -11,12 +11,12 @@ you choose.</para>
|
||||
<para>Choose a mount point and assign it to the LFS environment variable
|
||||
by running:</para>
|
||||
|
||||
<para><screen><userinput>export LFS=/mnt/lfs</userinput></screen></para>
|
||||
<screen><userinput>export LFS=/mnt/lfs</userinput></screen>
|
||||
|
||||
<para>Now create the mount point and mount the LFS file system by running:</para>
|
||||
|
||||
<para><screen><userinput>mkdir -p $LFS
|
||||
mount /dev/xxx $LFS</userinput></screen></para>
|
||||
<screen><userinput>mkdir -p $LFS
|
||||
mount /dev/xxx $LFS</userinput></screen>
|
||||
|
||||
<para>Replace <filename>xxx</filename> with the designation of the LFS
|
||||
partition.</para>
|
||||
@ -25,10 +25,10 @@ partition.</para>
|
||||
<filename>/</filename> and another for <filename>/usr</filename>), mount
|
||||
them like this:</para>
|
||||
|
||||
<para><screen><userinput>mkdir -p $LFS
|
||||
<screen><userinput>mkdir -p $LFS
|
||||
mount /dev/xxx $LFS
|
||||
mkdir $LFS/usr
|
||||
mount /dev/yyy $LFS/usr</userinput></screen></para>
|
||||
mount /dev/yyy $LFS/usr</userinput></screen>
|
||||
|
||||
<para>Of course, replace <filename>xxx</filename> and <filename>yyy</filename>
|
||||
with the appropriate partition names.</para>
|
||||
|
@ -40,7 +40,7 @@ during all stages of the building process.</para>
|
||||
<!--
|
||||
<para>So you may want to execute the following command:</para>
|
||||
|
||||
<para><screen><userinput>mkdir -p $LFS/usr/src/packages</userinput></screen></para>
|
||||
<screen><userinput>mkdir -p $LFS/usr/src/packages</userinput></screen>
|
||||
-->
|
||||
|
||||
<!--
|
||||
|
@ -10,20 +10,20 @@ work environment we'll create a new user <emphasis>lfs</emphasis> and
|
||||
use this one during the installation process. As <emphasis>root</emphasis>,
|
||||
issue the following commands to add the new user:</para>
|
||||
|
||||
<para><screen><userinput>useradd -s /bin/bash -m lfs
|
||||
passwd lfs</userinput></screen></para>
|
||||
<screen><userinput>useradd -s /bin/bash -m lfs
|
||||
passwd lfs</userinput></screen>
|
||||
|
||||
<para>Now grant this new user <emphasis>lfs</emphasis> full access to
|
||||
<filename class="directory">$LFS/tools</filename> by giving it ownership
|
||||
of the directory:</para>
|
||||
|
||||
<para><screen><userinput>chown lfs $LFS/tools</userinput></screen></para>
|
||||
<screen><userinput>chown lfs $LFS/tools</userinput></screen>
|
||||
|
||||
<para>Next, login as user <emphasis>lfs</emphasis>. This can be done via a
|
||||
virtual console, through a display manager, or with the following substitute
|
||||
user command:</para>
|
||||
|
||||
<para><screen><userinput>su - lfs</userinput></screen></para>
|
||||
<screen><userinput>su - lfs</userinput></screen>
|
||||
|
||||
<para>The "<userinput>-</userinput>" instructs <userinput>su</userinput> to
|
||||
start a new, clean shell.</para>
|
||||
|
@ -6,30 +6,30 @@
|
||||
<para>Bash contains several known bugs. Fix these with the following
|
||||
patch:</para>
|
||||
|
||||
<para><screen><userinput>patch -Np1 -i ../&bash-patch;</userinput></screen></para>
|
||||
<screen><userinput>patch -Np1 -i ../&bash-patch;</userinput></screen>
|
||||
|
||||
<para>Now prepare Bash for compilation:</para>
|
||||
|
||||
<para><screen><userinput>./configure --prefix=/tools</userinput></screen></para>
|
||||
<screen><userinput>./configure --prefix=/tools</userinput></screen>
|
||||
|
||||
<para>Compile the program:</para>
|
||||
|
||||
<para><screen><userinput>make</userinput></screen></para>
|
||||
<screen><userinput>make</userinput></screen>
|
||||
|
||||
<para>This package has a test suite available which can perform a number of
|
||||
checks to ensure it built correctly. Should you choose to run it, the
|
||||
following command will do so:</para>
|
||||
|
||||
<para><screen><userinput>make tests</userinput></screen></para>
|
||||
<screen><userinput>make tests</userinput></screen>
|
||||
|
||||
<para>Then install it and its documentation:</para>
|
||||
|
||||
<para><screen><userinput>make install</userinput></screen></para>
|
||||
<screen><userinput>make install</userinput></screen>
|
||||
|
||||
<para>And make a link for the programs that use <userinput>sh</userinput>
|
||||
for a shell:</para>
|
||||
|
||||
<para><screen><userinput>ln -s bash /tools/bin/sh</userinput></screen></para>
|
||||
<screen><userinput>ln -s bash /tools/bin/sh</userinput></screen>
|
||||
|
||||
</sect2>
|
||||
|
||||
|
@ -21,13 +21,13 @@ modifying them when building Binutils.</para>
|
||||
<para>The Binutils documentation recommends building Binutils outside of the
|
||||
source directory in a dedicated build directory:</para>
|
||||
|
||||
<para><screen><userinput>mkdir ../binutils-build
|
||||
cd ../binutils-build</userinput></screen></para>
|
||||
<screen><userinput>mkdir ../binutils-build
|
||||
cd ../binutils-build</userinput></screen>
|
||||
|
||||
<para>Next, prepare Binutils to be compiled:</para>
|
||||
|
||||
<para><screen><userinput>../binutils-&binutils-version;/configure \
|
||||
--prefix=/tools --disable-nls</userinput></screen></para>
|
||||
<screen><userinput>../binutils-&binutils-version;/configure \
|
||||
--prefix=/tools --disable-nls</userinput></screen>
|
||||
|
||||
<para>The meaning of the configure options:</para>
|
||||
|
||||
@ -44,8 +44,8 @@ when linking statically.</para></listitem>
|
||||
|
||||
<para>Continue with compiling the package:</para>
|
||||
|
||||
<para><screen><userinput>make configure-host
|
||||
make LDFLAGS="-all-static"</userinput></screen></para>
|
||||
<screen><userinput>make configure-host
|
||||
make LDFLAGS="-all-static"</userinput></screen>
|
||||
|
||||
<para>The meaning of the make option:</para>
|
||||
|
||||
@ -59,12 +59,12 @@ strictly speaking, <userinput>"-all-static"</userinput> is first passed to the
|
||||
|
||||
<para>And install the package:</para>
|
||||
|
||||
<para><screen><userinput>make install</userinput></screen></para>
|
||||
<screen><userinput>make install</userinput></screen>
|
||||
|
||||
<para>Now prepare the linker for the "locking in" of Glibc later on:</para>
|
||||
|
||||
<para><screen><userinput>make -C ld clean
|
||||
make -C ld LDFLAGS="-all-static" LIB_PATH=/tools/lib</userinput></screen></para>
|
||||
<screen><userinput>make -C ld clean
|
||||
make -C ld LDFLAGS="-all-static" LIB_PATH=/tools/lib</userinput></screen>
|
||||
|
||||
<para>The meaning of the make options:</para>
|
||||
|
||||
|
@ -9,13 +9,13 @@ section is considered not as important as the one we run in Chapter 6.</para>
|
||||
|
||||
<para>Create a separate build directory again:</para>
|
||||
|
||||
<para><screen><userinput>mkdir ../binutils-build
|
||||
cd ../binutils-build</userinput></screen></para>
|
||||
<screen><userinput>mkdir ../binutils-build
|
||||
cd ../binutils-build</userinput></screen>
|
||||
|
||||
<para>Now prepare Binutils to be compiled:</para>
|
||||
|
||||
<para><screen><userinput>../binutils-&binutils-version;/configure --prefix=/tools \
|
||||
--enable-shared --with-lib-path=/tools/lib</userinput></screen></para>
|
||||
<screen><userinput>../binutils-&binutils-version;/configure --prefix=/tools \
|
||||
--enable-shared --with-lib-path=/tools/lib</userinput></screen>
|
||||
|
||||
<para>The meaning of the new configure option:</para>
|
||||
|
||||
@ -31,12 +31,12 @@ variables that override the default optimization flags.</para>
|
||||
|
||||
<para>Compile the package:</para>
|
||||
|
||||
<para><screen><userinput>make </userinput></screen></para>
|
||||
<screen><userinput>make </userinput></screen>
|
||||
|
||||
<para>Test the results (there should be no unexpected failures here, expected
|
||||
failures are fine):</para>
|
||||
|
||||
<para><screen><userinput>make check</userinput></screen></para>
|
||||
<screen><userinput>make check</userinput></screen>
|
||||
|
||||
<para>Unfortunately, there is no easy way to view the test results summary like
|
||||
there was for the previous GCC package. However, if a failure occurs here, it
|
||||
@ -46,13 +46,13 @@ should be easy to spot. The output shown will contain something like:</para>
|
||||
|
||||
<para>And install the package:</para>
|
||||
|
||||
<para><screen><userinput>make install</userinput></screen></para>
|
||||
<screen><userinput>make install</userinput></screen>
|
||||
|
||||
<para>Now prepare Binutils for the re-adjusting of the toolchain in the next
|
||||
chapter:</para>
|
||||
|
||||
<para><screen><userinput>make -C ld clean
|
||||
make -C ld LIB_PATH=/usr/lib:/lib</userinput></screen></para>
|
||||
<screen><userinput>make -C ld clean
|
||||
make -C ld LIB_PATH=/usr/lib:/lib</userinput></screen>
|
||||
|
||||
<warning><para>Do not yet remove the Binutils source and build directories.
|
||||
We'll need these directories again in the next chapter in the state they are in
|
||||
|
@ -6,7 +6,7 @@
|
||||
<para>The Bzip2 package doesn't contain a <userinput>configure</userinput>
|
||||
script. Compile and install it with a straightforward:</para>
|
||||
|
||||
<para><screen><userinput>make PREFIX=/tools install</userinput></screen></para>
|
||||
<screen><userinput>make PREFIX=/tools install</userinput></screen>
|
||||
|
||||
</sect2>
|
||||
|
||||
|
@ -45,8 +45,8 @@ small, you will be glad to learn that you can throw away some unnecessary
|
||||
things. The executables and libraries you have built so far contain about 130 MB
|
||||
of unneeded debugging symbols. Remove those symbols like this:</para>
|
||||
|
||||
<para><screen><userinput>strip --strip-unneeded /tools/{,s}bin/*
|
||||
strip --strip-debug /tools/lib/*</userinput></screen></para>
|
||||
<screen><userinput>strip --strip-unneeded /tools/{,s}bin/*
|
||||
strip --strip-debug /tools/lib/*</userinput></screen>
|
||||
|
||||
<para>The first of the above commands will skip some twenty files, reporting
|
||||
that it doesn't recognize their file format. Most of them are scripts instead
|
||||
@ -59,7 +59,7 @@ destroyed and you would have to build Glibc all over again.</para>
|
||||
<para>To save another couple of megabytes, you can throw away all the
|
||||
documentation:</para>
|
||||
|
||||
<para><screen><userinput>rm -rf /tools/{,share/}{doc,info,man}</userinput></screen></para>
|
||||
<screen><userinput>rm -rf /tools/{,share/}{doc,info,man}</userinput></screen>
|
||||
|
||||
<para>You will now need to have at least 700 MB of free space on your LFS
|
||||
filesystem to be able to build and install Glibc in the next phase.</para>
|
||||
|
@ -5,17 +5,17 @@
|
||||
|
||||
<para>Prepare Coreutils to be compiled:</para>
|
||||
|
||||
<para><screen><userinput>./configure --prefix=/tools</userinput></screen></para>
|
||||
<screen><userinput>./configure --prefix=/tools</userinput></screen>
|
||||
|
||||
<para>Compile the package:</para>
|
||||
|
||||
<para><screen><userinput>make</userinput></screen></para>
|
||||
<screen><userinput>make</userinput></screen>
|
||||
|
||||
<para>This package has a test suite available which can perform a number of
|
||||
checks to ensure it built correctly. Should you choose to run it, the
|
||||
following command will do so:</para>
|
||||
|
||||
<para><screen><userinput>make RUN_EXPENSIVE_TESTS=yes check</userinput></screen></para>
|
||||
<screen><userinput>make RUN_EXPENSIVE_TESTS=yes check</userinput></screen>
|
||||
|
||||
<para>The meaning of the make option:</para>
|
||||
|
||||
@ -28,7 +28,7 @@ Linux.</para></listitem>
|
||||
|
||||
<para>And install the package:</para>
|
||||
|
||||
<para><screen><userinput>make install</userinput></screen></para>
|
||||
<screen><userinput>make install</userinput></screen>
|
||||
|
||||
</sect2>
|
||||
|
||||
|
@ -15,13 +15,13 @@ use something like "tools-for-lfs".</para>
|
||||
|
||||
<para>Create the required directory by running the following:</para>
|
||||
|
||||
<para><screen><userinput>mkdir $LFS/tools</userinput></screen></para>
|
||||
<screen><userinput>mkdir $LFS/tools</userinput></screen>
|
||||
|
||||
<para>The next step is to create a <filename>/tools</filename> symlink on
|
||||
your host system. It will point to the directory we just created on the LFS
|
||||
partition:</para>
|
||||
|
||||
<para><screen><userinput>ln -s $LFS/tools /</userinput></screen></para>
|
||||
<screen><userinput>ln -s $LFS/tools /</userinput></screen>
|
||||
|
||||
<para>This symlink enables us to compile our toolchain so that it always
|
||||
refers to <filename>/tools</filename>, meaning that the compiler, assembler
|
||||
|
@ -5,11 +5,11 @@
|
||||
|
||||
<para>Prepare DejaGnu to be compiled:</para>
|
||||
|
||||
<para><screen><userinput>./configure --prefix=/tools</userinput></screen></para>
|
||||
<screen><userinput>./configure --prefix=/tools</userinput></screen>
|
||||
|
||||
<para>Build and install the package:</para>
|
||||
|
||||
<para><screen><userinput>make install</userinput></screen></para>
|
||||
<screen><userinput>make install</userinput></screen>
|
||||
|
||||
</sect2>
|
||||
|
||||
|
@ -5,15 +5,15 @@
|
||||
|
||||
<para>Prepare Diffutils to be compiled:</para>
|
||||
|
||||
<para><screen><userinput>./configure --prefix=/tools</userinput></screen></para>
|
||||
<screen><userinput>./configure --prefix=/tools</userinput></screen>
|
||||
|
||||
<para>Compile the package:</para>
|
||||
|
||||
<para><screen><userinput>make</userinput></screen></para>
|
||||
<screen><userinput>make</userinput></screen>
|
||||
|
||||
<para>And install it:</para>
|
||||
|
||||
<para><screen><userinput>make install</userinput></screen></para>
|
||||
<screen><userinput>make install</userinput></screen>
|
||||
|
||||
</sect2>
|
||||
|
||||
|
@ -5,14 +5,14 @@
|
||||
|
||||
<para>First apply a patch:</para>
|
||||
|
||||
<para><screen><userinput>patch -Np1 -i ../&expect-patch;</userinput></screen></para>
|
||||
<screen><userinput>patch -Np1 -i ../&expect-patch;</userinput></screen>
|
||||
|
||||
<para>This fixes a bug in Expect that can result in bogus failures during the
|
||||
GCC test suite run.</para>
|
||||
|
||||
<para>Now prepare Expect to be compiled:</para>
|
||||
|
||||
<para><screen><userinput>./configure --prefix=/tools --with-tcl=/tools/lib --with-x=no</userinput></screen></para>
|
||||
<screen><userinput>./configure --prefix=/tools --with-tcl=/tools/lib --with-x=no</userinput></screen>
|
||||
|
||||
<para>The meaning of the configure options:</para>
|
||||
|
||||
@ -29,17 +29,17 @@ libraries, both of which may possibly reside on the host system.</para></listite
|
||||
|
||||
<para>Build the package:</para>
|
||||
|
||||
<para><screen><userinput>make</userinput></screen></para>
|
||||
<screen><userinput>make</userinput></screen>
|
||||
|
||||
<para>This package has a test suite available which can perform a number of
|
||||
checks to ensure it built correctly. Should you choose to run it, the
|
||||
following command will do so:</para>
|
||||
|
||||
<para><screen><userinput>make test</userinput></screen></para>
|
||||
<screen><userinput>make test</userinput></screen>
|
||||
|
||||
<para>And install:</para>
|
||||
|
||||
<para><screen><userinput>make SCRIPTS="" install</userinput></screen></para>
|
||||
<screen><userinput>make SCRIPTS="" install</userinput></screen>
|
||||
|
||||
<para>The meaning of the make option:</para>
|
||||
|
||||
|
@ -5,20 +5,20 @@
|
||||
|
||||
<para>Prepare Findutils to be compiled:</para>
|
||||
|
||||
<para><screen><userinput>./configure --prefix=/tools</userinput></screen></para>
|
||||
<screen><userinput>./configure --prefix=/tools</userinput></screen>
|
||||
|
||||
<para>Compile the package:</para>
|
||||
|
||||
<para><screen><userinput>make </userinput></screen></para>
|
||||
<screen><userinput>make </userinput></screen>
|
||||
|
||||
<para>This package has a test suite available which can perform a number of
|
||||
checks to ensure it built correctly. Should you choose to run it, the
|
||||
following command will do so:</para>
|
||||
|
||||
<para><screen><userinput>make check</userinput></screen></para>
|
||||
<screen><userinput>make check</userinput></screen>
|
||||
|
||||
<para>And install the package:</para>
|
||||
|
||||
<para><screen><userinput>make install</userinput></screen></para>
|
||||
<screen><userinput>make install</userinput></screen>
|
||||
|
||||
</sect2>
|
||||
|
@ -5,21 +5,21 @@
|
||||
|
||||
<para>Prepare Gawk to be compiled:</para>
|
||||
|
||||
<para><screen><userinput>./configure --prefix=/tools</userinput></screen></para>
|
||||
<screen><userinput>./configure --prefix=/tools</userinput></screen>
|
||||
|
||||
<para>Compile the package:</para>
|
||||
|
||||
<para><screen><userinput>make</userinput></screen></para>
|
||||
<screen><userinput>make</userinput></screen>
|
||||
|
||||
<para>This package has a test suite available which can perform a number of
|
||||
checks to ensure it built correctly. Should you choose to run it, the
|
||||
following command will do so:</para>
|
||||
|
||||
<para><screen><userinput>make check</userinput></screen></para>
|
||||
<screen><userinput>make check</userinput></screen>
|
||||
|
||||
<para>And install it:</para>
|
||||
|
||||
<para><screen><userinput>make install</userinput></screen></para>
|
||||
<screen><userinput>make install</userinput></screen>
|
||||
|
||||
</sect2>
|
||||
|
||||
|
@ -20,15 +20,15 @@ or modifying them when building GCC.</para>
|
||||
<para>The GCC documentation recommends building GCC outside of the source
|
||||
directory in a dedicated build directory:</para>
|
||||
|
||||
<para><screen><userinput>mkdir ../gcc-build
|
||||
cd ../gcc-build</userinput></screen></para>
|
||||
<screen><userinput>mkdir ../gcc-build
|
||||
cd ../gcc-build</userinput></screen>
|
||||
|
||||
<para>Prepare GCC to be compiled:</para>
|
||||
|
||||
<para><screen><userinput>../gcc-&gcc-version;/configure --prefix=/tools \
|
||||
<screen><userinput>../gcc-&gcc-version;/configure --prefix=/tools \
|
||||
--with-local-prefix=/tools \
|
||||
--disable-nls --enable-shared \
|
||||
--enable-languages=c</userinput></screen></para>
|
||||
--enable-languages=c</userinput></screen>
|
||||
|
||||
<para>The meaning of the configure options:</para>
|
||||
|
||||
@ -55,7 +55,7 @@ have downloaded and unpacked the full GCC tarball.</para></listitem>
|
||||
|
||||
<para>Continue with compiling the package:</para>
|
||||
|
||||
<para><screen><userinput>make BOOT_LDFLAGS="-static" bootstrap</userinput></screen></para>
|
||||
<screen><userinput>make BOOT_LDFLAGS="-static" bootstrap</userinput></screen>
|
||||
|
||||
<para>The meaning of the make parameters:</para>
|
||||
|
||||
@ -73,7 +73,7 @@ compiled correctly.</para></listitem>
|
||||
|
||||
<para>And install the package:</para>
|
||||
|
||||
<para><screen><userinput>make install</userinput></screen></para>
|
||||
<screen><userinput>make install</userinput></screen>
|
||||
|
||||
<para>As a finishing touch we'll create the <filename
|
||||
class="symlink">/tools/bin/cc</filename> symlink. Many programs and
|
||||
@ -83,7 +83,7 @@ Unix systems. Not everybody has the GNU C compiler installed. Simply running
|
||||
<userinput>cc</userinput> leaves the system administrator free to decide what
|
||||
C compiler to install, as long as there's a symlink pointing to it:</para>
|
||||
|
||||
<para><screen><userinput>ln -sf gcc /tools/bin/cc</userinput></screen></para>
|
||||
<screen><userinput>ln -sf gcc /tools/bin/cc</userinput></screen>
|
||||
|
||||
</sect2>
|
||||
|
||||
|
@ -12,7 +12,7 @@ implemented via the <emphasis>devpts</emphasis> file system. You can quickly
|
||||
check if your host system is set up correctly in this regard by performing a
|
||||
simple test:</para>
|
||||
|
||||
<para><screen><userinput>expect -c "spawn ls"</userinput></screen></para>
|
||||
<screen><userinput>expect -c "spawn ls"</userinput></screen>
|
||||
|
||||
<para>If you receive the message:</para>
|
||||
|
||||
@ -33,8 +33,8 @@ same working directory. They will all unfold into a single
|
||||
|
||||
<para>First correct one problem and make an essential adjustment:</para>
|
||||
|
||||
<para><screen><userinput>patch -Np1 -i ../&gcc-nofixincludes-patch;
|
||||
patch -Np1 -i ../&gcc-specs-patch;</userinput></screen></para>
|
||||
<screen><userinput>patch -Np1 -i ../&gcc-nofixincludes-patch;
|
||||
patch -Np1 -i ../&gcc-specs-patch;</userinput></screen>
|
||||
|
||||
<para>The first patch disables the GCC "fixincludes" script. We mentioned this
|
||||
briefly earlier, but a slightly more in-depth explanation of the fixincludes
|
||||
@ -60,19 +60,19 @@ successful overall build. Do not forget to apply them.</para></important>
|
||||
|
||||
<para>Create a separate build directory again:</para>
|
||||
|
||||
<para><screen><userinput>mkdir ../gcc-build
|
||||
cd ../gcc-build</userinput></screen></para>
|
||||
<screen><userinput>mkdir ../gcc-build
|
||||
cd ../gcc-build</userinput></screen>
|
||||
|
||||
<para>Before starting to build GCC, remember to unset any environment
|
||||
variables that override the default optimization flags.</para>
|
||||
|
||||
<para>Now prepare GCC to be compiled:</para>
|
||||
|
||||
<para><screen><userinput>../gcc-&gcc-version;/configure --prefix=/tools \
|
||||
<screen><userinput>../gcc-&gcc-version;/configure --prefix=/tools \
|
||||
--with-local-prefix=/tools \
|
||||
--enable-clocale=gnu --enable-shared \
|
||||
--enable-threads=posix --enable-__cxa_atexit \
|
||||
--enable-languages=c,c++</userinput></screen></para>
|
||||
--enable-languages=c,c++</userinput></screen>
|
||||
|
||||
<para>The meaning of the new configure options:</para>
|
||||
|
||||
@ -101,7 +101,7 @@ needed to ensure that both C and C++ compilers are built.</para></listitem>
|
||||
|
||||
<para>Compile the package:</para>
|
||||
|
||||
<para><screen><userinput>make</userinput></screen></para>
|
||||
<screen><userinput>make</userinput></screen>
|
||||
|
||||
<para>There is no need to use the <userinput>bootstrap</userinput> target now,
|
||||
as the compiler we're using to compile this GCC was built from the exact same
|
||||
@ -109,14 +109,14 @@ version of the GCC sources we used earlier.</para>
|
||||
|
||||
<para>Test the results:</para>
|
||||
|
||||
<para><screen><userinput>make -k check</userinput></screen></para>
|
||||
<screen><userinput>make -k check</userinput></screen>
|
||||
|
||||
<para>The <userinput>-k</userinput> flag is used to make the test suite run
|
||||
through to completion and not stop at the first failure. The GCC test suite is
|
||||
very comprehensive and is almost guaranteed to generate a few failures. To get
|
||||
a summary of the test suite results, run this:</para>
|
||||
|
||||
<para><screen><userinput>../gcc-&gcc-version;/contrib/test_summary | less</userinput></screen></para>
|
||||
<screen><userinput>../gcc-&gcc-version;/contrib/test_summary | less</userinput></screen>
|
||||
|
||||
<para>You can compare your results to those posted to the gcc-testresults
|
||||
mailing list for similar configurations to your own. For an example of how
|
||||
@ -150,7 +150,7 @@ to continue on.</para>
|
||||
|
||||
<para>And finally install the package:</para>
|
||||
|
||||
<para><screen><userinput>make install</userinput></screen></para>
|
||||
<screen><userinput>make install</userinput></screen>
|
||||
|
||||
<note><para>At this point it is strongly recommended to repeat the sanity check
|
||||
we performed earlier in the chapter. Refer back to
|
||||
|
@ -5,21 +5,21 @@
|
||||
|
||||
<para>Prepare Gettext to be compiled:</para>
|
||||
|
||||
<para><screen><userinput>./configure --prefix=/tools</userinput></screen></para>
|
||||
<screen><userinput>./configure --prefix=/tools</userinput></screen>
|
||||
|
||||
<para>Compile the programs:</para>
|
||||
|
||||
<para><screen><userinput>make </userinput></screen></para>
|
||||
<screen><userinput>make </userinput></screen>
|
||||
|
||||
<para>This package has a test suite available which can perform a number of
|
||||
checks to ensure it built correctly. Should you choose to run it, the
|
||||
following command will do so:</para>
|
||||
|
||||
<para><screen><userinput>make check</userinput></screen></para>
|
||||
<screen><userinput>make check</userinput></screen>
|
||||
|
||||
<para>Then install them and their documentation:</para>
|
||||
|
||||
<para><screen><userinput>make install</userinput></screen></para>
|
||||
<screen><userinput>make install</userinput></screen>
|
||||
|
||||
</sect2>
|
||||
|
||||
|
@ -25,27 +25,27 @@ is putting the stability of your system at risk.</para>
|
||||
complain about the absence of <filename>/tools/etc/ld.so.conf</filename>.
|
||||
Fix this annoying little error with:</para>
|
||||
|
||||
<para><screen><userinput>mkdir /tools/etc
|
||||
touch /tools/etc/ld.so.conf</userinput></screen></para>
|
||||
<screen><userinput>mkdir /tools/etc
|
||||
touch /tools/etc/ld.so.conf</userinput></screen>
|
||||
|
||||
<para>Also, Glibc has a subtle problem when compiled with GCC 3.3.1.
|
||||
Apply the following patch to fix this:</para>
|
||||
|
||||
<para><screen><userinput>patch -Np1 -i ../&glibc-sscanf-patch;</userinput></screen></para>
|
||||
<screen><userinput>patch -Np1 -i ../&glibc-sscanf-patch;</userinput></screen>
|
||||
|
||||
<para>The Glibc documentation recommends building Glibc outside of the source
|
||||
directory in a dedicated build directory:</para>
|
||||
|
||||
<para><screen><userinput>mkdir ../glibc-build
|
||||
cd ../glibc-build</userinput></screen></para>
|
||||
<screen><userinput>mkdir ../glibc-build
|
||||
cd ../glibc-build</userinput></screen>
|
||||
|
||||
<para>Next, prepare Glibc to be compiled:</para>
|
||||
|
||||
<para><screen><userinput>../glibc-&glibc-version;/configure --prefix=/tools \
|
||||
<screen><userinput>../glibc-&glibc-version;/configure --prefix=/tools \
|
||||
--disable-profile --enable-add-ons \
|
||||
--with-headers=/tools/include \
|
||||
--with-binutils=/tools/bin \
|
||||
--without-gd</userinput></screen></para>
|
||||
--without-gd</userinput></screen>
|
||||
|
||||
<para>The meaning of the configure options:</para>
|
||||
|
||||
@ -82,11 +82,11 @@ running the test suite.</para>
|
||||
|
||||
<para>Compile the package:</para>
|
||||
|
||||
<para><screen><userinput>make</userinput></screen></para>
|
||||
<screen><userinput>make</userinput></screen>
|
||||
|
||||
<para>Run the test suite:</para>
|
||||
|
||||
<para><screen><userinput>make check</userinput></screen></para>
|
||||
<screen><userinput>make check</userinput></screen>
|
||||
|
||||
<para>The Glibc test suite is highly dependent on certain functions of your host
|
||||
system, in particular the kernel. Additionally, here in Chapter 5, some tests
|
||||
@ -129,7 +129,7 @@ of failures.</para>
|
||||
|
||||
<para>Now install the package:</para>
|
||||
|
||||
<para><screen><userinput>make install</userinput></screen></para>
|
||||
<screen><userinput>make install</userinput></screen>
|
||||
|
||||
<para>Different countries and cultures have varying conventions for how to
|
||||
communicate. These conventions range from very simple ones, such as the format
|
||||
@ -137,7 +137,7 @@ for representing dates and times, to very complex ones, such as the language
|
||||
spoken. This "internationalization" works by means of locales. We'll install the
|
||||
Glibc locales now:</para>
|
||||
|
||||
<para><screen><userinput>make localedata/install-locales</userinput></screen></para>
|
||||
<screen><userinput>make localedata/install-locales</userinput></screen>
|
||||
|
||||
<para>An alternative to running the previous command is to install only
|
||||
those locales which you need or want. This can be achieved by using the
|
||||
@ -149,7 +149,7 @@ to pass correctly, in particular, the libstdc++ tests from GCC. The following
|
||||
instructions, instead of the install-locales command above, will install
|
||||
the minimum set of locales necessary for the tests to run successfully:</para>
|
||||
|
||||
<para><screen><userinput>mkdir -p /tools/lib/locale
|
||||
<screen><userinput>mkdir -p /tools/lib/locale
|
||||
localedef -i de_DE -f ISO-8859-1 de_DE
|
||||
localedef -i de_DE@euro -f ISO-8859-15 de_DE@euro
|
||||
localedef -i en_HK -f ISO-8859-1 en_HK
|
||||
@ -159,7 +159,7 @@ localedef -i es_MX -f ISO-8859-1 es_MX
|
||||
localedef -i fr_FR -f ISO-8859-1 fr_FR
|
||||
localedef -i fr_FR@euro -f ISO-8859-15 fr_FR@euro
|
||||
localedef -i it_IT -f ISO-8859-1 it_IT
|
||||
localedef -i ja_JP -f EUC-JP ja_JP</userinput></screen></para>
|
||||
localedef -i ja_JP -f EUC-JP ja_JP</userinput></screen>
|
||||
|
||||
</sect2>
|
||||
|
||||
|
@ -5,8 +5,8 @@
|
||||
|
||||
<para>Prepare Grep to be compiled:</para>
|
||||
|
||||
<para><screen><userinput>./configure --prefix=/tools \
|
||||
--disable-perl-regexp --with-included-regex</userinput></screen></para>
|
||||
<screen><userinput>./configure --prefix=/tools \
|
||||
--disable-perl-regexp --with-included-regex</userinput></screen>
|
||||
|
||||
<para>The meaning of the configure options:</para>
|
||||
|
||||
@ -22,17 +22,17 @@ the code from Glibc, which is known to be slightly buggy.</para></listitem>
|
||||
|
||||
<para>Compile the programs:</para>
|
||||
|
||||
<para><screen><userinput>make </userinput></screen></para>
|
||||
<screen><userinput>make </userinput></screen>
|
||||
|
||||
<para>This package has a test suite available which can perform a number of
|
||||
checks to ensure it built correctly. Should you choose to run it, the
|
||||
following command will do so:</para>
|
||||
|
||||
<para><screen><userinput>make check</userinput></screen></para>
|
||||
<screen><userinput>make check</userinput></screen>
|
||||
|
||||
<para>Then install them and their documentation:</para>
|
||||
|
||||
<para><screen><userinput>make install</userinput></screen></para>
|
||||
<screen><userinput>make install</userinput></screen>
|
||||
|
||||
</sect2>
|
||||
|
||||
|
@ -5,15 +5,15 @@
|
||||
|
||||
<para>Prepare Gzip to be compiled:</para>
|
||||
|
||||
<para><screen><userinput>./configure --prefix=/tools</userinput></screen></para>
|
||||
<screen><userinput>./configure --prefix=/tools</userinput></screen>
|
||||
|
||||
<para>Compile the package:</para>
|
||||
|
||||
<para><screen><userinput>make</userinput></screen></para>
|
||||
<screen><userinput>make</userinput></screen>
|
||||
|
||||
<para>And install it:</para>
|
||||
|
||||
<para><screen><userinput>make install</userinput></screen></para>
|
||||
<screen><userinput>make install</userinput></screen>
|
||||
|
||||
</sect2>
|
||||
|
||||
|
@ -43,7 +43,7 @@ sake and to save space.</para>
|
||||
<para>Before continuing, make sure the LFS environment variable is set up
|
||||
properly by executing the following:</para>
|
||||
|
||||
<para><screen><userinput>echo $LFS</userinput></screen></para>
|
||||
<screen><userinput>echo $LFS</userinput></screen>
|
||||
|
||||
<para>Make sure the output shows the path to your LFS partition's mount
|
||||
point, which is <filename class="directory">/mnt/lfs</filename> if you
|
||||
|
@ -9,7 +9,7 @@ place where <userinput>gcc</userinput> can later find them.</para>
|
||||
|
||||
<para>Prepare for the header installation with:</para>
|
||||
|
||||
<para><screen><userinput>make mrproper</userinput></screen></para>
|
||||
<screen><userinput>make mrproper</userinput></screen>
|
||||
|
||||
<para>This ensures that the kernel tree is absolutely clean. The kernel team
|
||||
recommends that this command be issued prior to <emphasis>each</emphasis> kernel
|
||||
@ -18,29 +18,29 @@ untarring.</para>
|
||||
|
||||
<para>Create the <filename>include/linux/version.h</filename> file:</para>
|
||||
|
||||
<para><screen><userinput>make include/linux/version.h</userinput></screen></para>
|
||||
<screen><userinput>make include/linux/version.h</userinput></screen>
|
||||
|
||||
<para>Create the platform-specific <filename>include/asm</filename>
|
||||
symlink:</para>
|
||||
|
||||
<para><screen><userinput>make symlinks</userinput></screen></para>
|
||||
<screen><userinput>make symlinks</userinput></screen>
|
||||
|
||||
<para>Install the platform-specific header files:</para>
|
||||
|
||||
<para><screen><userinput>mkdir /tools/include/asm
|
||||
<screen><userinput>mkdir /tools/include/asm
|
||||
cp include/asm/* /tools/include/asm
|
||||
cp -R include/asm-generic /tools/include</userinput></screen></para>
|
||||
cp -R include/asm-generic /tools/include</userinput></screen>
|
||||
|
||||
<para>Install the cross-platform kernel header files:</para>
|
||||
|
||||
<para><screen><userinput>cp -R include/linux /tools/include</userinput></screen></para>
|
||||
<screen><userinput>cp -R include/linux /tools/include</userinput></screen>
|
||||
|
||||
<para>There are a few kernel header files which make use of the
|
||||
<filename>autoconf.h</filename> header file. Since we do not yet configure the
|
||||
kernel, we need to create this file ourselves in order to avoid compilation
|
||||
failures. Create an empty <filename>autoconf.h</filename> file:</para>
|
||||
|
||||
<para><screen><userinput>touch /tools/include/linux/autoconf.h</userinput></screen></para>
|
||||
<screen><userinput>touch /tools/include/linux/autoconf.h</userinput></screen>
|
||||
|
||||
</sect2>
|
||||
|
||||
|
@ -10,7 +10,7 @@ specs file.</para>
|
||||
<para>First install the adjusted linker by running the following from within
|
||||
the <filename class="directory">binutils-build</filename> directory:</para>
|
||||
|
||||
<para><screen><userinput>make -C ld install</userinput></screen></para>
|
||||
<screen><userinput>make -C ld install</userinput></screen>
|
||||
|
||||
<para>The linker was adjusted a little while back, at the end of the first
|
||||
pass of Binutils. From this point onwards everything will link <emphasis>only
|
||||
@ -22,11 +22,11 @@ Binutils build and source directories.</para>
|
||||
<para>The next thing to do is to amend our GCC specs file so that it points
|
||||
to the new dynamic linker. A simple sed will accomplish this:</para>
|
||||
|
||||
<para><screen><userinput>SPECFILE=/tools/lib/gcc-lib/*/*/specs
|
||||
<screen><userinput>SPECFILE=/tools/lib/gcc-lib/*/*/specs
|
||||
sed -e 's@/lib/ld-linux.so.2@/tools/lib/ld-linux.so.2@g' \
|
||||
$SPECFILE > tempspecfile
|
||||
mv tempspecfile $SPECFILE
|
||||
unset SPECFILE</userinput></screen></para>
|
||||
unset SPECFILE</userinput></screen>
|
||||
|
||||
<para>We recommend that you cut-and-paste the above rather than try and type it
|
||||
all in. Or you can edit the specs file by hand if you want to: just replace any
|
||||
@ -44,15 +44,15 @@ because of GCC's "fixincludes" process which runs as part of the GCC build.
|
||||
We'll explain more about this further on in this chapter. For now, run the
|
||||
following commands to eliminate this possibility:</para>
|
||||
|
||||
<para><screen><userinput>rm -f /tools/lib/gcc-lib/*/*/include/{pthread.h,bits/sigthread.h}</userinput></screen></para>
|
||||
<screen><userinput>rm -f /tools/lib/gcc-lib/*/*/include/{pthread.h,bits/sigthread.h}</userinput></screen>
|
||||
|
||||
<caution><para>It is imperative at this point to stop and ensure that the basic
|
||||
functions (compiling and linking) of the new toolchain are working as expected.
|
||||
For this we are going to perform a simple sanity check:</para>
|
||||
|
||||
<para><screen><userinput>echo 'main(){}' > dummy.c
|
||||
<screen><userinput>echo 'main(){}' > dummy.c
|
||||
gcc dummy.c
|
||||
readelf -l a.out | grep ': /tools'</userinput></screen></para>
|
||||
readelf -l a.out | grep ': /tools'</userinput></screen>
|
||||
|
||||
<para>If everything is working correctly, there should be no errors, and the
|
||||
output of the last command will be:</para>
|
||||
@ -71,7 +71,7 @@ different.</para>
|
||||
|
||||
<para>Once you are satisfied that all is well, clean up the test files:</para>
|
||||
|
||||
<para><screen><userinput>rm dummy.c a.out</userinput></screen></para>
|
||||
<screen><userinput>rm dummy.c a.out</userinput></screen>
|
||||
</caution>
|
||||
|
||||
<para>This completes the installation of the self-contained toolchain, and it
|
||||
|
@ -5,21 +5,21 @@
|
||||
|
||||
<para>Prepare Make to be compiled:</para>
|
||||
|
||||
<para><screen><userinput>./configure --prefix=/tools</userinput></screen></para>
|
||||
<screen><userinput>./configure --prefix=/tools</userinput></screen>
|
||||
|
||||
<para>Compile the program:</para>
|
||||
|
||||
<para><screen><userinput>make </userinput></screen></para>
|
||||
<screen><userinput>make </userinput></screen>
|
||||
|
||||
<para>This package has a test suite available which can perform a number of
|
||||
checks to ensure it built correctly. Should you choose to run it, the
|
||||
following command will do so:</para>
|
||||
|
||||
<para><screen><userinput>make check</userinput></screen></para>
|
||||
<screen><userinput>make check</userinput></screen>
|
||||
|
||||
<para>Then install it and its documentation:</para>
|
||||
|
||||
<para><screen><userinput>make install</userinput></screen></para>
|
||||
<screen><userinput>make install</userinput></screen>
|
||||
|
||||
</sect2>
|
||||
|
||||
|
@ -5,8 +5,8 @@
|
||||
|
||||
<para>Fix two minor things:</para>
|
||||
|
||||
<para><screen><userinput>patch -Np1 -i ../&ncurses-etip-patch;
|
||||
patch -Np1 -i ../&ncurses-vsscanf-patch;</userinput></screen></para>
|
||||
<screen><userinput>patch -Np1 -i ../&ncurses-etip-patch;
|
||||
patch -Np1 -i ../&ncurses-vsscanf-patch;</userinput></screen>
|
||||
|
||||
<para>The first patch corrects the <filename>etip.h</filename> header file, and
|
||||
the second patch prevents some compiler warnings being issued on the use of
|
||||
@ -14,8 +14,8 @@ deprecated headers.</para>
|
||||
|
||||
<para>Now prepare Ncurses to be compiled:</para>
|
||||
|
||||
<para><screen><userinput>./configure --prefix=/tools --with-shared \
|
||||
--without-debug --without-ada --enable-overwrite</userinput></screen></para>
|
||||
<screen><userinput>./configure --prefix=/tools --with-shared \
|
||||
--without-debug --without-ada --enable-overwrite</userinput></screen>
|
||||
|
||||
<para>The meaning of the configure options:</para>
|
||||
|
||||
@ -33,11 +33,11 @@ ensure that other packages can find the Ncurses headers successfully.</para>
|
||||
|
||||
<para>Compile the programs and libraries:</para>
|
||||
|
||||
<para><screen><userinput>make </userinput></screen></para>
|
||||
<screen><userinput>make </userinput></screen>
|
||||
|
||||
<para>Then install them and their documentation:</para>
|
||||
|
||||
<para><screen><userinput>make install</userinput></screen></para>
|
||||
<screen><userinput>make install</userinput></screen>
|
||||
|
||||
</sect2>
|
||||
|
||||
|
@ -5,18 +5,18 @@
|
||||
|
||||
<para>Prepare Patch to be compiled:</para>
|
||||
|
||||
<para><screen><userinput>CPPFLAGS=-D_GNU_SOURCE ./configure --prefix=/tools</userinput></screen></para>
|
||||
<screen><userinput>CPPFLAGS=-D_GNU_SOURCE ./configure --prefix=/tools</userinput></screen>
|
||||
|
||||
<para>The preprocessor flag <userinput>-D_GNU_SOURCE</userinput> is only needed
|
||||
on the PowerPC platform. On other architectures you can leave it out.</para>
|
||||
|
||||
<para>Compile the program:</para>
|
||||
|
||||
<para><screen><userinput>make </userinput></screen></para>
|
||||
<screen><userinput>make </userinput></screen>
|
||||
|
||||
<para>Then install it and its documentation:</para>
|
||||
|
||||
<para><screen><userinput>make install</userinput></screen></para>
|
||||
<screen><userinput>make install</userinput></screen>
|
||||
|
||||
</sect2>
|
||||
|
||||
|
@ -4,26 +4,26 @@
|
||||
|
||||
<para>First adapt some hard-wired paths to the C library:</para>
|
||||
|
||||
<para><screen><userinput>patch -Np1 -i ../&perl-libc-patch;</userinput></screen></para>
|
||||
<screen><userinput>patch -Np1 -i ../&perl-libc-patch;</userinput></screen>
|
||||
|
||||
<para>And make sure some static extensions get built:</para>
|
||||
|
||||
<para><screen><userinput>chmod u+w hints/linux.sh
|
||||
echo 'static_ext="IO re Fcntl"' >> hints/linux.sh</userinput></screen></para>
|
||||
<screen><userinput>chmod u+w hints/linux.sh
|
||||
echo 'static_ext="IO re Fcntl"' >> hints/linux.sh</userinput></screen>
|
||||
|
||||
<para>Now prepare Perl for compilation:</para>
|
||||
|
||||
<para><screen><userinput>./configure.gnu --prefix=/tools</userinput></screen></para>
|
||||
<screen><userinput>./configure.gnu --prefix=/tools</userinput></screen>
|
||||
|
||||
<para>Compile only the required tools:</para>
|
||||
|
||||
<para><screen><userinput>make perl utilities</userinput></screen></para>
|
||||
<screen><userinput>make perl utilities</userinput></screen>
|
||||
|
||||
<para>Then copy these tools and their libraries:</para>
|
||||
|
||||
<para><screen><userinput>cp perl pod/pod2man /tools/bin
|
||||
<screen><userinput>cp perl pod/pod2man /tools/bin
|
||||
mkdir -p /tools/lib/perl5/5.8.0
|
||||
cp -R lib/* /tools/lib/perl5/5.8.0</userinput></screen></para>
|
||||
cp -R lib/* /tools/lib/perl5/5.8.0</userinput></screen>
|
||||
|
||||
</sect2>
|
||||
|
||||
|
@ -5,21 +5,21 @@
|
||||
|
||||
<para>Prepare Sed to be compiled:</para>
|
||||
|
||||
<para><screen><userinput>./configure --prefix=/tools</userinput></screen></para>
|
||||
<screen><userinput>./configure --prefix=/tools</userinput></screen>
|
||||
|
||||
<para>Compile the program:</para>
|
||||
|
||||
<para><screen><userinput>make </userinput></screen></para>
|
||||
<screen><userinput>make </userinput></screen>
|
||||
|
||||
<para>This package has a test suite available which can perform a number of
|
||||
checks to ensure it built correctly. Should you choose to run it, the
|
||||
following command will do so:</para>
|
||||
|
||||
<para><screen><userinput>make check</userinput></screen></para>
|
||||
<screen><userinput>make check</userinput></screen>
|
||||
|
||||
<para>Then install it and its documentation:</para>
|
||||
|
||||
<para><screen><userinput>make install</userinput></screen></para>
|
||||
<screen><userinput>make install</userinput></screen>
|
||||
|
||||
</sect2>
|
||||
|
||||
|
@ -5,7 +5,7 @@
|
||||
<para>While logged in as user <emphasis>lfs</emphasis>, issue the
|
||||
following commands to set up a good work environment:</para>
|
||||
|
||||
<para><screen><userinput>cat > ~/.bash_profile << "EOF"</userinput>
|
||||
<screen><userinput>cat > ~/.bash_profile << "EOF"</userinput>
|
||||
set +h
|
||||
umask 022
|
||||
LFS=/mnt/lfs
|
||||
@ -15,7 +15,7 @@ export LFS LC_ALL PATH
|
||||
unset CC CXX CPP LD_LIBRARY_PATH LD_PRELOAD
|
||||
<userinput>EOF
|
||||
|
||||
source ~/.bash_profile</userinput></screen></para>
|
||||
source ~/.bash_profile</userinput></screen>
|
||||
|
||||
<para>The <userinput>set +h</userinput> command turns off
|
||||
<userinput>bash</userinput>'s hash function. Normally hashing is a useful
|
||||
|
@ -5,21 +5,21 @@
|
||||
|
||||
<para>Prepare Tar to be compiled:</para>
|
||||
|
||||
<para><screen><userinput>./configure --prefix=/tools</userinput></screen></para>
|
||||
<screen><userinput>./configure --prefix=/tools</userinput></screen>
|
||||
|
||||
<para>Compile the programs:</para>
|
||||
|
||||
<para><screen><userinput>make </userinput></screen></para>
|
||||
<screen><userinput>make </userinput></screen>
|
||||
|
||||
<para>This package has a test suite available which can perform a number of
|
||||
checks to ensure it built correctly. Should you choose to run it, the
|
||||
following command will do so:</para>
|
||||
|
||||
<para><screen><userinput>make check</userinput></screen></para>
|
||||
<screen><userinput>make check</userinput></screen>
|
||||
|
||||
<para>Then install them and their documentation:</para>
|
||||
|
||||
<para><screen><userinput>make install</userinput></screen></para>
|
||||
<screen><userinput>make install</userinput></screen>
|
||||
|
||||
</sect2>
|
||||
|
||||
|
@ -10,18 +10,18 @@ to know that our most important tools are working properly.</para>
|
||||
|
||||
<para>Prepare Tcl to be compiled:</para>
|
||||
|
||||
<para><screen><userinput>cd unix
|
||||
./configure --prefix=/tools</userinput></screen></para>
|
||||
<screen><userinput>cd unix
|
||||
./configure --prefix=/tools</userinput></screen>
|
||||
|
||||
<para>Build the package:</para>
|
||||
|
||||
<para><screen><userinput>make</userinput></screen></para>
|
||||
<screen><userinput>make</userinput></screen>
|
||||
|
||||
<para>This package has a test suite available which can perform a number of
|
||||
checks to ensure it built correctly. Should you choose to run it, the
|
||||
following command will do so:</para>
|
||||
|
||||
<para><screen><userinput>TZ=UTC make test</userinput></screen></para>
|
||||
<screen><userinput>TZ=UTC make test</userinput></screen>
|
||||
|
||||
<para>The meaning of the make option:</para>
|
||||
|
||||
@ -40,10 +40,10 @@ throughout the book.</para>
|
||||
|
||||
<para>Install the package:</para>
|
||||
|
||||
<para><screen><userinput>make install</userinput></screen></para>
|
||||
<screen><userinput>make install</userinput></screen>
|
||||
|
||||
<para>Make a necessary symbolic link:</para>
|
||||
<para><screen><userinput>ln -s tclsh8.4 /tools/bin/tclsh</userinput></screen></para>
|
||||
<screen><userinput>ln -s tclsh8.4 /tools/bin/tclsh</userinput></screen>
|
||||
|
||||
<caution><para>Do not remove the
|
||||
<filename>tcl&tcl-version;</filename> source directory yet, as the next package
|
||||
|
@ -5,21 +5,21 @@
|
||||
|
||||
<para>Prepare Texinfo to be compiled:</para>
|
||||
|
||||
<para><screen><userinput>./configure --prefix=/tools</userinput></screen></para>
|
||||
<screen><userinput>./configure --prefix=/tools</userinput></screen>
|
||||
|
||||
<para>Compile the programs:</para>
|
||||
|
||||
<para><screen><userinput>make </userinput></screen></para>
|
||||
<screen><userinput>make </userinput></screen>
|
||||
|
||||
<para>This package has a test suite available which can perform a number of
|
||||
checks to ensure it built correctly. Should you choose to run it, the
|
||||
following command will do so:</para>
|
||||
|
||||
<para><screen><userinput>make check</userinput></screen></para>
|
||||
<screen><userinput>make check</userinput></screen>
|
||||
|
||||
<para>Then install them and their documentation:</para>
|
||||
|
||||
<para><screen><userinput>make install</userinput></screen></para>
|
||||
<screen><userinput>make install</userinput></screen>
|
||||
|
||||
</sect2>
|
||||
|
||||
|
@ -6,26 +6,26 @@
|
||||
<para>Util-linux doesn't use the freshly installed headers and libraries from
|
||||
the /tools directory. This is fixed by altering the configure script:</para>
|
||||
|
||||
<para><screen><userinput>cp configure configure.backup
|
||||
sed "s@/usr/include@/tools/include@g" configure.backup > configure</userinput> </screen></para>
|
||||
<screen><userinput>cp configure configure.backup
|
||||
sed "s@/usr/include@/tools/include@g" configure.backup > configure</userinput> </screen>
|
||||
|
||||
<para>Prepare Util-linux for compilation:</para>
|
||||
|
||||
<para><screen><userinput>./configure</userinput></screen></para>
|
||||
<screen><userinput>./configure</userinput></screen>
|
||||
|
||||
<para>Compile some support routines:</para>
|
||||
|
||||
<para><screen><userinput>make -C lib</userinput></screen></para>
|
||||
<screen><userinput>make -C lib</userinput></screen>
|
||||
|
||||
<para>And, since you'll need only a couple of the utilities contained in this
|
||||
package, build just those:</para>
|
||||
|
||||
<para><screen><userinput>make -C mount mount umount
|
||||
make -C text-utils more</userinput></screen></para>
|
||||
<screen><userinput>make -C mount mount umount
|
||||
make -C text-utils more</userinput></screen>
|
||||
|
||||
<para>Now copy these programs to the temporary tools directory:</para>
|
||||
|
||||
<para><screen><userinput>cp mount/{,u}mount text-utils/more /tools/bin</userinput></screen></para>
|
||||
<screen><userinput>cp mount/{,u}mount text-utils/more /tools/bin</userinput></screen>
|
||||
|
||||
</sect2>
|
||||
|
||||
|
@ -12,7 +12,7 @@ source and build directories from the second pass over Binutils. Install the
|
||||
adjusted linker by running the following from within the
|
||||
<filename class="directory">binutils-build</filename> directory:</para>
|
||||
|
||||
<para><screen><userinput>make -C ld INSTALL=/tools/bin/install install</userinput></screen></para>
|
||||
<screen><userinput>make -C ld INSTALL=/tools/bin/install install</userinput></screen>
|
||||
|
||||
<note><para>If you somehow missed the earlier warning to retain the Binutils
|
||||
source and build directories from the second pass in Chapter 5 or otherwise
|
||||
@ -40,11 +40,11 @@ problem here. The above command takes care of this also.</para>
|
||||
to the new dynamic linker. Just like earlier on, we use a sed to accomplish
|
||||
this:</para>
|
||||
|
||||
<para><screen><userinput>SPECFILE=/tools/lib/gcc-lib/*/*/specs
|
||||
<screen><userinput>SPECFILE=/tools/lib/gcc-lib/*/*/specs
|
||||
sed -e 's@/tools/lib/ld-linux.so.2@/lib/ld-linux.so.2@g' \
|
||||
$SPECFILE > newspecfile
|
||||
mv newspecfile $SPECFILE
|
||||
unset SPECFILE</userinput></screen></para>
|
||||
unset SPECFILE</userinput></screen>
|
||||
|
||||
<para>Again, cutting and pasting the above is recommended. And just like
|
||||
before, it is a good idea to check the specs file to ensure the intended
|
||||
@ -60,9 +60,9 @@ name of your platform's dynamic linker in the above commands. Refer back to
|
||||
basic functions (compiling and linking) of the adjusted toolchain are working
|
||||
as expected. For this we are going to perform a simple sanity check:</para>
|
||||
|
||||
<para><screen><userinput>echo 'main(){}' > dummy.c
|
||||
<screen><userinput>echo 'main(){}' > dummy.c
|
||||
gcc dummy.c
|
||||
readelf -l a.out | grep ': /lib'</userinput></screen></para>
|
||||
readelf -l a.out | grep ': /lib'</userinput></screen>
|
||||
|
||||
<para>If everything is working correctly, there should be no errors, and the
|
||||
output of the last command will be:</para>
|
||||
@ -81,7 +81,7 @@ different.</para>
|
||||
|
||||
<para>Once you are satisfied that all is well, clean up the test files:</para>
|
||||
|
||||
<para><screen><userinput>rm dummy.c a.out</userinput></screen></para>
|
||||
<screen><userinput>rm dummy.c a.out</userinput></screen>
|
||||
</caution>
|
||||
|
||||
</sect1>
|
||||
|
@ -4,21 +4,21 @@
|
||||
|
||||
<para>Prepare Autoconf for compilation:</para>
|
||||
|
||||
<para><screen><userinput>./configure --prefix=/usr</userinput></screen></para>
|
||||
<screen><userinput>./configure --prefix=/usr</userinput></screen>
|
||||
|
||||
<para>Compile the package:</para>
|
||||
|
||||
<para><screen><userinput>make</userinput></screen></para>
|
||||
<screen><userinput>make</userinput></screen>
|
||||
|
||||
<para>This package has a test suite available which can perform a number of
|
||||
checks to ensure it built correctly. Should you choose to run it, the
|
||||
following command will do so:</para>
|
||||
|
||||
<para><screen><userinput>make check</userinput></screen></para>
|
||||
<screen><userinput>make check</userinput></screen>
|
||||
|
||||
<para>And install the package:</para>
|
||||
|
||||
<para><screen><userinput>make install</userinput></screen></para>
|
||||
<screen><userinput>make install</userinput></screen>
|
||||
|
||||
</sect2>
|
||||
|
||||
|
@ -5,24 +5,24 @@
|
||||
|
||||
<para>Prepare Automake for compilation:</para>
|
||||
|
||||
<para><screen><userinput>./configure --prefix=/usr</userinput></screen></para>
|
||||
<screen><userinput>./configure --prefix=/usr</userinput></screen>
|
||||
|
||||
<para>Compile the package:</para>
|
||||
|
||||
<para><screen><userinput>make</userinput></screen></para>
|
||||
<screen><userinput>make</userinput></screen>
|
||||
|
||||
<para>This package has a test suite available which can perform a number of
|
||||
checks to ensure it built correctly. Should you choose to run it, the
|
||||
following command will do so:</para>
|
||||
|
||||
<para><screen><userinput>make check</userinput></screen></para>
|
||||
<screen><userinput>make check</userinput></screen>
|
||||
|
||||
<para>Install the package:</para>
|
||||
|
||||
<para><screen><userinput>make install</userinput></screen></para>
|
||||
<screen><userinput>make install</userinput></screen>
|
||||
|
||||
<para>And create a necessary symbolic link:</para>
|
||||
|
||||
<para><screen><userinput>ln -s automake-1.7 /usr/share/automake</userinput></screen></para>
|
||||
<screen><userinput>ln -s automake-1.7 /usr/share/automake</userinput></screen>
|
||||
|
||||
</sect2>
|
||||
|
@ -7,28 +7,28 @@
|
||||
way it is expected at times. Fix this behaviour with the following
|
||||
patch:</para>
|
||||
|
||||
<para><screen><userinput>patch -Np1 -i ../&bash-patch;</userinput></screen></para>
|
||||
<screen><userinput>patch -Np1 -i ../&bash-patch;</userinput></screen>
|
||||
|
||||
<para>Prepare Bash for compilation:</para>
|
||||
|
||||
<para><screen><userinput>./configure --prefix=/usr --bindir=/bin</userinput></screen></para>
|
||||
<screen><userinput>./configure --prefix=/usr --bindir=/bin</userinput></screen>
|
||||
|
||||
<para>Compile the package:</para>
|
||||
|
||||
<para><screen><userinput>make</userinput></screen></para>
|
||||
<screen><userinput>make</userinput></screen>
|
||||
|
||||
<para>This package has a test suite available which can perform a number of
|
||||
checks to ensure it built correctly. Should you choose to run it, the
|
||||
following command will do so:</para>
|
||||
|
||||
<para><screen><userinput>make tests</userinput></screen></para>
|
||||
<screen><userinput>make tests</userinput></screen>
|
||||
|
||||
<para>Install the package:</para>
|
||||
|
||||
<para><screen><userinput>make install</userinput></screen></para>
|
||||
<screen><userinput>make install</userinput></screen>
|
||||
|
||||
<para>And reload the newly compiled <userinput>bash</userinput> program:</para>
|
||||
|
||||
<para><screen><userinput>exec /bin/bash --login +h</userinput></screen></para>
|
||||
<screen><userinput>exec /bin/bash --login +h</userinput></screen>
|
||||
|
||||
</sect2>
|
||||
|
@ -14,7 +14,7 @@ contains information allowing resolution of host names to IP addresses.
|
||||
Create a very basic one (we'll make a better one later, but Perl needs it now
|
||||
for doing some tests) with the following command:</para>
|
||||
|
||||
<para><screen><userinput>echo "127.0.0.1 $(hostname) localhost" > /etc/hosts</userinput></screen></para>
|
||||
<screen><userinput>echo "127.0.0.1 $(hostname) localhost" > /etc/hosts</userinput></screen>
|
||||
|
||||
<para>Now unpack the Lfs-Utils tarball again, as we're going to copy two
|
||||
necessary files from it. One is <filename>/etc/services</filename>, which is
|
||||
@ -23,7 +23,7 @@ used to resolve service numbers to human-readable names, and the other is
|
||||
Copy them with the following command after you have entered the Lfs-Utils
|
||||
directory:</para>
|
||||
|
||||
<para><screen><userinput>cp -f etc/{services,protocols} /etc</userinput></screen></para>
|
||||
<screen><userinput>cp -f etc/{services,protocols} /etc</userinput></screen>
|
||||
|
||||
</sect1>
|
||||
|
||||
|
@ -6,7 +6,7 @@
|
||||
working properly inside the chroot environment. We will again quickly check that
|
||||
everything is set up correctly by performing a simple test:</para>
|
||||
|
||||
<para><screen><userinput>expect -c "spawn ls"</userinput></screen></para>
|
||||
<screen><userinput>expect -c "spawn ls"</userinput></screen>
|
||||
|
||||
<para>If you receive the message:</para>
|
||||
|
||||
@ -31,17 +31,17 @@ or modifying them when building Binutils.</para>
|
||||
<para>The Binutils documentation recommends building Binutils outside of the
|
||||
source directory in a dedicated build directory:</para>
|
||||
|
||||
<para><screen><userinput>mkdir ../binutils-build
|
||||
cd ../binutils-build</userinput></screen></para>
|
||||
<screen><userinput>mkdir ../binutils-build
|
||||
cd ../binutils-build</userinput></screen>
|
||||
|
||||
<para>Now prepare Binutils for compilation:</para>
|
||||
|
||||
<para><screen><userinput>../binutils-&binutils-version;/configure \
|
||||
--prefix=/usr --enable-shared</userinput></screen></para>
|
||||
<screen><userinput>../binutils-&binutils-version;/configure \
|
||||
--prefix=/usr --enable-shared</userinput></screen>
|
||||
|
||||
<para>Compile the package:</para>
|
||||
|
||||
<para><screen><userinput>make tooldir=/usr</userinput></screen></para>
|
||||
<screen><userinput>make tooldir=/usr</userinput></screen>
|
||||
|
||||
<para>Normally, the <emphasis>tooldir</emphasis> (the directory where the
|
||||
executables end up) is set to $(exec_prefix)/$(target_alias), which expands
|
||||
@ -53,7 +53,7 @@ generates code that can be executed on PowerPC machines).</para>
|
||||
|
||||
<para>Test the results:</para>
|
||||
|
||||
<para><screen><userinput>make check</userinput></screen></para>
|
||||
<screen><userinput>make check</userinput></screen>
|
||||
|
||||
<para>The test suite notes from <xref linkend="ch05-binutils-pass2"/> are still
|
||||
very much appropriate here. Be sure to refer back there should you have any
|
||||
@ -61,12 +61,12 @@ doubts.</para>
|
||||
|
||||
<para>Install the package:</para>
|
||||
|
||||
<para><screen><userinput>make tooldir=/usr install</userinput></screen></para>
|
||||
<screen><userinput>make tooldir=/usr install</userinput></screen>
|
||||
|
||||
<para>Install the <emphasis>libiberty</emphasis> header file that is needed by
|
||||
some packages:</para>
|
||||
|
||||
<para><screen><userinput>cp ../binutils-&binutils-version;/include/libiberty.h /usr/include</userinput></screen></para>
|
||||
<screen><userinput>cp ../binutils-&binutils-version;/include/libiberty.h /usr/include</userinput></screen>
|
||||
|
||||
</sect2>
|
||||
|
||||
|
@ -6,25 +6,25 @@
|
||||
<para>First we use a patch to bison, backported from CVS, which fixes a minor
|
||||
compilation problem with some packages:</para>
|
||||
|
||||
<para><screen><userinput>patch -Np1 -i ../&bison-patch;</userinput></screen></para>
|
||||
<screen><userinput>patch -Np1 -i ../&bison-patch;</userinput></screen>
|
||||
|
||||
<para>Prepare Bison for compilation:</para>
|
||||
|
||||
<para><screen><userinput>./configure --prefix=/usr</userinput></screen></para>
|
||||
<screen><userinput>./configure --prefix=/usr</userinput></screen>
|
||||
|
||||
<para>Compile the package:</para>
|
||||
|
||||
<para><screen><userinput>make</userinput></screen></para>
|
||||
<screen><userinput>make</userinput></screen>
|
||||
|
||||
<para>This package has a test suite available which can perform a number of
|
||||
checks to ensure it built correctly. Should you choose to run it, the
|
||||
following command will do so (and takes a long time):</para>
|
||||
|
||||
<para><screen><userinput>make check</userinput></screen></para>
|
||||
<screen><userinput>make check</userinput></screen>
|
||||
|
||||
<para>And install the package:</para>
|
||||
|
||||
<para><screen><userinput>make install</userinput></screen></para>
|
||||
<screen><userinput>make install</userinput></screen>
|
||||
|
||||
</sect2>
|
||||
|
||||
|
@ -14,11 +14,11 @@ skip Chapter 7 when you arrive at it and move on to Chapter 8.</para>
|
||||
|
||||
<para>Install the boot scripts:</para>
|
||||
|
||||
<para><screen><userinput>cp -a rc.d sysconfig /etc</userinput></screen></para>
|
||||
<screen><userinput>cp -a rc.d sysconfig /etc</userinput></screen>
|
||||
|
||||
<para>Give <emphasis>root</emphasis> ownership of the scripts:</para>
|
||||
|
||||
<para><screen><userinput>chown -R root:root /etc/rc.d /etc/sysconfig</userinput></screen></para>
|
||||
<screen><userinput>chown -R root:root /etc/rc.d /etc/sysconfig</userinput></screen>
|
||||
|
||||
</sect2>
|
||||
|
||||
|
@ -5,8 +5,8 @@
|
||||
|
||||
<para>Prepare Bzip2 for compilation with:</para>
|
||||
|
||||
<para><screen><userinput>make -f Makefile-libbz2_so
|
||||
make clean</userinput></screen></para>
|
||||
<screen><userinput>make -f Makefile-libbz2_so
|
||||
make clean</userinput></screen>
|
||||
|
||||
<para>The <emphasis>-f</emphasis> flag will cause Bzip2 to be built
|
||||
using a different <filename>Makefile</filename> file, in this case the
|
||||
@ -16,22 +16,22 @@ against it.</para>
|
||||
|
||||
<para>Compile the package:</para>
|
||||
|
||||
<para><screen><userinput>make</userinput></screen></para>
|
||||
<screen><userinput>make</userinput></screen>
|
||||
|
||||
<para>Install it:</para>
|
||||
|
||||
<para><screen><userinput>make install</userinput></screen></para>
|
||||
<screen><userinput>make install</userinput></screen>
|
||||
|
||||
<para>And install the shared <userinput>bzip2</userinput> binary into the
|
||||
<filename class="directory">/bin</filename> directory, then make some
|
||||
necessary symbolic links, and clean up.</para>
|
||||
|
||||
<para><screen><userinput>cp bzip2-shared /bin/bzip2
|
||||
<screen><userinput>cp bzip2-shared /bin/bzip2
|
||||
cp -a libbz2.so* /lib
|
||||
ln -s ../../lib/libbz2.so.1.0 /usr/lib/libbz2.so
|
||||
rm /usr/bin/{bunzip2,bzcat,bzip2}
|
||||
mv /usr/bin/{bzip2recover,bzless,bzmore} /bin
|
||||
ln -s bzip2 /bin/bunzip2
|
||||
ln -s bzip2 /bin/bzcat</userinput></screen></para>
|
||||
ln -s bzip2 /bin/bzcat</userinput></screen>
|
||||
|
||||
</sect2>
|
||||
|
@ -22,7 +22,7 @@ system. Alternatively, you can (and the book assumes you do) assign the
|
||||
contents of the <filename class="directory">/tools</filename> directory to
|
||||
user <emphasis>root</emphasis> by running the following command:</para>
|
||||
|
||||
<para><screen><userinput>chown -R 0:0 /tools</userinput></screen></para>
|
||||
<screen><userinput>chown -R 0:0 /tools</userinput></screen>
|
||||
|
||||
<para>The command uses "0:0" instead of "root:root", because chown is unable
|
||||
to resolve the name "root" until the password file has been created.</para>
|
||||
|
@ -16,12 +16,12 @@ example.</para>
|
||||
<para>Become <emphasis>root</emphasis> and run the following command
|
||||
to enter the chroot environment:</para>
|
||||
|
||||
<para><screen><userinput>chroot $LFS /tools/bin/env -i \
|
||||
<screen><userinput>chroot $LFS /tools/bin/env -i \
|
||||
HOME=/root TERM=$TERM PS1='\u:\w\$ ' \
|
||||
PATH=/bin:/usr/bin:/sbin:/usr/sbin:/tools/bin \
|
||||
/tools/bin/bash --login</userinput></screen></para>
|
||||
/tools/bin/bash --login</userinput></screen>
|
||||
|
||||
<para><screen><userinput>set +h</userinput></screen></para>
|
||||
<screen><userinput>set +h</userinput></screen>
|
||||
|
||||
<para>The <userinput>-i</userinput> option given to the
|
||||
<userinput>env</userinput> command will clear all variables of the chroot
|
||||
|
@ -10,7 +10,7 @@ to be set up.</para>
|
||||
<para>Create a new file <filename>/etc/nsswitch.conf</filename> by running the
|
||||
following:</para>
|
||||
|
||||
<para><screen><userinput>cat > /etc/nsswitch.conf << "EOF"</userinput>
|
||||
<screen><userinput>cat > /etc/nsswitch.conf << "EOF"</userinput>
|
||||
# Begin /etc/nsswitch.conf
|
||||
|
||||
passwd: files
|
||||
@ -30,18 +30,18 @@ rpc: db files
|
||||
netgroup: db files
|
||||
|
||||
# End /etc/nsswitch.conf
|
||||
<userinput>EOF</userinput></screen></para>
|
||||
<userinput>EOF</userinput></screen>
|
||||
|
||||
<para>To find out what time zone you're in, run the following script:</para>
|
||||
|
||||
<para><screen><userinput>tzselect</userinput></screen></para>
|
||||
<screen><userinput>tzselect</userinput></screen>
|
||||
|
||||
<para>When you've answered a few questions about your location, the script will
|
||||
output the name of your time zone, something like <emphasis>EST5EDT</emphasis>
|
||||
or <emphasis>Canada/Eastern</emphasis>. Then create the
|
||||
<filename>/etc/localtime</filename> file by running:</para>
|
||||
|
||||
<para><screen><userinput>cp --remove-destination /usr/share/zoneinfo/Canada/Eastern /etc/localtime </userinput></screen></para>
|
||||
<screen><userinput>cp --remove-destination /usr/share/zoneinfo/Canada/Eastern /etc/localtime </userinput></screen>
|
||||
|
||||
<para>The meaning of the option:</para>
|
||||
|
||||
@ -81,14 +81,14 @@ dynamic loader's search path.</para>
|
||||
<para>Create a new file <filename>/etc/ld.so.conf</filename> by running the
|
||||
following:</para>
|
||||
|
||||
<para><screen><userinput>cat > /etc/ld.so.conf << "EOF"</userinput>
|
||||
<screen><userinput>cat > /etc/ld.so.conf << "EOF"</userinput>
|
||||
# Begin /etc/ld.so.conf
|
||||
|
||||
/usr/local/lib
|
||||
/opt/lib
|
||||
|
||||
# End /etc/ld.so.conf
|
||||
<userinput>EOF</userinput></screen></para>
|
||||
<userinput>EOF</userinput></screen>
|
||||
|
||||
</sect2>
|
||||
|
||||
|
@ -9,7 +9,7 @@ change it.</para>
|
||||
<filename class="symlink">/usr/share/kbd/keymaps/defkeymap.map.gz</filename>
|
||||
symlink by running the following command:</para>
|
||||
|
||||
<para><screen><userinput>ln -s path/to/keymap /usr/share/kbd/keymaps/defkeymap.map.gz</userinput></screen></para>
|
||||
<screen><userinput>ln -s path/to/keymap /usr/share/kbd/keymaps/defkeymap.map.gz</userinput></screen>
|
||||
|
||||
<para>Of course, replace <filename>path/to/keymap</filename> with the path and
|
||||
name of your keyboard's map file. For example, if you have a Dutch keyboard,
|
||||
@ -24,8 +24,8 @@ kernel), as then the bootscript that normally sets up your keymap isn't run.</pa
|
||||
kernel source. You will have to repeat this command whenever you unpack a
|
||||
new kernel:</para>
|
||||
|
||||
<para><screen><userinput>loadkeys -m /usr/share/kbd/keymaps/defkeymap.map.gz > \
|
||||
/usr/src/linux-&kernel-version;/drivers/char/defkeymap.c</userinput></screen></para>
|
||||
<screen><userinput>loadkeys -m /usr/share/kbd/keymaps/defkeymap.map.gz > \
|
||||
/usr/src/linux-&kernel-version;/drivers/char/defkeymap.c</userinput></screen>
|
||||
|
||||
</sect2>
|
||||
|
||||
|
@ -13,12 +13,12 @@ shadowed passwords.</para>
|
||||
|
||||
<para>To enable shadowed passwords, run the following command:</para>
|
||||
|
||||
<para><screen><userinput>/usr/sbin/pwconv</userinput></screen></para>
|
||||
<screen><userinput>/usr/sbin/pwconv</userinput></screen>
|
||||
|
||||
<para>And to enable shadowed group passwords, run the following
|
||||
command:</para>
|
||||
|
||||
<para><screen><userinput>/usr/sbin/grpconv</userinput></screen></para>
|
||||
<screen><userinput>/usr/sbin/grpconv</userinput></screen>
|
||||
|
||||
<para>Under normal circumstances, you won't have created any passwords yet.
|
||||
However, if returning to this section to enable shadowing, you should reset any
|
||||
|
@ -5,7 +5,7 @@
|
||||
<para>Create a new file <filename>/etc/syslog.conf</filename> by running the
|
||||
following:</para>
|
||||
|
||||
<para><screen><userinput>cat > /etc/syslog.conf << "EOF"</userinput>
|
||||
<screen><userinput>cat > /etc/syslog.conf << "EOF"</userinput>
|
||||
# Begin /etc/syslog.conf
|
||||
|
||||
auth,authpriv.* -/var/log/auth.log
|
||||
@ -17,7 +17,7 @@ user.* -/var/log/user.log
|
||||
*.emerg *
|
||||
|
||||
# End /etc/syslog.conf
|
||||
<userinput>EOF</userinput></screen></para>
|
||||
<userinput>EOF</userinput></screen>
|
||||
|
||||
</sect2>
|
||||
|
||||
|
@ -5,7 +5,7 @@
|
||||
<para>Create a new file <filename>/etc/inittab</filename> by running the
|
||||
following:</para>
|
||||
|
||||
<para><screen><userinput>cat > /etc/inittab << "EOF"</userinput>
|
||||
<screen><userinput>cat > /etc/inittab << "EOF"</userinput>
|
||||
# Begin /etc/inittab
|
||||
|
||||
id:3:initdefault:
|
||||
@ -32,7 +32,7 @@ su:S016:once:/sbin/sulogin
|
||||
6:2345:respawn:/sbin/agetty tty6 9600
|
||||
|
||||
# End /etc/inittab
|
||||
<userinput>EOF</userinput></screen></para>
|
||||
<userinput>EOF</userinput></screen>
|
||||
|
||||
</sect2>
|
||||
|
||||
|
@ -7,14 +7,14 @@ but we have a high preference to run vim in vim mode (else we wouldn't
|
||||
have included vim in this book, but the original vi). Create the
|
||||
<filename>/root/.vimrc</filename> by running the following:</para>
|
||||
|
||||
<para><screen><userinput>cat > /root/.vimrc << "EOF"</userinput>
|
||||
<screen><userinput>cat > /root/.vimrc << "EOF"</userinput>
|
||||
" Begin /root/.vimrc
|
||||
|
||||
set nocompatible
|
||||
set bs=2
|
||||
|
||||
" End /root/.vimrc
|
||||
<userinput>EOF</userinput></screen></para>
|
||||
<userinput>EOF</userinput></screen>
|
||||
|
||||
</sect2>
|
||||
|
||||
|
@ -7,28 +7,28 @@
|
||||
broken, in that the <userinput>-p</userinput> switch always returns "unknown".
|
||||
The following patch fixes this behaviour for Intel architectures:</para>
|
||||
|
||||
<para><screen><userinput>patch -Np1 -i ../&coreutils-uname-patch;</userinput></screen></para>
|
||||
<screen><userinput>patch -Np1 -i ../&coreutils-uname-patch;</userinput></screen>
|
||||
|
||||
<para>We do not want Coreutils to install its version of the
|
||||
<userinput>hostname</userinput> program, because it is inferior to the version
|
||||
provided by Net-tools. Prevent its installation by applying a patch:</para>
|
||||
|
||||
<para><screen><userinput>patch -Np1 -i ../&coreutils-hostname-patch;</userinput></screen></para>
|
||||
<screen><userinput>patch -Np1 -i ../&coreutils-hostname-patch;</userinput></screen>
|
||||
|
||||
<para>Now prepare Coreutils for compilation:</para>
|
||||
|
||||
<para><screen><userinput>./configure --prefix=/usr</userinput></screen></para>
|
||||
<screen><userinput>./configure --prefix=/usr</userinput></screen>
|
||||
|
||||
<para>Compile the package:</para>
|
||||
|
||||
<para><screen><userinput>make</userinput></screen></para>
|
||||
<screen><userinput>make</userinput></screen>
|
||||
|
||||
<para>The <userinput>su</userinput> program from Coreutils wasn't installed in
|
||||
Chapter 5 because it needed <emphasis>root</emphasis> privilege to do so. We're
|
||||
going to need it in a few moments for the test suite. Therefore we work around
|
||||
the problem by installing it now:</para>
|
||||
|
||||
<para><screen><userinput>make install-root</userinput></screen></para>
|
||||
<screen><userinput>make install-root</userinput></screen>
|
||||
|
||||
<para>This package has a test suite available which can perform a number of
|
||||
checks to ensure it built correctly. However, this particular test suite makes
|
||||
@ -38,40 +38,40 @@ choose not to run the test suite, skip down to "Install the package". The
|
||||
following commands will prepare us for the test suite. Create two dummy groups
|
||||
and a dummy user name:</para>
|
||||
|
||||
<para><screen><userinput>echo "dummy1:x:1000" >> /etc/group
|
||||
<screen><userinput>echo "dummy1:x:1000" >> /etc/group
|
||||
echo "dummy2:x:1001:dummy" >> /etc/group
|
||||
echo "dummy:x:1000:1000:::/bin/bash" >> /etc/passwd</userinput></screen></para>
|
||||
echo "dummy:x:1000:1000:::/bin/bash" >> /etc/passwd</userinput></screen>
|
||||
|
||||
<para>Some tests are meant to run as <emphasis>root</emphasis>:</para>
|
||||
|
||||
<para><screen><userinput>make check-root</userinput></screen></para>
|
||||
<screen><userinput>make check-root</userinput></screen>
|
||||
|
||||
<para>The remainder of the tests are run as the <emphasis>dummy</emphasis>
|
||||
user:</para>
|
||||
|
||||
<para><screen><userinput>su dummy -c "make RUN_EXPENSIVE_TESTS=yes check"</userinput></screen></para>
|
||||
<screen><userinput>su dummy -c "make RUN_EXPENSIVE_TESTS=yes check"</userinput></screen>
|
||||
|
||||
<para>Remove the dummy groups and user name:</para>
|
||||
|
||||
<para><screen><userinput>sed -i.bak '/dummy/d' /etc/passwd /etc/group</userinput></screen></para>
|
||||
<screen><userinput>sed -i.bak '/dummy/d' /etc/passwd /etc/group</userinput></screen>
|
||||
|
||||
<para>Install the package:</para>
|
||||
|
||||
<para><screen><userinput>make install</userinput></screen></para>
|
||||
<screen><userinput>make install</userinput></screen>
|
||||
|
||||
<para>And move some programs to their proper locations:</para>
|
||||
|
||||
<para><screen><userinput>mv /usr/bin/{basename,cat,chgrp,chmod,chown,cp,dd,df} /bin
|
||||
<screen><userinput>mv /usr/bin/{basename,cat,chgrp,chmod,chown,cp,dd,df} /bin
|
||||
mv /usr/bin/{dir,dircolors,du,date,echo,false,head} /bin
|
||||
mv /usr/bin/{install,ln,ls,mkdir,mkfifo,mknod,mv,pwd} /bin
|
||||
mv /usr/bin/{rm,rmdir,shred,sync,sleep,stty,su,test} /bin
|
||||
mv /usr/bin/{touch,true,uname,vdir} /bin
|
||||
mv /usr/bin/chroot /usr/sbin</userinput></screen></para>
|
||||
mv /usr/bin/chroot /usr/sbin</userinput></screen>
|
||||
|
||||
<para>Finally, create a few necessary symlinks:</para>
|
||||
|
||||
<para><screen><userinput>ln -s test /bin/[
|
||||
ln -s ../../bin/install /usr/bin</userinput></screen></para>
|
||||
<screen><userinput>ln -s test /bin/[
|
||||
ln -s ../../bin/install /usr/bin</userinput></screen>
|
||||
|
||||
</sect2>
|
||||
|
||||
|
@ -4,7 +4,7 @@
|
||||
<para>Choose a password for user root and set it by running the following
|
||||
command:</para>
|
||||
|
||||
<para><screen><userinput>passwd root</userinput></screen></para>
|
||||
<screen><userinput>passwd root</userinput></screen>
|
||||
|
||||
</sect2>
|
||||
|
||||
|
@ -10,8 +10,8 @@ bad login attempts.</para>
|
||||
<para>Create these files with their proper permissions by running the
|
||||
following commands:</para>
|
||||
|
||||
<para><screen><userinput>touch /var/run/utmp /var/log/{btmp,lastlog,wtmp} &&
|
||||
chmod 644 /var/run/utmp /var/log/{btmp,lastlog,wtmp}</userinput></screen></para>
|
||||
<screen><userinput>touch /var/run/utmp /var/log/{btmp,lastlog,wtmp} &&
|
||||
chmod 644 /var/run/utmp /var/log/{btmp,lastlog,wtmp}</userinput></screen>
|
||||
|
||||
</sect2>
|
||||
|
||||
|
@ -7,10 +7,10 @@ order to satisfy these programs, we create a number of symbolic links which
|
||||
will be replaced by real files throughout the course of this chapter when
|
||||
we're installing all the software.</para>
|
||||
|
||||
<para><screen><userinput>ln -s /tools/bin/{bash,pwd,cat,stty} /bin
|
||||
<screen><userinput>ln -s /tools/bin/{bash,pwd,cat,stty} /bin
|
||||
ln -s /tools/bin/perl /usr/bin
|
||||
ln -s /tools/lib/libgcc_s.so.1 /usr/lib
|
||||
ln -s bash /bin/sh</userinput></screen></para>
|
||||
ln -s bash /bin/sh</userinput></screen>
|
||||
|
||||
</sect1>
|
||||
|
||||
|
@ -6,7 +6,7 @@
|
||||
a directory tree. Issuing the following commands will create a more or less
|
||||
standard tree:</para>
|
||||
|
||||
<para><screen><userinput>mkdir -p /{bin,boot,dev/{pts,shm},etc/opt,home,lib,mnt,proc}
|
||||
<screen><userinput>mkdir -p /{bin,boot,dev/{pts,shm},etc/opt,home,lib,mnt,proc}
|
||||
mkdir -p /{root,sbin,tmp,usr/local,var,opt}
|
||||
for dirname in /usr /usr/local
|
||||
do
|
||||
@ -19,14 +19,14 @@ done
|
||||
mkdir /var/{lock,log,mail,run,spool}
|
||||
mkdir -p /var/{tmp,opt,cache,lib/misc,local}
|
||||
mkdir /opt/{bin,doc,include,info}
|
||||
mkdir -p /opt/{lib,man/man{1,2,3,4,5,6,7,8}}</userinput></screen></para>
|
||||
mkdir -p /opt/{lib,man/man{1,2,3,4,5,6,7,8}}</userinput></screen>
|
||||
|
||||
<para>Directories are, by default, created with permission mode 755, but this
|
||||
isn't desirable for all directories. We will make two changes: one to the home
|
||||
directory of root, and another to the directories for temporary files.</para>
|
||||
|
||||
<para><screen><userinput>chmod 0750 /root
|
||||
chmod 1777 /tmp /var/tmp</userinput></screen></para>
|
||||
<screen><userinput>chmod 0750 /root
|
||||
chmod 1777 /tmp /var/tmp</userinput></screen>
|
||||
|
||||
<para>The first mode change ensures that not just anybody can enter the
|
||||
<filename class="directory">/root</filename> directory -- the same
|
||||
|
@ -5,15 +5,15 @@
|
||||
|
||||
<para>Prepare Diffutils for compilation:</para>
|
||||
|
||||
<para><screen><userinput>./configure --prefix=/usr</userinput></screen></para>
|
||||
<screen><userinput>./configure --prefix=/usr</userinput></screen>
|
||||
|
||||
<para>Compile the package:</para>
|
||||
|
||||
<para><screen><userinput>make</userinput></screen></para>
|
||||
<screen><userinput>make</userinput></screen>
|
||||
|
||||
<para>And install it:</para>
|
||||
|
||||
<para><screen><userinput>make install</userinput></screen></para>
|
||||
<screen><userinput>make install</userinput></screen>
|
||||
|
||||
</sect2>
|
||||
|
||||
|
@ -6,13 +6,13 @@
|
||||
<para>It is recommended to build E2fsprogs outside of the
|
||||
source tree:</para>
|
||||
|
||||
<para><screen><userinput>mkdir ../e2fsprogs-build
|
||||
cd ../e2fsprogs-build</userinput></screen></para>
|
||||
<screen><userinput>mkdir ../e2fsprogs-build
|
||||
cd ../e2fsprogs-build</userinput></screen>
|
||||
|
||||
<para>Prepare E2fsprogs for compilation:</para>
|
||||
|
||||
<para><screen><userinput>../e2fsprogs-&e2fsprogs-version;/configure --prefix=/usr --with-root-prefix="" \
|
||||
--enable-elf-shlibs</userinput></screen></para>
|
||||
<screen><userinput>../e2fsprogs-&e2fsprogs-version;/configure --prefix=/usr --with-root-prefix="" \
|
||||
--enable-elf-shlibs</userinput></screen>
|
||||
|
||||
<para>The meaning of the configure options:</para>
|
||||
|
||||
@ -34,21 +34,21 @@ of.</para></listitem>
|
||||
|
||||
<para>Compile the package:</para>
|
||||
|
||||
<para><screen><userinput>make</userinput></screen></para>
|
||||
<screen><userinput>make</userinput></screen>
|
||||
|
||||
<para>This package has a test suite available which can perform a number of
|
||||
checks to ensure it built correctly. Should you choose to run it, the
|
||||
following command will do so:</para>
|
||||
|
||||
<para><screen><userinput>make check</userinput></screen></para>
|
||||
<screen><userinput>make check</userinput></screen>
|
||||
|
||||
<para>Install most of the package:</para>
|
||||
|
||||
<para><screen><userinput>make install</userinput></screen></para>
|
||||
<screen><userinput>make install</userinput></screen>
|
||||
|
||||
<para>And install also the shared libraries:</para>
|
||||
|
||||
<para><screen><userinput>make install-libs</userinput></screen></para>
|
||||
<screen><userinput>make install-libs</userinput></screen>
|
||||
|
||||
</sect2>
|
||||
|
||||
|
@ -17,31 +17,31 @@ create temporary files.</para>
|
||||
|
||||
<para>Apply the patch:</para>
|
||||
|
||||
<para><screen><userinput>patch -Np1 -i ../&ed-patch;</userinput></screen></para>
|
||||
<screen><userinput>patch -Np1 -i ../&ed-patch;</userinput></screen>
|
||||
|
||||
<para>Now prepare Ed for compilation:</para>
|
||||
|
||||
<para><screen><userinput>./configure --prefix=/usr</userinput></screen></para>
|
||||
<screen><userinput>./configure --prefix=/usr</userinput></screen>
|
||||
|
||||
<para>Compile the package:</para>
|
||||
|
||||
<para><screen><userinput>make</userinput></screen></para>
|
||||
<screen><userinput>make</userinput></screen>
|
||||
|
||||
<para>This package has a test suite available which can perform a number of
|
||||
checks to ensure it built correctly. Should you choose to run it, the
|
||||
following command will do so:</para>
|
||||
|
||||
<para><screen><userinput>make check</userinput></screen></para>
|
||||
<screen><userinput>make check</userinput></screen>
|
||||
|
||||
<para>Install the package:</para>
|
||||
|
||||
<para><screen><userinput>make install</userinput></screen></para>
|
||||
<screen><userinput>make install</userinput></screen>
|
||||
|
||||
<para>And move the programs to the <filename>/bin</filename> directory, so
|
||||
they can be used in the event that the <filename>/usr</filename> partition is
|
||||
unavailable.</para>
|
||||
|
||||
<para><screen><userinput>mv /usr/bin/{ed,red} /bin</userinput></screen></para>
|
||||
<screen><userinput>mv /usr/bin/{ed,red} /bin</userinput></screen>
|
||||
|
||||
</sect2>
|
||||
|
||||
|
@ -5,15 +5,15 @@
|
||||
|
||||
<para>Prepare File for compilation:</para>
|
||||
|
||||
<para><screen><userinput>./configure --prefix=/usr</userinput></screen></para>
|
||||
<screen><userinput>./configure --prefix=/usr</userinput></screen>
|
||||
|
||||
<para>Compile the package:</para>
|
||||
|
||||
<para><screen><userinput>make</userinput></screen></para>
|
||||
<screen><userinput>make</userinput></screen>
|
||||
|
||||
<para>And install it:</para>
|
||||
|
||||
<para><screen><userinput>make install</userinput></screen></para>
|
||||
<screen><userinput>make install</userinput></screen>
|
||||
|
||||
</sect2>
|
||||
|
||||
|
@ -5,7 +5,7 @@
|
||||
|
||||
<para>Prepare Findutils for compilation:</para>
|
||||
|
||||
<para><screen><userinput>./configure --prefix=/usr --libexecdir=/usr/bin</userinput></screen></para>
|
||||
<screen><userinput>./configure --prefix=/usr --libexecdir=/usr/bin</userinput></screen>
|
||||
|
||||
<para>By default, the location of the updatedb database is in
|
||||
<filename>/usr/var</filename>. To make the location of
|
||||
@ -15,16 +15,16 @@
|
||||
|
||||
<para>Compile the package:</para>
|
||||
|
||||
<para><screen><userinput>make</userinput></screen></para>
|
||||
<screen><userinput>make</userinput></screen>
|
||||
|
||||
<para>This package has a test suite available which can perform a number of
|
||||
checks to ensure it built correctly. Should you choose to run it, the
|
||||
following command will do so:</para>
|
||||
|
||||
<para><screen><userinput>make check</userinput></screen></para>
|
||||
<screen><userinput>make check</userinput></screen>
|
||||
|
||||
<para>And install the package:</para>
|
||||
|
||||
<para><screen><userinput>make install</userinput></screen></para>
|
||||
<screen><userinput>make install</userinput></screen>
|
||||
|
||||
</sect2>
|
||||
|
@ -5,33 +5,33 @@
|
||||
|
||||
<para>Prepare Flex for compilation:</para>
|
||||
|
||||
<para><screen><userinput>./configure --prefix=/usr</userinput></screen></para>
|
||||
<screen><userinput>./configure --prefix=/usr</userinput></screen>
|
||||
|
||||
<para>Compile the package:</para>
|
||||
|
||||
<para><screen><userinput>make</userinput></screen></para>
|
||||
<screen><userinput>make</userinput></screen>
|
||||
|
||||
<para>This package has a test suite available which can perform a number of
|
||||
checks to ensure it built correctly. Should you choose to run it, the
|
||||
following command will do so:</para>
|
||||
|
||||
<para><screen><userinput>make bigcheck</userinput></screen></para>
|
||||
<screen><userinput>make bigcheck</userinput></screen>
|
||||
|
||||
<para>And install the package:</para>
|
||||
|
||||
<para><screen><userinput>make install</userinput></screen></para>
|
||||
<screen><userinput>make install</userinput></screen>
|
||||
|
||||
<para>There are some packages that expect to find the Lex library in
|
||||
<filename>/usr/lib</filename>. Create a symlink to account for this:</para>
|
||||
|
||||
<para><screen><userinput>ln -s libfl.a /usr/lib/libl.a</userinput></screen></para>
|
||||
<screen><userinput>ln -s libfl.a /usr/lib/libl.a</userinput></screen>
|
||||
|
||||
<para>A few programs don't know about <userinput>flex</userinput> yet and try
|
||||
to run its predecessor <userinput>lex</userinput>. To support those programs,
|
||||
create a shell script named <filename>lex</filename> that calls
|
||||
<userinput>flex</userinput> in Lex emulation mode:</para>
|
||||
|
||||
<para><screen><userinput>cat > /usr/bin/lex << "EOF"</userinput>
|
||||
<screen><userinput>cat > /usr/bin/lex << "EOF"</userinput>
|
||||
#!/bin/sh
|
||||
# Begin /usr/bin/lex
|
||||
|
||||
@ -39,7 +39,7 @@ exec /usr/bin/flex -l "$@"
|
||||
|
||||
# End /usr/bin/lex
|
||||
<userinput>EOF
|
||||
chmod 755 /usr/bin/lex</userinput></screen></para>
|
||||
chmod 755 /usr/bin/lex</userinput></screen>
|
||||
|
||||
</sect2>
|
||||
|
||||
|
@ -31,25 +31,25 @@ class="directory">$prefix/share/gawk-3.1.3</filename>) is removed along
|
||||
with its contents on a make uninstall.</para></listitem>
|
||||
</itemizedlist>
|
||||
|
||||
<para><screen><userinput>patch -Np1 -i ../&gawk-patch;</userinput></screen></para>
|
||||
<screen><userinput>patch -Np1 -i ../&gawk-patch;</userinput></screen>
|
||||
|
||||
<para>Now prepare Gawk for compilation:</para>
|
||||
|
||||
<para><screen><userinput>./configure --prefix=/usr --libexecdir=/usr/bin</userinput></screen></para>
|
||||
<screen><userinput>./configure --prefix=/usr --libexecdir=/usr/bin</userinput></screen>
|
||||
|
||||
<para>Compile the package:</para>
|
||||
|
||||
<para><screen><userinput>make</userinput></screen></para>
|
||||
<screen><userinput>make</userinput></screen>
|
||||
|
||||
<para>This package has a test suite available which can perform a number of
|
||||
checks to ensure it built correctly. Should you choose to run it, the
|
||||
following command will do so:</para>
|
||||
|
||||
<para><screen><userinput>make check</userinput></screen></para>
|
||||
<screen><userinput>make check</userinput></screen>
|
||||
|
||||
<para>And install the package:</para>
|
||||
|
||||
<para><screen><userinput>make install</userinput></screen></para>
|
||||
<screen><userinput>make install</userinput></screen>
|
||||
|
||||
</sect2>
|
||||
|
||||
|
@ -27,24 +27,24 @@ the system GCC already installed in <filename class="directory">/usr</filename>
|
||||
|
||||
<para>Apply the patches and make a small adjustment:</para>
|
||||
|
||||
<para><screen><userinput>patch -Np1 -i ../&gcc-2953-patch;
|
||||
<screen><userinput>patch -Np1 -i ../&gcc-2953-patch;
|
||||
patch -Np1 -i ../&gcc-2953-no-fixinc-patch;
|
||||
patch -Np1 -i ../&gcc-2953-returntype-fix-patch;
|
||||
echo timestamp > gcc/cstamp-h.in</userinput></screen></para>
|
||||
echo timestamp > gcc/cstamp-h.in</userinput></screen>
|
||||
|
||||
<para>The GCC documentation recommends building GCC outside of the source
|
||||
directory in a dedicated build directory:</para>
|
||||
|
||||
<para><screen><userinput>mkdir ../gcc-2-build
|
||||
cd ../gcc-2-build</userinput></screen></para>
|
||||
<screen><userinput>mkdir ../gcc-2-build
|
||||
cd ../gcc-2-build</userinput></screen>
|
||||
|
||||
<para>Compile and install gcc:</para>
|
||||
|
||||
<para><screen><userinput>../gcc-2.95.3/configure --prefix=/opt/gcc-2.95.3 \
|
||||
<screen><userinput>../gcc-2.95.3/configure --prefix=/opt/gcc-2.95.3 \
|
||||
--enable-shared --enable-languages=c \
|
||||
--enable-threads=posix
|
||||
make bootstrap
|
||||
make install</userinput></screen></para>
|
||||
make install</userinput></screen>
|
||||
|
||||
</sect2>
|
||||
|
||||
|
@ -20,8 +20,8 @@ GCC-testsuite package. The full GCC package contains even more
|
||||
compilers. Instructions for building these can be found at
|
||||
<ulink url="&blfs-root;view/stable/general/gcc.html"/>.</para>
|
||||
|
||||
<para><screen><userinput>patch -Np1 -i ../&gcc-nofixincludes-patch;
|
||||
patch -Np1 -i ../&gcc-suppress-libiberty-patch;</userinput></screen></para>
|
||||
<screen><userinput>patch -Np1 -i ../&gcc-nofixincludes-patch;
|
||||
patch -Np1 -i ../&gcc-suppress-libiberty-patch;</userinput></screen>
|
||||
|
||||
<para>The second patch here suppresses the installation of libiberty from GCC,
|
||||
as we will use the one provided by binutils instead. Be careful
|
||||
@ -31,24 +31,24 @@ here.</para>
|
||||
<para>The GCC documentation recommends building GCC outside of the source
|
||||
directory in a dedicated build directory:</para>
|
||||
|
||||
<para><screen><userinput>mkdir ../gcc-build
|
||||
cd ../gcc-build</userinput></screen></para>
|
||||
<screen><userinput>mkdir ../gcc-build
|
||||
cd ../gcc-build</userinput></screen>
|
||||
|
||||
<para>Now prepare GCC for compilation:</para>
|
||||
|
||||
<para><screen><userinput>../gcc-&gcc-version;/configure --prefix=/usr \
|
||||
<screen><userinput>../gcc-&gcc-version;/configure --prefix=/usr \
|
||||
--enable-shared --enable-threads=posix \
|
||||
--enable-__cxa_atexit --enable-clocale=gnu \
|
||||
--enable-languages=c,c++</userinput></screen></para>
|
||||
--enable-languages=c,c++</userinput></screen>
|
||||
|
||||
<para>Compile the package:</para>
|
||||
|
||||
<para><screen><userinput>make</userinput></screen></para>
|
||||
<screen><userinput>make</userinput></screen>
|
||||
|
||||
<para>Test the results, but don't stop at errors (you'll remember the few
|
||||
known ones):</para>
|
||||
|
||||
<para><screen><userinput>make -k check</userinput></screen></para>
|
||||
<screen><userinput>make -k check</userinput></screen>
|
||||
|
||||
<para>The test suite notes from <xref linkend="ch05-gcc-pass2"/> are still very
|
||||
much appropriate here. Be sure to refer back there should you have any
|
||||
@ -56,18 +56,18 @@ doubts.</para>
|
||||
|
||||
<para>And install the package:</para>
|
||||
|
||||
<para><screen><userinput>make install</userinput></screen></para>
|
||||
<screen><userinput>make install</userinput></screen>
|
||||
|
||||
<para>Some packages expect the C PreProcessor to be installed in the
|
||||
<filename>/lib</filename> directory.
|
||||
To honor those packages, create this symlink:</para>
|
||||
|
||||
<para><screen><userinput>ln -s ../usr/bin/cpp /lib</userinput></screen></para>
|
||||
<screen><userinput>ln -s ../usr/bin/cpp /lib</userinput></screen>
|
||||
|
||||
<para>Many packages use the name <userinput>cc</userinput> to call the C
|
||||
compiler. To satisfy those packages, create a symlink:</para>
|
||||
|
||||
<para><screen><userinput>ln -s gcc /usr/bin/cc</userinput></screen></para>
|
||||
<screen><userinput>ln -s gcc /usr/bin/cc</userinput></screen>
|
||||
|
||||
<note><para>At this point it is strongly recommended to repeat the sanity check
|
||||
we performed earlier in the chapter. Refer back to
|
||||
|
@ -5,21 +5,21 @@
|
||||
|
||||
<para>Prepare Gettext for compilation:</para>
|
||||
|
||||
<para><screen><userinput>./configure --prefix=/usr</userinput></screen></para>
|
||||
<screen><userinput>./configure --prefix=/usr</userinput></screen>
|
||||
|
||||
<para>Compile the package:</para>
|
||||
|
||||
<para><screen><userinput>make</userinput></screen></para>
|
||||
<screen><userinput>make</userinput></screen>
|
||||
|
||||
<para>This package has a test suite available which can perform a number of
|
||||
checks to ensure it built correctly. Should you choose to run it, the
|
||||
following command will do so (and takes a very long time):</para>
|
||||
|
||||
<para><screen><userinput>make check</userinput></screen></para>
|
||||
<screen><userinput>make check</userinput></screen>
|
||||
|
||||
<para>And install the package:</para>
|
||||
|
||||
<para><screen><userinput>make install</userinput></screen></para>
|
||||
<screen><userinput>make install</userinput></screen>
|
||||
|
||||
</sect2>
|
||||
|
||||
|
@ -20,19 +20,19 @@ flags.</para>
|
||||
|
||||
<para>Then apply the same patch we used previously:</para>
|
||||
|
||||
<para><screen><userinput>patch -Np1 -i ../&glibc-sscanf-patch;</userinput></screen></para>
|
||||
<screen><userinput>patch -Np1 -i ../&glibc-sscanf-patch;</userinput></screen>
|
||||
|
||||
<para>The Glibc documentation recommends building Glibc outside of the source
|
||||
directory in a dedicated build directory:</para>
|
||||
|
||||
<para><screen><userinput>mkdir ../glibc-build
|
||||
cd ../glibc-build</userinput></screen></para>
|
||||
<screen><userinput>mkdir ../glibc-build
|
||||
cd ../glibc-build</userinput></screen>
|
||||
|
||||
<para>Now prepare Glibc for compilation:</para>
|
||||
|
||||
<para><screen><userinput>../glibc-&glibc-version;/configure --prefix=/usr \
|
||||
<screen><userinput>../glibc-&glibc-version;/configure --prefix=/usr \
|
||||
--disable-profile --enable-add-ons \
|
||||
--libexecdir=/usr/bin --with-headers=/usr/include</userinput></screen></para>
|
||||
--libexecdir=/usr/bin --with-headers=/usr/include</userinput></screen>
|
||||
|
||||
<para>The meaning of the new configure options:</para>
|
||||
|
||||
@ -52,23 +52,23 @@ kernel headers into <filename>/usr/include</filename>.</para></listitem>
|
||||
|
||||
<para>Compile the package:</para>
|
||||
|
||||
<para><screen><userinput>make</userinput></screen></para>
|
||||
<screen><userinput>make</userinput></screen>
|
||||
|
||||
<para>Test the results:</para>
|
||||
|
||||
<para><screen><userinput>make check</userinput></screen></para>
|
||||
<screen><userinput>make check</userinput></screen>
|
||||
|
||||
<para>The test suite notes from <xref linkend="ch05-glibc"/> are still very much
|
||||
appropriate here. Be sure to refer back there should you have any doubts.</para>
|
||||
|
||||
<para>And install the package:</para>
|
||||
|
||||
<para><screen><userinput>make install</userinput></screen></para>
|
||||
<screen><userinput>make install</userinput></screen>
|
||||
|
||||
<para>The locales that can make your system respond in a different language
|
||||
weren't installed by the above command. Do it with this:</para>
|
||||
|
||||
<para><screen><userinput>make localedata/install-locales</userinput></screen></para>
|
||||
<screen><userinput>make localedata/install-locales</userinput></screen>
|
||||
|
||||
<para>An alternative to running the previous command is to install only those
|
||||
locales which you need or want. This can be achieved using the
|
||||
@ -80,7 +80,7 @@ correctly. The following instructions, in place of the install-locales
|
||||
command above, will install the minimum set of locales necessary for the
|
||||
tests to run successfully:</para>
|
||||
|
||||
<para><screen><userinput>mkdir -p /usr/lib/locale
|
||||
<screen><userinput>mkdir -p /usr/lib/locale
|
||||
localedef -i de_DE -f ISO-8859-1 de_DE
|
||||
localedef -i de_DE@euro -f ISO-8859-15 de_DE@euro
|
||||
localedef -i en_HK -f ISO-8859-1 en_HK
|
||||
@ -90,15 +90,15 @@ localedef -i es_MX -f ISO-8859-1 es_MX
|
||||
localedef -i fr_FR -f ISO-8859-1 fr_FR
|
||||
localedef -i fr_FR@euro -f ISO-8859-15 fr_FR@euro
|
||||
localedef -i it_IT -f ISO-8859-1 it_IT
|
||||
localedef -i ja_JP -f EUC-JP ja_JP</userinput></screen></para>
|
||||
localedef -i ja_JP -f EUC-JP ja_JP</userinput></screen>
|
||||
|
||||
<para>Finally, build the linuxthreads man pages:</para>
|
||||
|
||||
<para><screen><userinput>make -C ../&glibc-dir;/linuxthreads/man</userinput></screen></para>
|
||||
<screen><userinput>make -C ../&glibc-dir;/linuxthreads/man</userinput></screen>
|
||||
|
||||
<para>And install these pages:</para>
|
||||
|
||||
<para><screen><userinput>make -C ../&glibc-dir;/linuxthreads/man install</userinput></screen></para>
|
||||
<screen><userinput>make -C ../&glibc-dir;/linuxthreads/man install</userinput></screen>
|
||||
|
||||
</sect2>
|
||||
|
||||
|
@ -5,22 +5,22 @@
|
||||
|
||||
<para>Prepare Grep for compilation:</para>
|
||||
|
||||
<para><screen><userinput>./configure --prefix=/usr --bindir=/bin \
|
||||
--with-included-regex</userinput></screen></para>
|
||||
<screen><userinput>./configure --prefix=/usr --bindir=/bin \
|
||||
--with-included-regex</userinput></screen>
|
||||
|
||||
<para>Compile the package:</para>
|
||||
|
||||
<para><screen><userinput>make</userinput></screen></para>
|
||||
<screen><userinput>make</userinput></screen>
|
||||
|
||||
<para>This package has a test suite available which can perform a number of
|
||||
checks to ensure it built correctly. Should you choose to run it, the
|
||||
following command will do so:</para>
|
||||
|
||||
<para><screen><userinput>make check</userinput></screen></para>
|
||||
<screen><userinput>make check</userinput></screen>
|
||||
|
||||
<para>And install the package:</para>
|
||||
|
||||
<para><screen><userinput>make install</userinput></screen></para>
|
||||
<screen><userinput>make install</userinput></screen>
|
||||
|
||||
</sect2>
|
||||
|
||||
|
@ -10,22 +10,22 @@ live elsewhere, you may want to change <emphasis>PAGE=letter</emphasis> to
|
||||
|
||||
<para>Prepare Groff for compilation:</para>
|
||||
|
||||
<para><screen><userinput>PAGE=letter ./configure --prefix=/usr</userinput></screen></para>
|
||||
<screen><userinput>PAGE=letter ./configure --prefix=/usr</userinput></screen>
|
||||
|
||||
<para>Compile the package:</para>
|
||||
|
||||
<para><screen><userinput>make</userinput></screen></para>
|
||||
<screen><userinput>make</userinput></screen>
|
||||
|
||||
<para>And install it:</para>
|
||||
|
||||
<para><screen><userinput>make install</userinput></screen></para>
|
||||
<screen><userinput>make install</userinput></screen>
|
||||
|
||||
<para>Some documentation programs, such as <userinput>xman</userinput>,
|
||||
will not work work properly without the following symlinks:</para>
|
||||
|
||||
<para><screen><userinput>ln -s soelim /usr/bin/zsoelim
|
||||
<screen><userinput>ln -s soelim /usr/bin/zsoelim
|
||||
ln -s eqn /usr/bin/geqn
|
||||
ln -s tbl /usr/bin/gtbl</userinput></screen></para>
|
||||
ln -s tbl /usr/bin/gtbl</userinput></screen>
|
||||
|
||||
</sect2>
|
||||
|
||||
|
@ -11,21 +11,21 @@ Grub.</para>
|
||||
|
||||
<para>Grub needs a patch to fix a compilation problem with GCC-3.3.1</para>
|
||||
|
||||
<para><screen><userinput>patch -Np1 -i ../&grub-patch;</userinput></screen></para>
|
||||
<screen><userinput>patch -Np1 -i ../&grub-patch;</userinput></screen>
|
||||
|
||||
<para>Prepare Grub for compilation:</para>
|
||||
|
||||
<para><screen><userinput>./configure --prefix=/usr</userinput></screen></para>
|
||||
<screen><userinput>./configure --prefix=/usr</userinput></screen>
|
||||
|
||||
<para>Compile the package:</para>
|
||||
|
||||
<para><screen><userinput>make</userinput></screen></para>
|
||||
<screen><userinput>make</userinput></screen>
|
||||
|
||||
<para>And install it:</para>
|
||||
|
||||
<para><screen><userinput>make install
|
||||
<screen><userinput>make install
|
||||
mkdir /boot/grub
|
||||
cp /usr/share/grub/i386-pc/stage{1,2} /boot/grub</userinput></screen></para>
|
||||
cp /usr/share/grub/i386-pc/stage{1,2} /boot/grub</userinput></screen>
|
||||
|
||||
<para>Replace <filename class="directory">i386-pc</filename> with whatever
|
||||
directory is appropriate for your hardware.</para>
|
||||
|
@ -5,30 +5,30 @@
|
||||
|
||||
<para>Prepare Gzip for compilation:</para>
|
||||
|
||||
<para><screen><userinput>./configure --prefix=/usr</userinput></screen></para>
|
||||
<screen><userinput>./configure --prefix=/usr</userinput></screen>
|
||||
|
||||
<para>The gzexe program has the location of the gzip binary hard-wired into
|
||||
it. Because we later change the location of this binary, the following
|
||||
command will place the new location into the gzexe binary.</para>
|
||||
|
||||
<para><screen><userinput>cp gzexe.in{,.backup}
|
||||
sed 's%"BINDIR"%/bin%' gzexe.in.backup > gzexe.in</userinput></screen></para>
|
||||
<screen><userinput>cp gzexe.in{,.backup}
|
||||
sed 's%"BINDIR"%/bin%' gzexe.in.backup > gzexe.in</userinput></screen>
|
||||
|
||||
<para>Compile the package:</para>
|
||||
|
||||
<para><screen><userinput>make</userinput></screen></para>
|
||||
<screen><userinput>make</userinput></screen>
|
||||
|
||||
<para>Install the package:</para>
|
||||
|
||||
<para><screen><userinput>make install</userinput></screen></para>
|
||||
<screen><userinput>make install</userinput></screen>
|
||||
|
||||
<para>And move the programs to the <filename
|
||||
class="directory">/bin</filename> directory:</para>
|
||||
|
||||
<para><screen><userinput>mv /usr/bin/gzip /bin
|
||||
<screen><userinput>mv /usr/bin/gzip /bin
|
||||
rm /usr/bin/{gunzip,zcat}
|
||||
ln -s gzip /bin/gunzip
|
||||
ln -s gzip /bin/zcat
|
||||
ln -s gunzip /bin/uncompress</userinput></screen></para>
|
||||
ln -s gunzip /bin/uncompress</userinput></screen>
|
||||
|
||||
</sect2>
|
||||
|
@ -5,11 +5,11 @@
|
||||
|
||||
<para>Prepare Inetutils for compilation:</para>
|
||||
|
||||
<para><screen><userinput>./configure --prefix=/usr --disable-syslogd \
|
||||
<screen><userinput>./configure --prefix=/usr --disable-syslogd \
|
||||
--libexecdir=/usr/sbin --disable-logger \
|
||||
--sysconfdir=/etc --localstatedir=/var \
|
||||
--disable-whois --disable-servers
|
||||
</userinput></screen></para>
|
||||
</userinput></screen>
|
||||
|
||||
<para>The meaning of the configure options:</para>
|
||||
|
||||
@ -38,15 +38,15 @@ replacements are available for many of these servers.</para></listitem>
|
||||
|
||||
<para>Compile the package:</para>
|
||||
|
||||
<para><screen><userinput>make</userinput></screen></para>
|
||||
<screen><userinput>make</userinput></screen>
|
||||
|
||||
<para>Install it:</para>
|
||||
|
||||
<para><screen><userinput>make install</userinput></screen></para>
|
||||
<screen><userinput>make install</userinput></screen>
|
||||
|
||||
<para>And move the <userinput>ping</userinput> program to its proper place:</para>
|
||||
|
||||
<para><screen><userinput>mv /usr/bin/ping /bin</userinput></screen></para>
|
||||
<screen><userinput>mv /usr/bin/ping /bin</userinput></screen>
|
||||
|
||||
</sect2>
|
||||
|
||||
|
@ -7,19 +7,19 @@
|
||||
<userinput>setvesablank</userinput> and <userinput>getunimap</userinput>) are
|
||||
not installed . The patch enables the compilation of these utilities:</para>
|
||||
|
||||
<para><screen><userinput>patch -Np1 -i ../&kbd-patch;</userinput></screen></para>
|
||||
<screen><userinput>patch -Np1 -i ../&kbd-patch;</userinput></screen>
|
||||
|
||||
<para>Now prepare Kbd for compilation:</para>
|
||||
|
||||
<para><screen><userinput>./configure</userinput></screen></para>
|
||||
<screen><userinput>./configure</userinput></screen>
|
||||
|
||||
<para>Compile the package:</para>
|
||||
|
||||
<para><screen><userinput>make</userinput></screen></para>
|
||||
<screen><userinput>make</userinput></screen>
|
||||
|
||||
<para>And install it:</para>
|
||||
|
||||
<para><screen><userinput>make install</userinput></screen></para>
|
||||
<screen><userinput>make install</userinput></screen>
|
||||
|
||||
</sect2>
|
||||
|
||||
|
@ -25,7 +25,7 @@ to ensure all files are owned by user <emphasis>root</emphasis>.</para>
|
||||
|
||||
<para>Prepare for header installation:</para>
|
||||
|
||||
<para><screen><userinput>make mrproper</userinput></screen></para>
|
||||
<screen><userinput>make mrproper</userinput></screen>
|
||||
|
||||
<para>This ensures that the kernel tree is absolutely clean. The kernel team
|
||||
recommends that this command be issued prior to <emphasis>each</emphasis> kernel
|
||||
@ -34,28 +34,28 @@ untarring.</para>
|
||||
|
||||
<para>Create the <filename>include/linux/version.h</filename> file:</para>
|
||||
|
||||
<para><screen><userinput>make include/linux/version.h</userinput></screen></para>
|
||||
<screen><userinput>make include/linux/version.h</userinput></screen>
|
||||
|
||||
<para>Create the platform-specific <filename>include/asm</filename>
|
||||
symlink:</para>
|
||||
|
||||
<para><screen><userinput>make symlinks</userinput></screen></para>
|
||||
<screen><userinput>make symlinks</userinput></screen>
|
||||
|
||||
<para>Install the platform specific-header files:</para>
|
||||
|
||||
<para><screen><userinput>cp -HR include/asm /usr/include
|
||||
cp -R include/asm-generic /usr/include</userinput></screen></para>
|
||||
<screen><userinput>cp -HR include/asm /usr/include
|
||||
cp -R include/asm-generic /usr/include</userinput></screen>
|
||||
|
||||
<para>Install the cross-platform kernel header files:</para>
|
||||
|
||||
<para><screen><userinput>cp -R include/linux /usr/include</userinput></screen></para>
|
||||
<screen><userinput>cp -R include/linux /usr/include</userinput></screen>
|
||||
|
||||
<para>There are a few kernel header files which make use of the
|
||||
<filename>autoconf.h</filename> header file. Since we do not yet configure the
|
||||
kernel, we need to create this file ourselves in order to avoid compilation
|
||||
failures. Create an empty <filename>autoconf.h</filename> file:</para>
|
||||
|
||||
<para><screen><userinput>touch /usr/include/linux/autoconf.h</userinput></screen></para>
|
||||
<screen><userinput>touch /usr/include/linux/autoconf.h</userinput></screen>
|
||||
|
||||
</sect2>
|
||||
|
||||
|
@ -5,7 +5,7 @@
|
||||
|
||||
<para>Prepare Less for compilation:</para>
|
||||
|
||||
<para><screen><userinput>./configure --prefix=/usr --bindir=/bin --sysconfdir=/etc</userinput></screen></para>
|
||||
<screen><userinput>./configure --prefix=/usr --bindir=/bin --sysconfdir=/etc</userinput></screen>
|
||||
|
||||
<para>The meaning of the configure option:</para>
|
||||
|
||||
@ -17,11 +17,11 @@ configuration files.</para></listitem>
|
||||
|
||||
<para>Compile the package:</para>
|
||||
|
||||
<para><screen><userinput>make</userinput></screen></para>
|
||||
<screen><userinput>make</userinput></screen>
|
||||
|
||||
<para>And install it:</para>
|
||||
|
||||
<para><screen><userinput>make install</userinput></screen></para>
|
||||
<screen><userinput>make install</userinput></screen>
|
||||
|
||||
</sect2>
|
||||
|
||||
|
@ -5,16 +5,16 @@
|
||||
|
||||
<para>Compile the package:</para>
|
||||
|
||||
<para><screen><userinput>make</userinput></screen></para>
|
||||
<screen><userinput>make</userinput></screen>
|
||||
|
||||
<para>And install it:</para>
|
||||
|
||||
<para><screen><userinput>make install</userinput></screen></para>
|
||||
<screen><userinput>make install</userinput></screen>
|
||||
|
||||
<para>Now copy two supporting files included in the Lfs-Utils tarball to
|
||||
their destination:</para>
|
||||
|
||||
<para><screen><userinput>cp -f etc/{services,protocols} /etc</userinput></screen></para>
|
||||
<screen><userinput>cp -f etc/{services,protocols} /etc</userinput></screen>
|
||||
|
||||
<para>The <filename>/etc/services</filename> file is used to resolve service
|
||||
numbers to human-readable names, and the <filename>/etc/protocols</filename>
|
||||
|
@ -5,20 +5,20 @@
|
||||
|
||||
<para>Prepare Libtool for compilation:</para>
|
||||
|
||||
<para><screen><userinput>./configure --prefix=/usr</userinput></screen></para>
|
||||
<screen><userinput>./configure --prefix=/usr</userinput></screen>
|
||||
|
||||
<para>Compile the package:</para>
|
||||
|
||||
<para><screen><userinput>make</userinput></screen></para>
|
||||
<screen><userinput>make</userinput></screen>
|
||||
|
||||
<para>This package has a test suite available which can perform a number of
|
||||
checks to ensure it built correctly. Should you choose to run it, the
|
||||
following command will do so:</para>
|
||||
|
||||
<para><screen><userinput>make check</userinput></screen></para>
|
||||
<screen><userinput>make check</userinput></screen>
|
||||
|
||||
<para>And install the package:</para>
|
||||
|
||||
<para><screen><userinput>make install</userinput></screen></para>
|
||||
<screen><userinput>make install</userinput></screen>
|
||||
|
||||
</sect2>
|
||||
|
@ -5,21 +5,21 @@
|
||||
|
||||
<para>Prepare M4 for compilation:</para>
|
||||
|
||||
<para><screen><userinput>./configure --prefix=/usr</userinput></screen></para>
|
||||
<screen><userinput>./configure --prefix=/usr</userinput></screen>
|
||||
|
||||
<para>Compile the package:</para>
|
||||
|
||||
<para><screen><userinput>make</userinput></screen></para>
|
||||
<screen><userinput>make</userinput></screen>
|
||||
|
||||
<para>This package has a test suite available which can perform a number of
|
||||
checks to ensure it built correctly. Should you choose to run it, the
|
||||
following command will do so:</para>
|
||||
|
||||
<para><screen><userinput>make check</userinput></screen></para>
|
||||
<screen><userinput>make check</userinput></screen>
|
||||
|
||||
<para>And install the package:</para>
|
||||
|
||||
<para><screen><userinput>make install</userinput></screen></para>
|
||||
<screen><userinput>make install</userinput></screen>
|
||||
|
||||
</sect2>
|
||||
|
||||
|
@ -5,21 +5,21 @@
|
||||
|
||||
<para>Prepare Make for compilation:</para>
|
||||
|
||||
<para><screen><userinput>./configure --prefix=/usr</userinput></screen></para>
|
||||
<screen><userinput>./configure --prefix=/usr</userinput></screen>
|
||||
|
||||
<para>Compile the package:</para>
|
||||
|
||||
<para><screen><userinput>make</userinput></screen></para>
|
||||
<screen><userinput>make</userinput></screen>
|
||||
|
||||
<para>This package has a test suite available which can perform a number of
|
||||
checks to ensure it built correctly. Should you choose to run it, the
|
||||
following command will do so:</para>
|
||||
|
||||
<para><screen><userinput>make check</userinput></screen></para>
|
||||
<screen><userinput>make check</userinput></screen>
|
||||
|
||||
<para>And install the package:</para>
|
||||
|
||||
<para><screen><userinput>make install</userinput></screen></para>
|
||||
<screen><userinput>make install</userinput></screen>
|
||||
|
||||
</sect2>
|
||||
|
||||
|
@ -9,13 +9,13 @@ the file only contains a single shell script.</para>
|
||||
|
||||
<para>Install the MAKEDEV script:</para>
|
||||
|
||||
<para><screen><userinput>bzcat MAKEDEV-&makedev-version;.bz2 > /dev/MAKEDEV
|
||||
chmod 754 /dev/MAKEDEV</userinput></screen></para>
|
||||
<screen><userinput>bzcat MAKEDEV-&makedev-version;.bz2 > /dev/MAKEDEV
|
||||
chmod 754 /dev/MAKEDEV</userinput></screen>
|
||||
|
||||
<para>Run the script to create the device files:</para>
|
||||
|
||||
<para><screen><userinput>cd /dev
|
||||
./MAKEDEV -v generic-nopty</userinput></screen></para>
|
||||
<screen><userinput>cd /dev
|
||||
./MAKEDEV -v generic-nopty</userinput></screen>
|
||||
|
||||
<para>The meaning of the option:</para>
|
||||
|
||||
@ -40,7 +40,7 @@ the "Mounting the proc and devpts file systems" section, now is the time to
|
||||
try the alternatives. If your kernel supports the devfs file system, run the
|
||||
following command to mount devfs:</para>
|
||||
|
||||
<para><screen><userinput>mount -t devfs devfs /dev</userinput></screen></para>
|
||||
<screen><userinput>mount -t devfs devfs /dev</userinput></screen>
|
||||
|
||||
<para>This will mount the devfs file system over the top of the new static
|
||||
<filename>/dev</filename> structure. This poses no problems, as the device nodes
|
||||
|
@ -9,23 +9,23 @@
|
||||
<filename>man.conf</filename> file to prevent redundant results when using
|
||||
programs such as <userinput>whatis</userinput>:</para>
|
||||
|
||||
<para><screen><userinput>patch -Np1 -i ../&man-manpath-patch;</userinput></screen></para>
|
||||
<screen><userinput>patch -Np1 -i ../&man-manpath-patch;</userinput></screen>
|
||||
|
||||
<para>The second patch adds the <emphasis>-R</emphasis> option to the
|
||||
<emphasis>PAGER</emphasis> variable so that escape sequences are
|
||||
handled properly:</para>
|
||||
|
||||
<para><screen><userinput>patch -Np1 -i ../&man-pager-patch;</userinput></screen></para>
|
||||
<screen><userinput>patch -Np1 -i ../&man-pager-patch;</userinput></screen>
|
||||
|
||||
<para>The third and last patch prevents a problem when man pages not formatted
|
||||
with more than 80 columns are used in conjunction with recent releases of
|
||||
<userinput>groff</userinput>:</para>
|
||||
|
||||
<para><screen><userinput>patch -Np1 -i ../&man-80cols-patch;</userinput></screen></para>
|
||||
<screen><userinput>patch -Np1 -i ../&man-80cols-patch;</userinput></screen>
|
||||
|
||||
<para>Now prepare Man for compilation:</para>
|
||||
|
||||
<para><screen><userinput>./configure -default -confdir=/etc</userinput></screen></para>
|
||||
<screen><userinput>./configure -default -confdir=/etc</userinput></screen>
|
||||
|
||||
<para>The meaning of the configure options:</para>
|
||||
|
||||
@ -44,11 +44,11 @@ configuration file in the <filename>/etc</filename> directory.</para></listitem>
|
||||
|
||||
<para>Compile the package:</para>
|
||||
|
||||
<para><screen><userinput>make</userinput></screen></para>
|
||||
<screen><userinput>make</userinput></screen>
|
||||
|
||||
<para>And install it:</para>
|
||||
|
||||
<para><screen><userinput>make install</userinput></screen></para>
|
||||
<screen><userinput>make install</userinput></screen>
|
||||
|
||||
<note><para>If you wish to disable SGR escape sequences, you should
|
||||
edit the man.conf file and add the <userinput>-c</userinput> argument
|
||||
|
@ -5,7 +5,7 @@
|
||||
|
||||
<para>Install Man-pages by running:</para>
|
||||
|
||||
<para><screen><userinput>make install</userinput></screen></para>
|
||||
<screen><userinput>make install</userinput></screen>
|
||||
|
||||
</sect2>
|
||||
|
||||
|
@ -5,15 +5,15 @@
|
||||
|
||||
<para>Prepare Modutils for compilation:</para>
|
||||
|
||||
<para><screen><userinput>./configure</userinput></screen></para>
|
||||
<screen><userinput>./configure</userinput></screen>
|
||||
|
||||
<para>Compile the package:</para>
|
||||
|
||||
<para><screen><userinput>make</userinput></screen></para>
|
||||
<screen><userinput>make</userinput></screen>
|
||||
|
||||
<para>And install it:</para>
|
||||
|
||||
<para><screen><userinput>make install</userinput></screen></para>
|
||||
<screen><userinput>make install</userinput></screen>
|
||||
|
||||
</sect2>
|
||||
|
||||
|
@ -17,7 +17,7 @@ status of the system.</para>
|
||||
<filename class="directory">/proc</filename> by running the following
|
||||
command:</para>
|
||||
|
||||
<para><screen><userinput>mount proc /proc -t proc</userinput></screen></para>
|
||||
<screen><userinput>mount proc /proc -t proc</userinput></screen>
|
||||
|
||||
<para>You might get warning messages from the mount command, such as
|
||||
these:</para>
|
||||
@ -35,7 +35,7 @@ now the most common way for pseudo terminals (PTYs) to be implemented.</para>
|
||||
<para>The devpts file system is mounted on
|
||||
<filename class="directory">/dev/pts</filename> by running:</para>
|
||||
|
||||
<para><screen><userinput>mount devpts /dev/pts -t devpts</userinput></screen></para>
|
||||
<screen><userinput>mount devpts /dev/pts -t devpts</userinput></screen>
|
||||
|
||||
<para>Should this command fail with an error to the effect of:</para>
|
||||
|
||||
|
@ -5,8 +5,8 @@
|
||||
|
||||
<para>First fix two tiny bugs:</para>
|
||||
|
||||
<para><screen><userinput>patch -Np1 -i ../&ncurses-etip-patch;
|
||||
patch -Np1 -i ../&ncurses-vsscanf-patch;</userinput></screen></para>
|
||||
<screen><userinput>patch -Np1 -i ../&ncurses-etip-patch;
|
||||
patch -Np1 -i ../&ncurses-vsscanf-patch;</userinput></screen>
|
||||
|
||||
<para>The first patch corrects the <filename>etip.h</filename> header file, and
|
||||
the second patch prevents some compiler warnings on the use of deprecated
|
||||
@ -14,35 +14,35 @@ headers.</para>
|
||||
|
||||
<para>Now prepare Ncurses for compilation:</para>
|
||||
|
||||
<para><screen><userinput>./configure --prefix=/usr --with-shared \
|
||||
--without-debug</userinput></screen></para>
|
||||
<screen><userinput>./configure --prefix=/usr --with-shared \
|
||||
--without-debug</userinput></screen>
|
||||
|
||||
<para>Compile the package:</para>
|
||||
|
||||
<para><screen><userinput>make</userinput></screen></para>
|
||||
<screen><userinput>make</userinput></screen>
|
||||
|
||||
<para>Install the package:</para>
|
||||
|
||||
<para><screen><userinput>make install</userinput></screen></para>
|
||||
<screen><userinput>make install</userinput></screen>
|
||||
|
||||
<para>Give the Ncurses libraries execute permissions:</para>
|
||||
|
||||
<para><screen><userinput>chmod 755 /usr/lib/*.&ncurses-version;</userinput></screen></para>
|
||||
<screen><userinput>chmod 755 /usr/lib/*.&ncurses-version;</userinput></screen>
|
||||
|
||||
<para>And fix a library that shouldn't be executable:</para>
|
||||
|
||||
<para><screen><userinput>chmod 644 /usr/lib/libncurses++.a</userinput></screen></para>
|
||||
<screen><userinput>chmod 644 /usr/lib/libncurses++.a</userinput></screen>
|
||||
|
||||
<para>Move the libraries to the <filename>/lib</filename> directory,
|
||||
where they're expected to reside:</para>
|
||||
|
||||
<para><screen><userinput>mv /usr/lib/libncurses.so.5* /lib</userinput></screen></para>
|
||||
<screen><userinput>mv /usr/lib/libncurses.so.5* /lib</userinput></screen>
|
||||
|
||||
<para>Since the libraries have been moved to
|
||||
<filename>/lib</filename>, a few symlinks are currently pointing
|
||||
towards non-existing files. Recreate those symlinks:</para>
|
||||
|
||||
<para><screen><userinput>ln -sf ../../lib/libncurses.so.5 /usr/lib/libncurses.so
|
||||
ln -sf libncurses.so /usr/lib/libcurses.so</userinput></screen></para>
|
||||
<screen><userinput>ln -sf ../../lib/libncurses.so.5 /usr/lib/libncurses.so
|
||||
ln -sf libncurses.so /usr/lib/libcurses.so</userinput></screen>
|
||||
</sect2>
|
||||
|
||||
|
@ -16,11 +16,11 @@ but it's up to the kernel to make the protocols available.</para>
|
||||
<para>The following patch will fix a small syntax problem with the source
|
||||
for the mii-tool binary:</para>
|
||||
|
||||
<para><screen><userinput>patch -Np1 -i ../&net-tools-mii-patch;</userinput></screen></para>
|
||||
<screen><userinput>patch -Np1 -i ../&net-tools-mii-patch;</userinput></screen>
|
||||
|
||||
<para>Prepare Net-tools for compilation with:</para>
|
||||
|
||||
<para><screen><userinput>make config</userinput></screen></para>
|
||||
<screen><userinput>make config</userinput></screen>
|
||||
|
||||
<para>If you intend to accept the default settings, you may skip the
|
||||
questions generated by <emphasis>make config</emphasis> by running
|
||||
@ -28,11 +28,11 @@ questions generated by <emphasis>make config</emphasis> by running
|
||||
|
||||
<para>Compile the package:</para>
|
||||
|
||||
<para><screen><userinput>make</userinput></screen></para>
|
||||
<screen><userinput>make</userinput></screen>
|
||||
|
||||
<para>And install it:</para>
|
||||
|
||||
<para><screen><userinput>make update</userinput></screen></para>
|
||||
<screen><userinput>make update</userinput></screen>
|
||||
|
||||
</sect2>
|
||||
|
||||
|
@ -5,15 +5,15 @@
|
||||
|
||||
<para>Prepare Patch for compilation:</para>
|
||||
|
||||
<para><screen><userinput>CPPFLAGS=-D_GNU_SOURCE ./configure --prefix=/usr</userinput></screen></para>
|
||||
<screen><userinput>CPPFLAGS=-D_GNU_SOURCE ./configure --prefix=/usr</userinput></screen>
|
||||
|
||||
<para>Compile the package:</para>
|
||||
|
||||
<para><screen><userinput>make</userinput></screen></para>
|
||||
<screen><userinput>make</userinput></screen>
|
||||
|
||||
<para>And install it:</para>
|
||||
|
||||
<para><screen><userinput>make install</userinput></screen></para>
|
||||
<screen><userinput>make install</userinput></screen>
|
||||
|
||||
</sect2>
|
||||
|
||||
|
@ -5,7 +5,7 @@
|
||||
|
||||
<para>Prepare Perl for compilation:</para>
|
||||
|
||||
<para><screen><userinput>./configure.gnu --prefix=/usr</userinput></screen></para>
|
||||
<screen><userinput>./configure.gnu --prefix=/usr</userinput></screen>
|
||||
|
||||
<para>If you want more control over the way Perl sets itself up to be
|
||||
built, you can run the interactive <userinput>Configure</userinput> script
|
||||
@ -15,22 +15,22 @@ above.</para>
|
||||
|
||||
<para>Compile the package:</para>
|
||||
|
||||
<para><screen><userinput>make</userinput></screen></para>
|
||||
<screen><userinput>make</userinput></screen>
|
||||
|
||||
<para>This package has a test suite available which can perform a number of
|
||||
checks to ensure it built correctly. Should you choose to run it, you first
|
||||
have to create a basic <filename>/etc/hosts</filename> file, needed by a
|
||||
couple of tests to resolve the name <emphasis>localhost</emphasis>:</para>
|
||||
|
||||
<para><screen><userinput>echo "127.0.0.1 localhost $(hostname)" > /etc/hosts</userinput></screen></para>
|
||||
<screen><userinput>echo "127.0.0.1 localhost $(hostname)" > /etc/hosts</userinput></screen>
|
||||
|
||||
<para>Now run the tests, if you wish:</para>
|
||||
|
||||
<para><screen><userinput>make test</userinput></screen></para>
|
||||
<screen><userinput>make test</userinput></screen>
|
||||
|
||||
<para>And install the package:</para>
|
||||
|
||||
<para><screen><userinput>make install</userinput></screen></para>
|
||||
<screen><userinput>make install</userinput></screen>
|
||||
|
||||
</sect2>
|
||||
|
||||
|
@ -5,7 +5,7 @@
|
||||
|
||||
<para>Compile Procinfo:</para>
|
||||
|
||||
<para><screen><userinput>make LDLIBS=-lncurses</userinput></screen></para>
|
||||
<screen><userinput>make LDLIBS=-lncurses</userinput></screen>
|
||||
|
||||
<para>The <emphasis>-lncurses</emphasis> switch overwrites the
|
||||
default switch, <emphasis>-ltermcap</emphasis>. This is done
|
||||
@ -13,7 +13,7 @@ because libtermcap is declared obsolete in favor of libncurses.</para>
|
||||
|
||||
<para>And install the package:</para>
|
||||
|
||||
<para><screen><userinput>make install</userinput></screen></para>
|
||||
<screen><userinput>make install</userinput></screen>
|
||||
|
||||
</sect2>
|
||||
|
||||
|
@ -6,19 +6,19 @@
|
||||
<para>First fix a locale problem that can crash <userinput>w</userinput> under
|
||||
certain locale settings:</para>
|
||||
|
||||
<para><screen><userinput>patch -Np1 -i ../&procps-patch;</userinput></screen></para>
|
||||
<screen><userinput>patch -Np1 -i ../&procps-patch;</userinput></screen>
|
||||
|
||||
<para>Now compile Procps:</para>
|
||||
|
||||
<para><screen><userinput>make</userinput></screen></para>
|
||||
<screen><userinput>make</userinput></screen>
|
||||
|
||||
<para>Install it:</para>
|
||||
|
||||
<para><screen><userinput>make install</userinput></screen></para>
|
||||
<screen><userinput>make install</userinput></screen>
|
||||
|
||||
<para>And remove a spurious library link:</para>
|
||||
|
||||
<para><screen><userinput>rm /lib/libproc.so</userinput></screen></para>
|
||||
<screen><userinput>rm /lib/libproc.so</userinput></screen>
|
||||
|
||||
</sect2>
|
||||
|
||||
|
@ -5,7 +5,7 @@
|
||||
|
||||
<para>Prepare Psmisc for compilation:</para>
|
||||
|
||||
<para><screen><userinput>./configure --prefix=/usr --exec-prefix=/</userinput></screen></para>
|
||||
<screen><userinput>./configure --prefix=/usr --exec-prefix=/</userinput></screen>
|
||||
|
||||
<para>The meaning of the configure option:</para>
|
||||
|
||||
@ -19,11 +19,11 @@ filesystem isn't mounted.</para></listitem>
|
||||
|
||||
<para>Compile the package:</para>
|
||||
|
||||
<para><screen><userinput>make</userinput></screen></para>
|
||||
<screen><userinput>make</userinput></screen>
|
||||
|
||||
<para>And install it:</para>
|
||||
|
||||
<para><screen><userinput>make install</userinput></screen></para>
|
||||
<screen><userinput>make install</userinput></screen>
|
||||
|
||||
<para>By default Psmisc's <userinput>pidof</userinput> program isn't installed.
|
||||
Generally, this isn't a problem because we later install the Sysvinit package,
|
||||
@ -31,7 +31,7 @@ which provides a better <userinput>pidof</userinput> program. But if you're not
|
||||
going to use Sysvinit, you should complete the installation of Psmisc by
|
||||
creating the following symlink:</para>
|
||||
|
||||
<para><screen><userinput>ln -s killall /bin/pidof</userinput></screen></para>
|
||||
<screen><userinput>ln -s killall /bin/pidof</userinput></screen>
|
||||
|
||||
</sect2>
|
||||
|
||||
|
@ -9,9 +9,9 @@ name "root" to be recognized, there need to be relevant entries in the
|
||||
<para>Create the <filename>/etc/passwd</filename> file by running the following
|
||||
command:</para>
|
||||
|
||||
<para><screen><userinput>cat > /etc/passwd << "EOF"</userinput>
|
||||
<screen><userinput>cat > /etc/passwd << "EOF"</userinput>
|
||||
root:x:0:0:root:/root:/bin/bash
|
||||
<userinput>EOF</userinput></screen></para>
|
||||
<userinput>EOF</userinput></screen>
|
||||
|
||||
<para>The actual password for <emphasis>root</emphasis> (the "x" here is just a
|
||||
placeholder) will be set later.</para>
|
||||
@ -19,7 +19,7 @@ placeholder) will be set later.</para>
|
||||
<para>Create the <filename>/etc/group</filename> file by running the following
|
||||
command:</para>
|
||||
|
||||
<para><screen><userinput>cat > /etc/group << "EOF"</userinput>
|
||||
<screen><userinput>cat > /etc/group << "EOF"</userinput>
|
||||
root:x:0:
|
||||
bin:x:1:
|
||||
sys:x:2:
|
||||
@ -32,7 +32,7 @@ disk:x:8:
|
||||
lp:x:9:
|
||||
dialout:x:10:
|
||||
audio:x:11:
|
||||
<userinput>EOF</userinput></screen></para>
|
||||
<userinput>EOF</userinput></screen>
|
||||
|
||||
<para>The created groups aren't part of any standard -- they are the groups
|
||||
that the MAKEDEV script in the next section uses. Besides the group "root", the
|
||||
@ -47,7 +47,7 @@ resolution will start working immediately after the
|
||||
created, because we installed a full Glibc in Chapter 5. This will get rid of
|
||||
the <quote>I have no name!</quote> prompt.</para>
|
||||
|
||||
<para><screen><userinput>exec /tools/bin/bash --login +h</userinput></screen></para>
|
||||
<screen><userinput>exec /tools/bin/bash --login +h</userinput></screen>
|
||||
|
||||
|
||||
</sect1>
|
||||
|
@ -12,10 +12,10 @@ DejaGnu, which were used for running tests on the software as it was built. If
|
||||
you want to use these programs later, you will need to compile and install them
|
||||
on your new LFS system.</para>
|
||||
|
||||
<para><screen><userinput>chroot $LFS /usr/bin/env -i \
|
||||
<screen><userinput>chroot $LFS /usr/bin/env -i \
|
||||
HOME=/root TERM=$TERM PS1='\u:\w\$ ' \
|
||||
PATH=/bin:/usr/bin:/sbin:/usr/sbin \
|
||||
/bin/bash --login</userinput></screen></para>
|
||||
/bin/bash --login</userinput></screen>
|
||||
|
||||
</sect1>
|
||||
|
||||
|
@ -5,21 +5,21 @@
|
||||
|
||||
<para>Prepare Sed for compilation:</para>
|
||||
|
||||
<para><screen><userinput>./configure --prefix=/usr --bindir=/bin</userinput></screen></para>
|
||||
<screen><userinput>./configure --prefix=/usr --bindir=/bin</userinput></screen>
|
||||
|
||||
<para>Compile the package:</para>
|
||||
|
||||
<para><screen><userinput>make</userinput></screen></para>
|
||||
<screen><userinput>make</userinput></screen>
|
||||
|
||||
<para>This package has a test suite available which can perform a number of
|
||||
checks to ensure it built correctly. Should you choose to run it, the
|
||||
following command will do so:</para>
|
||||
|
||||
<para><screen><userinput>make check</userinput></screen></para>
|
||||
<screen><userinput>make check</userinput></screen>
|
||||
|
||||
<para>And install the package:</para>
|
||||
|
||||
<para><screen><userinput>make install</userinput></screen></para>
|
||||
<screen><userinput>make install</userinput></screen>
|
||||
|
||||
</sect2>
|
||||
|
||||
|
@ -14,8 +14,8 @@ proper place, create them now, with their proper permissions:</para>
|
||||
<para>Create these files with their proper permissions by running the
|
||||
following commands:</para>
|
||||
|
||||
<para><screen><userinput>touch /var/run/utmp /var/log/{btmp,lastlog,wtmp}
|
||||
chmod 644 /var/run/utmp /var/log/{btmp,lastlog,wtmp}</userinput></screen></para>
|
||||
<screen><userinput>touch /var/run/utmp /var/log/{btmp,lastlog,wtmp}
|
||||
chmod 644 /var/run/utmp /var/log/{btmp,lastlog,wtmp}</userinput></screen>
|
||||
|
||||
<para>The <filename>/var/run/utmp</filename> file lists the users that are
|
||||
currently logged in, the <filename>/var/log/wtmp</filename> file who
|
||||
@ -33,30 +33,30 @@ the package incorrectly assumes it is going to be located at
|
||||
<filename>/bin/passwd</filename>. To work around this bug, create a dummy
|
||||
<filename>passwd</filename> file, so that it gets hard-wired properly:</para>
|
||||
|
||||
<para><screen><userinput>touch /usr/bin/passwd</userinput></screen></para>
|
||||
<screen><userinput>touch /usr/bin/passwd</userinput></screen>
|
||||
|
||||
<para>The current shadow suite has a problem in the newgrp command which causes
|
||||
it to fail. The following patch (also appearing in Shadow's CVS code) fixes
|
||||
this problem.</para>
|
||||
|
||||
<para><screen><userinput>patch -Np1 -i ../&shadow-patch;</userinput></screen></para>
|
||||
<screen><userinput>patch -Np1 -i ../&shadow-patch;</userinput></screen>
|
||||
|
||||
<para>Now prepare Shadow for compilation:</para>
|
||||
|
||||
<para><screen><userinput>./configure --prefix=/usr --libdir=/usr/lib --enable-shared</userinput></screen></para>
|
||||
<screen><userinput>./configure --prefix=/usr --libdir=/usr/lib --enable-shared</userinput></screen>
|
||||
|
||||
<para>Compile the package:</para>
|
||||
|
||||
<para><screen><userinput>make</userinput></screen></para>
|
||||
<screen><userinput>make</userinput></screen>
|
||||
|
||||
<para>And install it:</para>
|
||||
|
||||
<para><screen><userinput>make install</userinput></screen></para>
|
||||
<screen><userinput>make install</userinput></screen>
|
||||
|
||||
<para>Shadow uses two files to configure authentication settings for the
|
||||
system. Install these two config files:</para>
|
||||
|
||||
<para><screen><userinput>cp etc/{limits,login.access} /etc</userinput></screen></para>
|
||||
<screen><userinput>cp etc/{limits,login.access} /etc</userinput></screen>
|
||||
|
||||
<para>We want to change the password method to enable MD5 passwords which are
|
||||
theoretically more secure than the default "crypt" method and also allow
|
||||
@ -66,9 +66,9 @@ mailboxes to the current location at
|
||||
<filename class="directory">/var/mail</filename>. We do this by changing the
|
||||
relevant configuration file while copying it to its destination:</para>
|
||||
|
||||
<para><screen><userinput>sed -e 's%/var/spool/mail%/var/mail%' \
|
||||
<screen><userinput>sed -e 's%/var/spool/mail%/var/mail%' \
|
||||
-e 's%#MD5_CRYPT_ENAB.no%MD5_CRYPT_ENAB yes%' \
|
||||
etc/login.defs.linux > /etc/login.defs</userinput></screen></para>
|
||||
etc/login.defs.linux > /etc/login.defs</userinput></screen>
|
||||
|
||||
<note><para>Be extra careful when typing all of the above. It is probably safer
|
||||
to cut-and-paste it rather than try and type it all in.</para></note>
|
||||
@ -77,32 +77,32 @@ to cut-and-paste it rather than try and type it all in.</para></note>
|
||||
<userinput>vigr</userinput> program should exist too. Since the installation
|
||||
procedure doesn't create this program, create a symlink manually:</para>
|
||||
|
||||
<para><screen><userinput>ln -s vipw /usr/sbin/vigr</userinput></screen></para>
|
||||
<screen><userinput>ln -s vipw /usr/sbin/vigr</userinput></screen>
|
||||
|
||||
<para>As the <filename>/bin/vipw</filename> symlink is redundant (and even
|
||||
pointing to a non-existent file), remove it:</para>
|
||||
|
||||
<para><screen><userinput>rm /bin/vipw</userinput></screen></para>
|
||||
<screen><userinput>rm /bin/vipw</userinput></screen>
|
||||
|
||||
<para>Now move the <userinput>sg</userinput> program to its proper place:</para>
|
||||
|
||||
<para><screen><userinput>mv /bin/sg /usr/bin</userinput></screen></para>
|
||||
<screen><userinput>mv /bin/sg /usr/bin</userinput></screen>
|
||||
|
||||
<para>And move Shadow's dynamic libraries to a more appropriate location:</para>
|
||||
|
||||
<para><screen><userinput>mv /usr/lib/lib{shadow,misc}.so.0* /lib</userinput></screen></para>
|
||||
<screen><userinput>mv /usr/lib/lib{shadow,misc}.so.0* /lib</userinput></screen>
|
||||
|
||||
<para>As some packages expect to find the just-moved libraries in
|
||||
<filename>/usr/lib</filename>, create the following symlinks:</para>
|
||||
|
||||
<para><screen><userinput>ln -sf ../../lib/libshadow.so.0 /usr/lib/libshadow.so
|
||||
ln -sf ../../lib/libmisc.so.0 /usr/lib/libmisc.so</userinput></screen></para>
|
||||
<screen><userinput>ln -sf ../../lib/libshadow.so.0 /usr/lib/libshadow.so
|
||||
ln -sf ../../lib/libmisc.so.0 /usr/lib/libmisc.so</userinput></screen>
|
||||
|
||||
<para>Coreutils has already installed a <userinput>groups</userinput> program
|
||||
in <filename>/usr/bin</filename>. If you wish, you can remove the one
|
||||
installed by Shadow:</para>
|
||||
|
||||
<para><screen><userinput>rm /bin/groups</userinput></screen></para>
|
||||
<screen><userinput>rm /bin/groups</userinput></screen>
|
||||
|
||||
</sect2>
|
||||
|
||||
|
@ -5,11 +5,11 @@
|
||||
|
||||
<para>Compile Sysklogd:</para>
|
||||
|
||||
<para><screen><userinput>make</userinput></screen></para>
|
||||
<screen><userinput>make</userinput></screen>
|
||||
|
||||
<para>And install it:</para>
|
||||
|
||||
<para><screen><userinput>make install</userinput></screen></para>
|
||||
<screen><userinput>make install</userinput></screen>
|
||||
|
||||
</sect2>
|
||||
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user