mirror of
https://git.linuxfromscratch.org/lfs.git
synced 2025-03-06 06:14:47 +00:00
Replacing several <userinput> tags by <command>.
git-svn-id: http://svn.linuxfromscratch.org/LFS/trunk/BOOK@3203 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689
This commit is contained in:
parent
c288d971d1
commit
90e3cb3f0e
@ -30,7 +30,7 @@ by their old names to use the current macro names.</para>
|
|||||||
<filename>configure.in</filename> for a software package. It prints the
|
<filename>configure.in</filename> for a software package. It prints the
|
||||||
identifiers that the package uses in C preprocessor conditionals. If a package
|
identifiers that the package uses in C preprocessor conditionals. If a package
|
||||||
has already been set up to have some portability, this program can help to
|
has already been set up to have some portability, this program can help to
|
||||||
determine what <userinput>configure</userinput> needs to check. It can fill
|
determine what <command>configure</command> needs to check. It can fill
|
||||||
in some gaps in a <filename>configure.in</filename> file generated by
|
in some gaps in a <filename>configure.in</filename> file generated by
|
||||||
autoscan.</para>
|
autoscan.</para>
|
||||||
|
|
||||||
|
@ -13,7 +13,7 @@
|
|||||||
<para><command>bzip2</command> compresses files using the Burrows-Wheeler
|
<para><command>bzip2</command> compresses files using the Burrows-Wheeler
|
||||||
block sorting text compression algorithm with Huffman coding. The compression
|
block sorting text compression algorithm with Huffman coding. The compression
|
||||||
rate is generally considerably better than that achieved by more conventional
|
rate is generally considerably better than that achieved by more conventional
|
||||||
compressors using LZ77/LZ78, like <userinput>gzip</userinput>.</para>
|
compressors using LZ77/LZ78, like <command>gzip</command>.</para>
|
||||||
|
|
||||||
<para><command>bzip2recover</command> tries to recover data from damaged
|
<para><command>bzip2recover</command> tries to recover data from damaged
|
||||||
bzip2 files.</para>
|
bzip2 files.</para>
|
||||||
|
@ -4,14 +4,14 @@
|
|||||||
It is used in scripts.</para>
|
It is used in scripts.</para>
|
||||||
|
|
||||||
<para><command>tempfile</command> creates temporary files in a less secure
|
<para><command>tempfile</command> creates temporary files in a less secure
|
||||||
manner than <userinput>mktemp</userinput>. It is installed for
|
manner than <command>mktemp</command>. It is installed for
|
||||||
backwards-compatibility.</para>
|
backwards-compatibility.</para>
|
||||||
|
|
||||||
<para>The <command>http-get</command> script takes advantage of a little known
|
<para>The <command>http-get</command> script takes advantage of a little known
|
||||||
feature of <userinput>bash</userinput> called "net redirection". It is used to
|
feature of <command>bash</command> called "net redirection". It is used to
|
||||||
download from websites without using any other programs.</para>
|
download from websites without using any other programs.</para>
|
||||||
|
|
||||||
<para><command>iana-net</command> uses the <userinput>http-get</userinput>
|
<para><command>iana-net</command> uses the <command>http-get</command>
|
||||||
script to simplify the process of procuring IANA's services and protocols
|
script to simplify the process of procuring IANA's services and protocols
|
||||||
configuration files.</para>
|
configuration files.</para>
|
||||||
|
|
||||||
|
@ -34,7 +34,7 @@ Procedure. It can be used to verify that Perl and its libraries have been
|
|||||||
installed correctly.</para>
|
installed correctly.</para>
|
||||||
|
|
||||||
<para><command>piconv</command> is a Perl version of the character encoding
|
<para><command>piconv</command> is a Perl version of the character encoding
|
||||||
converter <userinput>iconv</userinput>.</para>
|
converter <command>iconv</command>.</para>
|
||||||
|
|
||||||
<para><command>pl2pm</command> is a rough tool for converting Perl4 .pl
|
<para><command>pl2pm</command> is a rough tool for converting Perl4 .pl
|
||||||
files to Perl5 .pm modules.</para>
|
files to Perl5 .pm modules.</para>
|
||||||
|
@ -39,12 +39,12 @@ The swap partition for your LFS system can be the same one as for your host
|
|||||||
system, so you won't have to create another if your host system already uses
|
system, so you won't have to create another if your host system already uses
|
||||||
a swap partition.</para>
|
a swap partition.</para>
|
||||||
|
|
||||||
<para>Start a disk partitioning program such as <userinput>cfdisk</userinput>
|
<para>Start a disk partitioning program such as <command>cfdisk</command>
|
||||||
or <userinput>fdisk</userinput> with an argument naming the hard disk upon
|
or <command>fdisk</command> with an argument naming the hard disk upon
|
||||||
which the new partition must be created -- for example
|
which the new partition must be created -- for example
|
||||||
<filename>/dev/hda</filename> for the primary IDE disk. Create a Linux native
|
<filename>/dev/hda</filename> for the primary IDE disk. Create a Linux native
|
||||||
partition and a swap partition, if needed. Please refer to the man pages of
|
partition and a swap partition, if needed. Please refer to the man pages of
|
||||||
<userinput>cfdisk</userinput> or <userinput>fdisk</userinput> if you don't yet
|
<command>cfdisk</command> or <command>fdisk</command> if you don't yet
|
||||||
know how to use the programs.</para>
|
know how to use the programs.</para>
|
||||||
|
|
||||||
<para>Remember the designation of your new partition -- something like
|
<para>Remember the designation of your new partition -- something like
|
||||||
@ -122,7 +122,7 @@ with the appropriate partition names.</para>
|
|||||||
|
|
||||||
<para>You should also ensure that this new partition is not mounted with
|
<para>You should also ensure that this new partition is not mounted with
|
||||||
permissions that are too restrictive (such as the nosuid, nodev or noatime
|
permissions that are too restrictive (such as the nosuid, nodev or noatime
|
||||||
options). You can run the <userinput>mount</userinput> command without any
|
options). You can run the <command>mount</command> command without any
|
||||||
parameters to see with what options the LFS partition is mounted. If
|
parameters to see with what options the LFS partition is mounted. If
|
||||||
you see nosuid, nodev or noatime, you will need to remount it.</para>
|
you see nosuid, nodev or noatime, you will need to remount it.</para>
|
||||||
|
|
||||||
|
@ -49,7 +49,7 @@ you won't do the downloading as <emphasis>root</emphasis>, we guess:</para>
|
|||||||
<!--
|
<!--
|
||||||
<para>For your convenience the top of the list contains a link to a file
|
<para>For your convenience the top of the list contains a link to a file
|
||||||
you can use with the <ulink url="http://wget.sunsite.dk">wget</ulink>
|
you can use with the <ulink url="http://wget.sunsite.dk">wget</ulink>
|
||||||
program. Using this file and the <userinput>wget</userinput> program will
|
program. Using this file and the <command>wget</command> program will
|
||||||
make it easy to download all the files at once, rather than downloading each
|
make it easy to download all the files at once, rather than downloading each
|
||||||
and every individual file manually.</para>
|
and every individual file manually.</para>
|
||||||
-->
|
-->
|
||||||
|
@ -36,7 +36,7 @@ suite anyway, the following command will do so:</para>
|
|||||||
|
|
||||||
<screen><userinput>make install</userinput></screen>
|
<screen><userinput>make install</userinput></screen>
|
||||||
|
|
||||||
<para>And make a link for the programs that use <userinput>sh</userinput>
|
<para>And make a link for the programs that use <command>sh</command>
|
||||||
for a shell:</para>
|
for a shell:</para>
|
||||||
|
|
||||||
<screen><userinput>ln -s bash /tools/bin/sh</userinput></screen>
|
<screen><userinput>ln -s bash /tools/bin/sh</userinput></screen>
|
||||||
|
@ -66,9 +66,9 @@ problem.</para></listitem>
|
|||||||
|
|
||||||
<listitem><para><userinput>LDFLAGS="-all-static"</userinput>: This tells the
|
<listitem><para><userinput>LDFLAGS="-all-static"</userinput>: This tells the
|
||||||
linker that all the Binutils programs should be linked statically. However,
|
linker that all the Binutils programs should be linked statically. However,
|
||||||
strictly speaking, <userinput>"-all-static"</userinput> is first passed to the
|
strictly speaking, <emphasis>"-all-static"</emphasis> is first passed to the
|
||||||
<emphasis>libtool</emphasis> program which then passes
|
<command>libtool</command> program which then passes
|
||||||
<userinput>"-static"</userinput> on to the linker.</para></listitem>
|
<emphasis>"-static"</emphasis> on to the linker.</para></listitem>
|
||||||
</itemizedlist>
|
</itemizedlist>
|
||||||
|
|
||||||
<para>Compilation is now complete. This is the point where we would normally
|
<para>Compilation is now complete. This is the point where we would normally
|
||||||
|
@ -13,7 +13,7 @@
|
|||||||
<sect2>
|
<sect2>
|
||||||
<title>Installation of Bzip2</title>
|
<title>Installation of Bzip2</title>
|
||||||
|
|
||||||
<para>The Bzip2 package doesn't contain a <userinput>configure</userinput>
|
<para>The Bzip2 package doesn't contain a <command>configure</command>
|
||||||
script. Compile and install it with a straightforward:</para>
|
script. Compile and install it with a straightforward:</para>
|
||||||
|
|
||||||
<screen><userinput>make PREFIX=/tools install</userinput></screen>
|
<screen><userinput>make PREFIX=/tools install</userinput></screen>
|
||||||
|
@ -23,7 +23,7 @@ Since the packages compiled here are merely temporary, we don't want
|
|||||||
them to pollute the soon-to-be LFS system.</para>
|
them to pollute the soon-to-be LFS system.</para>
|
||||||
|
|
||||||
<para>The build instructions assume that you are using the
|
<para>The build instructions assume that you are using the
|
||||||
<userinput>bash</userinput> shell. It is also expected that you have already
|
<command>bash</command> shell. It is also expected that you have already
|
||||||
unpacked a source package (while logged in as user <emphasis>lfs</emphasis> --
|
unpacked a source package (while logged in as user <emphasis>lfs</emphasis> --
|
||||||
explained shortly) and performed a <userinput>cd</userinput> into the source
|
explained shortly) and performed a <userinput>cd</userinput> into the source
|
||||||
directory of a package before issuing its build commands.</para>
|
directory of a package before issuing its build commands.</para>
|
||||||
@ -100,7 +100,7 @@ something completely different. You should be able to determine the name
|
|||||||
of your platform's dynamic linker by looking in the
|
of your platform's dynamic linker by looking in the
|
||||||
<filename class="directory">/lib</filename> directory on your host system. A
|
<filename class="directory">/lib</filename> directory on your host system. A
|
||||||
surefire way is to inspect a random binary from your host system by running:
|
surefire way is to inspect a random binary from your host system by running:
|
||||||
<userinput>'readelf -l <name of binary> | grep interpreter'</userinput>
|
<userinput>readelf -l <name of binary> | grep interpreter</userinput>
|
||||||
and noting the output. The authoritative reference covering all platforms is in
|
and noting the output. The authoritative reference covering all platforms is in
|
||||||
the <filename>shlib-versions</filename> file in the root of the Glibc source
|
the <filename>shlib-versions</filename> file in the root of the Glibc source
|
||||||
tree.</para>
|
tree.</para>
|
||||||
@ -118,14 +118,14 @@ into the same prefix work in cooperation and thus utilize a little GNU
|
|||||||
path to ensure programs are linked only against libraries we
|
path to ensure programs are linked only against libraries we
|
||||||
choose.</para></listitem>
|
choose.</para></listitem>
|
||||||
|
|
||||||
<listitem><para>Careful manipulation of <userinput>gcc</userinput>'s
|
<listitem><para>Careful manipulation of <command>gcc</command>'s
|
||||||
<emphasis>specs</emphasis> file to tell the compiler which target dynamic
|
<emphasis>specs</emphasis> file to tell the compiler which target dynamic
|
||||||
linker will be used.</para></listitem>
|
linker will be used.</para></listitem>
|
||||||
</itemizedlist>
|
</itemizedlist>
|
||||||
|
|
||||||
<para>Binutils is installed first because both GCC and Glibc perform various
|
<para>Binutils is installed first because both GCC and Glibc perform various
|
||||||
feature tests on the assembler and linker during their respective runs of
|
feature tests on the assembler and linker during their respective runs of
|
||||||
<userinput>./configure</userinput> to determine which software features to enable
|
<command>./configure</command> to determine which software features to enable
|
||||||
or disable. This is more important than one might first realize. An incorrectly
|
or disable. This is more important than one might first realize. An incorrectly
|
||||||
configured GCC or Glibc can result in a subtly broken toolchain where the impact
|
configured GCC or Glibc can result in a subtly broken toolchain where the impact
|
||||||
of such breakage might not show up until near the end of the build of a whole
|
of such breakage might not show up until near the end of the build of a whole
|
||||||
@ -137,43 +137,43 @@ much time is wasted.</para>
|
|||||||
<filename class="directory">/tools/$TARGET_TRIPLET/bin</filename>. In reality,
|
<filename class="directory">/tools/$TARGET_TRIPLET/bin</filename>. In reality,
|
||||||
the tools in one location are hard linked to the other. An important facet of
|
the tools in one location are hard linked to the other. An important facet of
|
||||||
the linker is its library search order. Detailed information can be obtained
|
the linker is its library search order. Detailed information can be obtained
|
||||||
from <userinput>ld</userinput> by passing it the <emphasis>--verbose</emphasis>
|
from <command>ld</command> by passing it the <emphasis>--verbose</emphasis>
|
||||||
flag. For example: <userinput>'ld --verbose | grep SEARCH'</userinput> will
|
flag. For example: <command>ld --verbose | grep SEARCH</command> will
|
||||||
show you the current search paths and their order. You can see what files are
|
show you the current search paths and their order. You can see what files are
|
||||||
actually linked by <userinput>ld</userinput> by compiling a dummy program and
|
actually linked by <command>ld</command> by compiling a dummy program and
|
||||||
passing the <emphasis>--verbose</emphasis> switch. For example:
|
passing the <emphasis>--verbose</emphasis> switch to the linker. For example:
|
||||||
<userinput>'gcc dummy.c -Wl,--verbose 2>&1 | grep succeeded'</userinput>
|
<command>gcc dummy.c -Wl,--verbose 2>&1 | grep succeeded</command>
|
||||||
will show you all the files successfully opened during the link.</para>
|
will show you all the files successfully opened during the linking.</para>
|
||||||
|
|
||||||
<para>The next package installed is GCC and during its run of
|
<para>The next package installed is GCC and during its run of
|
||||||
<userinput>./configure</userinput> you'll see, for example:</para>
|
<command>./configure</command> you'll see, for example:</para>
|
||||||
|
|
||||||
<blockquote><screen>checking what assembler to use... /tools/i686-pc-linux-gnu/bin/as
|
<blockquote><screen>checking what assembler to use... /tools/i686-pc-linux-gnu/bin/as
|
||||||
checking what linker to use... /tools/i686-pc-linux-gnu/bin/ld</screen></blockquote>
|
checking what linker to use... /tools/i686-pc-linux-gnu/bin/ld</screen></blockquote>
|
||||||
|
|
||||||
<para>This is important for the reasons mentioned above. It also demonstrates
|
<para>This is important for the reasons mentioned above. It also demonstrates
|
||||||
that GCC's configure script does not search the $PATH directories to find which
|
that GCC's configure script does not search the $PATH directories to find which
|
||||||
tools to use. However, during the actual operation of <userinput>gcc</userinput>
|
tools to use. However, during the actual operation of <command>gcc</command>
|
||||||
itself, the same search paths are not necessarily used. You can find out which
|
itself, the same search paths are not necessarily used. You can find out which
|
||||||
standard linker <userinput>gcc</userinput> will use by running:
|
standard linker <command>gcc</command> will use by running:
|
||||||
<userinput>'gcc -print-prog-name=ld'</userinput>.
|
<command>gcc -print-prog-name=ld</command>.
|
||||||
Detailed information can be obtained from <userinput>gcc</userinput> by passing
|
Detailed information can be obtained from <command>gcc</command> by passing
|
||||||
it the <emphasis>-v</emphasis> flag while compiling a dummy program. For
|
it the <emphasis>-v</emphasis> flag while compiling a dummy program. For
|
||||||
example: <userinput>'gcc -v dummy.c'</userinput> will show you detailed
|
example: <command>gcc -v dummy.c</command> will show you detailed
|
||||||
information about the preprocessor, compilation and assembly stages, including
|
information about the preprocessor, compilation and assembly stages, including
|
||||||
<userinput>gcc</userinput>'s include search paths and their order.</para>
|
<command>gcc</command>'s include search paths and their order.</para>
|
||||||
|
|
||||||
<para>The next package installed is Glibc. The most important considerations for
|
<para>The next package installed is Glibc. The most important considerations for
|
||||||
building Glibc are the compiler, binary tools and kernel headers. The compiler
|
building Glibc are the compiler, binary tools and kernel headers. The compiler
|
||||||
is generally no problem as Glibc will always use the <userinput>gcc</userinput>
|
is generally no problem as Glibc will always use the <command>gcc</command>
|
||||||
found in a $PATH directory. The binary tools and kernel headers can be a little
|
found in a $PATH directory. The binary tools and kernel headers can be a little
|
||||||
more troublesome. Therefore we take no risks and use the available configure
|
more troublesome. Therefore we take no risks and use the available configure
|
||||||
switches to enforce the correct selections. After the run of
|
switches to enforce the correct selections. After the run of
|
||||||
<userinput>./configure</userinput> you can check the contents of the
|
<command>./configure</command> you can check the contents of the
|
||||||
<filename>config.make</filename> file in the
|
<filename>config.make</filename> file in the
|
||||||
<filename class="directory">glibc-build</filename> directory for all the
|
<filename class="directory">glibc-build</filename> directory for all the
|
||||||
important details. You'll note some interesting items like the use of
|
important details. You'll note some interesting items like the use of
|
||||||
<userinput>CC="gcc -B/tools/bin/"</userinput> to control which binary tools are
|
<emphasis>CC="gcc -B/tools/bin/"</emphasis> to control which binary tools are
|
||||||
used, and also the use of the <emphasis>-nostdinc</emphasis> and
|
used, and also the use of the <emphasis>-nostdinc</emphasis> and
|
||||||
<emphasis>-isystem</emphasis> flags to control the compiler's include search
|
<emphasis>-isystem</emphasis> flags to control the compiler's include search
|
||||||
path. These items help to highlight an important aspect of the Glibc package:
|
path. These items help to highlight an important aspect of the Glibc package:
|
||||||
@ -182,18 +182,17 @@ not rely on toolchain defaults.</para>
|
|||||||
|
|
||||||
<para>After the Glibc installation, we make some adjustments to ensure that
|
<para>After the Glibc installation, we make some adjustments to ensure that
|
||||||
searching and linking take place only within our <filename>/tools</filename>
|
searching and linking take place only within our <filename>/tools</filename>
|
||||||
prefix. We install an adjusted <userinput>ld</userinput>, which has a hard-wired
|
prefix. We install an adjusted <command>ld</command>, which has a hard-wired
|
||||||
search path limited to <filename class="directory">/tools/lib</filename>. Then
|
search path limited to <filename class="directory">/tools/lib</filename>. Then
|
||||||
we amend <userinput>gcc</userinput>'s specs file to point to our new dynamic
|
we amend <command>gcc</command>'s specs file to point to our new dynamic
|
||||||
linker in <filename class="directory">/tools/lib</filename>. This last step is
|
linker in <filename class="directory">/tools/lib</filename>. This last step is
|
||||||
<emphasis>vital</emphasis> to the whole process. As mentioned above, a
|
<emphasis>vital</emphasis> to the whole process. As mentioned above, a
|
||||||
hard-wired path to a dynamic linker is embedded into every ELF shared
|
hard-wired path to a dynamic linker is embedded into every ELF shared
|
||||||
executable. You can inspect this by running:
|
executable. You can inspect this by running:
|
||||||
<userinput>'readelf -l <name of binary> | grep interpreter'</userinput>.
|
<command>readelf -l <name of binary> | grep interpreter</command>.
|
||||||
By amending <userinput>gcc</userinput>'s specs file, we are ensuring that every
|
By amending <command>gcc</command>'s specs file, we are ensuring that every
|
||||||
program compiled from here through the end of <xref linkend="chapter05"/> will
|
program compiled from here through the end of this chapter will use our new
|
||||||
use our new dynamic linker in
|
dynamic linker in <filename class="directory">/tools/lib</filename>.</para>
|
||||||
<filename class="directory">/tools/lib</filename>.</para>
|
|
||||||
|
|
||||||
<para>The need to use the new dynamic linker is also the reason why we apply the
|
<para>The need to use the new dynamic linker is also the reason why we apply the
|
||||||
Specs patch for the second pass of GCC. Failure to do so will result in the GCC
|
Specs patch for the second pass of GCC. Failure to do so will result in the GCC
|
||||||
@ -203,7 +202,7 @@ would defeat our goal of getting away from the host.</para>
|
|||||||
|
|
||||||
<para>During the second pass of Binutils, we are able to utilize the
|
<para>During the second pass of Binutils, we are able to utilize the
|
||||||
<emphasis>--with-lib-path</emphasis> configure switch to control
|
<emphasis>--with-lib-path</emphasis> configure switch to control
|
||||||
<userinput>ld</userinput>'s library search path. From this point onwards, the
|
<command>ld</command>'s library search path. From this point onwards, the
|
||||||
core toolchain is self-contained and self-hosted. The remainder of the
|
core toolchain is self-contained and self-hosted. The remainder of the
|
||||||
<xref linkend="chapter05"/> packages all build against the new Glibc in
|
<xref linkend="chapter05"/> packages all build against the new Glibc in
|
||||||
<filename class="directory">/tools</filename> and all is well.</para>
|
<filename class="directory">/tools</filename> and all is well.</para>
|
||||||
@ -213,7 +212,7 @@ first major package we install is Glibc, due to its self-sufficient nature that
|
|||||||
we mentioned above. Once this Glibc is installed into
|
we mentioned above. Once this Glibc is installed into
|
||||||
<filename class="directory">/usr</filename>, we perform a quick changeover of
|
<filename class="directory">/usr</filename>, we perform a quick changeover of
|
||||||
the toolchain defaults, then proceed for real in building the rest of the
|
the toolchain defaults, then proceed for real in building the rest of the
|
||||||
target <xref linkend="chapter06"/> LFS system.</para>
|
target LFS system.</para>
|
||||||
|
|
||||||
<sect2>
|
<sect2>
|
||||||
<title>Notes on static linking</title>
|
<title>Notes on static linking</title>
|
||||||
@ -288,7 +287,7 @@ partition:</para>
|
|||||||
|
|
||||||
<screen><userinput>ln -s $LFS/tools /</userinput></screen>
|
<screen><userinput>ln -s $LFS/tools /</userinput></screen>
|
||||||
|
|
||||||
<note><para>The above command is correct. The <userinput>ln</userinput> command
|
<note><para>The above command is correct. The <command>ln</command> command
|
||||||
has a few syntactic variations, so be sure to check the info page before
|
has a few syntactic variations, so be sure to check the info page before
|
||||||
reporting what you may think is an error.</para></note>
|
reporting what you may think is an error.</para></note>
|
||||||
|
|
||||||
@ -349,8 +348,8 @@ user command:</para>
|
|||||||
|
|
||||||
<screen><userinput>su - lfs</userinput></screen>
|
<screen><userinput>su - lfs</userinput></screen>
|
||||||
|
|
||||||
<para>The "<userinput>-</userinput>" instructs <userinput>su</userinput> to
|
<para>The "<command>-</command>" instructs <command>su</command> to start a
|
||||||
start a <emphasis>login</emphasis> shell.</para>
|
<emphasis>login</emphasis> shell.</para>
|
||||||
|
|
||||||
</sect1>
|
</sect1>
|
||||||
|
|
||||||
@ -360,7 +359,7 @@ start a <emphasis>login</emphasis> shell.</para>
|
|||||||
<?dbhtml filename="settingenvironment.html" dir="chapter05"?>
|
<?dbhtml filename="settingenvironment.html" dir="chapter05"?>
|
||||||
|
|
||||||
<para>We're going to set up a good working environment by creating two new
|
<para>We're going to set up a good working environment by creating two new
|
||||||
startup files for the <userinput>bash</userinput> shell. While logged in as
|
startup files for the <command>bash</command> shell. While logged in as
|
||||||
user <emphasis>lfs</emphasis>, issue the following command to create a new
|
user <emphasis>lfs</emphasis>, issue the following command to create a new
|
||||||
<filename>.bash_profile</filename>:</para>
|
<filename>.bash_profile</filename>:</para>
|
||||||
|
|
||||||
@ -372,7 +371,7 @@ exec env -i HOME=$HOME TERM=$TERM PS1='\u:\w\$ ' /bin/bash
|
|||||||
the initial shell is a <emphasis>login</emphasis> shell which reads the
|
the initial shell is a <emphasis>login</emphasis> shell which reads the
|
||||||
<filename>/etc/profile</filename> of your host (probably containing some
|
<filename>/etc/profile</filename> of your host (probably containing some
|
||||||
settings of environment variables) and then <filename>.bash_profile</filename>.
|
settings of environment variables) and then <filename>.bash_profile</filename>.
|
||||||
The <userinput>exec env -i ... /bin/bash</userinput> command in the latter file
|
The <command>exec env -i ... /bin/bash</command> command in the latter file
|
||||||
replaces the running shell with a new one with a completely empty environment,
|
replaces the running shell with a new one with a completely empty environment,
|
||||||
except for the HOME, TERM and PS1 variables. This ensures that no unwanted and
|
except for the HOME, TERM and PS1 variables. This ensures that no unwanted and
|
||||||
potentially hazardous environment variables from the host system leak into our
|
potentially hazardous environment variables from the host system leak into our
|
||||||
@ -393,15 +392,15 @@ PATH=/tools/bin:/bin:/usr/bin
|
|||||||
export LFS LC_ALL PATH
|
export LFS LC_ALL PATH
|
||||||
<userinput>EOF</userinput></screen>
|
<userinput>EOF</userinput></screen>
|
||||||
|
|
||||||
<para>The <userinput>set +h</userinput> command turns off
|
<para>The <command>set +h</command> command turns off
|
||||||
<userinput>bash</userinput>'s hash function. Normally hashing is a useful
|
<command>bash</command>'s hash function. Normally hashing is a useful
|
||||||
feature: <userinput>bash</userinput> uses a hash table to remember the
|
feature: <command>bash</command> uses a hash table to remember the
|
||||||
full pathnames of executable files to avoid searching the PATH time and time
|
full pathnames of executable files to avoid searching the PATH time and time
|
||||||
again to find the same executable. However, we'd like the new tools to be
|
again to find the same executable. However, we'd like the new tools to be
|
||||||
used as soon as they are installed. By switching off the hash function, our
|
used as soon as they are installed. By switching off the hash function, our
|
||||||
"interactive" commands (<userinput>make</userinput>,
|
"interactive" commands (<command>make</command>,
|
||||||
<userinput>patch</userinput>, <userinput>sed</userinput>,
|
<command>patch</command>, <command>sed</command>,
|
||||||
<userinput>cp</userinput> and so forth) will always use
|
<command>cp</command> and so forth) will always use
|
||||||
the newest available version during the build process.</para>
|
the newest available version during the build process.</para>
|
||||||
|
|
||||||
<para>Setting the user file-creation mask to 022 ensures that newly created
|
<para>Setting the user file-creation mask to 022 ensures that newly created
|
||||||
@ -519,8 +518,8 @@ appears as the prefix of our dynamic linker. If you did not receive the output
|
|||||||
as shown above, or received no output at all, then something is seriously wrong.
|
as shown above, or received no output at all, then something is seriously wrong.
|
||||||
You will need to investigate and retrace your steps to find out where the
|
You will need to investigate and retrace your steps to find out where the
|
||||||
problem is and correct it. There is no point in continuing until this is done.
|
problem is and correct it. There is no point in continuing until this is done.
|
||||||
First, redo the sanity check using <userinput>gcc</userinput> instead of
|
First, redo the sanity check using <command>gcc</command> instead of
|
||||||
<userinput>cc</userinput>. If this works it means the
|
<command>cc</command>. If this works it means the
|
||||||
<filename class="symlink">/tools/bin/cc</filename> symlink is missing. Revisit
|
<filename class="symlink">/tools/bin/cc</filename> symlink is missing. Revisit
|
||||||
<xref linkend="ch-tools-gcc-pass1"/> and fix the symlink. Second, ensure your $PATH
|
<xref linkend="ch-tools-gcc-pass1"/> and fix the symlink. Second, ensure your $PATH
|
||||||
is correct. You can check this by running <userinput>echo $PATH</userinput> and
|
is correct. You can check this by running <userinput>echo $PATH</userinput> and
|
||||||
@ -587,7 +586,7 @@ that it doesn't recognize their file format. Most of them are scripts instead
|
|||||||
of binaries.</para>
|
of binaries.</para>
|
||||||
|
|
||||||
<para>Take care <emphasis>not</emphasis> to use
|
<para>Take care <emphasis>not</emphasis> to use
|
||||||
<userinput>--strip-unneeded</userinput> on the libraries -- they would be
|
<emphasis>--strip-unneeded</emphasis> on the libraries -- they would be
|
||||||
destroyed and you would have to build Glibc all over again.</para>
|
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
|
<para>To save another couple of megabytes, you can throw away all the
|
||||||
|
@ -42,7 +42,7 @@ cd ../gcc-build</userinput></screen>
|
|||||||
<itemizedlist>
|
<itemizedlist>
|
||||||
<listitem><para><userinput>--with-local-prefix=/tools</userinput>: The
|
<listitem><para><userinput>--with-local-prefix=/tools</userinput>: The
|
||||||
purpose of this switch is to remove <filename>/usr/local/include</filename>
|
purpose of this switch is to remove <filename>/usr/local/include</filename>
|
||||||
from <userinput>gcc</userinput>'s include search path. This is not absolutely
|
from <command>gcc</command>'s include search path. This is not absolutely
|
||||||
essential; however, we want to try to minimize the influence of the host
|
essential; however, we want to try to minimize the influence of the host
|
||||||
system, thus making this a sensible thing to do.</para></listitem>
|
system, thus making this a sensible thing to do.</para></listitem>
|
||||||
|
|
||||||
@ -51,8 +51,8 @@ seem counter-intuitive at first. But using it allows the building of
|
|||||||
<filename>libgcc_s.so.1</filename> and <filename>libgcc_eh.a</filename>, and
|
<filename>libgcc_s.so.1</filename> and <filename>libgcc_eh.a</filename>, and
|
||||||
having <filename>libgcc_eh.a</filename> available ensures that the configure
|
having <filename>libgcc_eh.a</filename> available ensures that the configure
|
||||||
script for Glibc (the next package we compile) produces the proper results.
|
script for Glibc (the next package we compile) produces the proper results.
|
||||||
Note that the <userinput>gcc</userinput> binaries will still be linked
|
Note that the <command>gcc</command> binaries will still be linked
|
||||||
statically, as this is controlled by the <userinput>-static</userinput>
|
statically, as this is controlled by the <command>-static</command>
|
||||||
value of BOOT_LDFLAGS further on.</para></listitem>
|
value of BOOT_LDFLAGS further on.</para></listitem>
|
||||||
|
|
||||||
<listitem><para><userinput>--enable-languages=c</userinput>: This option
|
<listitem><para><userinput>--enable-languages=c</userinput>: This option
|
||||||
@ -92,10 +92,10 @@ the second pass.</para>
|
|||||||
|
|
||||||
<para>As a finishing touch we'll create the <filename
|
<para>As a finishing touch we'll create the <filename
|
||||||
class="symlink">/tools/bin/cc</filename> symlink. Many programs and
|
class="symlink">/tools/bin/cc</filename> symlink. Many programs and
|
||||||
scripts run <userinput>cc</userinput> instead of <userinput>gcc</userinput>,
|
scripts run <command>cc</command> instead of <command>gcc</command>,
|
||||||
a thing meant to keep programs generic and therefore usable on all kinds of
|
a thing meant to keep programs generic and therefore usable on all kinds of
|
||||||
Unix systems. Not everybody has the GNU C compiler installed. Simply running
|
Unix systems. Not everybody has the GNU C compiler installed. Simply running
|
||||||
<userinput>cc</userinput> leaves the system administrator free to decide what
|
<command>cc</command> leaves the system administrator free to decide what
|
||||||
C compiler to install, as long as there's a symlink pointing to it:</para>
|
C compiler to install, as long as there's a symlink pointing to it:</para>
|
||||||
|
|
||||||
<screen><userinput>ln -s gcc /tools/bin/cc</userinput></screen>
|
<screen><userinput>ln -s gcc /tools/bin/cc</userinput></screen>
|
||||||
|
@ -112,7 +112,7 @@ needed to ensure that both C and C++ compilers are built.</para></listitem>
|
|||||||
|
|
||||||
<screen><userinput>make</userinput></screen>
|
<screen><userinput>make</userinput></screen>
|
||||||
|
|
||||||
<para>There is no need to use the <userinput>bootstrap</userinput> target now,
|
<para>There is no need to use the <emphasis>bootstrap</emphasis> target now,
|
||||||
as the compiler we're using to compile this GCC was built from the exact same
|
as the compiler we're using to compile this GCC was built from the exact same
|
||||||
version of the GCC sources we used earlier.</para>
|
version of the GCC sources we used earlier.</para>
|
||||||
|
|
||||||
@ -123,7 +123,7 @@ so:</para>
|
|||||||
|
|
||||||
<screen><userinput>make -k check</userinput></screen>
|
<screen><userinput>make -k check</userinput></screen>
|
||||||
|
|
||||||
<para>The <userinput>-k</userinput> flag is used to make the test suite run
|
<para>The <emphasis>-k</emphasis> flag is used to make the test suite run
|
||||||
through to completion and not stop at the first failure. The GCC test suite is
|
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
|
very comprehensive and is almost guaranteed to generate a few failures. To get
|
||||||
a summary of the test suite results, run this:</para>
|
a summary of the test suite results, run this:</para>
|
||||||
@ -142,12 +142,12 @@ current GCC-&gcc-version; should look on i686-pc-linux-gnu, see
|
|||||||
* 24 XPASS's for libstdc++</screen>
|
* 24 XPASS's for libstdc++</screen>
|
||||||
|
|
||||||
<para>The unexpected pass for g++ is due to the use of
|
<para>The unexpected pass for g++ is due to the use of
|
||||||
<userinput>--enable-__cxa_atexit</userinput>. Apparently not all platforms
|
<emphasis>--enable-__cxa_atexit</emphasis>. Apparently not all platforms
|
||||||
supported by GCC have support for "__cxa_atexit" in their C libraries, so this
|
supported by GCC have support for "__cxa_atexit" in their C libraries, so this
|
||||||
test is not always expected to pass.</para>
|
test is not always expected to pass.</para>
|
||||||
|
|
||||||
<para>The 24 unexpected passes for libstdc++ are due to the use of
|
<para>The 24 unexpected passes for libstdc++ are due to the use of
|
||||||
<userinput>--enable-clocale=gnu</userinput>, which is the correct choice on
|
<emphasis>--enable-clocale=gnu</emphasis>, which is the correct choice on
|
||||||
Glibc-based systems of versions 2.2.5 and above. The underlying locale support
|
Glibc-based systems of versions 2.2.5 and above. The underlying locale support
|
||||||
in the GNU C library is superior to that of the otherwise selected "generic"
|
in the GNU C library is superior to that of the otherwise selected "generic"
|
||||||
model (which may be applicable if for instance you were using Newlibc, Sun-libc
|
model (which may be applicable if for instance you were using Newlibc, Sun-libc
|
||||||
|
@ -53,7 +53,7 @@ regard to what kernel headers and Binutils programs get used during the
|
|||||||
Glibc build.</para></listitem>
|
Glibc build.</para></listitem>
|
||||||
|
|
||||||
<listitem><para><userinput>--without-gd</userinput>: This switch ensures
|
<listitem><para><userinput>--without-gd</userinput>: This switch ensures
|
||||||
that we don't build the <userinput>memusagestat</userinput> program, which
|
that we don't build the <command>memusagestat</command> program, which
|
||||||
strangely enough insists on linking against the host's libraries (libgd,
|
strangely enough insists on linking against the host's libraries (libgd,
|
||||||
libpng, libz, and so forth).</para></listitem>
|
libpng, libz, and so forth).</para></listitem>
|
||||||
|
|
||||||
@ -122,9 +122,9 @@ ultimately end up using so that is the one we would really like to see pass.
|
|||||||
But please keep in mind, even in <xref linkend="chapter06"/> some failures
|
But please keep in mind, even in <xref linkend="chapter06"/> some failures
|
||||||
could still occur -- the <emphasis>math</emphasis>
|
could still occur -- the <emphasis>math</emphasis>
|
||||||
tests for example. When experiencing a failure, make a note of it, then
|
tests for example. When experiencing a failure, make a note of it, then
|
||||||
continue by reissuing the <userinput>make check</userinput>. The test suite
|
continue by reissuing the <command>make check</command>. The test suite
|
||||||
should pick up where it left off and continue on. You can circumvent this
|
should pick up where it left off and continue on. You can circumvent this
|
||||||
stop-start sequence by issuing a <userinput>make -k check</userinput>. But if
|
stop-start sequence by issuing a <command>make -k check</command>. But if
|
||||||
you do that, be sure to log the output so that you can later peruse the log
|
you do that, be sure to log the output so that you can later peruse the log
|
||||||
file and examine the total number of failures.</para>
|
file and examine the total number of failures.</para>
|
||||||
|
|
||||||
@ -156,7 +156,7 @@ command will do so:</para>
|
|||||||
|
|
||||||
<para>An alternative to running the previous command is to install only those
|
<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
|
locales which you need or want. This can be achieved by using the
|
||||||
<userinput>localedef</userinput> command. Information on this can be found in
|
<command>localedef</command> command. Information on this can be found in
|
||||||
the <filename>INSTALL</filename> file in the Glibc source. However, there are
|
the <filename>INSTALL</filename> file in the Glibc source. However, there are
|
||||||
a number of locales that are essential for the tests of future packages to
|
a number of locales that are essential for the tests of future packages to
|
||||||
pass, in particular, the <emphasis>libstdc++</emphasis> tests from GCC. The
|
pass, in particular, the <emphasis>libstdc++</emphasis> tests from GCC. The
|
||||||
|
@ -22,7 +22,7 @@
|
|||||||
|
|
||||||
<itemizedlist>
|
<itemizedlist>
|
||||||
<listitem><para><userinput>--disable-perl-regexp</userinput>: This makes sure
|
<listitem><para><userinput>--disable-perl-regexp</userinput>: This makes sure
|
||||||
that <userinput>grep</userinput> does not get linked against a PCRE library
|
that <command>grep</command> does not get linked against a PCRE library
|
||||||
that may be present on the host and would not be available once we enter the
|
that may be present on the host and would not be available once we enter the
|
||||||
chroot environment.</para></listitem>
|
chroot environment.</para></listitem>
|
||||||
<listitem><para><userinput>--with-included-regex</userinput>: This ensures that
|
<listitem><para><userinput>--with-included-regex</userinput>: This ensures that
|
||||||
|
@ -12,7 +12,7 @@
|
|||||||
|
|
||||||
<para>As some packages need to refer to the kernel header files, we're going
|
<para>As some packages need to refer to the kernel header files, we're going
|
||||||
to unpack the kernel archive now, set it up, and copy the required files to a
|
to unpack the kernel archive now, set it up, and copy the required files to a
|
||||||
place where <userinput>gcc</userinput> can later find them.</para>
|
place where <command>gcc</command> can later find them.</para>
|
||||||
|
|
||||||
<para>Prepare for the header installation with:</para>
|
<para>Prepare for the header installation with:</para>
|
||||||
|
|
||||||
|
@ -17,7 +17,7 @@
|
|||||||
|
|
||||||
<screen><userinput>CPPFLAGS=-D_GNU_SOURCE ./configure --prefix=/tools</userinput></screen>
|
<screen><userinput>CPPFLAGS=-D_GNU_SOURCE ./configure --prefix=/tools</userinput></screen>
|
||||||
|
|
||||||
<para>The preprocessor flag <userinput>-D_GNU_SOURCE</userinput> is only needed
|
<para>The preprocessor flag <emphasis>-D_GNU_SOURCE</emphasis> is only needed
|
||||||
on the PowerPC platform. On other architectures you can leave it out.</para>
|
on the PowerPC platform. On other architectures you can leave it out.</para>
|
||||||
|
|
||||||
<para>Compile the program:</para>
|
<para>Compile the program:</para>
|
||||||
|
@ -37,7 +37,7 @@ symbols, the difference will generally be a factor between 2 and 5.</para>
|
|||||||
software, a lot of disk space can be regained by removing these symbols .</para>
|
software, a lot of disk space can be regained by removing these symbols .</para>
|
||||||
|
|
||||||
<para>To remove debugging symbols from a binary (which must be an a.out
|
<para>To remove debugging symbols from a binary (which must be an a.out
|
||||||
or ELF binary), run <userinput>strip --strip-debug filename</userinput>.
|
or ELF binary), run <command>strip --strip-debug filename</command>.
|
||||||
Wildcards can be used to treat multiple files (use something like
|
Wildcards can be used to treat multiple files (use something like
|
||||||
<userinput>strip --strip-debug $LFS/tools/bin/*</userinput>).</para>
|
<userinput>strip --strip-debug $LFS/tools/bin/*</userinput>).</para>
|
||||||
|
|
||||||
|
@ -39,7 +39,7 @@ following command will do so:</para>
|
|||||||
|
|
||||||
<screen><userinput>make install</userinput></screen>
|
<screen><userinput>make install</userinput></screen>
|
||||||
|
|
||||||
<para>And reload the newly compiled <userinput>bash</userinput> program:</para>
|
<para>And reload the newly compiled <command>bash</command> program:</para>
|
||||||
|
|
||||||
<screen><userinput>exec /bin/bash --login +h</userinput></screen>
|
<screen><userinput>exec /bin/bash --login +h</userinput></screen>
|
||||||
|
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
|
|
||||||
<para>The Bzip2 package contains programs for compressing and decompressing
|
<para>The Bzip2 package contains programs for compressing and decompressing
|
||||||
files. On text files they achieve a much better compression than the
|
files. On text files they achieve a much better compression than the
|
||||||
traditional <userinput>gzip</userinput>.</para>
|
traditional <command>gzip</command>.</para>
|
||||||
|
|
||||||
<screen>&buildtime; &bzip2-time;
|
<screen>&buildtime; &bzip2-time;
|
||||||
&diskspace; &bzip2-compsize;</screen>
|
&diskspace; &bzip2-compsize;</screen>
|
||||||
@ -34,13 +34,13 @@ against it.</para>
|
|||||||
|
|
||||||
<para>If you are reinstalling Bzip2, you will now first have to do
|
<para>If you are reinstalling Bzip2, you will now first have to do
|
||||||
<userinput>rm -f /usr/bin/bz*</userinput>, otherwise the following
|
<userinput>rm -f /usr/bin/bz*</userinput>, otherwise the following
|
||||||
<userinput>make install</userinput> will fail.</para>
|
<command>make install</command> will fail.</para>
|
||||||
|
|
||||||
<para>Install the programs:</para>
|
<para>Install the programs:</para>
|
||||||
|
|
||||||
<screen><userinput>make install</userinput></screen>
|
<screen><userinput>make install</userinput></screen>
|
||||||
|
|
||||||
<para>And install the shared <userinput>bzip2</userinput> binary into the
|
<para>And install the shared <command>bzip2</command> binary into the
|
||||||
<filename class="directory">/bin</filename> directory, then make some
|
<filename class="directory">/bin</filename> directory, then make some
|
||||||
necessary symbolic links, and clean up:</para>
|
necessary symbolic links, and clean up:</para>
|
||||||
|
|
||||||
|
@ -68,13 +68,12 @@ with a series of short descriptions of these.</para>
|
|||||||
<para>It is time to enter the chroot environment in order to begin installing
|
<para>It is time to enter the chroot environment in order to begin installing
|
||||||
the packages we need. Before you can chroot, however, you need to become
|
the packages we need. Before you can chroot, however, you need to become
|
||||||
<emphasis>root</emphasis>, since only <emphasis>root</emphasis>
|
<emphasis>root</emphasis>, since only <emphasis>root</emphasis>
|
||||||
can execute the <userinput>chroot</userinput> command.</para>
|
can execute the <command>chroot</command> command.</para>
|
||||||
|
|
||||||
<para>Just like earlier, ensure the LFS environment variable is set up properly
|
<para>Just like earlier, ensure the LFS environment variable is set up properly
|
||||||
by running <userinput>echo $LFS</userinput> and ensuring it shows the path to
|
by running <userinput>echo $LFS</userinput> and ensuring it shows the path to
|
||||||
your LFS partition's mount point, which is
|
your LFS partition's mount point, which is
|
||||||
<filename class="directory">/mnt/lfs</filename> if you followed our
|
<filename class="directory">/mnt/lfs</filename> if you followed our example.</para>
|
||||||
example.</para>
|
|
||||||
|
|
||||||
<para>Become <emphasis>root</emphasis> and run the following command
|
<para>Become <emphasis>root</emphasis> and run the following command
|
||||||
to enter the chroot environment:</para>
|
to enter the chroot environment:</para>
|
||||||
@ -84,12 +83,12 @@ to enter the chroot environment:</para>
|
|||||||
PATH=/bin:/usr/bin:/sbin:/usr/sbin:/tools/bin \
|
PATH=/bin:/usr/bin:/sbin:/usr/sbin:/tools/bin \
|
||||||
/tools/bin/bash --login +h</userinput></screen>
|
/tools/bin/bash --login +h</userinput></screen>
|
||||||
|
|
||||||
<para>The <userinput>-i</userinput> option given to the
|
<para>The <emphasis>-i</emphasis> option given to the
|
||||||
<userinput>env</userinput> command will clear all variables of the chroot
|
<command>env</command> command will clear all variables of the chroot
|
||||||
environment. After that, only the HOME, TERM, PS1 and PATH variables are
|
environment. After that, only the HOME, TERM, PS1 and PATH variables are
|
||||||
set again. The TERM=$TERM construct will set the TERM variable inside chroot
|
set again. The TERM=$TERM construct will set the TERM variable inside chroot
|
||||||
to the same value as outside chroot; this variable is needed for programs
|
to the same value as outside chroot; this variable is needed for programs
|
||||||
like <userinput>vim</userinput> and <userinput>less</userinput> to operate
|
like <command>vim</command> and <command>less</command> to operate
|
||||||
properly. If you need other variables present, such as CFLAGS or CXXFLAGS,
|
properly. If you need other variables present, such as CFLAGS or CXXFLAGS,
|
||||||
this is a good place to set them again.</para>
|
this is a good place to set them again.</para>
|
||||||
|
|
||||||
@ -103,8 +102,8 @@ the chroot command.</para>
|
|||||||
last in the PATH. This means that a temporary tool will not be used any more
|
last in the PATH. This means that a temporary tool will not be used any more
|
||||||
as soon as its final version is installed. Well, at least when the shell
|
as soon as its final version is installed. Well, at least when the shell
|
||||||
doesn't remember the locations of executed binaries -- for this reason hashing
|
doesn't remember the locations of executed binaries -- for this reason hashing
|
||||||
is switched off by passing the <userinput>+h</userinput> option to
|
is switched off by passing the <emphasis>+h</emphasis> option to
|
||||||
<userinput>bash</userinput>.</para>
|
<command>bash</command>.</para>
|
||||||
|
|
||||||
<para>You have to make sure all the commands in the rest of this chapter and
|
<para>You have to make sure all the commands in the rest of this chapter and
|
||||||
in the following chapters are run from within the chroot environment.
|
in the following chapters are run from within the chroot environment.
|
||||||
@ -281,15 +280,15 @@ will now work.</para>
|
|||||||
|
|
||||||
<screen><userinput>exec /tools/bin/bash --login +h</userinput></screen>
|
<screen><userinput>exec /tools/bin/bash --login +h</userinput></screen>
|
||||||
|
|
||||||
<para>Note the use of the <userinput>+h</userinput> directive. This tells
|
<para>Note the use of the <emphasis>+h</emphasis> directive. This tells
|
||||||
<userinput>bash</userinput> not to use its internal path hashing. Without this
|
<command>bash</command> not to use its internal path hashing. Without this
|
||||||
directive, <userinput>bash</userinput> would remember the paths to binaries it
|
directive, <command>bash</command> would remember the paths to binaries it
|
||||||
has executed. Since we want to use our newly compiled binaries as soon as
|
has executed. Since we want to use our newly compiled binaries as soon as
|
||||||
they are installed, we turn off this function for the duration of this
|
they are installed, we turn off this function for the duration of this
|
||||||
chapter.</para>
|
chapter.</para>
|
||||||
|
|
||||||
<para>The <userinput>login</userinput>, <userinput>agetty</userinput> and
|
<para>The <command>login</command>, <command>agetty</command> and
|
||||||
<userinput>init</userinput> programs (and some others) use a number of log
|
<command>init</command> programs (and some others) use a number of log
|
||||||
files to record information such as who was logged into the system and when.
|
files to record information such as who was logged into the system and when.
|
||||||
These programs, however, won't write to the log files if they don't already
|
These programs, however, won't write to the log files if they don't already
|
||||||
exist. Initialize the log files and give them their proper permissions:</para>
|
exist. Initialize the log files and give them their proper permissions:</para>
|
||||||
@ -341,7 +340,7 @@ identical.</para></note>
|
|||||||
<para>From now on every compiled program will link <emphasis>only</emphasis>
|
<para>From now on every compiled program will link <emphasis>only</emphasis>
|
||||||
against the libraries in <filename>/usr/lib</filename> and
|
against the libraries in <filename>/usr/lib</filename> and
|
||||||
<filename>/lib</filename>. The extra
|
<filename>/lib</filename>. The extra
|
||||||
<userinput>INSTALL=/tools/bin/install</userinput> is needed because the Makefile
|
<emphasis>INSTALL=/tools/bin/install</emphasis> is needed because the Makefile
|
||||||
created during the second pass still contains the reference to
|
created during the second pass still contains the reference to
|
||||||
<filename>/usr/bin/install</filename>, which we obviously haven't installed yet.
|
<filename>/usr/bin/install</filename>, which we obviously haven't installed yet.
|
||||||
Some host distributions contain a <filename class="symlink">ginstall</filename>
|
Some host distributions contain a <filename class="symlink">ginstall</filename>
|
||||||
|
@ -54,7 +54,7 @@ user mode.</para></listitem>
|
|||||||
</itemizedlist>
|
</itemizedlist>
|
||||||
|
|
||||||
<para>Of course, instead of <emphasis>Canada/Eastern</emphasis>, fill in
|
<para>Of course, instead of <emphasis>Canada/Eastern</emphasis>, fill in
|
||||||
the name of the time zone that the <userinput>tzselect</userinput> script
|
the name of the time zone that the <command>tzselect</command> script
|
||||||
gave you.</para>
|
gave you.</para>
|
||||||
|
|
||||||
</sect2>
|
</sect2>
|
||||||
|
@ -23,7 +23,7 @@ command:</para>
|
|||||||
|
|
||||||
<para>Under normal circumstances, you won't have created any passwords yet.
|
<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
|
However, if returning to this section to enable shadowing, you should reset any
|
||||||
current user passwords with the <userinput>passwd</userinput> command or any
|
current user passwords with the <command>passwd</command> command or any
|
||||||
group passwords with the <userinput>gpasswd</userinput> command.</para>
|
group passwords with the <command>gpasswd</command> command.</para>
|
||||||
</sect2>
|
</sect2>
|
||||||
|
|
||||||
|
@ -2,10 +2,10 @@
|
|||||||
|
|
||||||
<sect2><title>Configuring Vim</title>
|
<sect2><title>Configuring Vim</title>
|
||||||
|
|
||||||
<para>By default, <userinput>vim</userinput> runs in vi-compatible mode. Some
|
<para>By default, <command>vim</command> runs in vi-compatible mode. Some
|
||||||
people might like this, but we prefer to run <userinput>vim</userinput> in its
|
people might like this, but we prefer to run <command>vim</command> in its
|
||||||
own mode (else we wouldn't have included it in this book, but the original
|
own mode (else we wouldn't have included it in this book, but the original
|
||||||
<userinput>vi</userinput>). Create a default vim configuration file by running
|
<command>vi</command>). Create a default vim configuration file by running
|
||||||
the following:</para>
|
the following:</para>
|
||||||
|
|
||||||
<screen><userinput>cat > /etc/vimrc << "EOF"</userinput>
|
<screen><userinput>cat > /etc/vimrc << "EOF"</userinput>
|
||||||
@ -18,11 +18,11 @@ syntax on
|
|||||||
" End /etc/vimrc
|
" End /etc/vimrc
|
||||||
<userinput>EOF</userinput></screen>
|
<userinput>EOF</userinput></screen>
|
||||||
|
|
||||||
<para>The <userinput>set nocompatible</userinput> will make
|
<para>The <emphasis>set nocompatible</emphasis> will make
|
||||||
<userinput>vim</userinput> behave in a more useful way than the default
|
<command>vim</command> behave in a more useful way than the default
|
||||||
vi-compatible manner. The <userinput>set backspace=2</userinput> allows
|
vi-compatible manner. The <emphasis>set backspace=2</emphasis> allows
|
||||||
backspacing over line breaks, autoindent and the start of insert. And the
|
backspacing over line breaks, autoindent and the start of insert. And the
|
||||||
<userinput>syntax on</userinput> switches on <userinput>vim</userinput>'s
|
<emphasis>syntax on</emphasis> switches on <command>vim</command>'s
|
||||||
semantic colouring.</para>
|
semantic colouring.</para>
|
||||||
|
|
||||||
</sect2>
|
</sect2>
|
||||||
|
@ -20,14 +20,14 @@ basic system characteristics.</para>
|
|||||||
|
|
||||||
<screen><userinput>patch -Np1 -i ../&coreutils-posixver-patch;</userinput></screen>
|
<screen><userinput>patch -Np1 -i ../&coreutils-posixver-patch;</userinput></screen>
|
||||||
|
|
||||||
<para>Normally the functionality of <userinput>uname</userinput> is somewhat
|
<para>Normally the functionality of <command>uname</command> is somewhat
|
||||||
broken, in that the <userinput>-p</userinput> switch always returns "unknown".
|
broken, in that the <emphasis>-p</emphasis> switch always returns "unknown".
|
||||||
The following patch fixes this behaviour for Intel architectures:</para>
|
The following patch fixes this behaviour for Intel architectures:</para>
|
||||||
|
|
||||||
<screen><userinput>patch -Np1 -i ../&coreutils-uname-patch;</userinput></screen>
|
<screen><userinput>patch -Np1 -i ../&coreutils-uname-patch;</userinput></screen>
|
||||||
|
|
||||||
<para>We do not want Coreutils to install its version of the
|
<para>We do not want Coreutils to install its version of the
|
||||||
<userinput>hostname</userinput> program, because it is inferior to the version
|
<command>hostname</command> program, because it is inferior to the version
|
||||||
provided by Net-tools. Prevent its installation by applying a patch:</para>
|
provided by Net-tools. Prevent its installation by applying a patch:</para>
|
||||||
|
|
||||||
<screen><userinput>patch -Np1 -i ../&coreutils-hostname-patch;</userinput></screen>
|
<screen><userinput>patch -Np1 -i ../&coreutils-hostname-patch;</userinput></screen>
|
||||||
@ -40,7 +40,7 @@ provided by Net-tools. Prevent its installation by applying a patch:</para>
|
|||||||
|
|
||||||
<screen><userinput>make</userinput></screen>
|
<screen><userinput>make</userinput></screen>
|
||||||
|
|
||||||
<para>The <userinput>su</userinput> program from Coreutils wasn't installed in
|
<para>The <command>su</command> program from Coreutils wasn't installed in
|
||||||
Chapter 5 because it needed <emphasis>root</emphasis> privilege to do so. We're
|
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
|
going to need it in a few moments for the test suite. Therefore we work around
|
||||||
the problem by installing it now:</para>
|
the problem by installing it now:</para>
|
||||||
|
@ -39,10 +39,10 @@ following command will do so:</para>
|
|||||||
|
|
||||||
<screen><userinput>ln -s libfl.a /usr/lib/libl.a</userinput></screen>
|
<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
|
<para>A few programs don't know about <command>flex</command> yet and try
|
||||||
to run its predecessor <userinput>lex</userinput>. To support those programs,
|
to run its predecessor <command>lex</command>. To support those programs,
|
||||||
create a shell script named <filename>lex</filename> that calls
|
create a shell script named <filename>lex</filename> that calls
|
||||||
<userinput>flex</userinput> in Lex emulation mode:</para>
|
<command>flex</command> in Lex emulation mode:</para>
|
||||||
|
|
||||||
<screen><userinput>cat > /usr/bin/lex << "EOF"</userinput>
|
<screen><userinput>cat > /usr/bin/lex << "EOF"</userinput>
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
@ -86,7 +86,7 @@ To honor those packages, create this symlink:</para>
|
|||||||
|
|
||||||
<screen><userinput>ln -s ../usr/bin/cpp /lib</userinput></screen>
|
<screen><userinput>ln -s ../usr/bin/cpp /lib</userinput></screen>
|
||||||
|
|
||||||
<para>Many packages use the name <userinput>cc</userinput> to call the C
|
<para>Many packages use the name <command>cc</command> to call the C
|
||||||
compiler. To satisfy those packages, create a symlink:</para>
|
compiler. To satisfy those packages, create a symlink:</para>
|
||||||
|
|
||||||
<screen><userinput>ln -s gcc /usr/bin/cc</userinput></screen>
|
<screen><userinput>ln -s gcc /usr/bin/cc</userinput></screen>
|
||||||
|
@ -91,7 +91,7 @@ weren't installed by the above command. Do it with this:</para>
|
|||||||
|
|
||||||
<para>An alternative to running the previous command is to install only those
|
<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
|
locales which you need or want. This can be achieved by using the
|
||||||
<userinput>localedef</userinput> command. Information on this can be found in
|
<command>localedef</command> command. Information on this can be found in
|
||||||
the <filename>INSTALL</filename> file in the Glibc source. However, there are
|
the <filename>INSTALL</filename> file in the Glibc source. However, there are
|
||||||
a number of locales that are essential for the tests of future packages to
|
a number of locales that are essential for the tests of future packages to
|
||||||
pass, in particular, the <emphasis>libstdc++</emphasis> tests from GCC. The
|
pass, in particular, the <emphasis>libstdc++</emphasis> tests from GCC. The
|
||||||
|
@ -32,7 +32,7 @@ live elsewhere, you may want to change <emphasis>PAGE=letter</emphasis> to
|
|||||||
|
|
||||||
<screen><userinput>make install</userinput></screen>
|
<screen><userinput>make install</userinput></screen>
|
||||||
|
|
||||||
<para>Some documentation programs, such as <userinput>xman</userinput>,
|
<para>Some documentation programs, such as <command>xman</command>,
|
||||||
will not work properly without the following symlinks:</para>
|
will not work properly without the following symlinks:</para>
|
||||||
|
|
||||||
<screen><userinput>ln -s soelim /usr/bin/zsoelim
|
<screen><userinput>ln -s soelim /usr/bin/zsoelim
|
||||||
|
@ -20,8 +20,8 @@ files.</para>
|
|||||||
|
|
||||||
<screen><userinput>./configure --prefix=/usr</userinput></screen>
|
<screen><userinput>./configure --prefix=/usr</userinput></screen>
|
||||||
|
|
||||||
<para>The <userinput>gzexe</userinput> script has the location of the
|
<para>The <command>gzexe</command> script has the location of the
|
||||||
<userinput>gzip</userinput> binary hard-wired into it. Because we later change
|
<command>gzip</command> binary hard-wired into it. Because we later change
|
||||||
the location of the binary, the following command assures that the new
|
the location of the binary, the following command assures that the new
|
||||||
location gets placed into the script:</para>
|
location gets placed into the script:</para>
|
||||||
|
|
||||||
|
@ -61,7 +61,7 @@ replacements are available for many of these servers.</para></listitem>
|
|||||||
|
|
||||||
<screen><userinput>make install</userinput></screen>
|
<screen><userinput>make install</userinput></screen>
|
||||||
|
|
||||||
<para>And move the <userinput>ping</userinput> program to its proper place:</para>
|
<para>And move the <command>ping</command> program to its proper place:</para>
|
||||||
|
|
||||||
<screen><userinput>mv /usr/bin/ping /bin</userinput></screen>
|
<screen><userinput>mv /usr/bin/ping /bin</userinput></screen>
|
||||||
|
|
||||||
|
@ -15,8 +15,8 @@
|
|||||||
<sect2>
|
<sect2>
|
||||||
<title>Installation of Kbd</title>
|
<title>Installation of Kbd</title>
|
||||||
|
|
||||||
<para>By default some of Kbd's utilities (<userinput>setlogcons</userinput>,
|
<para>By default some of Kbd's utilities (<command>setlogcons</command>,
|
||||||
<userinput>setvesablank</userinput> and <userinput>getunimap</userinput>) are
|
<command>setvesablank</command> and <command>getunimap</command>) are
|
||||||
not installed. First enable the compilation of these utilities:</para>
|
not installed. First enable the compilation of these utilities:</para>
|
||||||
|
|
||||||
<screen><userinput>patch -Np1 -i ../&kbd-patch;</userinput></screen>
|
<screen><userinput>patch -Np1 -i ../&kbd-patch;</userinput></screen>
|
||||||
|
@ -23,7 +23,7 @@
|
|||||||
|
|
||||||
<itemizedlist>
|
<itemizedlist>
|
||||||
<listitem><para><userinput>--with-libc</userinput>: This causes the
|
<listitem><para><userinput>--with-libc</userinput>: This causes the
|
||||||
<userinput>mktemp</userinput> program to use the <emphasis>mkstemp</emphasis>
|
<command>mktemp</command> program to use the <emphasis>mkstemp</emphasis>
|
||||||
and <emphasis>mkdtemp</emphasis> functions from the system C
|
and <emphasis>mkdtemp</emphasis> functions from the system C
|
||||||
library.</para></listitem>
|
library.</para></listitem>
|
||||||
</itemizedlist>
|
</itemizedlist>
|
||||||
|
@ -16,10 +16,10 @@
|
|||||||
<title>Making devices</title>
|
<title>Making devices</title>
|
||||||
|
|
||||||
<para>Note that unpacking the <filename>MAKEDEV-&makedev-version;.bz2</filename>
|
<para>Note that unpacking the <filename>MAKEDEV-&makedev-version;.bz2</filename>
|
||||||
file doesn't create a directory for you to <userinput>cd</userinput> into, as
|
file doesn't create a directory for you to <command>cd</command> into, as
|
||||||
the file contains only a shell script.</para>
|
the file contains only a shell script.</para>
|
||||||
|
|
||||||
<para>Install the <userinput>MAKEDEV</userinput> script:</para>
|
<para>Install the <command>MAKEDEV</command> script:</para>
|
||||||
|
|
||||||
<screen><userinput>bzcat MAKEDEV-&makedev-version;.bz2 > /dev/MAKEDEV
|
<screen><userinput>bzcat MAKEDEV-&makedev-version;.bz2 > /dev/MAKEDEV
|
||||||
chmod 754 /dev/MAKEDEV</userinput></screen>
|
chmod 754 /dev/MAKEDEV</userinput></screen>
|
||||||
@ -36,7 +36,7 @@ chmod 754 /dev/MAKEDEV</userinput></screen>
|
|||||||
verbose mode.</para></listitem>
|
verbose mode.</para></listitem>
|
||||||
|
|
||||||
<listitem><para><userinput>generic-nopty</userinput>: This instructs
|
<listitem><para><userinput>generic-nopty</userinput>: This instructs
|
||||||
<userinput>MAKEDEV</userinput> to create a generic selection of commonly used
|
<command>MAKEDEV</command> to create a generic selection of commonly used
|
||||||
device special files, except for the ptyXX and ttyXX range of files. We don't
|
device special files, except for the ptyXX and ttyXX range of files. We don't
|
||||||
need those files because we are going to use Unix98 PTYs via the
|
need those files because we are going to use Unix98 PTYs via the
|
||||||
<emphasis>devpts</emphasis> file system.</para></listitem>
|
<emphasis>devpts</emphasis> file system.</para></listitem>
|
||||||
@ -44,7 +44,7 @@ need those files because we are going to use Unix98 PTYs via the
|
|||||||
|
|
||||||
<para>If it turns out that some special device <filename>zzz</filename> that
|
<para>If it turns out that some special device <filename>zzz</filename> that
|
||||||
you need is missing, try running <userinput>./MAKEDEV -v zzz</userinput>.
|
you need is missing, try running <userinput>./MAKEDEV -v zzz</userinput>.
|
||||||
Alternatively, you may create devices via the <userinput>mknod</userinput>
|
Alternatively, you may create devices via the <command>mknod</command>
|
||||||
program. Please refer to its man and info pages if you need more
|
program. Please refer to its man and info pages if you need more
|
||||||
information.</para>
|
information.</para>
|
||||||
|
|
||||||
|
@ -31,7 +31,7 @@ properly handled by Less:</para>
|
|||||||
|
|
||||||
<para>The third is also a sed substitution to comment out the "MANPATH
|
<para>The third is also a sed substitution to comment out the "MANPATH
|
||||||
/usr/man" line in the <filename>man.conf</filename> file to prevent redundant
|
/usr/man" line in the <filename>man.conf</filename> file to prevent redundant
|
||||||
results when using programs such as <userinput>whatis</userinput>:</para>
|
results when using programs such as <command>whatis</command>:</para>
|
||||||
|
|
||||||
<screen><userinput>sed -i 's%MANPATH./usr/man%#&%' src/man.conf.in</userinput></screen>
|
<screen><userinput>sed -i 's%MANPATH./usr/man%#&%' src/man.conf.in</userinput></screen>
|
||||||
|
|
||||||
@ -50,7 +50,7 @@ FHS by putting cat pages under /var/cache/man provided that that directory
|
|||||||
exists.</para></listitem>
|
exists.</para></listitem>
|
||||||
|
|
||||||
<listitem><para><userinput>-confdir=/etc</userinput>: This tells the
|
<listitem><para><userinput>-confdir=/etc</userinput>: This tells the
|
||||||
<userinput>man</userinput> program to look for the <filename>man.conf</filename>
|
<command>man</command> program to look for the <filename>man.conf</filename>
|
||||||
configuration file in the <filename>/etc</filename> directory.</para></listitem>
|
configuration file in the <filename>/etc</filename> directory.</para></listitem>
|
||||||
</itemizedlist>
|
</itemizedlist>
|
||||||
|
|
||||||
@ -62,9 +62,9 @@ configuration file in the <filename>/etc</filename> directory.</para></listitem>
|
|||||||
|
|
||||||
<screen><userinput>make install</userinput></screen>
|
<screen><userinput>make install</userinput></screen>
|
||||||
|
|
||||||
<note><para>If you wish to disable SGR escape sequences, you should
|
<note><para>If you wish to disable SGR escape sequences, you should edit the
|
||||||
edit the man.conf file and add the <userinput>-c</userinput> argument
|
<filename>man.conf</filename> file and add the <emphasis>-c</emphasis> switch
|
||||||
to nroff.</para></note>
|
to NROFF.</para></note>
|
||||||
|
|
||||||
<para>You may want to also take a look at the BLFS page at
|
<para>You may want to also take a look at the BLFS page at
|
||||||
<ulink url="&blfs-root;view/cvs/postlfs/compressdoc.html"/> which deals with
|
<ulink url="&blfs-root;view/cvs/postlfs/compressdoc.html"/> which deals with
|
||||||
|
@ -44,7 +44,7 @@ now the most common way for pseudo terminals (PTYs) to be implemented.</para>
|
|||||||
<para>The most likely cause is that your host system's kernel was compiled
|
<para>The most likely cause is that your host system's kernel was compiled
|
||||||
without support for the devpts file system. You can check which file systems
|
without support for the devpts file system. You can check which file systems
|
||||||
your kernel supports by peeking into its internals with a command such as
|
your kernel supports by peeking into its internals with a command such as
|
||||||
<userinput>cat /proc/filesystems</userinput>. If a file system type named
|
<command>cat /proc/filesystems</command>. If a file system type named
|
||||||
<emphasis>devfs</emphasis> is listed there, then we'll be able to work around
|
<emphasis>devfs</emphasis> is listed there, then we'll be able to work around
|
||||||
the problem by mounting the host's devfs file system on top of the new
|
the problem by mounting the host's devfs file system on top of the new
|
||||||
<filename>/dev</filename> structure which we'll create later on in the section
|
<filename>/dev</filename> structure which we'll create later on in the section
|
||||||
|
@ -16,7 +16,7 @@
|
|||||||
<title>Installation of Net-tools</title>
|
<title>Installation of Net-tools</title>
|
||||||
|
|
||||||
<para>If you don't know what to answer to all the questions asked during the
|
<para>If you don't know what to answer to all the questions asked during the
|
||||||
<userinput>make config</userinput> phase below, then just accept the defaults.
|
<command>make config</command> phase below, then just accept the defaults.
|
||||||
This will be just fine in the majority of cases. What you're asked here is a
|
This will be just fine in the majority of cases. What you're asked here is a
|
||||||
bunch of questions about which network protocols you've enabled in your
|
bunch of questions about which network protocols you've enabled in your
|
||||||
kernel. The default answers will enable the tools from this package to work
|
kernel. The default answers will enable the tools from this package to work
|
||||||
@ -35,7 +35,7 @@ program:</para>
|
|||||||
<screen><userinput>make config</userinput></screen>
|
<screen><userinput>make config</userinput></screen>
|
||||||
|
|
||||||
<para>If you intend to accept the default settings, you may skip the
|
<para>If you intend to accept the default settings, you may skip the
|
||||||
questions generated by <emphasis>make config</emphasis> by running
|
questions generated by <command>make config</command> by running
|
||||||
<userinput>yes "" | make config</userinput> instead.</para>
|
<userinput>yes "" | make config</userinput> instead.</para>
|
||||||
|
|
||||||
<para>Compile the package:</para>
|
<para>Compile the package:</para>
|
||||||
|
@ -19,7 +19,7 @@
|
|||||||
|
|
||||||
<screen><userinput>CPPFLAGS=-D_GNU_SOURCE ./configure --prefix=/usr</userinput></screen>
|
<screen><userinput>CPPFLAGS=-D_GNU_SOURCE ./configure --prefix=/usr</userinput></screen>
|
||||||
|
|
||||||
<para>Again, the preprocessor flag <userinput>-D_GNU_SOURCE</userinput> is only
|
<para>Again, the preprocessor flag <emphasis>-D_GNU_SOURCE</emphasis> is only
|
||||||
needed on the PowerPC platform. On other architectures you can leave it out.</para>
|
needed on the PowerPC platform. On other architectures you can leave it out.</para>
|
||||||
|
|
||||||
<para>Compile the package:</para>
|
<para>Compile the package:</para>
|
||||||
|
@ -22,7 +22,7 @@
|
|||||||
<screen><userinput>./configure.gnu --prefix=/usr -Dpager="/bin/less -isR"</userinput></screen>
|
<screen><userinput>./configure.gnu --prefix=/usr -Dpager="/bin/less -isR"</userinput></screen>
|
||||||
|
|
||||||
<para>If you want more control over the way Perl sets itself up to be
|
<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
|
built, you can run the interactive <command>Configure</command> script
|
||||||
instead and modify the way Perl is built. If you think you can live with the
|
instead and modify the way Perl is built. If you think you can live with the
|
||||||
(sensible) defaults Perl auto-detects, then just use the command listed
|
(sensible) defaults Perl auto-detects, then just use the command listed
|
||||||
above.</para>
|
above.</para>
|
||||||
|
@ -48,9 +48,9 @@ therefore make it a symbolic link to <filename>pstree</filename>:</para>
|
|||||||
<screen><userinput>mv /bin/pstree* /usr/bin
|
<screen><userinput>mv /bin/pstree* /usr/bin
|
||||||
ln -sf pstree /usr/bin/pstree.x11</userinput></screen>
|
ln -sf pstree /usr/bin/pstree.x11</userinput></screen>
|
||||||
|
|
||||||
<para>By default Psmisc's <userinput>pidof</userinput> program isn't installed.
|
<para>By default Psmisc's <command>pidof</command> program isn't installed.
|
||||||
Generally, this isn't a problem because we later install the Sysvinit package,
|
Generally, this isn't a problem because we later install the Sysvinit package,
|
||||||
which provides a better <userinput>pidof</userinput> program. But if you're not
|
which provides a better <command>pidof</command> program. But if you're not
|
||||||
going to use Sysvinit, you should complete the installation of Psmisc by
|
going to use Sysvinit, you should complete the installation of Psmisc by
|
||||||
creating the following symlink:</para>
|
creating the following symlink:</para>
|
||||||
|
|
||||||
|
@ -16,9 +16,9 @@ way.</para>
|
|||||||
<sect2>
|
<sect2>
|
||||||
<title>Installation of Shadow</title>
|
<title>Installation of Shadow</title>
|
||||||
|
|
||||||
<para>Shadow hard-wires the path to the <userinput>passwd</userinput> binary
|
<para>Shadow hard-wires the path to the <command>passwd</command> binary
|
||||||
within the binary itself, but does this the wrong way. If a
|
within the binary itself, but does this the wrong way. If a
|
||||||
<userinput>passwd</userinput> binary is not present before installing Shadow,
|
<command>passwd</command> binary is not present before installing Shadow,
|
||||||
the package incorrectly assumes it is going to be located at
|
the package incorrectly assumes it is going to be located at
|
||||||
<filename>/bin/passwd</filename>, but then installs it in
|
<filename>/bin/passwd</filename>, but then installs it in
|
||||||
<filename>/usr/bin/passwd</filename>. This will lead to errors about not finding
|
<filename>/usr/bin/passwd</filename>. This will lead to errors about not finding
|
||||||
@ -84,7 +84,7 @@ directory for it to work properly:</para>
|
|||||||
|
|
||||||
<screen><userinput>mkdir /etc/default</userinput></screen>
|
<screen><userinput>mkdir /etc/default</userinput></screen>
|
||||||
|
|
||||||
<para>Coreutils has already installed a better <userinput>groups</userinput>
|
<para>Coreutils has already installed a better <command>groups</command>
|
||||||
program in <filename>/usr/bin</filename>. Remove the one installed by
|
program in <filename>/usr/bin</filename>. Remove the one installed by
|
||||||
Shadow:</para>
|
Shadow:</para>
|
||||||
|
|
||||||
|
@ -19,7 +19,7 @@ messages.</para>
|
|||||||
|
|
||||||
<para>The FHS recommends that we use <filename>/var/lib/hwclock</filename>,
|
<para>The FHS recommends that we use <filename>/var/lib/hwclock</filename>,
|
||||||
instead of the usual <filename>/etc</filename>, as the location for the
|
instead of the usual <filename>/etc</filename>, as the location for the
|
||||||
<filename>adjtime</filename> file. To make the <userinput>hwclock</userinput>
|
<filename>adjtime</filename> file. To make the <command>hwclock</command>
|
||||||
program FHS-compliant, run the following:</para>
|
program FHS-compliant, run the following:</para>
|
||||||
|
|
||||||
<screen><userinput>cp hwclock/hwclock.c{,.backup}
|
<screen><userinput>cp hwclock/hwclock.c{,.backup}
|
||||||
@ -44,12 +44,12 @@ mkdir -p /var/lib/hwclock</userinput></screen>
|
|||||||
|
|
||||||
<itemizedlist>
|
<itemizedlist>
|
||||||
<listitem><para><userinput>HAVE_KILL=yes</userinput>: This prevents the
|
<listitem><para><userinput>HAVE_KILL=yes</userinput>: This prevents the
|
||||||
<userinput>kill</userinput> program (already installed by Procps) from being
|
<command>kill</command> program (already installed by Procps) from being
|
||||||
built and installed again.</para></listitem>
|
built and installed again.</para></listitem>
|
||||||
|
|
||||||
<listitem><para><userinput>HAVE_SLN=yes</userinput>: This prevents the
|
<listitem><para><userinput>HAVE_SLN=yes</userinput>: This prevents the
|
||||||
<userinput>sln</userinput> program (a statically linked
|
<command>sln</command> program (a statically linked
|
||||||
<userinput>ln</userinput>, already installed by Glibc) from being built and
|
<command>ln</command>, already installed by Glibc) from being built and
|
||||||
installed again.</para></listitem>
|
installed again.</para></listitem>
|
||||||
</itemizedlist>
|
</itemizedlist>
|
||||||
|
|
||||||
|
@ -52,7 +52,7 @@ the following command will do so:</para>
|
|||||||
|
|
||||||
<screen><userinput>make install</userinput></screen>
|
<screen><userinput>make install</userinput></screen>
|
||||||
|
|
||||||
<para>When called as <userinput>vi</userinput>, <userinput>vim</userinput>
|
<para>When called as <command>vi</command>, <command>vim</command>
|
||||||
will run in old-fashioned vi-mode. To allow this, create a symlink:</para>
|
will run in old-fashioned vi-mode. To allow this, create a symlink:</para>
|
||||||
|
|
||||||
<screen><userinput>ln -s vim /usr/bin/vi</userinput></screen>
|
<screen><userinput>ln -s vim /usr/bin/vi</userinput></screen>
|
||||||
|
@ -3,12 +3,12 @@
|
|||||||
<?dbhtml filename="sysklogd.html" dir="chapter07"?>
|
<?dbhtml filename="sysklogd.html" dir="chapter07"?>
|
||||||
|
|
||||||
<para>The <filename>sysklogd</filename> script invokes the
|
<para>The <filename>sysklogd</filename> script invokes the
|
||||||
<userinput>syslogd</userinput> program with the <emphasis>-m 0</emphasis>
|
<command>syslogd</command> program with the <emphasis>-m 0</emphasis> option.
|
||||||
option. This option turns off the periodic timestamp mark that syslogd
|
This option turns off the periodic timestamp mark that
|
||||||
writes to the log files every 20 minutes by default. If you want to turn
|
<command>syslogd</command> writes to the log files every 20 minutes by default.
|
||||||
on this periodic timestamp mark, edit the <filename>sysklogd</filename>
|
If you want to turn on this periodic timestamp mark, edit the
|
||||||
script and make the changes accordingly. See <userinput>man
|
<filename>sysklogd</filename> script and make the changes accordingly. See
|
||||||
syslogd</userinput> for more information.</para>
|
<userinput>man syslogd</userinput> for more information.</para>
|
||||||
|
|
||||||
</sect1>
|
</sect1>
|
||||||
|
|
||||||
|
@ -25,21 +25,21 @@ different runlevels as they are often implemented:</para>
|
|||||||
5: same as 4, it is usually used for GUI login (like X's xdm or KDE's kdm)
|
5: same as 4, it is usually used for GUI login (like X's xdm or KDE's kdm)
|
||||||
6: reboot the computer</literallayout>
|
6: reboot the computer</literallayout>
|
||||||
|
|
||||||
<para>The command used to change runlevels is <userinput>init
|
<para>The command used to change runlevels is <command>init
|
||||||
<runlevel></userinput> where <runlevel> is
|
<runlevel></command> where <runlevel> is the target runlevel. For
|
||||||
the target runlevel. For example, to reboot the computer, a user would issue
|
example, to reboot the computer, a user would issue the <command>init
|
||||||
the init 6 command. The reboot command is just an alias, as is the halt
|
6</command> command. The <command>reboot</command> command is just an alias for
|
||||||
command an alias to init 0.</para>
|
it, as is the <command>halt</command> command an alias for <command>init
|
||||||
|
0</command>.</para>
|
||||||
|
|
||||||
<para>There are a number of directories under /etc/rc.d that look like
|
<para>There are a number of directories under <filename>/etc/rc.d</filename>
|
||||||
like rc?.d where ? is the number of the runlevel and rcsysinit.d which
|
that look like like rc?.d where ? is the number of the runlevel and rcsysinit.d
|
||||||
contain a number of symbolic links. Some begin with a K, the others
|
which contain a number of symbolic links. Some begin with a K, the others begin
|
||||||
begin with an S, and all of them have two numbers following the initial
|
with an S, and all of them have two numbers following the initial letter. The K
|
||||||
letter. The K means to stop (kill) a service, and the S means to start a
|
means to stop (kill) a service, and the S means to start a service. The numbers
|
||||||
service. The numbers determine the order in which the scripts are run,
|
determine the order in which the scripts are run, from 00 to 99; the lower the
|
||||||
from 00 to 99; the lower the number the sooner it gets executed. When init
|
number the sooner it gets executed. When init switches to another runlevel, the
|
||||||
switches to another runlevel, the appropriate services get killed and
|
appropriate services get killed and others get started.</para>
|
||||||
others get started.</para>
|
|
||||||
|
|
||||||
<para>The real scripts are in /etc/rc.d/init.d. They do all the work, and the
|
<para>The real scripts are in /etc/rc.d/init.d. They do all the work, and the
|
||||||
symlinks all point to them. Killing links and starting links point to
|
symlinks all point to them. Killing links and starting links point to
|
||||||
|
@ -25,7 +25,7 @@ shm /dev/shm tmpfs defaults 0 0
|
|||||||
and <filename>fff</filename> with the values appropriate for your system --
|
and <filename>fff</filename> with the values appropriate for your system --
|
||||||
for example <filename>hda2</filename>, <filename>hda5</filename> and
|
for example <filename>hda2</filename>, <filename>hda5</filename> and
|
||||||
<filename>reiserfs</filename>. For all the details on the six fields in this
|
<filename>reiserfs</filename>. For all the details on the six fields in this
|
||||||
table, see <userinput>man 5 fstab</userinput>.</para>
|
table, see <command>man 5 fstab</command>.</para>
|
||||||
|
|
||||||
<para>When using a reiserfs partition, the <emphasis>1 1</emphasis> at the
|
<para>When using a reiserfs partition, the <emphasis>1 1</emphasis> at the
|
||||||
end of the line should be replaced with <emphasis>0 0</emphasis>, as such a
|
end of the line should be replaced with <emphasis>0 0</emphasis>, as such a
|
||||||
|
@ -116,7 +116,7 @@ rootnoverify (hd0,0)
|
|||||||
chainloader +1
|
chainloader +1
|
||||||
<userinput>EOF</userinput></screen>
|
<userinput>EOF</userinput></screen>
|
||||||
|
|
||||||
<para>If <userinput>info grub</userinput> doesn't tell you all you want to
|
<para>If <command>info grub</command> doesn't tell you all you want to
|
||||||
know, you can find more information regarding Grub on its website, located at:
|
know, you can find more information regarding Grub on its website, located at:
|
||||||
<ulink url="http://www.gnu.org/software/grub"/>.</para>
|
<ulink url="http://www.gnu.org/software/grub"/>.</para>
|
||||||
|
|
||||||
|
@ -88,7 +88,7 @@ kernel. Issue the following command to install the map file:</para>
|
|||||||
<screen><userinput>cp System.map /boot</userinput></screen>
|
<screen><userinput>cp System.map /boot</userinput></screen>
|
||||||
|
|
||||||
<para><filename>.config</filename> is the kernel configuration file that was
|
<para><filename>.config</filename> is the kernel configuration file that was
|
||||||
produced by the <userinput>make menuconfig</userinput> step above. It contains
|
produced by the <command>make menuconfig</command> step above. It contains
|
||||||
all the config selections for the kernel that was just compiled. It's a good
|
all the config selections for the kernel that was just compiled. It's a good
|
||||||
idea to keep this file for future reference:</para>
|
idea to keep this file for future reference:</para>
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user