mirror of https://github.com/tLDP/LDP
new
This commit is contained in:
parent
85c6382c29
commit
b4398edb7a
|
@ -0,0 +1,9 @@
|
|||
<sect2>
|
||||
<title>Gawk Installation Dependencies</title>
|
||||
|
||||
<para>Last checked against version &gawk-depversion;.</para>
|
||||
|
||||
<literallayout>(No dependencies checked yet.)</literallayout>
|
||||
|
||||
</sect2>
|
||||
|
|
@ -0,0 +1,35 @@
|
|||
<sect2><title>Contents of Gawk</title>
|
||||
|
||||
<para>Last checked against version &gawk-contversion;.</para>
|
||||
|
||||
<sect3><title>Program Files</title>
|
||||
<para>awk, gawk, gawk-3.1.1, grcat, igawk, pgawk, pgawk-3.1.1,
|
||||
pwcat</para></sect3>
|
||||
|
||||
<sect3><title>Descriptions</title>
|
||||
|
||||
<sect4><title>awk</title>
|
||||
<para>awk is a symbolic link to gawk.</para></sect4>
|
||||
|
||||
<sect4><title>gawk, gawk-3.1.1</title>
|
||||
<para>gawk is the GNU implementation of awk,
|
||||
a pattern scanning and processing language.</para></sect4>
|
||||
|
||||
<sect4><title>grcat</title>
|
||||
<para>grcat concatenates the group database,
|
||||
/etc/group.</para></sect4>
|
||||
|
||||
<sect4><title>igawk</title>
|
||||
<para>igawk is a shell script which gives gawk the ability to
|
||||
include files.</para></sect4>
|
||||
|
||||
<sect4><title>pgawk, pgawk-3.1.1</title>
|
||||
<para>pgawk is the profiling version of gawk.</para></sect4>
|
||||
|
||||
<sect4><title>pwcat</title>
|
||||
<para>pwcat concatenates the password database,
|
||||
/etc/passwd.</para></sect4>
|
||||
|
||||
</sect3>
|
||||
|
||||
</sect2>
|
|
@ -0,0 +1,10 @@
|
|||
<sect2>
|
||||
<title>Official Download Location</title>
|
||||
|
||||
<para><literallayout>Gawk (&gawk-version;):
|
||||
<ulink url="ftp://ftp.gnu.org/pub/gnu/gawk/"/>
|
||||
|
||||
Gawk Patch (&gawk-patch-version;):
|
||||
<ulink url="&ftp;/"/>
|
||||
<ulink url="&http;/"/></literallayout></para>
|
||||
</sect2>
|
|
@ -0,0 +1,10 @@
|
|||
<sect1 id="aa-gawk">
|
||||
<title>Gawk</title>
|
||||
<?dbhtml filename="gawk.html" dir="appendixa"?>
|
||||
|
||||
&aa-gawk-down;
|
||||
&aa-gawk-desc;
|
||||
&aa-gawk-dep;
|
||||
|
||||
</sect1>
|
||||
|
|
@ -0,0 +1,7 @@
|
|||
<sect2>
|
||||
<title>Linux threads man pages installation Dependencies</title>
|
||||
|
||||
<para>Not yet checked.</para>
|
||||
|
||||
</sect2>
|
||||
|
|
@ -0,0 +1,17 @@
|
|||
<sect2><title>Contents of Linux threads man pages</title>
|
||||
|
||||
<para>Last checked against version &linuxthreadsmanpages-contversion;.</para>
|
||||
|
||||
<sect3><title>Support Files</title>
|
||||
<para>Various Linux threads API manual pages.</para></sect3>
|
||||
|
||||
<sect3><title>Descriptions</title>
|
||||
|
||||
<sect4><title>Manual pages</title>
|
||||
<para>Contains the manual pages regarding the Glibc Linux threads
|
||||
API.</para></sect4>
|
||||
|
||||
</sect3>
|
||||
|
||||
</sect2>
|
||||
|
|
@ -0,0 +1,9 @@
|
|||
<sect1 id="aa-linuxthreadsmanpages">
|
||||
<title>Linux threads man pages</title>
|
||||
<?dbhtml filename="linuxthreadsmanpages.html" dir="appendixa"?>
|
||||
|
||||
&aa-linuxthreadsmanpages-desc;
|
||||
&aa-linuxthreadsmanpages-dep;
|
||||
|
||||
</sect1>
|
||||
|
|
@ -0,0 +1,6 @@
|
|||
<sect2>
|
||||
<title>Zlib Installation Dependencies</title>
|
||||
|
||||
<literallayout>No dependencies checked yet.</literallayout>
|
||||
</sect2>
|
||||
|
|
@ -0,0 +1,17 @@
|
|||
<sect2><title>Contents of Zlib</title>
|
||||
|
||||
<para>Last checked against version &zlib-contversion;.</para>
|
||||
|
||||
<sect3><title>Library Files</title>
|
||||
<para>libz[a,so]</para></sect3>
|
||||
|
||||
<sect3><title>Descriptions</title>
|
||||
|
||||
<sect4><title>libz</title>
|
||||
<para>This is the zlib library, which is used by many programs for its
|
||||
compression and uncompression functions.</para></sect4>
|
||||
|
||||
</sect3>
|
||||
|
||||
</sect2>
|
||||
|
|
@ -0,0 +1,6 @@
|
|||
<sect2>
|
||||
<title>Official Download Location</title>
|
||||
|
||||
<para><literallayout>Zlib (&zlib-version;):
|
||||
<ulink url="ftp://ftp.info-zip.org/pub/infozip/zlib/"/></literallayout></para>
|
||||
</sect2>
|
|
@ -0,0 +1,10 @@
|
|||
<sect1 id="aa-zlib">
|
||||
<title>Zlib</title>
|
||||
<?dbhtml filename="zlib.html" dir="appendixa"?>
|
||||
|
||||
&aa-zlib-down;
|
||||
&aa-zlib-desc;
|
||||
&aa-zlib-dep;
|
||||
|
||||
</sect1>
|
||||
|
|
@ -0,0 +1,124 @@
|
|||
<sect1 id="ch01-acknowledgments">
|
||||
<title>Acknowledgments</title>
|
||||
<?dbhtml filename="acknowledgements.html" dir="chapter01"?>
|
||||
|
||||
<para>We thank the following people and organizations for their
|
||||
contributions toward the Linux From Scratch project:</para>
|
||||
|
||||
<itemizedlist>
|
||||
|
||||
<listitem><para><ulink url="mailto:strider@linux.com">Mark Stone</ulink>
|
||||
<mstone@linux.com> for donating the linuxfromscratch.org
|
||||
server.</para></listitem>
|
||||
|
||||
<listitem><para><ulink url="http://www.valinux.com">VA Linux
|
||||
Systems</ulink> for providing rackspace and bandwidth for the
|
||||
linuxfromscratch.org server.</para></listitem>
|
||||
|
||||
<listitem><para><ulink url="http://fredan.org">Fredrik Danerklint</ulink>
|
||||
for running the se.linuxfromscratch.org mirror.</para></listitem>
|
||||
|
||||
<listitem><para><ulink url="mailto:tim@idge.net">Tim Jackson</ulink>
|
||||
<tim@idge.net> for running the linuxfromscratch.idge.net
|
||||
mirror.</para></listitem>
|
||||
|
||||
<listitem><para><ulink url="mailto:hrx@hrxnet.de">Hagen Herrschaft</ulink>
|
||||
<hrx@hrxnet.de> for running the de.linuxfromscratch.org
|
||||
mirrors, and for his donation of a P4-2.2GHz system to the LFS
|
||||
project.</para></listitem>
|
||||
|
||||
<listitem><para><ulink url="http://www.mirror.ac.uk">UK Mirror
|
||||
Service</ulink> for running the linuxfromscratch.mirror.ac.uk mirror.</para></listitem>
|
||||
|
||||
<listitem><para><ulink url="mailto:guido@primerelay.net">Guido
|
||||
Passet</ulink> <guido@primerelay.net> for running the
|
||||
www.nl.linuxfromscratch.org and ftp.snt.utwente.nl
|
||||
mirrors.</para></listitem>
|
||||
|
||||
<listitem><para><ulink url="mailto:timothy@linuxfromscratch.org">Timothy
|
||||
Bauscher</ulink> <timothy@linuxfromscratch.org> for being more than a
|
||||
great help in editing this book.</para></listitem>
|
||||
|
||||
<listitem><para><ulink url="mailto:markh@linuxfromscratch.org">Mark
|
||||
Hymers</ulink> <markh@linuxfromscratch.org> for being more than a
|
||||
great help in editing this book.</para></listitem>
|
||||
|
||||
<listitem><para><ulink url="mailto:marc_heerdink@softhome.net">Marc
|
||||
Heerdink</ulink> <marc_heerdink@softhome.net> for also being a great
|
||||
help in editing this book.</para></listitem>
|
||||
|
||||
<listitem><para><ulink url="http://www.dreamwvr.com/services">DREAMWVR.COM</ulink> for their ongoing sponsorship by donating various resources to the LFS and
|
||||
related sub projects.</para></listitem>
|
||||
|
||||
<listitem><para><ulink url="mailto:jan.niemann@tu.bs.de">Jan
|
||||
Niemann</ulink> <jan.niemann@tu.bs.de> for running the
|
||||
www.de.linuxfromscratch.org mirror.</para></listitem>
|
||||
|
||||
<listitem><para><ulink url="mailto:westermann@linux-provider.net">Torsten
|
||||
Westermann</ulink> <westermann@linux-provider.net> for running the
|
||||
lfs.linux-provider.net mirror.</para></listitem>
|
||||
|
||||
<listitem><para><ulink url="mailto:ian@ichilton.co.uk">Ian
|
||||
Chilton</ulink> <ian@ichilton.co.uk> for running the
|
||||
www.us.linuxfromscratch.org and www.linuxfromscratch.co.uk
|
||||
mirrors.</para></listitem>
|
||||
|
||||
<listitem><para><ulink url="mailto:dag@stenstad.net">Dag
|
||||
Stenstad</ulink> <dag@stenstad.net> for providing the
|
||||
www.no.linuxfromscratch.org mirror, and
|
||||
<ulink url="mailto:ian@ichilton.co.uk">Ian Chilton</ulink>
|
||||
<ian@ichilton.co.uk> for running it.</para></listitem>
|
||||
|
||||
<listitem><para><ulink url="mailto:Antonin.Sprinzl@tuwien.ac.at">Antonin
|
||||
Sprinzl</ulink> <Antonin.Sprinzl@tuwien.ac.at> for running the
|
||||
www.at.linuxfromscratch.org mirror.</para></listitem>
|
||||
|
||||
<listitem><para><ulink url="mailto:jason@dstc.edu.au">Jason
|
||||
Andrade</ulink> <jason@dstc.edu.au> for running the
|
||||
www.au.linuxfromscratch.org mirror.</para></listitem>
|
||||
|
||||
<listitem><para><ulink url="mailto:ian@wpi.edu">Ian
|
||||
Cooper</ulink> <ian@wpi.edu> for running the
|
||||
www.us2.linuxfromscratch.org mirror.</para></listitem>
|
||||
|
||||
<listitem><para><ulink url="http://www.valinux.com">VA Linux
|
||||
Systems</ulink> who,
|
||||
on behalf of <ulink url="http://www.linux.com">Linux.com</ulink>, donated
|
||||
a VA Linux 420 (former StartX SP2) workstation
|
||||
towards this project.</para></listitem>
|
||||
|
||||
<listitem><para><ulink url="mailto:johan@linuxfromscratch.org">Johan
|
||||
Lenglet</ulink> <johan@linuxfromscratch.org> for leading the French
|
||||
LFS translation project.</para></listitem>
|
||||
|
||||
<listitem><para><ulink url="mailto:highos@linuxfromscratch.org">Jesse
|
||||
Tie-Ten-Quee</ulink> <highos@linuxfromscratch.org> for donating a
|
||||
Yamaha CDRW 8824E cd writer.</para></listitem>
|
||||
|
||||
<listitem><para><ulink url="http://www.oreilly.com">O'Reilly</ulink> for
|
||||
donating books on SQL and PHP.</para></listitem>
|
||||
|
||||
<listitem><para>Robert Briggs for donating the linuxfromscratch.org and
|
||||
linuxfromscratch.com domain names.</para></listitem>
|
||||
|
||||
<listitem><para><ulink url="mailto:bkenoah@oswd.org">Frank
|
||||
Skettino</ulink> <bkenoah@oswd.org> at <ulink
|
||||
url="http://www.oswd.org">OSWD</ulink> for coming up with the
|
||||
initial design of the LFS website.</para></listitem>
|
||||
|
||||
<listitem><para><ulink url="mailto:garrett@linux.com">Garrett
|
||||
LeSage</ulink> <garrett@linux.com> for creating the LFS
|
||||
banner.</para></listitem>
|
||||
|
||||
<listitem><para><ulink url="mailto:dean@vipersoft.co.uk">Dean
|
||||
Benson</ulink> <dean@vipersoft.co.uk> for helping out financially
|
||||
with setting up the LFS non-profit organization.</para></listitem>
|
||||
|
||||
<listitem><para>Countless other people on the various LFS mailinglists who are
|
||||
making this book happen by giving their suggestions, testing the book
|
||||
and submitting bug reports.</para></listitem>
|
||||
|
||||
</itemizedlist>
|
||||
|
||||
</sect1>
|
||||
|
|
@ -0,0 +1,9 @@
|
|||
<sect2>
|
||||
<title>lfs-chat</title>
|
||||
|
||||
<para>The lfs-chat list is a hangout place for members of the LFS Community
|
||||
(that includes you as well) and just chat about stuff. Doesn't even have to
|
||||
be computer related. Anything goes, nothing is off-topic.</para>
|
||||
|
||||
</sect2>
|
||||
|
|
@ -0,0 +1,29 @@
|
|||
<sect1 id="ch02-aboutsbus">
|
||||
<title>About SBUs</title>
|
||||
<?dbhtml filename="aboutsbus.html" dir="chapter02"?>
|
||||
|
||||
<para>SBUs are <emphasis>Static Bash Units</emphasis> and they are our way
|
||||
of identifying how long a package takes to compile. Why don't we use normal
|
||||
times like anybody else?</para>
|
||||
|
||||
<para>The biggest problem is that times cannot be accurate, not even a
|
||||
little bit. So many people install LFS on so many different systems, the
|
||||
times it takes to compile something varies too much. One package may take
|
||||
20 minutes on one system, but that same package may take 3 days on another
|
||||
(this is not an exaggeration). So instead we've come up with a
|
||||
<emphasis>Static Bash Unit</emphasis> or <emphasis>SBU</emphasis>.</para>
|
||||
|
||||
<para>It works like this: the very first package you compile in this book
|
||||
is Bash in Chapter 5 and it'll be statically linked. The time it takes to
|
||||
compile this package will be the basis and called the SBU. All other
|
||||
compile times are relative to the time it takes to install Bash. For
|
||||
example, GCC-3.2 takes about 9.5 SBUs and it's proven that this number is
|
||||
fairly consistent among a lot of different systems. So multiply 9.5 by the
|
||||
number of seconds it takes for Bash to install (the SBU value) and you get
|
||||
a close approximation of how long GCC will take on your system.</para>
|
||||
|
||||
<para>Note: We've seen that SBUs don't work well on SMP based machines. So
|
||||
all bets are off if you're lucky enough to have an SMP setup.</para>
|
||||
|
||||
</sect1>
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
Ed Patch (&ed-patch-version;) - &ed-patch-size;:
|
||||
<ulink url="&ftp;/ed-&ed-patch-version;.patch.bz2"/>
|
||||
<ulink url="&http;/ed-&ed-patch-version;.patch.bz2"/>
|
|
@ -0,0 +1,3 @@
|
|||
Fileutils Patch (&fileutils-patch-version;) - &fileutils-patch-size;:
|
||||
<ulink url="&ftp;/fileutils-&fileutils-patch-version;.patch.bz2"/>
|
||||
<ulink url="&http;/fileutils-&fileutils-patch-version;.patch.bz2"/>
|
|
@ -0,0 +1,3 @@
|
|||
Gawk Patch (&gawk-patch-version;) - &gawk-patch-size;:
|
||||
<ulink url="&ftp;/gawk-&gawk-patch-version;.patch.bz2"/>
|
||||
<ulink url="&http;/gawk-&gawk-patch-version;.patch.bz2"/>
|
|
@ -0,0 +1,3 @@
|
|||
Gawk (&gawk-version;) - &gawk-size;:
|
||||
<ulink url="&ftp;/gawk-&gawk-version;.tar.bz2"/>
|
||||
<ulink url="&http;/gawk-&gawk-version;.tar.bz2"/>
|
|
@ -0,0 +1,3 @@
|
|||
Glibc Patch (&glibc-patch-version;) - &glibc-patch-size;:
|
||||
<ulink url="&ftp;/glibc-&glibc-patch-version;.patch.bz2"/>
|
||||
<ulink url="&http;/glibc-&glibc-patch-version;.patch.bz2"/>
|
|
@ -0,0 +1,3 @@
|
|||
Man Patch (&man-patch-version;) - &man-patch-size;
|
||||
<ulink url="&ftp;/man-&man-patch-version;.patch.bz2"/>
|
||||
<ulink url="&http;/man-&man-patch-version;.patch.bz2"/>
|
|
@ -0,0 +1,3 @@
|
|||
Ncurses Patch (&ncurses-patch-version;) - &ncurses-patch-size;:
|
||||
<ulink url="&ftp;/ncurses-&ncurses-patch-version;.patch.bz2"/>
|
||||
<ulink url="&http;/ncurses-&ncurses-patch-version;.patch.bz2"/>
|
|
@ -0,0 +1,3 @@
|
|||
Procps Patch (&procps-patch-version;) - &procps-patch-size;:
|
||||
<ulink url="&ftp;/procps-&procps-patch-version;.patch.bz2"/>
|
||||
<ulink url="&http;/procps-&procps-patch-version;.patch.bz2"/>
|
|
@ -0,0 +1,3 @@
|
|||
Sh-utils Hostname Patch (&sh-utils-hostname-patch-version;) - &sh-utils-hostname-patch-size;:
|
||||
<ulink url="&ftp;/sh-utils-&sh-utils-hostname-patch-version;.patch.bz2"/>
|
||||
<ulink url="&http;/sh-utils-&sh-utils-hostname-patch-version;.patch.bz2"/>
|
|
@ -0,0 +1,3 @@
|
|||
Vim Patch (&vim-patch-version;) - &vim-patch-size;:
|
||||
<ulink url="&ftp;/vim-&vim-patch-version;.patch.bz2"/>
|
||||
<ulink url="&http;/vim-&vim-patch-version;.patch.bz2"/>
|
|
@ -0,0 +1,3 @@
|
|||
Zlib (&zlib-version;) - &zlib-size;:
|
||||
<ulink url="&ftp;/zlib-&zlib-version;.tar.bz2"/>
|
||||
<ulink url="&http;/zlib-&zlib-version;.tar.bz2"/>
|
|
@ -0,0 +1,20 @@
|
|||
<sect1 id="ch05-creatingstaticdir">
|
||||
<title>Creating the $LFS/static directory</title>
|
||||
<?dbhtml filename="creatingstaticdir.html" dir="chapter05"?>
|
||||
|
||||
<para>As explained in this chapter's introduction, everything we install
|
||||
from this chapter will be installed under the <filename
|
||||
class="directory">$LFS/static</filename> directory. This way it won't
|
||||
pollute the LFS partition with a bunch of temporary files. All we need to
|
||||
do is create this directory so we can start installing. Simply run this
|
||||
command to create the directory:</para>
|
||||
|
||||
<para><screen><userinput>mkdir $LFS/static</userinput></screen></para>
|
||||
|
||||
<para>You may want to move the packages you downloaded in Chapter 3 to this
|
||||
<filename class="directory">$LFS/static</filename> directory, perhaps
|
||||
create a subdirectory <filename
|
||||
class="directory">$LFS/static/src</filename> to keep them in.</para>
|
||||
|
||||
</sect1>
|
||||
|
|
@ -0,0 +1,9 @@
|
|||
<sect2>
|
||||
<title>Command explanations</title>
|
||||
|
||||
<para><userinput>patch -Np1 -i ../findutils-&findutils-patch-version;.patch</userinput>: This
|
||||
patch is to fix some compilation errors by
|
||||
avoiding a variable conflict and changing some bad syntax.</para>
|
||||
|
||||
</sect2>
|
||||
|
|
@ -0,0 +1,16 @@
|
|||
<sect2>
|
||||
<title>Installing Findutils</title>
|
||||
|
||||
<para>This package requires its patch to be applied before you can
|
||||
install it. Make sure it's unpacked before running the installation
|
||||
commands.</para>
|
||||
|
||||
<para>Install Findutils by running the following commands:</para>
|
||||
|
||||
<para><screen><userinput>patch -Np1 -i ../findutils-&findutils-patch-version;.patch &&
|
||||
CPPFLAGS=-Dre_max_failures=re_max_failures2 \
|
||||
./configure --prefix=$LFS/static &&
|
||||
make LDFLAGS=-static &&
|
||||
make install</userinput></screen></para>
|
||||
|
||||
</sect2>
|
|
@ -0,0 +1,14 @@
|
|||
<sect1 id="ch05-findutils">
|
||||
<title>Installing Findutils-&findutils-version;</title>
|
||||
<?dbhtml filename="findutils.html" dir="chapter05"?>
|
||||
|
||||
<screen>Estimated build time: &findutils-time-static;
|
||||
Estimated required disk space: &findutils-compsize-static;</screen>
|
||||
|
||||
&c5-findutils-inst;
|
||||
&c5-findutils-exp;
|
||||
&aa-findutils-desc;
|
||||
&aa-findutils-dep;
|
||||
|
||||
</sect1>
|
||||
|
|
@ -0,0 +1,12 @@
|
|||
<sect2>
|
||||
<title>Installation of Gawk</title>
|
||||
|
||||
<para>Install Gawk by running the following commands:</para>
|
||||
|
||||
<para><screen><userinput>CPPFLAGS=-Dre_max_failures=re_max_failures2 \
|
||||
./configure --prefix=$LFS/static --disable-nls &&
|
||||
make LDFLAGS=-static &&
|
||||
make install</userinput></screen></para>
|
||||
|
||||
</sect2>
|
||||
|
|
@ -0,0 +1,13 @@
|
|||
<sect1 id="ch05-gawk">
|
||||
<title>Installing Gawk-&gawk-version;</title>
|
||||
<?dbhtml filename="gawk.html" dir="chapter05"?>
|
||||
|
||||
<screen>Estimated build time: &gawk-time-static;
|
||||
Estimated required disk space: &gawk-compsize-static;</screen>
|
||||
|
||||
&c5-gawk-inst;
|
||||
&aa-gawk-desc;
|
||||
&aa-gawk-dep;
|
||||
|
||||
</sect1>
|
||||
|
|
@ -0,0 +1,10 @@
|
|||
<sect2>
|
||||
<title>Command explanations</title>
|
||||
|
||||
<para><userinput>--disable-perl-regexp:</userinput> This configure option
|
||||
makes sure Grep is not linked against the PCRE library, which is often
|
||||
only available as a shared library in distributions. Not using this option
|
||||
might result in a compilation error.</para>
|
||||
|
||||
</sect2>
|
||||
|
|
@ -0,0 +1,15 @@
|
|||
<sect2>
|
||||
<title>Installation of Util-linux</title>
|
||||
|
||||
<para>We only need the mount and umount programs at the moment, so we won't
|
||||
be compiling the entire package.</para>
|
||||
|
||||
<para>Install Util-linux by running the following commands:</para>
|
||||
|
||||
<para><screen><userinput>./configure &&
|
||||
make -C lib &&
|
||||
make -C mount LDFLAGS=-static mount umount &&
|
||||
cp mount/{mount,umount} $LFS/static/bin</userinput></screen></para>
|
||||
|
||||
</sect2>
|
||||
|
|
@ -0,0 +1,11 @@
|
|||
<sect1 id="ch05-utillinux">
|
||||
<title>Installing Util-linux-&util-linux-version;</title>
|
||||
<?dbhtml filename="util-linux.html" dir="chapter05"?>
|
||||
|
||||
<screen>Estimated build time: &util-linux-time-static;
|
||||
Estimated required disk space: &util-linux-compsize-static;</screen>
|
||||
|
||||
&c5-utillinux-inst;
|
||||
&aa-utillinux-dep;
|
||||
|
||||
</sect1>
|
|
@ -0,0 +1,32 @@
|
|||
<sect2><title>Configuring your keyboard</title>
|
||||
|
||||
<para>Nothing is more annoying than using Linux with a wrong keymap loaded
|
||||
for your keyboard. If you have a default US keyboard, you can skip this
|
||||
section. The US keymap file is the default if you don't change it.</para>
|
||||
|
||||
<para>To set the default keymap file, create the
|
||||
<filename class="symlink">/usr/share/kbd/keymaps/defkeymap.map.gz</filename>
|
||||
symlink by running the following commands:</para>
|
||||
|
||||
<para><screen><userinput>ln -s <path/to/keymap> /usr/share/kbd/keymaps/defkeymap.map.gz</userinput></screen></para>
|
||||
|
||||
<para>Replace <path/to/keymap> with the your keyboard's map file. For
|
||||
example, if you have a Dutch keyboard, you would run:</para>
|
||||
|
||||
<para><screen><userinput>ln -s i386/qwerty/nl.map.gz /usr/share/kbd/keymaps/defkeymap.map.gz</userinput></screen></para>
|
||||
|
||||
<para>A second option to configure your keyboard's layout is to compile
|
||||
the keymap directly into the kernel. This will make sure that your
|
||||
keyboard always works as expected, even when you have booted into
|
||||
maintenance mode (by passing `init=/bin/sh' to the kernel) in which case
|
||||
the bootscript that normally sets up your keymap isn't run.</para>
|
||||
|
||||
<para>Run the following command to patch the correct keymap into the
|
||||
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/drivers/char/defkeymap.c</userinput></screen></para>
|
||||
|
||||
</sect2>
|
||||
|
|
@ -0,0 +1,17 @@
|
|||
<sect1 id="ch06-createfiles">
|
||||
<title>Creating the bash and sh symlinks</title>
|
||||
<?dbhtml filename="createfiles.html" dir="chapter06"?>
|
||||
|
||||
<para>Some programs hard-wire paths to programs which don't exist yet. In
|
||||
order to satisfy these programs, we create the symbolic links
|
||||
<filename>/bin/bash</filename> and <filename>/bin/sh</filename>, both
|
||||
pointing to the static <filename>bash</filename> program.</para>
|
||||
|
||||
<para>Create the <filename>/bin/bash</filename> and <filename>/bin/sh</filename>
|
||||
symlinks by running the following commands:</para>
|
||||
|
||||
<para><screen><userinput>ln -s /static/bin/bash /bin/bash &&
|
||||
ln -s bash /bin/sh</userinput></screen></para>
|
||||
|
||||
</sect1>
|
||||
|
|
@ -0,0 +1,62 @@
|
|||
<sect1 id="ch06-creatingdirs">
|
||||
<title>Creating directories</title>
|
||||
<?dbhtml filename="creatingdirs.html" dir="chapter06"?>
|
||||
|
||||
<para>Let's now create some structure in our LFS file system. Let's create
|
||||
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,etc/opt,home,lib,mnt,proc} &&
|
||||
mkdir -p /{root,sbin,tmp,usr/local,var,opt} &&
|
||||
for dirname in /usr /usr/local
|
||||
do
|
||||
mkdir $dirname/{bin,etc,include,lib,sbin,share,src}
|
||||
ln -s share/{man,doc,info} $dirname
|
||||
mkdir $dirname/share/{dict,doc,info,locale,man}
|
||||
mkdir $dirname/share/{nls,misc,terminfo,zoneinfo}
|
||||
mkdir $dirname/share/man/man{1,2,3,4,5,6,7,8}
|
||||
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}} &&
|
||||
ln -s ../var/tmp /usr</userinput></screen></para>
|
||||
|
||||
<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>
|
||||
|
||||
<para>The first mode change ensures that not just everybody can enter the
|
||||
<filename class="directory">/root</filename> directory -- the same
|
||||
as a normal user would do with his or her home directory.
|
||||
The second mode change makes sure that any user can write to the
|
||||
<filename class="directory">/tmp</filename> and
|
||||
<filename class="directory">/var/tmp</filename> directories, but
|
||||
cannot remove other users' files from them. The latter is prohibited
|
||||
by the so-called "sticky bit" -- the highest bit in the 1777 bit mask.</para>
|
||||
|
||||
<para>Now that the directories are created, move the source tarballs that
|
||||
were downloaded in Chapter 3 to some subdirectory under
|
||||
<filename class="directory">/usr/src</filename> (you
|
||||
will have to create the desired subdirectory yourself).</para>
|
||||
|
||||
<sect2>
|
||||
<title>FHS compliance note</title>
|
||||
|
||||
<para>We have based our directory tree on the FHS standard (available at
|
||||
<ulink url="http://www.pathname.com/fhs/"/>). Besides the above created
|
||||
tree this standard stipulates the existence of
|
||||
<filename class="directory">/usr/local/games</filename> and
|
||||
<filename class="directory">/usr/share/games</filename>, but we don't
|
||||
much like these for a base system. However, feel free to make your system
|
||||
FHS-compliant. As to the structure of the
|
||||
<filename class="directory">/usr/local/share</filename> subdirectory, the FHS
|
||||
isn't precise, so we created here the directories that we think are needed.</para>
|
||||
|
||||
</sect2>
|
||||
|
||||
</sect1>
|
||||
|
|
@ -0,0 +1,11 @@
|
|||
<sect2>
|
||||
<title>Command explanations</title>
|
||||
|
||||
<para><userinput>patch -Np1 -i ../gawk-&gawk-patch-version;.patch:</userinput> This
|
||||
patch alters the code that determines the location of the
|
||||
<filename class="directory">libexec</filename> directory. This patch will
|
||||
allow us to override it by passing <emphasis>--libexecdir</emphasis> to the
|
||||
configure script.</para>
|
||||
|
||||
</sect2>
|
||||
|
|
@ -0,0 +1,26 @@
|
|||
<sect2>
|
||||
<title>Installation of Gawk</title>
|
||||
|
||||
<para>This package requires its patch to be applied before you can
|
||||
install it. Make sure it's unpacked before running the installation
|
||||
commands.</para>
|
||||
|
||||
<para>Warning: do NOT run <userinput>make uninstall</userinput> on this
|
||||
package if you apply the patch to change the
|
||||
<filename class="directory">libexec</filename> directory definition. The
|
||||
<emphasis>uninstall</emphasis> rule in the <filename>Makefile</filename>
|
||||
file runs a command like <userinput>rm -rf
|
||||
<libexecdir>/*</userinput> Since we change the <filename
|
||||
class="directory">libexec</filename> directory to <filename
|
||||
class="directory">/usr/bin</filename> it'll run <userinput>rm -rf
|
||||
/usr/bin/*</userinput></para>
|
||||
|
||||
<para>Install Gawk by running the following commands:</para>
|
||||
|
||||
<para><screen><userinput>patch -Np1 -i ../gawk-&gawk-patch-version;.patch &&
|
||||
./configure --prefix=/usr --libexecdir=/usr/bin &&
|
||||
make &&
|
||||
make install</userinput></screen></para>
|
||||
|
||||
</sect2>
|
||||
|
|
@ -0,0 +1,14 @@
|
|||
<sect1 id="ch06-gawk">
|
||||
<title>Installing Gawk-&gawk-version;</title>
|
||||
<?dbhtml filename="gawk.html" dir="chapter06"?>
|
||||
|
||||
<screen>Estimated build time: &gawk-time;
|
||||
Estimated required disk space: &gawk-compsize;</screen>
|
||||
|
||||
&c6-gawk-inst;
|
||||
&c6-gawk-exp;
|
||||
&aa-gawk-desc;
|
||||
&aa-gawk-dep;
|
||||
|
||||
</sect1>
|
||||
|
|
@ -0,0 +1,19 @@
|
|||
<sect2>
|
||||
<title>Command explanations</title>
|
||||
|
||||
<para><userinput>--enable-threads=posix:</userinput> This enables C++
|
||||
exception handling for multithreaded code.</para>
|
||||
|
||||
<para><userinput>--enable-__cxa_atexit:</userinput> This option will result
|
||||
in C++ shared libraries and C++ programs that are interoperable with other
|
||||
linux distributions.</para>
|
||||
|
||||
<para><userinput>--enable-clocale=gnu:</userinput> There is a risk that
|
||||
some people will build ABI incompatible C++ libraries if they didn't install
|
||||
all of the glibc localedata. Using --enable-clocale=gnu ensures that the
|
||||
"right thing" is done in all cases. If you don't wish to use this option,
|
||||
then at least build the <emphasis>de_DE</emphasis> locale. When GCC finds
|
||||
this specific locale, then the correct locale mode (<emphasis>gnu</emphasis>)
|
||||
is implemented.</para>
|
||||
|
||||
</sect2>
|
|
@ -0,0 +1,13 @@
|
|||
<sect2>
|
||||
<title>Command explanations</title>
|
||||
|
||||
<para><userinput>make PROCESSEDEXAMPLEFILES="":</userinput> Groff has a few
|
||||
extra dependencies that we don't install with LFS. This option disables the
|
||||
need for those tools.</para>
|
||||
|
||||
<para><userinput>ln -s ...</userinput>: These symlinks are needed for some
|
||||
<userinput>xman</userinput> and other groff/man document programs to work
|
||||
properly.</para>
|
||||
|
||||
</sect2>
|
||||
|
|
@ -0,0 +1,8 @@
|
|||
<sect2>
|
||||
<title>Command explanations</title>
|
||||
|
||||
<para><userinput>patch -Np1 -i ../gzip-1.2.4b.patch:</userinput>
|
||||
This patch fixes a buffer overflow that occurs when a filename is
|
||||
longer than 1020 characters.</para>
|
||||
|
||||
</sect2>
|
|
@ -0,0 +1,40 @@
|
|||
<sect2>
|
||||
<title>Why we copy the kernel headers and don't symlink them</title>
|
||||
|
||||
<para>In the past it was common practice to symlink the
|
||||
<filename class="directory">/usr/include/{linux,asm}</filename> directories
|
||||
to <filename class="directory">/usr/src/linux/include/{linux,asm}</filename>.
|
||||
This was a <emphasis>bad</emphasis> practice, as the following extract from a
|
||||
post by Linus Torvalds to the Linux Kernel Mailing List points out:</para>
|
||||
|
||||
<screen>I would suggest that people who compile new kernels should:
|
||||
|
||||
- not have a single symbolic link in sight (except the one that the
|
||||
kernel build itself sets up, namely the "linux/include/asm" symlink
|
||||
that is only used for the internal kernel compile itself)
|
||||
|
||||
And yes, this is what I do. My /usr/src/linux still has the old 2.2.13
|
||||
header files, even though I haven't run a 2.2.13 kernel in a _loong_
|
||||
time. But those headers were what glibc was compiled against, so those
|
||||
headers are what matches the library object files.
|
||||
|
||||
And this is actually what has been the suggested environment for at
|
||||
least the last five years. I don't know why the symlink business keeps
|
||||
on living on, like a bad zombie. Pretty much every distribution still
|
||||
has that broken symlink, and people still remember that the linux
|
||||
sources should go into "/usr/src/linux" even though that hasn't been
|
||||
true in a _loong_ time.</screen>
|
||||
|
||||
<para>The essential part is where Linus states that the header files should be
|
||||
<emphasis>the ones which glibc was compiled against</emphasis>. These are
|
||||
the headers that should be used when you later compile other packages, as they
|
||||
are the ones that match the object-code library files. By copying the headers,
|
||||
we ensure that they remain available if later you upgrade your kernel.</para>
|
||||
|
||||
<para>Note, by the way, that it is perfectly all right to have the kernel sources
|
||||
in <filename class="directory">/usr/src/linux</filename>, as long as you don't
|
||||
have the <filename class="directory">/usr/include/{linux,asm}</filename>
|
||||
symlinks.</para>
|
||||
|
||||
</sect2>
|
||||
|
|
@ -0,0 +1,36 @@
|
|||
<sect2>
|
||||
<title>Command explanations</title>
|
||||
|
||||
<para><userinput>ln -s /static/bin/pwd /bin/pwd</userinput>: In the kernel
|
||||
source, the path to the <filename>pwd</filename> program is hard-wired as
|
||||
<filename>/bin/pwd</filename>, so we create a temporary symlink to account
|
||||
for that. At the end we remove it again.</para>
|
||||
|
||||
<para><userinput>make mrproper</userinput>: This ensures that the kernel
|
||||
tree is absolutely clean. The kernel team recommends that this command be
|
||||
issued prior to <emphasis>each</emphasis> kernel compilation and that you
|
||||
shouldn't rely on the source tree being clean after untarring.</para>
|
||||
|
||||
<para><userinput>make include/linux/version.h</userinput> and
|
||||
<userinput>make symlinks</userinput>: This creates the
|
||||
<filename>include/linux/version.h</filename> file and the platform-specific
|
||||
<filename class="symlink">include/asm</filename> symlink.</para>
|
||||
|
||||
<para><userinput>mkdir /usr/include/asm</userinput>
|
||||
, <userinput>cp include/asm/* /usr/include/asm</userinput> and
|
||||
<userinput>cp -R include/asm-generic /usr/include</userinput>:
|
||||
These commands copy the platform-specific assembler kernel header files to
|
||||
<filename class="directory">/usr/include/asm</filename> and <filename
|
||||
class="directory">/usr/include/asm-generic</filename>.</para>
|
||||
|
||||
<para><userinput>cp -R include/linux /usr/include</userinput>:
|
||||
This command copies the cross-platform kernel header files to
|
||||
<filename>/usr/include</filename>.</para>
|
||||
|
||||
<para><userinput>touch /usr/include/linux/autoconf.h</userinput>: This
|
||||
creates an empty <filename>autoconf.h</filename> file. As we do not yet
|
||||
configure the kernel, we have to create this file ourselves for those few
|
||||
kernel header files that make use of it, to avoid compilation failures.</para>
|
||||
|
||||
</sect2>
|
||||
|
|
@ -0,0 +1,23 @@
|
|||
<sect2>
|
||||
<title>Installation of the kernel headers</title>
|
||||
|
||||
<para>We won't be compiling a new kernel yet -- we'll do that when we have
|
||||
finished the installation of all the packages. But as some packages need the
|
||||
kernel header files, we're going to unpack the kernel archive now, set it up,
|
||||
and copy the header files to where they will be found by these packages.</para>
|
||||
|
||||
<para>The kernel headers are copied by running the following commands:</para>
|
||||
|
||||
<para><screen><userinput>ln -s /static/bin/pwd /bin/pwd &&
|
||||
make mrproper &&
|
||||
make include/linux/version.h &&
|
||||
make symlinks &&
|
||||
mkdir /usr/include/asm &&
|
||||
cp include/asm/* /usr/include/asm &&
|
||||
cp -R include/asm-generic /usr/include &&
|
||||
cp -R include/linux /usr/include &&
|
||||
touch /usr/include/linux/autoconf.h &&
|
||||
rm /bin/pwd</userinput></screen></para>
|
||||
|
||||
</sect2>
|
||||
|
|
@ -0,0 +1,15 @@
|
|||
<sect1 id="ch06-kernel">
|
||||
<title>Installing Linux-&kernel-version;</title>
|
||||
<?dbhtml filename="kernel.html" dir="chapter06"?>
|
||||
|
||||
<screen>Estimated build time: &kernel-time-headers;
|
||||
Estimated required disk space: &kernel-compsize-headers;</screen>
|
||||
|
||||
&c6-kernel-inst;
|
||||
&c6-kernel-exp;
|
||||
&c6-kernel-exp-headers;
|
||||
&aa-kernel-desc;
|
||||
&aa-kernel-dep;
|
||||
|
||||
</sect1>
|
||||
|
|
@ -0,0 +1,16 @@
|
|||
<sect2>
|
||||
<title>Installation of Linux threads man pages</title>
|
||||
|
||||
<para>Unpack the glibc-linuxthreads package and you'll notice that you end
|
||||
up with two new directories. Enter the
|
||||
<filename class="directory">linuxthreads</filename> directory, not the
|
||||
<filename class="directory">linuxthreads_db</filename> directory.</para>
|
||||
|
||||
<para>Install the Linux threads man pages by running the following
|
||||
commands:</para>
|
||||
|
||||
<para><screen><userinput>make -C man &&
|
||||
make -C man install</userinput></screen></para>
|
||||
|
||||
</sect2>
|
||||
|
|
@ -0,0 +1,14 @@
|
|||
<sect1 id="ch06-linuxthreadsmanpages">
|
||||
<title>Installing Linux threads-&linuxthreadsmanpages-version; man pages</title>
|
||||
<?dbhtml filename="linuxthreadsmanpages.html" dir="chapter06"?>
|
||||
|
||||
<screen>Estimated build time: &linuxthreadsmanpages-time;
|
||||
Estimated required disk space: &linuxthreadsmanpages-compsize;</screen>
|
||||
|
||||
&c6-linuxthreadsmanpages-inst;
|
||||
&aa-linuxthreadsmanpages-desc;
|
||||
&aa-linuxthreadsmanpages-dep;
|
||||
|
||||
</sect1>
|
||||
|
||||
|
|
@ -0,0 +1,19 @@
|
|||
<sect2>
|
||||
<title>Command explanations</title>
|
||||
|
||||
<para><userinput>PATH=$PATH:/usr/bin:/bin ./configure -default</userinput>:
|
||||
The paths to some programs get written into man's files. Unfortunately, the
|
||||
configure script picks the last location in PATH rather than the first
|
||||
where a program is found. By appending /usr/bin:/bin to PATH for the
|
||||
./configure command, we make sure that man doesn't use the /static versions
|
||||
of our programs.</para>
|
||||
|
||||
<para><userinput>patch -Np1 -i ../man-&man-patch-version;.patch:</userinput>
|
||||
This patch comments out one of the files in the <filename>man.conf</filename>
|
||||
file (MANPATH /usr/man) because it will create redundant results when using
|
||||
programs like <userinput>whatis</userinput>. It also adds the
|
||||
<emphasis>-R</emphasis> option to the <emphasis>PAGER</emphasis> variable so
|
||||
man pages are displayed properly.</para>
|
||||
|
||||
</sect2>
|
||||
|
|
@ -0,0 +1,29 @@
|
|||
<sect1 id="ch06-proc">
|
||||
<title>Mounting the proc file system</title>
|
||||
<?dbhtml filename="proc.html" dir="chapter06"?>
|
||||
|
||||
<para>In order for certain programs to function properly, the proc file
|
||||
system must be available within the chroot environment.
|
||||
As a file system can be mounted as many times and in as many places
|
||||
as you like, it's not a problem that the proc file system is already
|
||||
mounted on your host system -- especially so because proc is a
|
||||
virtual file system.</para>
|
||||
|
||||
<para>The proc file system is mounted under
|
||||
<filename class="directory">/proc</filename> by running the
|
||||
following command:</para>
|
||||
|
||||
<para><screen><userinput>mount proc /proc -t proc</userinput></screen></para>
|
||||
|
||||
<para>You will most likely get some warning messages from the mount
|
||||
command, such as these:</para>
|
||||
|
||||
<blockquote><screen>warning: can't open /etc/fstab: No such file or directory
|
||||
not enough memory</screen></blockquote>
|
||||
|
||||
<para>Ignore these, they're just due to the fact that the system
|
||||
isn't installed completely yet and some files are missing. The mount itself
|
||||
will be successful and that's all we care about at this point.</para>
|
||||
|
||||
</sect1>
|
||||
|
|
@ -0,0 +1,44 @@
|
|||
<sect1 id="ch06-pwdgroup">
|
||||
<title>Creating the passwd and group files</title>
|
||||
<?dbhtml filename="pwdgroup.html" dir="chapter06"?>
|
||||
|
||||
<para>In order for root to be able to login and for the name "root" to be
|
||||
recognized, there need to be relevant entries in the
|
||||
<filename>/etc/passwd</filename> and
|
||||
<filename>/etc/group</filename> files.</para>
|
||||
|
||||
<para>Create the <filename>/etc/passwd</filename> file by running the
|
||||
following command:</para>
|
||||
|
||||
<para><screen><userinput>echo "root:x:0:0:root:/root:/bin/bash" > /etc/passwd</userinput></screen></para>
|
||||
|
||||
<para>The actual password for root (the "x" here is just a 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>
|
||||
root:x:0:
|
||||
bin:x:1:
|
||||
sys:x:2:
|
||||
kmem:x:3:
|
||||
tty:x:4:
|
||||
tape:x:5:
|
||||
daemon:x:6:
|
||||
floppy:x:7:
|
||||
disk:x:8:
|
||||
lp:x:9:
|
||||
dialout:x:10:
|
||||
audio:x:11:
|
||||
<userinput>EOF</userinput></screen></para>
|
||||
|
||||
<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 LSB recommends only a group "bin", with a GID
|
||||
of 1, be present. All other group names and GIDs can be chosen freely by
|
||||
the user, as well-written packages don't depend on GID numbers but use the
|
||||
group's name.</para>
|
||||
|
||||
</sect1>
|
||||
|
|
@ -0,0 +1,11 @@
|
|||
<sect2>
|
||||
<title>Command explanations</title>
|
||||
|
||||
<para><userinput>patch -Np1 -i ../sh-utils-&sh-utils-hostname-patch-version;.patch:</userinput> This patch
|
||||
suppresses the build of the hostname program which we will be installed
|
||||
later with the net-tools package. The hostname program from the net-tools
|
||||
package is a much better version (and in some cases even required since it
|
||||
supports options that are needed by some programs such as XFree86).</para>
|
||||
|
||||
</sect2>
|
||||
|
|
@ -0,0 +1,13 @@
|
|||
<sect2>
|
||||
<title>Installation of Zlib</title>
|
||||
|
||||
<para>Install Zlib by running the following commands:</para>
|
||||
|
||||
<para><screen><userinput>./configure --prefix=/usr --shared &&
|
||||
make LIBS="libz.so.1.1.4 libz.a" &&
|
||||
make LIBS="libz.so.1.1.4 libz.a" install &&
|
||||
mv /usr/lib/libz.so.* /lib &&
|
||||
ln -sf ../../lib/libz.so.1 /usr/lib/libz.so &&
|
||||
cp zlib.3 /usr/share/man/man3</userinput></screen></para>
|
||||
|
||||
</sect2>
|
|
@ -0,0 +1,13 @@
|
|||
<sect1 id="ch06-zlib">
|
||||
<title>Installing Zlib-&zlib-version;</title>
|
||||
<?dbhtml filename="zlib.html" dir="chapter06"?>
|
||||
|
||||
<screen>Estimated build time: &zlib-time;
|
||||
Estimated required disk space: &zlib-compsize;</screen>
|
||||
|
||||
&c6-zlib-inst;
|
||||
&aa-zlib-desc;
|
||||
&aa-zlib-dep;
|
||||
|
||||
</sect1>
|
||||
|
|
@ -0,0 +1,14 @@
|
|||
<sect1 id="ch07-sysklogd">
|
||||
<title>Configuring the sysklogd script</title>
|
||||
<?dbhtml filename="sysklogd.html" dir="chapter07"?>
|
||||
|
||||
<para>The <filename>sysklogd</filename> script invokes the
|
||||
<userinput>syslogd</userinput> program with the <emphasis>-m 0</emphasis>
|
||||
option. This option turns off the periodic timestamp mark that syslogd
|
||||
writes to the log files every 20 minutes by default. If you want to turn
|
||||
on this periodic timestamp mark, edit the <filename>sysklogd</filename>
|
||||
script and make the changes accordingly. See <userinput>man
|
||||
syslogd</userinput> for more information.</para>
|
||||
|
||||
</sect1>
|
||||
|
Loading…
Reference in New Issue