diff options
author | Alex Gronenwoud <alex@linuxfromscratch.org> | 2003-11-01 22:31:50 +0000 |
---|---|---|
committer | Alex Gronenwoud <alex@linuxfromscratch.org> | 2003-11-01 22:31:50 +0000 |
commit | 73aedd1d35747ff2fad4ddf514dca810721a612a (patch) | |
tree | d05f8b503f210d7248c2b2abea9e5528fc04d90a /chapter06 | |
parent | 0b400add2ba87352e955326bcb931e53864cc2ae (diff) |
Merging caption and installation sections for all packages in chapters 5 and 6.
git-svn-id: http://svn.linuxfromscratch.org/LFS/trunk/BOOK@3052 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689
Diffstat (limited to 'chapter06')
102 files changed, 2048 insertions, 2069 deletions
diff --git a/chapter06/autoconf-inst.xml b/chapter06/autoconf-inst.xml deleted file mode 100644 index a0d7ac9e4..000000000 --- a/chapter06/autoconf-inst.xml +++ /dev/null @@ -1,24 +0,0 @@ -<sect2><title> </title><para> </para></sect2> -<sect2> -<title>Installation of Autoconf</title> - -<para>Prepare Autoconf for compilation:</para> - -<screen><userinput>./configure --prefix=/usr</userinput></screen> - -<para>Compile the package:</para> - -<screen><userinput>make</userinput></screen> - -<para>This package has a test suite available which can perform a number of -checks to ensure it built correctly. Should you choose to run it, the -following command will do so:</para> - -<screen><userinput>make check</userinput></screen> - -<para>And install the package:</para> - -<screen><userinput>make install</userinput></screen> - -</sect2> - diff --git a/chapter06/autoconf.xml b/chapter06/autoconf.xml index 0331a04c9..0d43410fa 100644 --- a/chapter06/autoconf.xml +++ b/chapter06/autoconf.xml @@ -7,6 +7,30 @@ Estimated required disk space: &autoconf-compsize;</screen> &aa-autoconf-shortdesc; &aa-autoconf-dep; -&c6-autoconf-inst; + +<sect2><title> </title><para> </para></sect2> +<sect2> +<title>Installation of Autoconf</title> + +<para>Prepare Autoconf for compilation:</para> + +<screen><userinput>./configure --prefix=/usr</userinput></screen> + +<para>Compile the package:</para> + +<screen><userinput>make</userinput></screen> + +<para>This package has a test suite available which can perform a number of +checks to ensure it built correctly. Should you choose to run it, the +following command will do so:</para> + +<screen><userinput>make check</userinput></screen> + +<para>And install the package:</para> + +<screen><userinput>make install</userinput></screen> + +</sect2> </sect1> + diff --git a/chapter06/automake-inst.xml b/chapter06/automake-inst.xml deleted file mode 100644 index 97e0452b8..000000000 --- a/chapter06/automake-inst.xml +++ /dev/null @@ -1,28 +0,0 @@ -<sect2><title> </title><para> </para></sect2> - -<sect2> -<title>Installation of Automake</title> - -<para>Prepare Automake for compilation:</para> - -<screen><userinput>./configure --prefix=/usr</userinput></screen> - -<para>Compile the package:</para> - -<screen><userinput>make</userinput></screen> - -<para>This package has a test suite available which can perform a number of -checks to ensure it built correctly. Should you choose to run it, the -following command will do so:</para> - -<screen><userinput>make check</userinput></screen> - -<para>Install the package:</para> - -<screen><userinput>make install</userinput></screen> - -<para>And create a necessary symbolic link:</para> - -<screen><userinput>ln -s automake-1.7 /usr/share/automake</userinput></screen> - -</sect2> diff --git a/chapter06/automake.xml b/chapter06/automake.xml index fb821c3b0..e28116cba 100644 --- a/chapter06/automake.xml +++ b/chapter06/automake.xml @@ -7,6 +7,35 @@ Estimated required disk space: &automake-compsize;</screen> &aa-automake-shortdesc; &aa-automake-dep; -&c6-automake-inst; + +<sect2><title> </title><para> </para></sect2> + +<sect2> +<title>Installation of Automake</title> + +<para>Prepare Automake for compilation:</para> + +<screen><userinput>./configure --prefix=/usr</userinput></screen> + +<para>Compile the package:</para> + +<screen><userinput>make</userinput></screen> + +<para>This package has a test suite available which can perform a number of +checks to ensure it built correctly. Should you choose to run it, the +following command will do so:</para> + +<screen><userinput>make check</userinput></screen> + +<para>Install the package:</para> + +<screen><userinput>make install</userinput></screen> + +<para>And create a necessary symbolic link:</para> + +<screen><userinput>ln -s automake-1.7 /usr/share/automake</userinput></screen> + +</sect2> </sect1> + diff --git a/chapter06/bash-inst.xml b/chapter06/bash-inst.xml deleted file mode 100644 index 6f1a94e7d..000000000 --- a/chapter06/bash-inst.xml +++ /dev/null @@ -1,34 +0,0 @@ -<sect2><title> </title><para> </para></sect2> - -<sect2> -<title>Installation of Bash</title> - -<para>Bash has a number of bugs in it that cause it to not behave the -way it is expected at times. Fix this behaviour with the following -patch:</para> - -<screen><userinput>patch -Np1 -i ../&bash-patch;</userinput></screen> - -<para>Prepare Bash for compilation:</para> - -<screen><userinput>./configure --prefix=/usr --bindir=/bin</userinput></screen> - -<para>Compile the package:</para> - -<screen><userinput>make</userinput></screen> - -<para>This package has a test suite available which can perform a number of -checks to ensure it built correctly. Should you choose to run it, the -following command will do so:</para> - -<screen><userinput>make tests</userinput></screen> - -<para>Install the package:</para> - -<screen><userinput>make install</userinput></screen> - -<para>And reload the newly compiled <userinput>bash</userinput> program:</para> - -<screen><userinput>exec /bin/bash --login +h</userinput></screen> - -</sect2> diff --git a/chapter06/bash.xml b/chapter06/bash.xml index 4ebebe535..c2703142a 100644 --- a/chapter06/bash.xml +++ b/chapter06/bash.xml @@ -7,6 +7,41 @@ Estimated required disk space: &bash-compsize;</screen> &aa-bash-shortdesc; &aa-bash-dep; -&c6-bash-inst; + +<sect2><title> </title><para> </para></sect2> + +<sect2> +<title>Installation of Bash</title> + +<para>Bash has a number of bugs in it that cause it to not behave the +way it is expected at times. Fix this behaviour with the following +patch:</para> + +<screen><userinput>patch -Np1 -i ../&bash-patch;</userinput></screen> + +<para>Prepare Bash for compilation:</para> + +<screen><userinput>./configure --prefix=/usr --bindir=/bin</userinput></screen> + +<para>Compile the package:</para> + +<screen><userinput>make</userinput></screen> + +<para>This package has a test suite available which can perform a number of +checks to ensure it built correctly. Should you choose to run it, the +following command will do so:</para> + +<screen><userinput>make tests</userinput></screen> + +<para>Install the package:</para> + +<screen><userinput>make install</userinput></screen> + +<para>And reload the newly compiled <userinput>bash</userinput> program:</para> + +<screen><userinput>exec /bin/bash --login +h</userinput></screen> + +</sect2> </sect1> + diff --git a/chapter06/binutils-inst.xml b/chapter06/binutils-inst.xml deleted file mode 100644 index 81312fe4c..000000000 --- a/chapter06/binutils-inst.xml +++ /dev/null @@ -1,72 +0,0 @@ -<sect2><title> </title><para> </para></sect2> - -<sect2><title>Installation of Binutils</title> - -<para>Now is an appropriate time to verify that your pseudo terminals (PTYs) are -working properly inside the chroot environment. We will again quickly check that -everything is set up correctly by performing a simple test:</para> - -<screen><userinput>expect -c "spawn ls"</userinput></screen> - -<para>If you receive the message:</para> - -<blockquote><screen>The system has no more ptys. Ask your system administrator to create more.</screen></blockquote> - -<para>Your chroot environment is not set up for proper PTY operation. In this -case there is no point in running the test suites for Binutils and GCC until you -are able to resolve the issue. Please refer back to <xref linkend="ch06-proc"/> -and <xref linkend="ch06-makedev"/> and perform the recommended steps to fix the -problem.</para> - -<note><para>The test suite for Binutils in this section is considered -<emphasis>critical</emphasis>. Our advice is to not skip it under any -circumstances.</para> </note> - -<para>This package is known to behave badly when you have changed its -default optimization flags (including the -march and -mcpu options). -Therefore, if you have defined any environment variables that override -default optimizations, such as CFLAGS and CXXFLAGS, we recommend unsetting -or modifying them when building Binutils.</para> - -<para>The Binutils documentation recommends building Binutils outside of the -source directory in a dedicated build directory:</para> - -<screen><userinput>mkdir ../binutils-build -cd ../binutils-build</userinput></screen> - -<para>Now prepare Binutils for compilation:</para> - -<screen><userinput>../binutils-&binutils-version;/configure \ - --prefix=/usr --enable-shared</userinput></screen> - -<para>Compile the package:</para> - -<screen><userinput>make tooldir=/usr</userinput></screen> - -<para>Normally, the <emphasis>tooldir</emphasis> (the directory where the -executables end up) is set to $(exec_prefix)/$(target_alias), which expands -into, for example, <filename>/usr/i686-pc-linux-gnu</filename>. Since we only -build for our own system, we don't need this target specific directory in -<filename>/usr</filename>. That setup would be used if the system was used to -cross-compile (for example compiling a package on an Intel machine that -generates code that can be executed on PowerPC machines).</para> - -<para>Test the results:</para> - -<screen><userinput>make check</userinput></screen> - -<para>The test suite notes from <xref linkend="ch05-binutils-pass2"/> are still -very much appropriate here. Be sure to refer back there should you have any -doubts.</para> - -<para>Install the package:</para> - -<screen><userinput>make tooldir=/usr install</userinput></screen> - -<para>Install the <emphasis>libiberty</emphasis> header file that is needed by -some packages:</para> - -<screen><userinput>cp ../binutils-&binutils-version;/include/libiberty.h /usr/include</userinput></screen> - -</sect2> - diff --git a/chapter06/binutils.xml b/chapter06/binutils.xml index 2acece44f..872fff1ab 100644 --- a/chapter06/binutils.xml +++ b/chapter06/binutils.xml @@ -7,6 +7,78 @@ Estimated required disk space: &binutils-compsize;</screen> &aa-binutils-shortdesc; &aa-binutils-dep; -&c6-binutils-inst; + +<sect2><title> </title><para> </para></sect2> + +<sect2><title>Installation of Binutils</title> + +<para>Now is an appropriate time to verify that your pseudo terminals (PTYs) are +working properly inside the chroot environment. We will again quickly check that +everything is set up correctly by performing a simple test:</para> + +<screen><userinput>expect -c "spawn ls"</userinput></screen> + +<para>If you receive the message:</para> + +<blockquote><screen>The system has no more ptys. Ask your system administrator to create more.</screen></blockquote> + +<para>Your chroot environment is not set up for proper PTY operation. In this +case there is no point in running the test suites for Binutils and GCC until you +are able to resolve the issue. Please refer back to <xref linkend="ch06-proc"/> +and <xref linkend="ch06-makedev"/> and perform the recommended steps to fix the +problem.</para> + +<note><para>The test suite for Binutils in this section is considered +<emphasis>critical</emphasis>. Our advice is to not skip it under any +circumstances.</para> </note> + +<para>This package is known to behave badly when you have changed its +default optimization flags (including the -march and -mcpu options). +Therefore, if you have defined any environment variables that override +default optimizations, such as CFLAGS and CXXFLAGS, we recommend unsetting +or modifying them when building Binutils.</para> + +<para>The Binutils documentation recommends building Binutils outside of the +source directory in a dedicated build directory:</para> + +<screen><userinput>mkdir ../binutils-build +cd ../binutils-build</userinput></screen> + +<para>Now prepare Binutils for compilation:</para> + +<screen><userinput>../binutils-&binutils-version;/configure \ + --prefix=/usr --enable-shared</userinput></screen> + +<para>Compile the package:</para> + +<screen><userinput>make tooldir=/usr</userinput></screen> + +<para>Normally, the <emphasis>tooldir</emphasis> (the directory where the +executables end up) is set to $(exec_prefix)/$(target_alias), which expands +into, for example, <filename>/usr/i686-pc-linux-gnu</filename>. Since we only +build for our own system, we don't need this target specific directory in +<filename>/usr</filename>. That setup would be used if the system was used to +cross-compile (for example compiling a package on an Intel machine that +generates code that can be executed on PowerPC machines).</para> + +<para>Test the results:</para> + +<screen><userinput>make check</userinput></screen> + +<para>The test suite notes from <xref linkend="ch05-binutils-pass2"/> are still +very much appropriate here. Be sure to refer back there should you have any +doubts.</para> + +<para>Install the package:</para> + +<screen><userinput>make tooldir=/usr install</userinput></screen> + +<para>Install the <emphasis>libiberty</emphasis> header file that is needed by +some packages:</para> + +<screen><userinput>cp ../binutils-&binutils-version;/include/libiberty.h /usr/include</userinput></screen> + +</sect2> </sect1> + diff --git a/chapter06/bison-inst.xml b/chapter06/bison-inst.xml deleted file mode 100644 index 7240736b1..000000000 --- a/chapter06/bison-inst.xml +++ /dev/null @@ -1,30 +0,0 @@ -<sect2><title> </title><para> </para></sect2> - -<sect2> -<title>Installation of Bison</title> - -<para>First we use a patch to bison, backported from CVS, which fixes a minor -compilation problem with some packages:</para> - -<screen><userinput>patch -Np1 -i ../&bison-patch;</userinput></screen> - -<para>Prepare Bison for compilation:</para> - -<screen><userinput>./configure --prefix=/usr</userinput></screen> - -<para>Compile the package:</para> - -<screen><userinput>make</userinput></screen> - -<para>This package has a test suite available which can perform a number of -checks to ensure it built correctly. Should you choose to run it, the -following command will do so (and takes a long time):</para> - -<screen><userinput>make check</userinput></screen> - -<para>And install the package:</para> - -<screen><userinput>make install</userinput></screen> - -</sect2> - diff --git a/chapter06/bison.xml b/chapter06/bison.xml index 3e469dcc9..e8c2fbf9d 100644 --- a/chapter06/bison.xml +++ b/chapter06/bison.xml @@ -7,7 +7,36 @@ Estimated required disk space: &bison-compsize;</screen> &aa-bison-shortdesc; &aa-bison-dep; -&c6-bison-inst; + +<sect2><title> </title><para> </para></sect2> + +<sect2> +<title>Installation of Bison</title> + +<para>First we use a patch to bison, backported from CVS, which fixes a minor +compilation problem with some packages:</para> + +<screen><userinput>patch -Np1 -i ../&bison-patch;</userinput></screen> + +<para>Prepare Bison for compilation:</para> + +<screen><userinput>./configure --prefix=/usr</userinput></screen> + +<para>Compile the package:</para> + +<screen><userinput>make</userinput></screen> + +<para>This package has a test suite available which can perform a number of +checks to ensure it built correctly. Should you choose to run it, the +following command will do so (and takes a long time):</para> + +<screen><userinput>make check</userinput></screen> + +<para>And install the package:</para> + +<screen><userinput>make install</userinput></screen> + +</sect2> </sect1> diff --git a/chapter06/bootscripts-inst.xml b/chapter06/bootscripts-inst.xml deleted file mode 100644 index ef1e60968..000000000 --- a/chapter06/bootscripts-inst.xml +++ /dev/null @@ -1,25 +0,0 @@ -<sect2><title> </title><para> </para></sect2> - -<sect2> -<title>Installation of LFS-Bootscripts</title> - -<para>We will be using SysV style init scripts. We have chosen this style -because it is widely used and we feel comfortable with it. If you would prefer -to try something else, Marc Heerdink has written a hint about BSD style init -scripts, to be found at <ulink url="&hints-root;bsd-init.txt"/>. And if you'd -like something more radical, search the LFS mailing lists for depinit.</para> - -<para>If you decide to use BSD style, or some other style scripts, you can -skip the next chapter when you arrive at it and move on to -<xref linkend="chapter08"/>.</para> - -<para>Install the boot scripts:</para> - -<screen><userinput>cp -a rc.d sysconfig /etc</userinput></screen> - -<para>Give <emphasis>root</emphasis> ownership of the scripts:</para> - -<screen><userinput>chown -R root:root /etc/rc.d /etc/sysconfig</userinput></screen> - -</sect2> - diff --git a/chapter06/bootscripts.xml b/chapter06/bootscripts.xml index 94a44f52f..6c3a21963 100644 --- a/chapter06/bootscripts.xml +++ b/chapter06/bootscripts.xml @@ -7,7 +7,31 @@ Estimated required disk space: &bootscripts-compsize;</screen> &aa-bootscripts-shortdesc; &aa-bootscripts-dep; -&c6-bootscripts-inst; + +<sect2><title> </title><para> </para></sect2> + +<sect2> +<title>Installation of LFS-Bootscripts</title> + +<para>We will be using SysV style init scripts. We have chosen this style +because it is widely used and we feel comfortable with it. If you would prefer +to try something else, Marc Heerdink has written a hint about BSD style init +scripts, to be found at <ulink url="&hints-root;bsd-init.txt"/>. And if you'd +like something more radical, search the LFS mailing lists for depinit.</para> + +<para>If you decide to use BSD style, or some other style scripts, you can +skip the next chapter when you arrive at it and move on to +<xref linkend="chapter08"/>.</para> + +<para>Install the boot scripts:</para> + +<screen><userinput>cp -a rc.d sysconfig /etc</userinput></screen> + +<para>Give <emphasis>root</emphasis> ownership of the scripts:</para> + +<screen><userinput>chown -R root:root /etc/rc.d /etc/sysconfig</userinput></screen> + +</sect2> </sect1> diff --git a/chapter06/bzip2-inst.xml b/chapter06/bzip2-inst.xml deleted file mode 100644 index 87d8c361f..000000000 --- a/chapter06/bzip2-inst.xml +++ /dev/null @@ -1,37 +0,0 @@ -<sect2><title> </title><para> </para></sect2> - -<sect2> -<title>Installation of Bzip2</title> - -<para>Prepare Bzip2 for compilation with:</para> - -<screen><userinput>make -f Makefile-libbz2_so -make clean</userinput></screen> - -<para>The <emphasis>-f</emphasis> flag will cause Bzip2 to be built -using a different <filename>Makefile</filename> file, in this case the -<filename>Makefile-libbz2_so</filename> file, which creates a dynamic -<filename>libbz2.so</filename> library and links the bzip2 utilities -against it.</para> - -<para>Compile the package:</para> - -<screen><userinput>make</userinput></screen> - -<para>Install it:</para> - -<screen><userinput>make install</userinput></screen> - -<para>And install the shared <userinput>bzip2</userinput> binary into the -<filename class="directory">/bin</filename> directory, then make some -necessary symbolic links, and clean up.</para> - -<screen><userinput>cp bzip2-shared /bin/bzip2 -cp -a libbz2.so* /lib -ln -s ../../lib/libbz2.so.1.0 /usr/lib/libbz2.so -rm /usr/bin/{bunzip2,bzcat,bzip2} -mv /usr/bin/{bzip2recover,bzless,bzmore} /bin -ln -s bzip2 /bin/bunzip2 -ln -s bzip2 /bin/bzcat</userinput></screen> - -</sect2> diff --git a/chapter06/bzip2.xml b/chapter06/bzip2.xml index 0a1bb3540..bc032f049 100644 --- a/chapter06/bzip2.xml +++ b/chapter06/bzip2.xml @@ -7,6 +7,44 @@ Estimated required disk space: &bzip2-compsize;</screen> &aa-bzip2-shortdesc; &aa-bzip2-dep; -&c6-bzip2-inst; + +<sect2><title> </title><para> </para></sect2> + +<sect2> +<title>Installation of Bzip2</title> + +<para>Prepare Bzip2 for compilation with:</para> + +<screen><userinput>make -f Makefile-libbz2_so +make clean</userinput></screen> + +<para>The <emphasis>-f</emphasis> flag will cause Bzip2 to be built +using a different <filename>Makefile</filename> file, in this case the +<filename>Makefile-libbz2_so</filename> file, which creates a dynamic +<filename>libbz2.so</filename> library and links the bzip2 utilities +against it.</para> + +<para>Compile the package:</para> + +<screen><userinput>make</userinput></screen> + +<para>Install it:</para> + +<screen><userinput>make install</userinput></screen> + +<para>And install the shared <userinput>bzip2</userinput> binary into the +<filename class="directory">/bin</filename> directory, then make some +necessary symbolic links, and clean up.</para> + +<screen><userinput>cp bzip2-shared /bin/bzip2 +cp -a libbz2.so* /lib +ln -s ../../lib/libbz2.so.1.0 /usr/lib/libbz2.so +rm /usr/bin/{bunzip2,bzcat,bzip2} +mv /usr/bin/{bzip2recover,bzless,bzmore} /bin +ln -s bzip2 /bin/bunzip2 +ln -s bzip2 /bin/bzcat</userinput></screen> + +</sect2> </sect1> + diff --git a/chapter06/coreutils-inst.xml b/chapter06/coreutils-inst.xml deleted file mode 100644 index ad17757ee..000000000 --- a/chapter06/coreutils-inst.xml +++ /dev/null @@ -1,78 +0,0 @@ -<sect2><title> </title><para> </para></sect2> - -<sect2> -<title>Installation of Coreutils</title> - -<para>Normally the functionality of <userinput>uname</userinput> is somewhat -broken, in that the <userinput>-p</userinput> switch always returns "unknown". -The following patch fixes this behaviour for Intel architectures:</para> - -<screen><userinput>patch -Np1 -i ../&coreutils-uname-patch;</userinput></screen> - -<para>We do not want Coreutils to install its version of the -<userinput>hostname</userinput> program, because it is inferior to the version -provided by Net-tools. Prevent its installation by applying a patch:</para> - -<screen><userinput>patch -Np1 -i ../&coreutils-hostname-patch;</userinput></screen> - -<para>Now prepare Coreutils for compilation:</para> - -<screen><userinput>./configure --prefix=/usr</userinput></screen> - -<para>Compile the package:</para> - -<screen><userinput>make</userinput></screen> - -<para>The <userinput>su</userinput> program from Coreutils wasn't installed in -Chapter 5 because it needed <emphasis>root</emphasis> privilege to do so. We're -going to need it in a few moments for the test suite. Therefore we work around -the problem by installing it now:</para> - -<screen><userinput>make install-root</userinput></screen> - -<para>This package has a test suite available which can perform a number of -checks to ensure it built correctly. However, this particular test suite -makes some assumptions with regards to the presence of non-root users and -groups that don't apply this early into the LFS build. We therefore create -a dummy system user and two dummy groups to allow the tests to run -properly. Should you choose not to run the test suite, skip down to -"Install the package". The following commands will prepare us for the test -suite. Create two dummy groups and a dummy user name:</para> - -<screen><userinput>echo "dummy1:x:1000" >> /etc/group -echo "dummy2:x:1001:dummy" >> /etc/group -echo "dummy:x:1000:1000:::/bin/bash" >> /etc/passwd</userinput></screen> - -<para>Some tests are meant to run as <emphasis>root</emphasis>:</para> - -<screen><userinput>make check-root</userinput></screen> - -<para>The remainder of the tests are run as the <emphasis>dummy</emphasis> -user:</para> - -<screen><userinput>su dummy -c "make RUN_EXPENSIVE_TESTS=yes check"</userinput></screen> - -<para>Remove the dummy groups and user name:</para> - -<screen><userinput>sed -i.bak '/dummy/d' /etc/passwd /etc/group</userinput></screen> - -<para>Install the package:</para> - -<screen><userinput>make install</userinput></screen> - -<para>And move some programs to their proper locations:</para> - -<screen><userinput>mv /usr/bin/{basename,cat,chgrp,chmod,chown,cp,dd,df} /bin -mv /usr/bin/{dir,dircolors,du,date,echo,false,head} /bin -mv /usr/bin/{install,ln,ls,mkdir,mkfifo,mknod,mv,pwd} /bin -mv /usr/bin/{rm,rmdir,shred,sync,sleep,stty,su,test} /bin -mv /usr/bin/{touch,true,uname,vdir} /bin -mv /usr/bin/chroot /usr/sbin</userinput></screen> - -<para>Finally, create a few necessary symlinks:</para> - -<screen><userinput>ln -s test /bin/[ -ln -s ../../bin/install /usr/bin</userinput></screen> - -</sect2> - diff --git a/chapter06/coreutils.xml b/chapter06/coreutils.xml index 1ee2c812d..7eeaa69a3 100644 --- a/chapter06/coreutils.xml +++ b/chapter06/coreutils.xml @@ -7,7 +7,84 @@ Estimated required disk space: &coreutils-compsize;</screen> &aa-coreutils-shortdesc; &aa-coreutils-dep; -&c6-coreutils-inst; + +<sect2><title> </title><para> </para></sect2> + +<sect2> +<title>Installation of Coreutils</title> + +<para>Normally the functionality of <userinput>uname</userinput> is somewhat +broken, in that the <userinput>-p</userinput> switch always returns "unknown". +The following patch fixes this behaviour for Intel architectures:</para> + +<screen><userinput>patch -Np1 -i ../&coreutils-uname-patch;</userinput></screen> + +<para>We do not want Coreutils to install its version of the +<userinput>hostname</userinput> program, because it is inferior to the version +provided by Net-tools. Prevent its installation by applying a patch:</para> + +<screen><userinput>patch -Np1 -i ../&coreutils-hostname-patch;</userinput></screen> + +<para>Now prepare Coreutils for compilation:</para> + +<screen><userinput>./configure --prefix=/usr</userinput></screen> + +<para>Compile the package:</para> + +<screen><userinput>make</userinput></screen> + +<para>The <userinput>su</userinput> program from Coreutils wasn't installed in +Chapter 5 because it needed <emphasis>root</emphasis> privilege to do so. We're +going to need it in a few moments for the test suite. Therefore we work around +the problem by installing it now:</para> + +<screen><userinput>make install-root</userinput></screen> + +<para>This package has a test suite available which can perform a number of +checks to ensure it built correctly. However, this particular test suite +makes some assumptions with regards to the presence of non-root users and +groups that don't apply this early into the LFS build. We therefore create +a dummy system user and two dummy groups to allow the tests to run +properly. Should you choose not to run the test suite, skip down to +"Install the package". The following commands will prepare us for the test +suite. Create two dummy groups and a dummy user name:</para> + +<screen><userinput>echo "dummy1:x:1000" >> /etc/group +echo "dummy2:x:1001:dummy" >> /etc/group +echo "dummy:x:1000:1000:::/bin/bash" >> /etc/passwd</userinput></screen> + +<para>Some tests are meant to run as <emphasis>root</emphasis>:</para> + +<screen><userinput>make check-root</userinput></screen> + +<para>The remainder of the tests are run as the <emphasis>dummy</emphasis> +user:</para> + +<screen><userinput>su dummy -c "make RUN_EXPENSIVE_TESTS=yes check"</userinput></screen> + +<para>Remove the dummy groups and user name:</para> + +<screen><userinput>sed -i.bak '/dummy/d' /etc/passwd /etc/group</userinput></screen> + +<para>Install the package:</para> + +<screen><userinput>make install</userinput></screen> + +<para>And move some programs to their proper locations:</para> + +<screen><userinput>mv /usr/bin/{basename,cat,chgrp,chmod,chown,cp,dd,df} /bin +mv /usr/bin/{dir,dircolors,du,date,echo,false,head} /bin +mv /usr/bin/{install,ln,ls,mkdir,mkfifo,mknod,mv,pwd} /bin +mv /usr/bin/{rm,rmdir,shred,sync,sleep,stty,su,test} /bin +mv /usr/bin/{touch,true,uname,vdir} /bin +mv /usr/bin/chroot /usr/sbin</userinput></screen> + +<para>Finally, create a few necessary symlinks:</para> + +<screen><userinput>ln -s test /bin/[ +ln -s ../../bin/install /usr/bin</userinput></screen> + +</sect2> </sect1> diff --git a/chapter06/diffutils-inst.xml b/chapter06/diffutils-inst.xml deleted file mode 100644 index fc5805f28..000000000 --- a/chapter06/diffutils-inst.xml +++ /dev/null @@ -1,19 +0,0 @@ -<sect2><title> </title><para> </para></sect2> - -<sect2> -<title>Installation of Diffutils</title> - -<para>Prepare Diffutils for compilation:</para> - -<screen><userinput>./configure --prefix=/usr</userinput></screen> - -<para>Compile the package:</para> - -<screen><userinput>make</userinput></screen> - -<para>And install it:</para> - -<screen><userinput>make install</userinput></screen> - -</sect2> - diff --git a/chapter06/diffutils.xml b/chapter06/diffutils.xml index 57c834a41..321081944 100644 --- a/chapter06/diffutils.xml +++ b/chapter06/diffutils.xml @@ -7,6 +7,25 @@ Estimated required disk space: &diffutils-compsize;</screen> &aa-diffutils-shortdesc; &aa-diffutils-dep; -&c6-diffutils-inst; + +<sect2><title> </title><para> </para></sect2> + +<sect2> +<title>Installation of Diffutils</title> + +<para>Prepare Diffutils for compilation:</para> + +<screen><userinput>./configure --prefix=/usr</userinput></screen> + +<para>Compile the package:</para> + +<screen><userinput>make</userinput></screen> + +<para>And install it:</para> + +<screen><userinput>make install</userinput></screen> + +</sect2> </sect1> + diff --git a/chapter06/e2fsprogs-inst.xml b/chapter06/e2fsprogs-inst.xml deleted file mode 100644 index c5124729d..000000000 --- a/chapter06/e2fsprogs-inst.xml +++ /dev/null @@ -1,55 +0,0 @@ -<sect2><title> </title><para> </para></sect2> - -<sect2> -<title>Installation of E2fsprogs</title> - -<para>It is recommended to build E2fsprogs outside of the -source tree:</para> - -<screen><userinput>mkdir ../e2fsprogs-build -cd ../e2fsprogs-build</userinput></screen> - -<para>Prepare E2fsprogs for compilation:</para> - -<screen><userinput>../e2fsprogs-&e2fsprogs-version;/configure --prefix=/usr --with-root-prefix="" \ - --enable-elf-shlibs</userinput></screen> - -<para>The meaning of the configure options:</para> - -<itemizedlist> -<listitem><para><userinput>--with-root-prefix=""</userinput>: Certain -programs (such as the e2fsck program) are considered essential programs. -When, for example, <filename class="directory">/usr</filename> isn't -mounted, these essential program have to be available. They belong in -directories like <filename class="directory">/lib</filename> and -<filename class="directory">/sbin</filename>. If this option isn't passed -to E2fsprogs's configure, the programs are placed in the -<filename class="directory">/usr</filename> directory, which is not what we -want.</para></listitem> - -<listitem><para><userinput>--enable-elf-shlibs</userinput>: This creates -the shared libraries which some programs in this package make use -of.</para></listitem> -</itemizedlist> - -<para>Compile the package:</para> - -<screen><userinput>make</userinput></screen> - -<para>This package has a test suite available which can perform a number of -checks to ensure it built correctly. Should you choose to run it, the -following command will do so:</para> - -<screen><userinput>make check</userinput></screen> - -<para>Install most of the package:</para> - -<screen><userinput>make install</userinput></screen> - -<para>And install also the shared libraries:</para> - -<screen><userinput>make install-libs</userinput></screen> - -</sect2> - - diff --git a/chapter06/e2fsprogs.xml b/chapter06/e2fsprogs.xml index 412e99fe6..d9ff51cb9 100644 --- a/chapter06/e2fsprogs.xml +++ b/chapter06/e2fsprogs.xml @@ -7,6 +7,61 @@ Estimated required disk space: &e2fsprogs-compsize;</screen> &aa-e2fsprogs-shortdesc; &aa-e2fsprogs-dep; -&c6-e2fsprogs-inst; + +<sect2><title> </title><para> </para></sect2> + +<sect2> +<title>Installation of E2fsprogs</title> + +<para>It is recommended to build E2fsprogs outside of the +source tree:</para> + +<screen><userinput>mkdir ../e2fsprogs-build +cd ../e2fsprogs-build</userinput></screen> + +<para>Prepare E2fsprogs for compilation:</para> + +<screen><userinput>../e2fsprogs-&e2fsprogs-version;/configure --prefix=/usr --with-root-prefix="" \ + --enable-elf-shlibs</userinput></screen> + +<para>The meaning of the configure options:</para> + +<itemizedlist> +<listitem><para><userinput>--with-root-prefix=""</userinput>: Certain +programs (such as the e2fsck program) are considered essential programs. +When, for example, <filename class="directory">/usr</filename> isn't +mounted, these essential program have to be available. They belong in +directories like <filename class="directory">/lib</filename> and +<filename class="directory">/sbin</filename>. If this option isn't passed +to E2fsprogs's configure, the programs are placed in the +<filename class="directory">/usr</filename> directory, which is not what we +want.</para></listitem> + +<listitem><para><userinput>--enable-elf-shlibs</userinput>: This creates +the shared libraries which some programs in this package make use +of.</para></listitem> +</itemizedlist> + +<para>Compile the package:</para> + +<screen><userinput>make</userinput></screen> + +<para>This package has a test suite available which can perform a number of +checks to ensure it built correctly. Should you choose to run it, the +following command will do so:</para> + +<screen><userinput>make check</userinput></screen> + +<para>Install most of the package:</para> + +<screen><userinput>make install</userinput></screen> + +<para>And install also the shared libraries:</para> + +<screen><userinput>make install-libs</userinput></screen> + +</sect2> + </sect1> + diff --git a/chapter06/ed-inst.xml b/chapter06/ed-inst.xml deleted file mode 100644 index bc0e6cfa9..000000000 --- a/chapter06/ed-inst.xml +++ /dev/null @@ -1,47 +0,0 @@ -<sect2><title> </title><para> </para></sect2> - -<sect2> -<title>Installation of Ed</title> - -<note><para>Ed isn't something which many people use. It's installed here -because it can be used by the patch program if you encounter an ed-based patch -file. This happens rarely because diff-based patches are preferred these -days.</para></note> - -<para>Ed normally uses the mktemp function to create temporary files in -<filename class="directory">/tmp</filename>, but this function contains a -vulnerability (see the section on Temporary Files in <ulink -url="http://en.tldp.org/HOWTO/Secure-Programs-HOWTO/avoid-race.html"/>). The -following patch makes Ed use mkstemp instead, which is the recommended way to -create temporary files.</para> - -<para>Apply the patch:</para> - -<screen><userinput>patch -Np1 -i ../&ed-patch;</userinput></screen> - -<para>Now prepare Ed for compilation:</para> - -<screen><userinput>./configure --prefix=/usr</userinput></screen> - -<para>Compile the package:</para> - -<screen><userinput>make</userinput></screen> - -<para>This package has a test suite available which can perform a number of -checks to ensure it built correctly. Should you choose to run it, the -following command will do so:</para> - -<screen><userinput>make check</userinput></screen> - -<para>Install the package:</para> - -<screen><userinput>make install</userinput></screen> - -<para>And move the programs to the <filename>/bin</filename> directory, so -they can be used in the event that the <filename>/usr</filename> partition is -unavailable.</para> - -<screen><userinput>mv /usr/bin/{ed,red} /bin</userinput></screen> - -</sect2> - diff --git a/chapter06/ed.xml b/chapter06/ed.xml index e5a0c3100..078f0a45a 100644 --- a/chapter06/ed.xml +++ b/chapter06/ed.xml @@ -7,8 +7,53 @@ Estimated required disk space: &ed-compsize;</screen> &aa-ed-shortdesc; &aa-ed-dep; -&c6-ed-inst; -</sect1> +<sect2><title> </title><para> </para></sect2> + +<sect2> +<title>Installation of Ed</title> + +<note><para>Ed isn't something which many people use. It's installed here +because it can be used by the patch program if you encounter an ed-based patch +file. This happens rarely because diff-based patches are preferred these +days.</para></note> + +<para>Ed normally uses the mktemp function to create temporary files in +<filename class="directory">/tmp</filename>, but this function contains a +vulnerability (see the section on Temporary Files in <ulink +url="http://en.tldp.org/HOWTO/Secure-Programs-HOWTO/avoid-race.html"/>). The +following patch makes Ed use mkstemp instead, which is the recommended way to +create temporary files.</para> + +<para>Apply the patch:</para> + +<screen><userinput>patch -Np1 -i ../&ed-patch;</userinput></screen> + +<para>Now prepare Ed for compilation:</para> + +<screen><userinput>./configure --prefix=/usr</userinput></screen> + +<para>Compile the package:</para> +<screen><userinput>make</userinput></screen> + +<para>This package has a test suite available which can perform a number of +checks to ensure it built correctly. Should you choose to run it, the +following command will do so:</para> + +<screen><userinput>make check</userinput></screen> + +<para>Install the package:</para> + +<screen><userinput>make install</userinput></screen> + +<para>And move the programs to the <filename>/bin</filename> directory, so +they can be used in the event that the <filename>/usr</filename> partition is +unavailable.</para> + +<screen><userinput>mv /usr/bin/{ed,red} /bin</userinput></screen> + +</sect2> + +</sect1> diff --git a/chapter06/file-inst.xml b/chapter06/file-inst.xml deleted file mode 100644 index 10d578295..000000000 --- a/chapter06/file-inst.xml +++ /dev/null @@ -1,19 +0,0 @@ -<sect2><title> </title><para> </para></sect2> - -<sect2> -<title>Installation of File</title> - -<para>Prepare File for compilation:</para> - -<screen><userinput>./configure --prefix=/usr</userinput></screen> - -<para>Compile the package:</para> - -<screen><userinput>make</userinput></screen> - -<para>And install it:</para> - -<screen><userinput>make install</userinput></screen> - -</sect2> - diff --git a/chapter06/file.xml b/chapter06/file.xml index db2ada676..d21b96286 100644 --- a/chapter06/file.xml +++ b/chapter06/file.xml @@ -7,7 +7,25 @@ Estimated required disk space: &file-compsize;</screen> &aa-file-shortdesc; &aa-file-dep; -&c6-file-inst; + +<sect2><title> </title><para> </para></sect2> + +<sect2> +<title>Installation of File</title> + +<para>Prepare File for compilation:</para> + +<screen><userinput>./configure --prefix=/usr</userinput></screen> + +<para>Compile the package:</para> + +<screen><userinput>make</userinput></screen> + +<para>And install it:</para> + +<screen><userinput>make install</userinput></screen> + +</sect2> </sect1> diff --git a/chapter06/findutils-inst.xml b/chapter06/findutils-inst.xml deleted file mode 100644 index e2aa65266..000000000 --- a/chapter06/findutils-inst.xml +++ /dev/null @@ -1,30 +0,0 @@ -<sect2><title> </title><para> </para></sect2> - -<sect2> -<title>Installing Findutils</title> - -<para>Prepare Findutils for compilation:</para> - -<screen><userinput>./configure --prefix=/usr --libexecdir=/usr/bin</userinput></screen> - -<para>By default, the location of the updatedb database is in -<filename>/usr/var</filename>. To make the location of -<filename>/var/lib/misc/locatedb</filename> file FHS compliant, pass the -<emphasis>--localstatedir=/var/lib/misc</emphasis> option to -<userinput>configure</userinput>.</para> - -<para>Compile the package:</para> - -<screen><userinput>make</userinput></screen> - -<para>This package has a test suite available which can perform a number of -checks to ensure it built correctly. Should you choose to run it, the -following command will do so:</para> - -<screen><userinput>make check</userinput></screen> - -<para>And install the package:</para> - -<screen><userinput>make install</userinput></screen> - -</sect2> diff --git a/chapter06/findutils.xml b/chapter06/findutils.xml index 6918deb5e..5d527b2ee 100644 --- a/chapter06/findutils.xml +++ b/chapter06/findutils.xml @@ -7,7 +7,37 @@ Estimated required disk space: &findutils-compsize;</screen> &aa-findutils-shortdesc; &aa-findutils-dep; -&c6-findutils-inst; + +<sect2><title> </title><para> </para></sect2> + +<sect2> +<title>Installing Findutils</title> + +<para>Prepare Findutils for compilation:</para> + +<screen><userinput>./configure --prefix=/usr --libexecdir=/usr/bin</userinput></screen> + +<para>By default, the location of the updatedb database is in +<filename>/usr/var</filename>. To make the location of +<filename>/var/lib/misc/locatedb</filename> file FHS compliant, pass the +<emphasis>--localstatedir=/var/lib/misc</emphasis> option to +<userinput>configure</userinput>.</para> + +<para>Compile the package:</para> + +<screen><userinput>make</userinput></screen> + +<para>This package has a test suite available which can perform a number of +checks to ensure it built correctly. Should you choose to run it, the +following command will do so:</para> + +<screen><userinput>make check</userinput></screen> + +<para>And install the package:</para> + +<screen><userinput>make install</userinput></screen> + +</sect2> </sect1> diff --git a/chapter06/flex-inst.xml b/chapter06/flex-inst.xml deleted file mode 100644 index 2681eb7ce..000000000 --- a/chapter06/flex-inst.xml +++ /dev/null @@ -1,45 +0,0 @@ -<sect2><title> </title><para> </para></sect2> - -<sect2> -<title>Installation of Flex</title> - -<para>Prepare Flex for compilation:</para> - -<screen><userinput>./configure --prefix=/usr</userinput></screen> - -<para>Compile the package:</para> - -<screen><userinput>make</userinput></screen> - -<para>This package has a test suite available which can perform a number of -checks to ensure it built correctly. Should you choose to run it, the -following command will do so:</para> - -<screen><userinput>make bigcheck</userinput></screen> - -<para>And install the package:</para> - -<screen><userinput>make install</userinput></screen> - -<para>There are some packages that expect to find the Lex library in -<filename>/usr/lib</filename>. Create a symlink to account for this:</para> - -<screen><userinput>ln -s libfl.a /usr/lib/libl.a</userinput></screen> - -<para>A few programs don't know about <userinput>flex</userinput> yet and try -to run its predecessor <userinput>lex</userinput>. To support those programs, -create a shell script named <filename>lex</filename> that calls -<userinput>flex</userinput> in Lex emulation mode:</para> - -<screen><userinput>cat > /usr/bin/lex << "EOF"</userinput> -#!/bin/sh -# Begin /usr/bin/lex - -exec /usr/bin/flex -l "$@" - -# End /usr/bin/lex -<userinput>EOF -chmod 755 /usr/bin/lex</userinput></screen> - -</sect2> - diff --git a/chapter06/flex.xml b/chapter06/flex.xml index bf7ddd59f..d202df991 100644 --- a/chapter06/flex.xml +++ b/chapter06/flex.xml @@ -7,6 +7,51 @@ Estimated required disk space: &flex-compsize;</screen> &aa-flex-shortdesc; &aa-flex-dep; -&c6-flex-inst; + +<sect2><title> </title><para> </para></sect2> + +<sect2> +<title>Installation of Flex</title> + +<para>Prepare Flex for compilation:</para> + +<screen><userinput>./configure --prefix=/usr</userinput></screen> + +<para>Compile the package:</para> + +<screen><userinput>make</userinput></screen> + +<para>This package has a test suite available which can perform a number of +checks to ensure it built correctly. Should you choose to run it, the +following command will do so:</para> + +<screen><userinput>make bigcheck</userinput></screen> + +<para>And install the package:</para> + +<screen><userinput>make install</userinput></screen> + +<para>There are some packages that expect to find the Lex library in +<filename>/usr/lib</filename>. Create a symlink to account for this:</para> + +<screen><userinput>ln -s libfl.a /usr/lib/libl.a</userinput></screen> + +<para>A few programs don't know about <userinput>flex</userinput> yet and try +to run its predecessor <userinput>lex</userinput>. To support those programs, +create a shell script named <filename>lex</filename> that calls +<userinput>flex</userinput> in Lex emulation mode:</para> + +<screen><userinput>cat > /usr/bin/lex << "EOF"</userinput> +#!/bin/sh +# Begin /usr/bin/lex + +exec /usr/bin/flex -l "$@" + +# End /usr/bin/lex +<userinput>EOF +chmod 755 /usr/bin/lex</userinput></screen> + +</sect2> </sect1> + diff --git a/chapter06/gawk-inst.xml b/chapter06/gawk-inst.xml deleted file mode 100644 index d5b5dd9d7..000000000 --- a/chapter06/gawk-inst.xml +++ /dev/null @@ -1,51 +0,0 @@ -<sect2><title> </title><para> </para></sect2> - -<sect2> -<title>Installation of Gawk</title> - -<para>First apply a patch to fix the following issues:</para> - -<itemizedlist> -<listitem><para>Gawk's default location for some of its executables is -<filename>$prefix/libexec/awk</filename>. This location doesn't comply -with the FHS, which never even mentions a directory called -<filename>libexec</filename>. The patch makes it possible to pass a -<emphasis>--libexecdir</emphasis> switch to the configure script, so that we -can use a more appropriate location for the <userinput>grcat</userinput> and -<userinput>pwcat</userinput> binaries: -<filename>/usr/bin</filename>.</para></listitem> - -<listitem><para>Gawk's default data directory is -<filename>$prefix/share/awk</filename>. But package-specific -directories should be named using the package name and version number -(for example: <filename>gawk-7.7.2.</filename>) and not simply the package -name, as there may be different versions of a package installed on the system. -The patch changes the name of the data directory to the correct -<filename>$prefix/share/gawk-&gawk-version;</filename>.</para></listitem> - -<listitem><para>The patch also ensures that this data directory, including its -contents, is removed on a <emphasis>make uninstall</emphasis>.</para></listitem> -</itemizedlist> - -<screen><userinput>patch -Np1 -i ../&gawk-patch;</userinput></screen> - -<para>Now prepare Gawk for compilation:</para> - -<screen><userinput>./configure --prefix=/usr --libexecdir=/usr/bin</userinput></screen> - -<para>Compile the package:</para> - -<screen><userinput>make</userinput></screen> - -<para>This package has a test suite available which can perform a number of -checks to ensure it built correctly. Should you choose to run it, the -following command will do so:</para> - -<screen><userinput>make check</userinput></screen> - -<para>And install the package:</para> - -<screen><userinput>make install</userinput></screen> - -</sect2> - diff --git a/chapter06/gawk.xml b/chapter06/gawk.xml index 15d58ccf9..e1989f21c 100644 --- a/chapter06/gawk.xml +++ b/chapter06/gawk.xml @@ -7,7 +7,57 @@ Estimated required disk space: &gawk-compsize;</screen> &aa-gawk-shortdesc; &aa-gawk-dep; -&c6-gawk-inst; + +<sect2><title> </title><para> </para></sect2> + +<sect2> +<title>Installation of Gawk</title> + +<para>First apply a patch to fix the following issues:</para> + +<itemizedlist> +<listitem><para>Gawk's default location for some of its executables is +<filename>$prefix/libexec/awk</filename>. This location doesn't comply +with the FHS, which never even mentions a directory called +<filename>libexec</filename>. The patch makes it possible to pass a +<emphasis>--libexecdir</emphasis> switch to the configure script, so that we +can use a more appropriate location for the <userinput>grcat</userinput> and +<userinput>pwcat</userinput> binaries: +<filename>/usr/bin</filename>.</para></listitem> + +<listitem><para>Gawk's default data directory is +<filename>$prefix/share/awk</filename>. But package-specific +directories should be named using the package name and version number +(for example: <filename>gawk-7.7.2.</filename>) and not simply the package +name, as there may be different versions of a package installed on the system. +The patch changes the name of the data directory to the correct +<filename>$prefix/share/gawk-&gawk-version;</filename>.</para></listitem> + +<listitem><para>The patch also ensures that this data directory, including its +contents, is removed on a <emphasis>make uninstall</emphasis>.</para></listitem> +</itemizedlist> + +<screen><userinput>patch -Np1 -i ../&gawk-patch;</userinput></screen> + +<para>Now prepare Gawk for compilation:</para> + +<screen><userinput>./configure --prefix=/usr --libexecdir=/usr/bin</userinput></screen> + +<para>Compile the package:</para> + +<screen><userinput>make</userinput></screen> + +<para>This package has a test suite available which can perform a number of +checks to ensure it built correctly. Should you choose to run it, the +following command will do so:</para> + +<screen><userinput>make check</userinput></screen> + +<para>And install the package:</para> + +<screen><userinput>make install</userinput></screen> + +</sect2> </sect1> diff --git a/chapter06/gcc-2953-inst.xml b/chapter06/gcc-2953-inst.xml deleted file mode 100644 index 782f708bc..000000000 --- a/chapter06/gcc-2953-inst.xml +++ /dev/null @@ -1,51 +0,0 @@ -<sect2><title> </title><para> </para></sect2> - -<sect2> -<title>Installation of GCC</title> - -<para>This package is known to behave badly when you have changed its -default optimization flags (including the -march and -mcpu options). -Therefore, if you have defined any environment variables that override -default optimizations, such as CFLAGS and CXXFLAGS, we recommend unsetting -or modifying them when building GCC.</para> - -<para>This is an older release of GCC which we are going to install for the -purpose of compiling the Linux kernel in <xref linkend="chapter08"/>. This -version is recommended -by the kernel developers when you need absolute stability. Later versions of -GCC have not received as much testing for Linux kernel compilation. Using a -later version is likely to work, however, we recommend adhering to the kernel -developer's advice and using the version here to compile your kernel.</para> - -<note><para>We don't install the C++ compiler or libraries here. However, there -may be reasons why you would want to install them. More information can be found -at <ulink url="&blfs-root;view/stable/general/gcc2.html"/>.</para></note> - -<para>We'll install this older release of GCC into the non-standard prefix of -<filename class="directory">/opt</filename> so as to avoid interfering with -the system GCC already installed in <filename class="directory">/usr</filename> - .</para> - -<para>Apply the patches and make a small adjustment:</para> - -<screen><userinput>patch -Np1 -i ../&gcc-2953-patch; -patch -Np1 -i ../&gcc-2953-no-fixinc-patch; -patch -Np1 -i ../&gcc-2953-returntype-fix-patch; -echo timestamp > gcc/cstamp-h.in</userinput></screen> - -<para>The GCC documentation recommends building GCC outside of the source -directory in a dedicated build directory:</para> - -<screen><userinput>mkdir ../gcc-2-build -cd ../gcc-2-build</userinput></screen> - -<para>Compile and install gcc:</para> - -<screen><userinput>../gcc-2.95.3/configure --prefix=/opt/gcc-2.95.3 \ - --enable-shared --enable-languages=c \ - --enable-threads=posix -make bootstrap -make install</userinput></screen> - -</sect2> - diff --git a/chapter06/gcc-2953.xml b/chapter06/gcc-2953.xml index 0afac9ae7..f0f196ada 100644 --- a/chapter06/gcc-2953.xml +++ b/chapter06/gcc-2953.xml @@ -5,7 +5,57 @@ <screen>Estimated build time: &gcc-2953-time; Estimated required disk space: &gcc-2953-compsize;</screen> -&c6-gcc-2953-inst; + +<sect2><title> </title><para> </para></sect2> + +<sect2> +<title>Installation of GCC</title> + +<para>This package is known to behave badly when you have changed its +default optimization flags (including the -march and -mcpu options). +Therefore, if you have defined any environment variables that override +default optimizations, such as CFLAGS and CXXFLAGS, we recommend unsetting +or modifying them when building GCC.</para> + +<para>This is an older release of GCC which we are going to install for the +purpose of compiling the Linux kernel in <xref linkend="chapter08"/>. This +version is recommended +by the kernel developers when you need absolute stability. Later versions of +GCC have not received as much testing for Linux kernel compilation. Using a +later version is likely to work, however, we recommend adhering to the kernel +developer's advice and using the version here to compile your kernel.</para> + +<note><para>We don't install the C++ compiler or libraries here. However, there +may be reasons why you would want to install them. More information can be found +at <ulink url="&blfs-root;view/stable/general/gcc2.html"/>.</para></note> + +<para>We'll install this older release of GCC into the non-standard prefix of +<filename class="directory">/opt</filename> so as to avoid interfering with +the system GCC already installed in <filename class="directory">/usr</filename> + .</para> + +<para>Apply the patches and make a small adjustment:</para> + +<screen><userinput>patch -Np1 -i ../&gcc-2953-patch; +patch -Np1 -i ../&gcc-2953-no-fixinc-patch; +patch -Np1 -i ../&gcc-2953-returntype-fix-patch; +echo timestamp > gcc/cstamp-h.in</userinput></screen> + +<para>The GCC documentation recommends building GCC outside of the source +directory in a dedicated build directory:</para> + +<screen><userinput>mkdir ../gcc-2-build +cd ../gcc-2-build</userinput></screen> + +<para>Compile and install gcc:</para> + +<screen><userinput>../gcc-2.95.3/configure --prefix=/opt/gcc-2.95.3 \ + --enable-shared --enable-languages=c \ + --enable-threads=posix +make bootstrap +make install</userinput></screen> + +</sect2> </sect1> diff --git a/chapter06/gcc-inst.xml b/chapter06/gcc-inst.xml deleted file mode 100644 index 835df60b6..000000000 --- a/chapter06/gcc-inst.xml +++ /dev/null @@ -1,78 +0,0 @@ -<sect2><title> </title><para> </para></sect2> - -<sect2> -<title>Installation of GCC</title> - -<note><para>The test suite for GCC in this section is considered -<emphasis>critical</emphasis>. Our advice is to not skip it under any -circumstance.</para></note> - -<para>This package is known to behave badly when you have changed its -default optimization flags (including the -march and -mcpu options). -Therefore, if you have defined any environment variables that override -default optimizations, such as CFLAGS and CXXFLAGS, we recommend unsetting -or modifying them when building GCC.</para> - -<para>This time we will build both the C and the C++ compiler, so you'll have -to unpack the GCC-core <emphasis>and</emphasis> the GCC-g++ tarball -- they -will unfold into the same directory. You should likewise extract the -GCC-testsuite package. The full GCC package contains even more -compilers. Instructions for building these can be found at -<ulink url="&blfs-root;view/stable/general/gcc.html"/>.</para> - -<screen><userinput>patch -Np1 -i ../&gcc-nofixincludes-patch; -patch -Np1 -i ../&gcc-suppress-libiberty-patch;</userinput></screen> - -<para>The second patch here suppresses the installation of libiberty from GCC, -as we will use the one provided by binutils instead. Be careful -<emphasis>not</emphasis> to apply the GCC specs patch from Chapter 5 -here.</para> - -<para>The GCC documentation recommends building GCC outside of the source -directory in a dedicated build directory:</para> - -<screen><userinput>mkdir ../gcc-build -cd ../gcc-build</userinput></screen> - -<para>Now prepare GCC for compilation:</para> - -<screen><userinput>../gcc-&gcc-version;/configure --prefix=/usr \ - --enable-shared --enable-threads=posix \ - --enable-__cxa_atexit --enable-clocale=gnu \ - --enable-languages=c,c++</userinput></screen> - -<para>Compile the package:</para> - -<screen><userinput>make</userinput></screen> - -<para>Test the results, but don't stop at errors (you'll remember the few -known ones):</para> - -<screen><userinput>make -k check</userinput></screen> - -<para>The test suite notes from <xref linkend="ch05-gcc-pass2"/> are still very -much appropriate here. Be sure to refer back there should you have any -doubts.</para> - -<para>And install the package:</para> - -<screen><userinput>make install</userinput></screen> - -<para>Some packages expect the C PreProcessor to be installed in the -<filename>/lib</filename> directory. -To honor those packages, create this symlink:</para> - -<screen><userinput>ln -s ../usr/bin/cpp /lib</userinput></screen> - -<para>Many packages use the name <userinput>cc</userinput> to call the C -compiler. To satisfy those packages, create a symlink:</para> - -<screen><userinput>ln -s gcc /usr/bin/cc</userinput></screen> - -<note><para>At this point it is strongly recommended to repeat the sanity check -we performed earlier in this chapter. Refer back to -<xref linkend="ch06-adjustingtoolchain"/> and repeat the check. If the results -are wrong, then most likely you erroneously applied the GCC Specs patch from -Chapter 5.</para></note> - -</sect2> diff --git a/chapter06/gcc.xml b/chapter06/gcc.xml index dd141c817..54a105db1 100644 --- a/chapter06/gcc.xml +++ b/chapter06/gcc.xml @@ -7,7 +7,85 @@ Estimated required disk space: &gcc-compsize;</screen> &aa-gcc-shortdesc; &aa-gcc-dep; -&c6-gcc-inst; + +<sect2><title> </title><para> </para></sect2> + +<sect2> +<title>Installation of GCC</title> + +<note><para>The test suite for GCC in this section is considered +<emphasis>critical</emphasis>. Our advice is to not skip it under any +circumstance.</para></note> + +<para>This package is known to behave badly when you have changed its +default optimization flags (including the -march and -mcpu options). +Therefore, if you have defined any environment variables that override +default optimizations, such as CFLAGS and CXXFLAGS, we recommend unsetting +or modifying them when building GCC.</para> + +<para>This time we will build both the C and the C++ compiler, so you'll have +to unpack the GCC-core <emphasis>and</emphasis> the GCC-g++ tarball -- they +will unfold into the same directory. You should likewise extract the +GCC-testsuite package. The full GCC package contains even more +compilers. Instructions for building these can be found at +<ulink url="&blfs-root;view/stable/general/gcc.html"/>.</para> + +<screen><userinput>patch -Np1 -i ../&gcc-nofixincludes-patch; +patch -Np1 -i ../&gcc-suppress-libiberty-patch;</userinput></screen> + +<para>The second patch here suppresses the installation of libiberty from GCC, +as we will use the one provided by binutils instead. Be careful +<emphasis>not</emphasis> to apply the GCC specs patch from Chapter 5 +here.</para> + +<para>The GCC documentation recommends building GCC outside of the source +directory in a dedicated build directory:</para> + +<screen><userinput>mkdir ../gcc-build +cd ../gcc-build</userinput></screen> + +<para>Now prepare GCC for compilation:</para> + +<screen><userinput>../gcc-&gcc-version;/configure --prefix=/usr \ + --enable-shared --enable-threads=posix \ + --enable-__cxa_atexit --enable-clocale=gnu \ + --enable-languages=c,c++</userinput></screen> + +<para>Compile the package:</para> + +<screen><userinput>make</userinput></screen> + +<para>Test the results, but don't stop at errors (you'll remember the few +known ones):</para> + +<screen><userinput>make -k check</userinput></screen> + +<para>The test suite notes from <xref linkend="ch05-gcc-pass2"/> are still very +much appropriate here. Be sure to refer back there should you have any +doubts.</para> + +<para>And install the package:</para> + +<screen><userinput>make install</userinput></screen> + +<para>Some packages expect the C PreProcessor to be installed in the +<filename>/lib</filename> directory. +To honor those packages, create this symlink:</para> + +<screen><userinput>ln -s ../usr/bin/cpp /lib</userinput></screen> + +<para>Many packages use the name <userinput>cc</userinput> to call the C +compiler. To satisfy those packages, create a symlink:</para> + +<screen><userinput>ln -s gcc /usr/bin/cc</userinput></screen> + +<note><para>At this point it is strongly recommended to repeat the sanity check +we performed earlier in this chapter. Refer back to +<xref linkend="ch06-adjustingtoolchain"/> and repeat the check. If the results +are wrong, then most likely you erroneously applied the GCC Specs patch from +Chapter 5.</para></note> + +</sect2> </sect1> diff --git a/chapter06/gettext-inst.xml b/chapter06/gettext-inst.xml deleted file mode 100644 index 47c1fcc1c..000000000 --- a/chapter06/gettext-inst.xml +++ /dev/null @@ -1,25 +0,0 @@ -<sect2><title> </title><para> </para></sect2> - -<sect2> -<title>Installation of Gettext</title> - -<para>Prepare Gettext for compilation:</para> - -<screen><userinput>./configure --prefix=/usr</userinput></screen> - -<para>Compile the package:</para> - -<screen><userinput>make</userinput></screen> - -<para>This package has a test suite available which can perform a number of -checks to ensure it built correctly. Should you choose to run it, the -following command will do so (and takes a very long time):</para> - -<screen><userinput>make check</userinput></screen> - -<para>And install the package:</para> - -<screen><userinput>make install</userinput></screen> - -</sect2> - diff --git a/chapter06/gettext.xml b/chapter06/gettext.xml index 1c240346d..63d473121 100644 --- a/chapter06/gettext.xml +++ b/chapter06/gettext.xml @@ -7,6 +7,31 @@ Estimated required disk space: &gettext-compsize;</screen> &aa-gettext-shortdesc; &aa-gettext-dep; -&c6-gettext-inst; + +<sect2><title> </title><para> </para></sect2> + +<sect2> +<title>Installation of Gettext</title> + +<para>Prepare Gettext for compilation:</para> + +<screen><userinput>./configure --prefix=/usr</userinput></screen> + +<para>Compile the package:</para> + +<screen><userinput>make</userinput></screen> + +<para>This package has a test suite available which can perform a number of +checks to ensure it built correctly. Should you choose to run it, the +following command will do so (and takes a very long time):</para> + +<screen><userinput>make check</userinput></screen> + +<para>And install the package:</para> + +<screen><userinput>make install</userinput></screen> + +</sect2> </sect1> + diff --git a/chapter06/glibc-inst.xml b/chapter06/glibc-inst.xml deleted file mode 100644 index a10cc9347..000000000 --- a/chapter06/glibc-inst.xml +++ /dev/null @@ -1,110 +0,0 @@ -<sect2><title> </title><para> </para></sect2> - -<sect2> -<title>Glibc installation</title> - -<para>The Glibc build system is very well self-contained and will install -perfectly, even though our compiler specs file and linker are still pointing -at <filename>/tools</filename>. We cannot adjust the specs and linker before -the Glibc install, because the Glibc autoconf tests would then give bogus -results and thus defeat our goal of achieving a clean build.</para> - -<note><para>The test suite for Glibc in this section is considered -<emphasis>critical</emphasis>. Our advice is to not skip it under any -circumstance.</para></note> - -<para>Before starting to build Glibc, remember to unpack the Glibc-linuxthreads -again inside the <filename>glibc-&glibc-version;</filename> directory, and to -unset any environment variables that override the default optimization -flags.</para> - -<para>Though it is a harmless message, the install stage of Glibc will -complain about the absence of <filename>/etc/ld.so.conf</filename>. Fix this -annoying little warning with:</para> - -<screen><userinput>touch /etc/ld.so.conf</userinput></screen> - -<para>Then apply the same patch we used previously:</para> - -<screen><userinput>patch -Np1 -i ../&glibc-sscanf-patch;</userinput></screen> - -<para>The Glibc documentation recommends building Glibc outside of the source -directory in a dedicated build directory:</para> - -<screen><userinput>mkdir ../glibc-build -cd ../glibc-build</userinput></screen> - -<para>Now prepare Glibc for compilation:</para> - -<screen><userinput>../glibc-&glibc-version;/configure --prefix=/usr \ - --disable-profile --enable-add-ons \ - --libexecdir=/usr/bin --with-headers=/usr/include</userinput></screen> - -<para>The meaning of the new configure options:</para> - -<itemizedlist> -<listitem><para><userinput>--libexecdir=/usr/bin</userinput>: This will -cause the <filename>pt_chown</filename> program to be installed in the -<filename>/usr/bin</filename> directory.</para></listitem> - -<listitem><para><userinput>--with-headers=/usr/include</userinput>: This -ensures that the kernel headers in <filename>/usr/include</filename> are used -for this build. If you don't pass this switch then the headers from -<filename>/tools/include</filename> are used which of course is not ideal -(although they should be identical). Using this switch has the advantage -that you will be informed immediately should you have forgotten to install the -kernel headers into <filename>/usr/include</filename>.</para></listitem> -</itemizedlist> - -<para>Compile the package:</para> - -<screen><userinput>make</userinput></screen> - -<para>Test the results:</para> - -<screen><userinput>make check</userinput></screen> - -<para>The test suite notes from <xref linkend="ch05-glibc"/> are still very much -appropriate here. Be sure to refer back there should you have any doubts.</para> - -<para>And install the package:</para> - -<screen><userinput>make install</userinput></screen> - -<para>The locales that can make your system respond in a different language -weren't installed by the above command. Do it with this:</para> - -<screen><userinput>make localedata/install-locales</userinput></screen> - -<para>An alternative to running the previous command is to install only those -locales which you need or want. This can be achieved using the -<userinput>localedef</userinput> command. Information on this can be found in -the <filename>INSTALL</filename> file in the -<filename>glibc-&glibc-version;</filename> tree. However, there are a number -of locales that are essential for the tests of future packages to pass -correctly. The following instructions, in place of the install-locales -command above, will install the minimum set of locales necessary for the -tests to run successfully:</para> - -<screen><userinput>mkdir -p /usr/lib/locale -localedef -i de_DE -f ISO-8859-1 de_DE -localedef -i de_DE@euro -f ISO-8859-15 de_DE@euro -localedef -i en_HK -f ISO-8859-1 en_HK -localedef -i en_PH -f ISO-8859-1 en_PH -localedef -i en_US -f ISO-8859-1 en_US -localedef -i es_MX -f ISO-8859-1 es_MX -localedef -i fr_FR -f ISO-8859-1 fr_FR -localedef -i fr_FR@euro -f ISO-8859-15 fr_FR@euro -localedef -i it_IT -f ISO-8859-1 it_IT -localedef -i ja_JP -f EUC-JP ja_JP</userinput></screen> - -<para>Finally, build the linuxthreads man pages:</para> - -<screen><userinput>make -C ../&glibc-dir;/linuxthreads/man</userinput></screen> - -<para>And install these pages:</para> - -<screen><userinput>make -C ../&glibc-dir;/linuxthreads/man install</userinput></screen> - -</sect2> - diff --git a/chapter06/glibc.xml b/chapter06/glibc.xml index 5567defe8..0ee7f3f5b 100644 --- a/chapter06/glibc.xml +++ b/chapter06/glibc.xml @@ -7,8 +7,116 @@ Estimated required disk space: &glibc-compsize;</screen> &aa-glibc-shortdesc; &aa-glibc-dep; -&c6-glibc-inst; -&c6-cf-glibc; + +<sect2><title> </title><para> </para></sect2> + +<sect2> +<title>Glibc installation</title> + +<para>The Glibc build system is very well self-contained and will install +perfectly, even though our compiler specs file and linker are still pointing +at <filename>/tools</filename>. We cannot adjust the specs and linker before +the Glibc install, because the Glibc autoconf tests would then give bogus +results and thus defeat our goal of achieving a clean build.</para> + +<note><para>The test suite for Glibc in this section is considered +<emphasis>critical</emphasis>. Our advice is to not skip it under any +circumstance.</para></note> + +<para>Before starting to build Glibc, remember to unpack the Glibc-linuxthreads +again inside the <filename>glibc-&glibc-version;</filename> directory, and to +unset any environment variables that override the default optimization +flags.</para> + +<para>Though it is a harmless message, the install stage of Glibc will +complain about the absence of <filename>/etc/ld.so.conf</filename>. Fix this +annoying little warning with:</para> + +<screen><userinput>touch /etc/ld.so.conf</userinput></screen> + +<para>Then apply the same patch we used previously:</para> + +<screen><userinput>patch -Np1 -i ../&glibc-sscanf-patch;</userinput></screen> + +<para>The Glibc documentation recommends building Glibc outside of the source +directory in a dedicated build directory:</para> + +<screen><userinput>mkdir ../glibc-build +cd ../glibc-build</userinput></screen> + +<para>Now prepare Glibc for compilation:</para> + +<screen><userinput>../glibc-&glibc-version;/configure --prefix=/usr \ + --disable-profile --enable-add-ons \ + --libexecdir=/usr/bin --with-headers=/usr/include</userinput></screen> + +<para>The meaning of the new configure options:</para> + +<itemizedlist> +<listitem><para><userinput>--libexecdir=/usr/bin</userinput>: This will +cause the <filename>pt_chown</filename> program to be installed in the +<filename>/usr/bin</filename> directory.</para></listitem> + +<listitem><para><userinput>--with-headers=/usr/include</userinput>: This +ensures that the kernel headers in <filename>/usr/include</filename> are used +for this build. If you don't pass this switch then the headers from +<filename>/tools/include</filename> are used which of course is not ideal +(although they should be identical). Using this switch has the advantage +that you will be informed immediately should you have forgotten to install the +kernel headers into <filename>/usr/include</filename>.</para></listitem> +</itemizedlist> + +<para>Compile the package:</para> + +<screen><userinput>make</userinput></screen> + +<para>Test the results:</para> + +<screen><userinput>make check</userinput></screen> + +<para>The test suite notes from <xref linkend="ch05-glibc"/> are still very much +appropriate here. Be sure to refer back there should you have any doubts.</para> + +<para>And install the package:</para> + +<screen><userinput>make install</userinput></screen> + +<para>The locales that can make your system respond in a different language +weren't installed by the above command. Do it with this:</para> + +<screen><userinput>make localedata/install-locales</userinput></screen> + +<para>An alternative to running the previous command is to install only those +locales which you need or want. This can be achieved using the +<userinput>localedef</userinput> command. Information on this can be found in +the <filename>INSTALL</filename> file in the +<filename>glibc-&glibc-version;</filename> tree. However, there are a number +of locales that are essential for the tests of future packages to pass +correctly. The following instructions, in place of the install-locales +command above, will install the minimum set of locales necessary for the +tests to run successfully:</para> + +<screen><userinput>mkdir -p /usr/lib/locale +localedef -i de_DE -f ISO-8859-1 de_DE +localedef -i de_DE@euro -f ISO-8859-15 de_DE@euro +localedef -i en_HK -f ISO-8859-1 en_HK +localedef -i en_PH -f ISO-8859-1 en_PH +localedef -i en_US -f ISO-8859-1 en_US +localedef -i es_MX -f ISO-8859-1 es_MX +localedef -i fr_FR -f ISO-8859-1 fr_FR +localedef -i fr_FR@euro -f ISO-8859-15 fr_FR@euro +localedef -i it_IT -f ISO-8859-1 it_IT +localedef -i ja_JP -f EUC-JP ja_JP</userinput></screen> + +<para>Finally, build the linuxthreads man pages:</para> + +<screen><userinput>make -C ../&glibc-dir;/linuxthreads/man</userinput></screen> + +<para>And install these pages:</para> + +<screen><userinput>make -C ../&glibc-dir;/linuxthreads/man install</userinput></screen> + +</sect2> </sect1> diff --git a/chapter06/grep-inst.xml b/chapter06/grep-inst.xml deleted file mode 100644 index 5957f5e99..000000000 --- a/chapter06/grep-inst.xml +++ /dev/null @@ -1,26 +0,0 @@ -<sect2><title> </title><para> </para></sect2> - -<sect2> -<title>Installation of Grep</title> - -<para>Prepare Grep for compilation:</para> - -<screen><userinput>./configure --prefix=/usr --bindir=/bin \ - --with-included-regex</userinput></screen> - -<para>Compile the package:</para> - -<screen><userinput>make</userinput></screen> - -<para>This package has a test suite available which can perform a number of -checks to ensure it built correctly. Should you choose to run it, the -following command will do so:</para> - -<screen><userinput>make check</userinput></screen> - -<para>And install the package:</para> - -<screen><userinput>make install</userinput></screen> - -</sect2> - diff --git a/chapter06/grep.xml b/chapter06/grep.xml index d764ecd27..a68e7a271 100644 --- a/chapter06/grep.xml +++ b/chapter06/grep.xml @@ -7,6 +7,32 @@ Estimated required disk space: &grep-compsize;</screen> &aa-grep-shortdesc; &aa-grep-dep; -&c6-grep-inst; + +<sect2><title> </title><para> </para></sect2> + +<sect2> +<title>Installation of Grep</title> + +<para>Prepare Grep for compilation:</para> + +<screen><userinput>./configure --prefix=/usr --bindir=/bin \ + --with-included-regex</userinput></screen> + +<para>Compile the package:</para> + +<screen><userinput>make</userinput></screen> + +<para>This package has a test suite available which can perform a number of +checks to ensure it built correctly. Should you choose to run it, the +following command will do so:</para> + +<screen><userinput>make check</userinput></screen> + +<para>And install the package:</para> + +<screen><userinput>make install</userinput></screen> + +</sect2> </sect1> + diff --git a/chapter06/groff-inst.xml b/chapter06/groff-inst.xml deleted file mode 100644 index 7b2afb1a3..000000000 --- a/chapter06/groff-inst.xml +++ /dev/null @@ -1,31 +0,0 @@ -<sect2><title> </title><para> </para></sect2> - -<sect2> -<title>Installation of Groff</title> - -<para>Groff expects the environment variable PAGE to contain the default paper -size. For those in the United States, the command below is appropriate. If you -live elsewhere, you may want to change <emphasis>PAGE=letter</emphasis> to -<emphasis>PAGE=A4</emphasis>.</para> - -<para>Prepare Groff for compilation:</para> - -<screen><userinput>PAGE=letter ./configure --prefix=/usr</userinput></screen> - -<para>Compile the package:</para> - -<screen><userinput>make</userinput></screen> - -<para>And install it:</para> - -<screen><userinput>make install</userinput></screen> - -<para>Some documentation programs, such as <userinput>xman</userinput>, -will not work work properly without the following symlinks:</para> - -<screen><userinput>ln -s soelim /usr/bin/zsoelim -ln -s eqn /usr/bin/geqn -ln -s tbl /usr/bin/gtbl</userinput></screen> - -</sect2> - diff --git a/chapter06/groff.xml b/chapter06/groff.xml index 6699b0c81..4c3531fd9 100644 --- a/chapter06/groff.xml +++ b/chapter06/groff.xml @@ -7,7 +7,37 @@ Estimated required disk space: &groff-compsize;</screen> &aa-groff-shortdesc; &aa-groff-dep; -&c6-groff-inst; + +<sect2><title> </title><para> </para></sect2> + +<sect2> +<title>Installation of Groff</title> + +<para>Groff expects the environment variable PAGE to contain the default paper +size. For those in the United States, the command below is appropriate. If you +live elsewhere, you may want to change <emphasis>PAGE=letter</emphasis> to +<emphasis>PAGE=A4</emphasis>.</para> + +<para>Prepare Groff for compilation:</para> + +<screen><userinput>PAGE=letter ./configure --prefix=/usr</userinput></screen> + +<para>Compile the package:</para> + +<screen><userinput>make</userinput></screen> + +<para>And install it:</para> + +<screen><userinput>make install</userinput></screen> + +<para>Some documentation programs, such as <userinput>xman</userinput>, +will not work work properly without the following symlinks:</para> + +<screen><userinput>ln -s soelim /usr/bin/zsoelim +ln -s eqn /usr/bin/geqn +ln -s tbl /usr/bin/gtbl</userinput></screen> + +</sect2> </sect1> diff --git a/chapter06/grub-inst.xml b/chapter06/grub-inst.xml deleted file mode 100644 index 748de1fbc..000000000 --- a/chapter06/grub-inst.xml +++ /dev/null @@ -1,41 +0,0 @@ -<sect2><title> </title><para> </para></sect2> - -<sect2> -<title>Installation of Grub</title> - -<para>This package is known to behave badly when you have changed its default -optimization flags (including the -march and -mcpu options). Therefore, if you -have defined any environment variables that override default optimizations, -such as CFLAGS and CXXFLAGS, we recommend unsetting them when building -Grub.</para> - -<para>Grub needs a patch to fix a compilation problem with GCC-&gcc-version;</para> - -<screen><userinput>patch -Np1 -i ../&grub-patch;</userinput></screen> - -<para>Prepare Grub for compilation:</para> - -<screen><userinput>./configure --prefix=/usr</userinput></screen> - -<para>Compile the package:</para> - -<screen><userinput>make</userinput></screen> - -<para>And install it:</para> - -<screen><userinput>make install -mkdir /boot/grub -cp /usr/share/grub/i386-pc/stage{1,2} /boot/grub</userinput></screen> - -<para>Replace <filename class="directory">i386-pc</filename> with whatever -directory is appropriate for your hardware.</para> - -<para>The <filename class="directory">i386-pc</filename> directory also -contains a number of <filename>*stage1_5</filename> files, different ones -for different filesystems. Have a look at the ones available and copy the -appropriate ones to the <filename class="directory">/boot/grub</filename> -directory. Most people will copy the <filename>e2fs_stage1_5</filename> -and/or <filename>reiserfs_stage1_5</filename> files.</para> - -</sect2> - diff --git a/chapter06/grub.xml b/chapter06/grub.xml index 1eadcb226..431715f8d 100644 --- a/chapter06/grub.xml +++ b/chapter06/grub.xml @@ -7,6 +7,47 @@ Estimated required disk space: &grub-compsize;</screen> &aa-grub-shortdesc; &aa-grub-dep; -&c6-grub-inst; + +<sect2><title> </title><para> </para></sect2> + +<sect2> +<title>Installation of Grub</title> + +<para>This package is known to behave badly when you have changed its default +optimization flags (including the -march and -mcpu options). Therefore, if you +have defined any environment variables that override default optimizations, +such as CFLAGS and CXXFLAGS, we recommend unsetting them when building +Grub.</para> + +<para>Grub needs a patch to fix a compilation problem with GCC-&gcc-version;</para> + +<screen><userinput>patch -Np1 -i ../&grub-patch;</userinput></screen> + +<para>Prepare Grub for compilation:</para> + +<screen><userinput>./configure --prefix=/usr</userinput></screen> + +<para>Compile the package:</para> + +<screen><userinput>make</userinput></screen> + +<para>And install it:</para> + +<screen><userinput>make install +mkdir /boot/grub +cp /usr/share/grub/i386-pc/stage{1,2} /boot/grub</userinput></screen> + +<para>Replace <filename class="directory">i386-pc</filename> with whatever +directory is appropriate for your hardware.</para> + +<para>The <filename class="directory">i386-pc</filename> directory also +contains a number of <filename>*stage1_5</filename> files, different ones +for different filesystems. Have a look at the ones available and copy the +appropriate ones to the <filename class="directory">/boot/grub</filename> +directory. Most people will copy the <filename>e2fs_stage1_5</filename> +and/or <filename>reiserfs_stage1_5</filename> files.</para> + +</sect2> </sect1> + diff --git a/chapter06/gzip-inst.xml b/chapter06/gzip-inst.xml deleted file mode 100644 index 55ace4eeb..000000000 --- a/chapter06/gzip-inst.xml +++ /dev/null @@ -1,34 +0,0 @@ -<sect2><title> </title><para> </para></sect2> - -<sect2> -<title>Installation of Gzip</title> - -<para>Prepare Gzip for compilation:</para> - -<screen><userinput>./configure --prefix=/usr</userinput></screen> - -<para>The gzexe program has the location of the gzip binary hard-wired into -it. Because we later change the location of this binary, the following -command will place the new location into the gzexe binary.</para> - -<screen><userinput>cp gzexe.in{,.backup} -sed 's%"BINDIR"%/bin%' gzexe.in.backup > gzexe.in</userinput></screen> - -<para>Compile the package:</para> - -<screen><userinput>make</userinput></screen> - -<para>Install the package:</para> - -<screen><userinput>make install</userinput></screen> - -<para>And move the programs to the <filename -class="directory">/bin</filename> directory:</para> - -<screen><userinput>mv /usr/bin/gzip /bin -rm /usr/bin/{gunzip,zcat} -ln -s gzip /bin/gunzip -ln -s gzip /bin/zcat -ln -s gunzip /bin/uncompress</userinput></screen> - -</sect2> diff --git a/chapter06/gzip.xml b/chapter06/gzip.xml index 616614f1f..c5a65e9b0 100644 --- a/chapter06/gzip.xml +++ b/chapter06/gzip.xml @@ -7,6 +7,41 @@ Estimated required disk space: &gzip-compsize;</screen> &aa-gzip-shortdesc; &aa-gzip-dep; -&c6-gzip-inst; + +<sect2><title> </title><para> </para></sect2> + +<sect2> +<title>Installation of Gzip</title> + +<para>Prepare Gzip for compilation:</para> + +<screen><userinput>./configure --prefix=/usr</userinput></screen> + +<para>The gzexe program has the location of the gzip binary hard-wired into +it. Because we later change the location of this binary, the following +command will place the new location into the gzexe binary.</para> + +<screen><userinput>cp gzexe.in{,.backup} +sed 's%"BINDIR"%/bin%' gzexe.in.backup > gzexe.in</userinput></screen> + +<para>Compile the package:</para> + +<screen><userinput>make</userinput></screen> + +<para>Install the package:</para> + +<screen><userinput>make install</userinput></screen> + +<para>And move the programs to the <filename +class="directory">/bin</filename> directory:</para> + +<screen><userinput>mv /usr/bin/gzip /bin +rm /usr/bin/{gunzip,zcat} +ln -s gzip /bin/gunzip +ln -s gzip /bin/zcat +ln -s gunzip /bin/uncompress</userinput></screen> + +</sect2> </sect1> + diff --git a/chapter06/inetutils-inst.xml b/chapter06/inetutils-inst.xml deleted file mode 100644 index 0b08d6d34..000000000 --- a/chapter06/inetutils-inst.xml +++ /dev/null @@ -1,51 +0,0 @@ -<sect2><title> </title><para> </para></sect2> - -<sect2> -<title>Installation of Inetutils</title> - -<para>Prepare Inetutils for compilation:</para> - -<screen><userinput>./configure --prefix=/usr --disable-syslogd \ - --libexecdir=/usr/sbin --disable-logger \ - --sysconfdir=/etc --localstatedir=/var \ - --disable-whois --disable-servers</userinput></screen> - -<para>The meaning of the configure options:</para> - -<itemizedlist> -<listitem><para><userinput>--disable-syslogd</userinput>: This option -prevents inetutils from installing the System Log Daemon, which is -installed with the Sysklogd package.</para></listitem> - -<listitem><para><userinput>--disable-logger</userinput>: This option -prevents inetutils from installing the logger program, which is used by -scripts to pass messages to the System Log Daemon. We do not install it -because Util-linux installs a better version later.</para></listitem> - -<listitem><para><userinput>--disable-whois</userinput>: This option disables -the building of the inetutils whois client, which is woefully out of date. -Instructions for a better whois client are in the BLFS book.</para></listitem> - -<listitem><para><userinput>--disable-servers</userinput>: This disables the -installation of the various network servers included as part of the Inetutils -package. These servers are deemed not appropriate in a basic LFS system. Some -are insecure by nature and are only considered safe on trusted networks. More -information can be found at -<ulink url="&blfs-root;view/stable/basicnet/inetutils.html"/>. Note that better -replacements are available for many of these servers.</para></listitem> -</itemizedlist> - -<para>Compile the package:</para> - -<screen><userinput>make</userinput></screen> - -<para>Install it:</para> - -<screen><userinput>make install</userinput></screen> - -<para>And move the <userinput>ping</userinput> program to its proper place:</para> - -<screen><userinput>mv /usr/bin/ping /bin</userinput></screen> - -</sect2> - diff --git a/chapter06/inetutils.xml b/chapter06/inetutils.xml index b269ec090..fd448abdb 100644 --- a/chapter06/inetutils.xml +++ b/chapter06/inetutils.xml @@ -7,6 +7,57 @@ Estimated required disk space: &inetutils-compsize;</screen> &aa-inetutils-shortdesc; &aa-inetutils-dep; -&c6-inetutils-inst; + +<sect2><title> </title><para> </para></sect2> + +<sect2> +<title>Installation of Inetutils</title> + +<para>Prepare Inetutils for compilation:</para> + +<screen><userinput>./configure --prefix=/usr --disable-syslogd \ + --libexecdir=/usr/sbin --disable-logger \ + --sysconfdir=/etc --localstatedir=/var \ + --disable-whois --disable-servers</userinput></screen> + +<para>The meaning of the configure options:</para> + +<itemizedlist> +<listitem><para><userinput>--disable-syslogd</userinput>: This option +prevents inetutils from installing the System Log Daemon, which is +installed with the Sysklogd package.</para></listitem> + +<listitem><para><userinput>--disable-logger</userinput>: This option +prevents inetutils from installing the logger program, which is used by +scripts to pass messages to the System Log Daemon. We do not install it +because Util-linux installs a better version later.</para></listitem> + +<listitem><para><userinput>--disable-whois</userinput>: This option disables +the building of the inetutils whois client, which is woefully out of date. +Instructions for a better whois client are in the BLFS book.</para></listitem> + +<listitem><para><userinput>--disable-servers</userinput>: This disables the +installation of the various network servers included as part of the Inetutils +package. These servers are deemed not appropriate in a basic LFS system. Some +are insecure by nature and are only considered safe on trusted networks. More +information can be found at +<ulink url="&blfs-root;view/stable/basicnet/inetutils.html"/>. Note that better +replacements are available for many of these servers.</para></listitem> +</itemizedlist> + +<para>Compile the package:</para> + +<screen><userinput>make</userinput></screen> + +<para>Install it:</para> + +<screen><userinput>make install</userinput></screen> + +<para>And move the <userinput>ping</userinput> program to its proper place:</para> + +<screen><userinput>mv /usr/bin/ping /bin</userinput></screen> + +</sect2> </sect1> + diff --git a/chapter06/kbd-inst.xml b/chapter06/kbd-inst.xml deleted file mode 100644 index 39f9b5cb4..000000000 --- a/chapter06/kbd-inst.xml +++ /dev/null @@ -1,25 +0,0 @@ -<sect2><title> </title><para> </para></sect2> - -<sect2> -<title>Installation of Kbd</title> - -<para>By default some of Kbd's utilities (<userinput>setlogcons</userinput>, -<userinput>setvesablank</userinput> and <userinput>getunimap</userinput>) are -not installed . The patch enables the compilation of these utilities:</para> - -<screen><userinput>patch -Np1 -i ../&kbd-patch;</userinput></screen> - -<para>Now prepare Kbd for compilation:</para> - -<screen><userinput>./configure</userinput></screen> - -<para>Compile the package:</para> - -<screen><userinput>make</userinput></screen> - -<para>And install it:</para> - -<screen><userinput>make install</userinput></screen> - -</sect2> - diff --git a/chapter06/kbd.xml b/chapter06/kbd.xml index 5e9fc3830..33eb1d71c 100644 --- a/chapter06/kbd.xml +++ b/chapter06/kbd.xml @@ -7,7 +7,31 @@ Estimated required disk space: &kbd-compsize;</screen> &aa-kbd-shortdesc; &aa-kbd-dep; -&c6-kbd-inst; + +<sect2><title> </title><para> </para></sect2> + +<sect2> +<title>Installation of Kbd</title> + +<para>By default some of Kbd's utilities (<userinput>setlogcons</userinput>, +<userinput>setvesablank</userinput> and <userinput>getunimap</userinput>) are +not installed . The patch enables the compilation of these utilities:</para> + +<screen><userinput>patch -Np1 -i ../&kbd-patch;</userinput></screen> + +<para>Now prepare Kbd for compilation:</para> + +<screen><userinput>./configure</userinput></screen> + +<para>Compile the package:</para> + +<screen><userinput>make</userinput></screen> + +<para>And install it:</para> + +<screen><userinput>make install</userinput></screen> + +</sect2> </sect1> diff --git a/chapter06/kernel-inst.xml b/chapter06/kernel-inst.xml deleted file mode 100644 index b3b6f41cd..000000000 --- a/chapter06/kernel-inst.xml +++ /dev/null @@ -1,61 +0,0 @@ -<sect2><title> </title><para> </para></sect2> - -<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 so they can be found by these packages.</para> - -<para>It is important to note that the files in the kernel source directory -are not owned by <emphasis>root</emphasis>. Whenever you unpack a package as -user <emphasis>root</emphasis> (like we do here inside chroot), the files end -up having the user and group IDs of whatever they were on the packager's -computer. This is usually not a -problem for any other package you install because you remove the source -tree after the installation. But the Linux kernel source tree is often kept -around for a long time, so there's a chance that whatever user ID the packager -used will be assigned to somebody on your machine and then that person would -have write access to the kernel source.</para> - -<para>In light of this, you might want to run <userinput>chown -R 0:0</userinput> -on the <filename>linux-&kernel-version;</filename> directory -to ensure all files are owned by user <emphasis>root</emphasis>.</para> - -<para>Prepare for header installation:</para> - -<screen><userinput>make mrproper</userinput></screen> - -<para>This ensures that the kernel tree is absolutely clean. The kernel team -recommends that this command be issued prior to <emphasis>each</emphasis> kernel -compilation. You shouldn't rely on the source tree being clean after -untarring.</para> - -<para>Create the <filename>include/linux/version.h</filename> file:</para> - -<screen><userinput>make include/linux/version.h</userinput></screen> - -<para>Create the platform-specific <filename>include/asm</filename> -symlink:</para> - -<screen><userinput>make symlinks</userinput></screen> - -<para>Install the platform specific-header files:</para> - -<screen><userinput>cp -HR include/asm /usr/include -cp -R include/asm-generic /usr/include</userinput></screen> - -<para>Install the cross-platform kernel header files:</para> - -<screen><userinput>cp -R include/linux /usr/include</userinput></screen> - -<para>There are a few kernel header files which make use of the -<filename>autoconf.h</filename> header file. Since we do not yet configure the -kernel, we need to create this file ourselves in order to avoid compilation -failures. Create an empty <filename>autoconf.h</filename> file:</para> - -<screen><userinput>touch /usr/include/linux/autoconf.h</userinput></screen> - -</sect2> - diff --git a/chapter06/kernel.xml b/chapter06/kernel.xml index f16c107ad..f154f00c5 100644 --- a/chapter06/kernel.xml +++ b/chapter06/kernel.xml @@ -7,8 +7,67 @@ Estimated required disk space: &kernel-compsize-headers;</screen> &aa-kernel-shortdesc; &aa-kernel-dep; -&c6-kernel-inst; -&c6-kernel-exp-headers; + +<sect2><title> </title><para> </para></sect2> + +<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 so they can be found by these packages.</para> + +<para>It is important to note that the files in the kernel source directory +are not owned by <emphasis>root</emphasis>. Whenever you unpack a package as +user <emphasis>root</emphasis> (like we do here inside chroot), the files end +up having the user and group IDs of whatever they were on the packager's +computer. This is usually not a +problem for any other package you install because you remove the source +tree after the installation. But the Linux kernel source tree is often kept +around for a long time, so there's a chance that whatever user ID the packager +used will be assigned to somebody on your machine and then that person would +have write access to the kernel source.</para> + +<para>In light of this, you might want to run <userinput>chown -R 0:0</userinput> +on the <filename>linux-&kernel-version;</filename> directory +to ensure all files are owned by user <emphasis>root</emphasis>.</para> + +<para>Prepare for header installation:</para> + +<screen><userinput>make mrproper</userinput></screen> + +<para>This ensures that the kernel tree is absolutely clean. The kernel team +recommends that this command be issued prior to <emphasis>each</emphasis> kernel +compilation. You shouldn't rely on the source tree being clean after +untarring.</para> + +<para>Create the <filename>include/linux/version.h</filename> file:</para> + +<screen><userinput>make include/linux/version.h</userinput></screen> + +<para>Create the platform-specific <filename>include/asm</filename> +symlink:</para> + +<screen><userinput>make symlinks</userinput></screen> + +<para>Install the platform specific-header files:</para> + +<screen><userinput>cp -HR include/asm /usr/include +cp -R include/asm-generic /usr/include</userinput></screen> + +<para>Install the cross-platform kernel header files:</para> + +<screen><userinput>cp -R include/linux /usr/include</userinput></screen> + +<para>There are a few kernel header files which make use of the +<filename>autoconf.h</filename> header file. Since we do not yet configure the +kernel, we need to create this file ourselves in order to avoid compilation +failures. Create an empty <filename>autoconf.h</filename> file:</para> + +<screen><userinput>touch /usr/include/linux/autoconf.h</userinput></screen> + +</sect2> </sect1> diff --git a/chapter06/less-inst.xml b/chapter06/less-inst.xml deleted file mode 100644 index 13e23a1a2..000000000 --- a/chapter06/less-inst.xml +++ /dev/null @@ -1,27 +0,0 @@ -<sect2><title> </title><para> </para></sect2> - -<sect2> -<title>Installation of Less</title> - -<para>Prepare Less for compilation:</para> - -<screen><userinput>./configure --prefix=/usr --bindir=/bin --sysconfdir=/etc</userinput></screen> - -<para>The meaning of the configure option:</para> - -<itemizedlist> -<listitem><para><userinput>--sysconfdir=/etc</userinput>: This option tells the -programs created by the package to look in <filename>/etc</filename> for their -configuration files.</para></listitem> -</itemizedlist> - -<para>Compile the package:</para> - -<screen><userinput>make</userinput></screen> - -<para>And install it:</para> - -<screen><userinput>make install</userinput></screen> - -</sect2> - diff --git a/chapter06/less.xml b/chapter06/less.xml index e65ad3072..0508af478 100644 --- a/chapter06/less.xml +++ b/chapter06/less.xml @@ -7,7 +7,33 @@ Estimated required disk space: &less-compsize;</screen> &aa-less-shortdesc; &aa-less-dep; -&c6-less-inst; + +<sect2><title> </title><para> </para></sect2> + +<sect2> +<title>Installation of Less</title> + +<para>Prepare Less for compilation:</para> + +<screen><userinput>./configure --prefix=/usr --bindir=/bin --sysconfdir=/etc</userinput></screen> + +<para>The meaning of the configure option:</para> + +<itemizedlist> +<listitem><para><userinput>--sysconfdir=/etc</userinput>: This option tells the +programs created by the package to look in <filename>/etc</filename> for their +configuration files.</para></listitem> +</itemizedlist> + +<para>Compile the package:</para> + +<screen><userinput>make</userinput></screen> + +<para>And install it:</para> + +<screen><userinput>make install</userinput></screen> + +</sect2> </sect1> diff --git a/chapter06/lfs-utils-inst.xml b/chapter06/lfs-utils-inst.xml deleted file mode 100644 index 2961ec330..000000000 --- a/chapter06/lfs-utils-inst.xml +++ /dev/null @@ -1,24 +0,0 @@ -<sect2><title> </title><para> </para></sect2> - -<sect2> -<title>Installation of Lfs-Utils</title> - -<para>Compile the package:</para> - -<screen><userinput>make</userinput></screen> - -<para>And install it:</para> - -<screen><userinput>make install</userinput></screen> - -<para>Now copy two supporting files included in the Lfs-Utils tarball to -their destination:</para> - -<screen><userinput>cp etc/{services,protocols} /etc</userinput></screen> - -<para>The <filename>/etc/services</filename> file is used to resolve service -numbers to human-readable names, and the <filename>/etc/protocols</filename> -does the same for protocol numbers.</para> - -</sect2> - diff --git a/chapter06/lfs-utils.xml b/chapter06/lfs-utils.xml index 1436e58f5..5119b4804 100644 --- a/chapter06/lfs-utils.xml +++ b/chapter06/lfs-utils.xml @@ -7,6 +7,30 @@ Estimated required disk space: &lfs-utils-compsize;</screen> &aa-lfs-utils-shortdesc; &aa-lfs-utils-dep; -&c6-lfs-utils-inst; + +<sect2><title> </title><para> </para></sect2> + +<sect2> +<title>Installation of Lfs-Utils</title> + +<para>Compile the package:</para> + +<screen><userinput>make</userinput></screen> + +<para>And install it:</para> + +<screen><userinput>make install</userinput></screen> + +<para>Now copy two supporting files included in the Lfs-Utils tarball to +their destination:</para> + +<screen><userinput>cp etc/{services,protocols} /etc</userinput></screen> + +<para>The <filename>/etc/services</filename> file is used to resolve service +numbers to human-readable names, and the <filename>/etc/protocols</filename> +does the same for protocol numbers.</para> + +</sect2> </sect1> + diff --git a/chapter06/libtool-inst.xml b/chapter06/libtool-inst.xml deleted file mode 100644 index 352c5200c..000000000 --- a/chapter06/libtool-inst.xml +++ /dev/null @@ -1,24 +0,0 @@ -<sect2><title> </title><para> </para></sect2> - -<sect2> -<title>Installation of Libtool</title> - -<para>Prepare Libtool for compilation:</para> - -<screen><userinput>./configure --prefix=/usr</userinput></screen> - -<para>Compile the package:</para> - -<screen><userinput>make</userinput></screen> - -<para>This package has a test suite available which can perform a number of -checks to ensure it built correctly. Should you choose to run it, the -following command will do so:</para> - -<screen><userinput>make check</userinput></screen> - -<para>And install the package:</para> - -<screen><userinput>make install</userinput></screen> - -</sect2> diff --git a/chapter06/libtool.xml b/chapter06/libtool.xml index a7dfbbf50..9e9f9457f 100644 --- a/chapter06/libtool.xml +++ b/chapter06/libtool.xml @@ -7,6 +7,31 @@ Estimated required disk space: &libtool-compsize;</screen> &aa-libtool-shortdesc; &aa-libtool-dep; -&c6-libtool-inst; + +<sect2><title> </title><para> </para></sect2> + +<sect2> +<title>Installation of Libtool</title> + +<para>Prepare Libtool for compilation:</para> + +<screen><userinput>./configure --prefix=/usr</userinput></screen> + +<para>Compile the package:</para> + +<screen><userinput>make</userinput></screen> + +<para>This package has a test suite available which can perform a number of +checks to ensure it built correctly. Should you choose to run it, the +following command will do so:</para> + +<screen><userinput>make check</userinput></screen> + +<para>And install the package:</para> + +<screen><userinput>make install</userinput></screen> + +</sect2> </sect1> + diff --git a/chapter06/m4-inst.xml b/chapter06/m4-inst.xml deleted file mode 100644 index 57e137bf8..000000000 --- a/chapter06/m4-inst.xml +++ /dev/null @@ -1,25 +0,0 @@ -<sect2><title> </title><para> </para></sect2> - -<sect2> -<title>Installation of M4</title> - -<para>Prepare M4 for compilation:</para> - -<screen><userinput>./configure --prefix=/usr</userinput></screen> - -<para>Compile the package:</para> - -<screen><userinput>make</userinput></screen> - -<para>This package has a test suite available which can perform a number of -checks to ensure it built correctly. Should you choose to run it, the -following command will do so:</para> - -<screen><userinput>make check</userinput></screen> - -<para>And install the package:</para> - -<screen><userinput>make install</userinput></screen> - -</sect2> - diff --git a/chapter06/m4.xml b/chapter06/m4.xml index b68c90333..b52647f10 100644 --- a/chapter06/m4.xml +++ b/chapter06/m4.xml @@ -7,7 +7,31 @@ Estimated required disk space: &m4-compsize;</screen> &aa-m4-shortdesc; &aa-m4-dep; -&c6-m4-inst; + +<sect2><title> </title><para> </para></sect2> + +<sect2> +<title>Installation of M4</title> + +<para>Prepare M4 for compilation:</para> + +<screen><userinput>./configure --prefix=/usr</userinput></screen> + +<para>Compile the package:</para> + +<screen><userinput>make</userinput></screen> + +<para>This package has a test suite available which can perform a number of +checks to ensure it built correctly. Should you choose to run it, the +following command will do so:</para> + +<screen><userinput>make check</userinput></screen> + +<para>And install the package:</para> + +<screen><userinput>make install</userinput></screen> + +</sect2> </sect1> diff --git a/chapter06/make-inst.xml b/chapter06/make-inst.xml deleted file mode 100644 index c5a33444d..000000000 --- a/chapter06/make-inst.xml +++ /dev/null @@ -1,25 +0,0 @@ -<sect2><title> </title><para> </para></sect2> - -<sect2> -<title>Installation of Make</title> - -<para>Prepare Make for compilation:</para> - -<screen><userinput>./configure --prefix=/usr</userinput></screen> - -<para>Compile the package:</para> - -<screen><userinput>make</userinput></screen> - -<para>This package has a test suite available which can perform a number of -checks to ensure it built correctly. Should you choose to run it, the -following command will do so:</para> - -<screen><userinput>make check</userinput></screen> - -<para>And install the package:</para> - -<screen><userinput>make install</userinput></screen> - -</sect2> - diff --git a/chapter06/make.xml b/chapter06/make.xml index 0f477d832..f24d53ee3 100644 --- a/chapter06/make.xml +++ b/chapter06/make.xml @@ -7,6 +7,31 @@ Estimated required disk space: &make-compsize;</screen> &aa-make-shortdesc; &aa-make-dep; -&c6-make-inst; + +<sect2><title> </title><para> </para></sect2> + +<sect2> +<title>Installation of Make</title> + +<para>Prepare Make for compilation:</para> + +<screen><userinput>./configure --prefix=/usr</userinput></screen> + +<para>Compile the package:</para> + +<screen><userinput>make</userinput></screen> + +<para>This package has a test suite available which can perform a number of +checks to ensure it built correctly. Should you choose to run it, the +following command will do so:</para> + +<screen><userinput>make check</userinput></screen> + +<para>And install the package:</para> + +<screen><userinput>make install</userinput></screen> + +</sect2> </sect1> + diff --git a/chapter06/makedev-inst.xml b/chapter06/makedev-inst.xml deleted file mode 100644 index 15308031b..000000000 --- a/chapter06/makedev-inst.xml +++ /dev/null @@ -1,59 +0,0 @@ -<sect2><title> </title><para> </para></sect2> - -<sect2> -<title>Creating devices</title> - -<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 -the file contains only a shell script.</para> - -<para>Install the <userinput>MAKEDEV</userinput> script:</para> - -<screen><userinput>bzcat MAKEDEV-&makedev-version;.bz2 > /dev/MAKEDEV -chmod 754 /dev/MAKEDEV</userinput></screen> - -<para>Run the script to create the device files:</para> - -<screen><userinput>cd /dev -./MAKEDEV -v generic-nopty</userinput></screen> - -<para>The meaning of the arguments:</para> - -<itemizedlist> -<listitem><para><userinput>-v</userinput>: This tells the script to run in -verbose mode.</para></listitem> - -<listitem><para><userinput>generic-nopty</userinput>: This instructs -<userinput>MAKEDEV</userinput> to create a generic selection of commonly used -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 -<emphasis>devpts</emphasis> file system.</para></listitem> -</itemizedlist> - -<para>If it turns out that some special device <filename>zzz</filename> that -you need is missing, try running <userinput>./MAKEDEV -v zzz</userinput>. -Alternatively, you may create devices via the <userinput>mknod</userinput> -program. Please refer to its man and info pages if you need more -information.</para> - -<para>Additionally, if you were unable to mount the devpts filesystem earlier in -the "Mounting the proc and devpts file systems" section, now is the time to -try the alternatives. If your kernel supports the devfs file system, run the -following command to mount devfs:</para> - -<screen><userinput>mount -t devfs devfs /dev</userinput></screen> - -<para>This will mount the devfs file system over the top of the new static -<filename>/dev</filename> structure. This poses no problems, as the device nodes -created are still present, they are just hidden by the new devfs -filesystem.</para> - -<para>If this still doesn't work, the only option left is to use the MAKEDEV -script to create the ptyXX and ttyXX range of files that would otherwise not be -needed. Ensure you are still in the <filename>/dev</filename> directory then run -<userinput>./MAKEDEV -v pty</userinput>. The downside of this is, we are -creating an extra 512 device special files which will not be needed when we -finally boot into the finished LFS system.</para> - -</sect2> - diff --git a/chapter06/makedev.xml b/chapter06/makedev.xml index e7005e574..acb766683 100644 --- a/chapter06/makedev.xml +++ b/chapter06/makedev.xml @@ -7,7 +7,65 @@ Estimated required disk space: &makedev-compsize;</screen> &aa-makedev-shortdesc; &aa-makedev-dep; -&c6-makedev-inst; + +<sect2><title> </title><para> </para></sect2> + +<sect2> +<title>Creating devices</title> + +<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 +the file contains only a shell script.</para> + +<para>Install the <userinput>MAKEDEV</userinput> script:</para> + +<screen><userinput>bzcat MAKEDEV-&makedev-version;.bz2 > /dev/MAKEDEV +chmod 754 /dev/MAKEDEV</userinput></screen> + +<para>Run the script to create the device files:</para> + +<screen><userinput>cd /dev +./MAKEDEV -v generic-nopty</userinput></screen> + +<para>The meaning of the arguments:</para> + +<itemizedlist> +<listitem><para><userinput>-v</userinput>: This tells the script to run in +verbose mode.</para></listitem> + +<listitem><para><userinput>generic-nopty</userinput>: This instructs +<userinput>MAKEDEV</userinput> to create a generic selection of commonly used +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 +<emphasis>devpts</emphasis> file system.</para></listitem> +</itemizedlist> + +<para>If it turns out that some special device <filename>zzz</filename> that +you need is missing, try running <userinput>./MAKEDEV -v zzz</userinput>. +Alternatively, you may create devices via the <userinput>mknod</userinput> +program. Please refer to its man and info pages if you need more +information.</para> + +<para>Additionally, if you were unable to mount the devpts filesystem earlier in +the "Mounting the proc and devpts file systems" section, now is the time to +try the alternatives. If your kernel supports the devfs file system, run the +following command to mount devfs:</para> + +<screen><userinput>mount -t devfs devfs /dev</userinput></screen> + +<para>This will mount the devfs file system over the top of the new static +<filename>/dev</filename> structure. This poses no problems, as the device nodes +created are still present, they are just hidden by the new devfs +filesystem.</para> + +<para>If this still doesn't work, the only option left is to use the MAKEDEV +script to create the ptyXX and ttyXX range of files that would otherwise not be +needed. Ensure you are still in the <filename>/dev</filename> directory then run +<userinput>./MAKEDEV -v pty</userinput>. The downside of this is, we are +creating an extra 512 device special files which will not be needed when we +finally boot into the finished LFS system.</para> + +</sect2> </sect1> diff --git a/chapter06/man-inst.xml b/chapter06/man-inst.xml deleted file mode 100644 index 1d3b84a62..000000000 --- a/chapter06/man-inst.xml +++ /dev/null @@ -1,62 +0,0 @@ -<sect2><title> </title><para> </para></sect2> - -<sect2> -<title>Installation of Man</title> - -<para>We'll make three adjustments to the sources of Man.</para> - -<para>The first patch comments out the "MANPATH /usr/man" line in the -<filename>man.conf</filename> file to prevent redundant results when using - programs such as <userinput>whatis</userinput>:</para> - -<screen><userinput>patch -Np1 -i ../&man-manpath-patch;</userinput></screen> - -<para>The second patch adds the <emphasis>-R</emphasis> option to the -<emphasis>PAGER</emphasis> variable so that escape sequences are -handled properly:</para> - -<screen><userinput>patch -Np1 -i ../&man-pager-patch;</userinput></screen> - -<para>The third and last patch prevents a problem when man pages not formatted -with more than 80 columns are used in conjunction with recent releases of -<userinput>groff</userinput>:</para> - -<screen><userinput>patch -Np1 -i ../&man-80cols-patch;</userinput></screen> - -<para>Now prepare Man for compilation:</para> - -<screen><userinput>./configure -default -confdir=/etc</userinput></screen> - -<para>The meaning of the configure options:</para> - -<itemizedlist> -<listitem><para><userinput>-default</userinput>: This tells the configure script -to select a sensible set of default options. For example: only English man -pages, no message catalogs, man not suid, handle compressed man pages, compress -cat pages, create cat pages whenever the appropriate directory exists, follow -FHS by putting cat pages under /var/cache/man provided that that directory -exists.</para></listitem> - -<listitem><para><userinput>-confdir=/etc</userinput>: This tells the -<userinput>man</userinput> program to look for the <filename>man.conf</filename> -configuration file in the <filename>/etc</filename> directory.</para></listitem> -</itemizedlist> - -<para>Compile the package:</para> - -<screen><userinput>make</userinput></screen> - -<para>And install it:</para> - -<screen><userinput>make install</userinput></screen> - -<note><para>If you wish to disable SGR escape sequences, you should -edit the man.conf file and add the <userinput>-c</userinput> argument -to nroff.</para></note> - -<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 -formatting and compression issues for man pages.</para> - -</sect2> - diff --git a/chapter06/man.xml b/chapter06/man.xml index 9c0cd7978..833ff0e8e 100644 --- a/chapter06/man.xml +++ b/chapter06/man.xml @@ -7,7 +7,68 @@ Estimated required disk space: &man-compsize;</screen> &aa-man-shortdesc; &aa-man-dep; -&c6-man-inst; + +<sect2><title> </title><para> </para></sect2> + +<sect2> +<title>Installation of Man</title> + +<para>We'll make three adjustments to the sources of Man.</para> + +<para>The first patch comments out the "MANPATH /usr/man" line in the +<filename>man.conf</filename> file to prevent redundant results when using + programs such as <userinput>whatis</userinput>:</para> + +<screen><userinput>patch -Np1 -i ../&man-manpath-patch;</userinput></screen> + +<para>The second patch adds the <emphasis>-R</emphasis> option to the +<emphasis>PAGER</emphasis> variable so that escape sequences are +handled properly:</para> + +<screen><userinput>patch -Np1 -i ../&man-pager-patch;</userinput></screen> + +<para>The third and last patch prevents a problem when man pages not formatted +with more than 80 columns are used in conjunction with recent releases of +<userinput>groff</userinput>:</para> + +<screen><userinput>patch -Np1 -i ../&man-80cols-patch;</userinput></screen> + +<para>Now prepare Man for compilation:</para> + +<screen><userinput>./configure -default -confdir=/etc</userinput></screen> + +<para>The meaning of the configure options:</para> + +<itemizedlist> +<listitem><para><userinput>-default</userinput>: This tells the configure script +to select a sensible set of default options. For example: only English man +pages, no message catalogs, man not suid, handle compressed man pages, compress +cat pages, create cat pages whenever the appropriate directory exists, follow +FHS by putting cat pages under /var/cache/man provided that that directory +exists.</para></listitem> + +<listitem><para><userinput>-confdir=/etc</userinput>: This tells the +<userinput>man</userinput> program to look for the <filename>man.conf</filename> +configuration file in the <filename>/etc</filename> directory.</para></listitem> +</itemizedlist> + +<para>Compile the package:</para> + +<screen><userinput>make</userinput></screen> + +<para>And install it:</para> + +<screen><userinput>make install</userinput></screen> + +<note><para>If you wish to disable SGR escape sequences, you should +edit the man.conf file and add the <userinput>-c</userinput> argument +to nroff.</para></note> + +<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 +formatting and compression issues for man pages.</para> + +</sect2> </sect1> diff --git a/chapter06/manpages-inst.xml b/chapter06/manpages-inst.xml deleted file mode 100644 index 587c681e3..000000000 --- a/chapter06/manpages-inst.xml +++ /dev/null @@ -1,11 +0,0 @@ -<sect2><title> </title><para> </para></sect2> - -<sect2> -<title>Installation of Man-pages</title> - -<para>Install Man-pages by running:</para> - -<screen><userinput>make install</userinput></screen> - -</sect2> - diff --git a/chapter06/manpages.xml b/chapter06/manpages.xml index 78e14f3f0..699f68b74 100644 --- a/chapter06/manpages.xml +++ b/chapter06/manpages.xml @@ -7,6 +7,17 @@ Estimated required disk space: &man-pages-compsize;</screen> &aa-manpages-shortdesc; &aa-manpages-dep; -&c6-manpages-inst; + +<sect2><title> </title><para> </para></sect2> + +<sect2> +<title>Installation of Man-pages</title> + +<para>Install Man-pages by running:</para> + +<screen><userinput>make install</userinput></screen> + +</sect2> </sect1> + diff --git a/chapter06/modutils-inst.xml b/chapter06/modutils-inst.xml deleted file mode 100644 index 71fd6e079..000000000 --- a/chapter06/modutils-inst.xml +++ /dev/null @@ -1,19 +0,0 @@ -<sect2><title> </title><para> </para></sect2> - -<sect2> -<title>Installation of Modutils</title> - -<para>Prepare Modutils for compilation:</para> - -<screen><userinput>./configure</userinput></screen> - -<para>Compile the package:</para> - -<screen><userinput>make</userinput></screen> - -<para>And install it:</para> - -<screen><userinput>make install</userinput></screen> - -</sect2> - diff --git a/chapter06/modutils.xml b/chapter06/modutils.xml index eb556ca76..d5c6708f1 100644 --- a/chapter06/modutils.xml +++ b/chapter06/modutils.xml @@ -7,6 +7,25 @@ Estimated required disk space: &modutils-compsize;</screen> &aa-modutils-shortdesc; &aa-modutils-dep; -&c6-modutils-inst; + +<sect2><title> </title><para> </para></sect2> + +<sect2> +<title>Installation of Modutils</title> + +<para>Prepare Modutils for compilation:</para> + +<screen><userinput>./configure</userinput></screen> + +<para>Compile the package:</para> + +<screen><userinput>make</userinput></screen> + +<para>And install it:</para> + +<screen><userinput>make install</userinput></screen> + +</sect2> </sect1> + diff --git a/chapter06/ncurses-inst.xml b/chapter06/ncurses-inst.xml deleted file mode 100644 index e974379ee..000000000 --- a/chapter06/ncurses-inst.xml +++ /dev/null @@ -1,48 +0,0 @@ -<sect2><title> </title><para> </para></sect2> - -<sect2> -<title>Installation of Ncurses</title> - -<para>First fix two tiny bugs:</para> - -<screen><userinput>patch -Np1 -i ../&ncurses-etip-patch; -patch -Np1 -i ../&ncurses-vsscanf-patch;</userinput></screen> - -<para>The first patch corrects the <filename>etip.h</filename> header file, and -the second patch prevents some compiler warnings on the use of deprecated -headers.</para> - -<para>Now prepare Ncurses for compilation:</para> - -<screen><userinput>./configure --prefix=/usr --with-shared \ - --without-debug</userinput></screen> - -<para>Compile the package:</para> - -<screen><userinput>make</userinput></screen> - -<para>Install the package:</para> - -<screen><userinput>make install</userinput></screen> - -<para>Give the Ncurses libraries execute permissions:</para> - -<screen><userinput>chmod 755 /usr/lib/*.&ncurses-version;</userinput></screen> - -<para>And fix a library that shouldn't be executable:</para> - -<screen><userinput>chmod 644 /usr/lib/libncurses++.a</userinput></screen> - -<para>Move the libraries to the <filename>/lib</filename> directory, -where they're expected to reside:</para> - -<screen><userinput>mv /usr/lib/libncurses.so.5* /lib</userinput></screen> - -<para>Since the libraries have been moved to -<filename>/lib</filename>, a few symlinks are currently pointing -towards non-existing files. Recreate those symlinks:</para> - -<screen><userinput>ln -sf ../../lib/libncurses.so.5 /usr/lib/libncurses.so -ln -sf libncurses.so /usr/lib/libcurses.so</userinput></screen> -</sect2> - diff --git a/chapter06/ncurses.xml b/chapter06/ncurses.xml index aa97c4867..8cc9008d1 100644 --- a/chapter06/ncurses.xml +++ b/chapter06/ncurses.xml @@ -7,7 +7,54 @@ Estimated required disk space: &ncurses-compsize;</screen> &aa-ncurses-shortdesc; &aa-ncurses-dep; -&c6-ncurses-inst; + +<sect2><title> </title><para> </para></sect2> + +<sect2> +<title>Installation of Ncurses</title> + +<para>First fix two tiny bugs:</para> + +<screen><userinput>patch -Np1 -i ../&ncurses-etip-patch; +patch -Np1 -i ../&ncurses-vsscanf-patch;</userinput></screen> + +<para>The first patch corrects the <filename>etip.h</filename> header file, and +the second patch prevents some compiler warnings on the use of deprecated +headers.</para> + +<para>Now prepare Ncurses for compilation:</para> + +<screen><userinput>./configure --prefix=/usr --with-shared \ + --without-debug</userinput></screen> + +<para>Compile the package:</para> + +<screen><userinput>make</userinput></screen> + +<para>Install the package:</para> + +<screen><userinput>make install</userinput></screen> + +<para>Give the Ncurses libraries execute permissions:</para> + +<screen><userinput>chmod 755 /usr/lib/*.&ncurses-version;</userinput></screen> + +<para>And fix a library that shouldn't be executable:</para> + +<screen><userinput>chmod 644 /usr/lib/libncurses++.a</userinput></screen> + +<para>Move the libraries to the <filename>/lib</filename> directory, +where they're expected to reside:</para> + +<screen><userinput>mv /usr/lib/libncurses.so.5* /lib</userinput></screen> + +<para>Since the libraries have been moved to +<filename>/lib</filename>, a few symlinks are currently pointing +towards non-existing files. Recreate those symlinks:</para> + +<screen><userinput>ln -sf ../../lib/libncurses.so.5 /usr/lib/libncurses.so +ln -sf libncurses.so /usr/lib/libcurses.so</userinput></screen> +</sect2> </sect1> diff --git a/chapter06/nettools-inst.xml b/chapter06/nettools-inst.xml deleted file mode 100644 index fee875247..000000000 --- a/chapter06/nettools-inst.xml +++ /dev/null @@ -1,38 +0,0 @@ -<sect2><title> </title><para> </para></sect2> - -<sect2> -<title>Installation of Net-tools</title> - -<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. -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 -kernel. The default answers will enable the tools from this package to work -with the most common protocols: TCP, PPP, and several others. You still need -to actually enable these protocols in the kernel -- what you do here is merely -telling the package to include support for those protocols in its programs, -but it's up to the kernel to make the protocols available.</para> - -<para>First fix a small syntax problem in the sources of the mii-tool -program:</para> - -<screen><userinput>patch -Np1 -i ../&net-tools-mii-patch;</userinput></screen> - -<para>Now prepare Net-tools for compilation with:</para> - -<screen><userinput>make config</userinput></screen> - -<para>If you intend to accept the default settings, you may skip the -questions generated by <emphasis>make config</emphasis> by running -<userinput>yes "" | make config</userinput> instead.</para> - -<para>Compile the package:</para> - -<screen><userinput>make</userinput></screen> - -<para>And install it:</para> - -<screen><userinput>make update</userinput></screen> - -</sect2> - diff --git a/chapter06/nettools.xml b/chapter06/nettools.xml index 417bd502d..61a6359d6 100644 --- a/chapter06/nettools.xml +++ b/chapter06/nettools.xml @@ -7,7 +7,44 @@ Estimated required disk space: &net-tools-compsize;</screen> &aa-nettools-shortdesc; &aa-nettools-dep; -&c6-nettools-inst; + +<sect2><title> </title><para> </para></sect2> + +<sect2> +<title>Installation of Net-tools</title> + +<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. +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 +kernel. The default answers will enable the tools from this package to work +with the most common protocols: TCP, PPP, and several others. You still need +to actually enable these protocols in the kernel -- what you do here is merely +telling the package to include support for those protocols in its programs, +but it's up to the kernel to make the protocols available.</para> + +<para>First fix a small syntax problem in the sources of the mii-tool +program:</para> + +<screen><userinput>patch -Np1 -i ../&net-tools-mii-patch;</userinput></screen> + +<para>Now prepare Net-tools for compilation with:</para> + +<screen><userinput>make config</userinput></screen> + +<para>If you intend to accept the default settings, you may skip the +questions generated by <emphasis>make config</emphasis> by running +<userinput>yes "" | make config</userinput> instead.</para> + +<para>Compile the package:</para> + +<screen><userinput>make</userinput></screen> + +<para>And install it:</para> + +<screen><userinput>make update</userinput></screen> + +</sect2> </sect1> diff --git a/chapter06/patch-inst.xml b/chapter06/patch-inst.xml deleted file mode 100644 index ead7ec11c..000000000 --- a/chapter06/patch-inst.xml +++ /dev/null @@ -1,22 +0,0 @@ -<sect2><title> </title><para> </para></sect2> - -<sect2> -<title>Installation of Patch</title> - -<para>Prepare Patch for compilation:</para> - -<screen><userinput>CPPFLAGS=-D_GNU_SOURCE ./configure --prefix=/usr</userinput></screen> - -<para>Again, the preprocessor flag <userinput>-D_GNU_SOURCE</userinput> is only -needed on the PowerPC platform. On other architectures you can leave it out.</para> - -<para>Compile the package:</para> - -<screen><userinput>make</userinput></screen> - -<para>And install it:</para> - -<screen><userinput>make install</userinput></screen> - -</sect2> - diff --git a/chapter06/patch.xml b/chapter06/patch.xml index 442ad0e46..cc634a8e8 100644 --- a/chapter06/patch.xml +++ b/chapter06/patch.xml @@ -7,7 +7,28 @@ Estimated required disk space: &patch-compsize;</screen> &aa-patch-shortdesc; &aa-patch-dep; -&c6-patch-inst; + +<sect2><title> </title><para> </para></sect2> + +<sect2> +<title>Installation of Patch</title> + +<para>Prepare Patch for compilation:</para> + +<screen><userinput>CPPFLAGS=-D_GNU_SOURCE ./configure --prefix=/usr</userinput></screen> + +<para>Again, the preprocessor flag <userinput>-D_GNU_SOURCE</userinput> is only +needed on the PowerPC platform. On other architectures you can leave it out.</para> + +<para>Compile the package:</para> + +<screen><userinput>make</userinput></screen> + +<para>And install it:</para> + +<screen><userinput>make install</userinput></screen> + +</sect2> </sect1> diff --git a/chapter06/perl-inst.xml b/chapter06/perl-inst.xml deleted file mode 100644 index 9b5466010..000000000 --- a/chapter06/perl-inst.xml +++ /dev/null @@ -1,36 +0,0 @@ -<sect2><title> </title><para> </para></sect2> - -<sect2> -<title>Installation of Perl</title> - -<para>Prepare Perl for compilation:</para> - -<screen><userinput>./configure.gnu --prefix=/usr</userinput></screen> - -<para>If you want more control over the way Perl sets itself up to be -built, you can run the interactive <userinput>Configure</userinput> script -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 -above.</para> - -<para>Compile the package:</para> - -<screen><userinput>make</userinput></screen> - -<para>This package has a test suite available which can perform a number of -checks to ensure it built correctly. Should you choose to run it, you first -have to create a basic <filename>/etc/hosts</filename> file, needed by a -couple of tests to resolve the name <emphasis>localhost</emphasis>:</para> - -<screen><userinput>echo "127.0.0.1 localhost $(hostname)" > /etc/hosts</userinput></screen> - -<para>Now run the tests, if you wish:</para> - -<screen><userinput>make test</userinput></screen> - -<para>And install the package:</para> - -<screen><userinput>make install</userinput></screen> - -</sect2> - diff --git a/chapter06/perl.xml b/chapter06/perl.xml index 8528e6149..5e90ec069 100644 --- a/chapter06/perl.xml +++ b/chapter06/perl.xml @@ -7,7 +7,42 @@ Estimated required disk space: &perl-compsize;</screen> &aa-perl-shortdesc; &aa-perl-dep; -&c6-perl-inst; + +<sect2><title> </title><para> </para></sect2> + +<sect2> +<title>Installation of Perl</title> + +<para>Prepare Perl for compilation:</para> + +<screen><userinput>./configure.gnu --prefix=/usr</userinput></screen> + +<para>If you want more control over the way Perl sets itself up to be +built, you can run the interactive <userinput>Configure</userinput> script +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 +above.</para> + +<para>Compile the package:</para> + +<screen><userinput>make</userinput></screen> + +<para>This package has a test suite available which can perform a number of +checks to ensure it built correctly. Should you choose to run it, you first +have to create a basic <filename>/etc/hosts</filename> file, needed by a +couple of tests to resolve the name <emphasis>localhost</emphasis>:</para> + +<screen><userinput>echo "127.0.0.1 localhost $(hostname)" > /etc/hosts</userinput></screen> + +<para>Now run the tests, if you wish:</para> + +<screen><userinput>make test</userinput></screen> + +<para>And install the package:</para> + +<screen><userinput>make install</userinput></screen> + +</sect2> </sect1> diff --git a/chapter06/procinfo-inst.xml b/chapter06/procinfo-inst.xml deleted file mode 100644 index 9ed40c34d..000000000 --- a/chapter06/procinfo-inst.xml +++ /dev/null @@ -1,22 +0,0 @@ -<sect2><title> </title><para> </para></sect2> - -<sect2> -<title>Installation of Procinfo</title> - -<para>Compile Procinfo:</para> - -<screen><userinput>make LDLIBS=-lncurses</userinput></screen> - -<para>The meaning of the make parameter:</para> -<itemizedlist> -<listitem><para><userinput>LDLIBS=-lncurses</userinput>: This tells Procinfo -to use the <filename>libncurses</filename> library instead of the -long-obsolete <filename>libtermcap</filename>.</para></listitem> -</itemizedlist> - -<para>And install the package:</para> - -<screen><userinput>make install</userinput></screen> - -</sect2> - diff --git a/chapter06/procinfo.xml b/chapter06/procinfo.xml index 70eabfca6..e02b583b6 100644 --- a/chapter06/procinfo.xml +++ b/chapter06/procinfo.xml @@ -7,6 +7,28 @@ Estimated required disk space: &procinfo-compsize;</screen> &aa-procinfo-shortdesc; &aa-procinfo-dep; -&c6-procinfo-inst; + +<sect2><title> </title><para> </para></sect2> + +<sect2> +<title>Installation of Procinfo</title> + +<para>Compile Procinfo:</para> + +<screen><userinput>make LDLIBS=-lncurses</userinput></screen> + +<para>The meaning of the make parameter:</para> +<itemizedlist> +<listitem><para><userinput>LDLIBS=-lncurses</userinput>: This tells Procinfo +to use the <filename>libncurses</filename> library instead of the +long-obsolete <filename>libtermcap</filename>.</para></listitem> +</itemizedlist> + +<para>And install the package:</para> + +<screen><userinput>make install</userinput></screen> + +</sect2> </sect1> + diff --git a/chapter06/procps-inst.xml b/chapter06/procps-inst.xml deleted file mode 100644 index 000145462..000000000 --- a/chapter06/procps-inst.xml +++ /dev/null @@ -1,24 +0,0 @@ -<sect2><title> </title><para> </para></sect2> - -<sect2> -<title>Installation of Procps</title> - -<para>First fix a problem that can crash <userinput>w</userinput> under -certain locale settings:</para> - -<screen><userinput>patch -Np1 -i ../&procps-patch;</userinput></screen> - -<para>Now compile Procps:</para> - -<screen><userinput>make</userinput></screen> - -<para>Install it:</para> - -<screen><userinput>make install</userinput></screen> - -<para>And remove a spurious library link:</para> - -<screen><userinput>rm /lib/libproc.so</userinput></screen> - -</sect2> - diff --git a/chapter06/procps.xml b/chapter06/procps.xml index eb28a8f76..a2a4fb14b 100644 --- a/chapter06/procps.xml +++ b/chapter06/procps.xml @@ -7,6 +7,30 @@ Estimated required disk space: &procps-compsize;</screen> &aa-procps-shortdesc; &aa-procps-dep; -&c6-procps-inst; + +<sect2><title> </title><para> </para></sect2> + +<sect2> +<title>Installation of Procps</title> + +<para>First fix a problem that can crash <userinput>w</userinput> under +certain locale settings:</para> + +<screen><userinput>patch -Np1 -i ../&procps-patch;</userinput></screen> + +<para>Now compile Procps:</para> + +<screen><userinput>make</userinput></screen> + +<para>Install it:</para> + +<screen><userinput>make install</userinput></screen> + +<para>And remove a spurious library link:</para> + +<screen><userinput>rm /lib/libproc.so</userinput></screen> + +</sect2> </sect1> + diff --git a/chapter06/psmisc-inst.xml b/chapter06/psmisc-inst.xml deleted file mode 100644 index 740a808e1..000000000 --- a/chapter06/psmisc-inst.xml +++ /dev/null @@ -1,37 +0,0 @@ -<sect2><title> </title><para> </para></sect2> - -<sect2> -<title>Installation of Psmisc</title> - -<para>Prepare Psmisc for compilation:</para> - -<screen><userinput>./configure --prefix=/usr --exec-prefix=/</userinput></screen> - -<para>The meaning of the configure option:</para> - -<itemizedlist> -<listitem><para><userinput>--exec-prefix=/</userinput>: This causes the -binaries to be installed in <filename>/bin</filename> and not in -<filename>/usr/bin</filename>. As the Psmisc programs are often used in -bootscripts, they should be available also when the <filename>/usr</filename> -filesystem isn't mounted.</para></listitem> -</itemizedlist> - -<para>Compile the package:</para> - -<screen><userinput>make</userinput></screen> - -<para>And install it:</para> - -<screen><userinput>make install</userinput></screen> - -<para>By default Psmisc's <userinput>pidof</userinput> program isn't installed. -Generally, this isn't a problem because we later install the Sysvinit package, -which provides a better <userinput>pidof</userinput> program. But if you're not -going to use Sysvinit, you should complete the installation of Psmisc by -creating the following symlink:</para> - -<screen><userinput>ln -s killall /bin/pidof</userinput></screen> - -</sect2> - diff --git a/chapter06/psmisc.xml b/chapter06/psmisc.xml index e2a9d6c6e..3b939961d 100644 --- a/chapter06/psmisc.xml +++ b/chapter06/psmisc.xml @@ -7,6 +7,43 @@ Estimated required disk space: &psmisc-compsize;</screen> &aa-psmisc-shortdesc; &aa-psmisc-dep; -&c6-psmisc-inst; + +<sect2><title> </title><para> </para></sect2> + +<sect2> +<title>Installation of Psmisc</title> + +<para>Prepare Psmisc for compilation:</para> + +<screen><userinput>./configure --prefix=/usr --exec-prefix=/</userinput></screen> + +<para>The meaning of the configure option:</para> + +<itemizedlist> +<listitem><para><userinput>--exec-prefix=/</userinput>: This causes the +binaries to be installed in <filename>/bin</filename> and not in +<filename>/usr/bin</filename>. As the Psmisc programs are often used in +bootscripts, they should be available also when the <filename>/usr</filename> +filesystem isn't mounted.</para></listitem> +</itemizedlist> + +<para>Compile the package:</para> + +<screen><userinput>make</userinput></screen> + +<para>And install it:</para> + +<screen><userinput>make install</userinput></screen> + +<para>By default Psmisc's <userinput>pidof</userinput> program isn't installed. +Generally, this isn't a problem because we later install the Sysvinit package, +which provides a better <userinput>pidof</userinput> program. But if you're not +going to use Sysvinit, you should complete the installation of Psmisc by +creating the following symlink:</para> + +<screen><userinput>ln -s killall /bin/pidof</userinput></screen> + +</sect2> </sect1> + diff --git a/chapter06/sed-inst.xml b/chapter06/sed-inst.xml deleted file mode 100644 index 4ea0a401f..000000000 --- a/chapter06/sed-inst.xml +++ /dev/null @@ -1,25 +0,0 @@ -<sect2><title> </title><para> </para></sect2> - -<sect2> -<title>Installation of Sed</title> - -<para>Prepare Sed for compilation:</para> - -<screen><userinput>./configure --prefix=/usr --bindir=/bin</userinput></screen> - -<para>Compile the package:</para> - -<screen><userinput>make</userinput></screen> - -<para>This package has a test suite available which can perform a number of -checks to ensure it built correctly. Should you choose to run it, the -following command will do so:</para> - -<screen><userinput>make check</userinput></screen> - -<para>And install the package:</para> - -<screen><userinput>make install</userinput></screen> - -</sect2> - diff --git a/chapter06/sed.xml b/chapter06/sed.xml index 9cdcf6b69..25f9b488d 100644 --- a/chapter06/sed.xml +++ b/chapter06/sed.xml @@ -7,6 +7,31 @@ Estimated required disk space: &sed-compsize;</screen> &aa-sed-shortdesc; &aa-sed-dep; -&c6-sed-inst; + +<sect2><title> </title><para> </para></sect2> + +<sect2> +<title>Installation of Sed</title> + +<para>Prepare Sed for compilation:</para> + +<screen><userinput>./configure --prefix=/usr --bindir=/bin</userinput></screen> + +<para>Compile the package:</para> + +<screen><userinput>make</userinput></screen> + +<para>This package has a test suite available which can perform a number of +checks to ensure it built correctly. Should you choose to run it, the +following command will do so:</para> + +<screen><userinput>make check</userinput></screen> + +<para>And install the package:</para> + +<screen><userinput>make install</userinput></screen> + +</sect2> </sect1> + diff --git a/chapter06/shadowpwd-inst.xml b/chapter06/shadowpwd-inst.xml deleted file mode 100644 index 2632f7732..000000000 --- a/chapter06/shadowpwd-inst.xml +++ /dev/null @@ -1,105 +0,0 @@ -<sect2><title> </title><para> </para></sect2> - -<sect2> -<title>Installation of Shadow</title> - -<para>The <userinput>login</userinput>, <userinput>getty</userinput> and -<userinput>init</userinput> programs (and some others) maintain a number -of logfiles to record who are and who were logged in to the system. These -programs, however, don't create these logfiles when they don't exist, so if -you want this logging to occur you will have to create the files yourself. -The Shadow package needs to detect these files in their proper place, so we -create them now, with their proper permissions:</para> - -<screen><userinput>touch /var/run/utmp /var/log/{btmp,lastlog,wtmp} -chmod 644 /var/run/utmp /var/log/{btmp,lastlog,wtmp}</userinput></screen> - -<para>The <filename>/var/run/utmp</filename> file lists the users that are -currently logged in, the <filename>/var/log/wtmp</filename> file who -<emphasis>were</emphasis> logged in and when. -The <filename>/var/log/lastlog</filename> file shows for each user when he -or she last logged in, and the <filename>/var/log/btmp</filename> lists the -bad login attempts.</para> - -<para>Shadow hard-wires the path to the <userinput>passwd</userinput> binary -within the binary itself, but does this the wrong way. If a -<userinput>passwd</userinput> binary is not present before installing Shadow, -the package incorrectly assumes it is going to be located at -<filename>/bin/passwd</filename>, but then installs it in -<filename>/usr/bin/passwd</filename>. This will lead to errors about not finding -<filename>/bin/passwd</filename>. To work around this bug, create a dummy -<filename>passwd</filename> file, so that it gets hard-wired properly:</para> - -<screen><userinput>touch /usr/bin/passwd</userinput></screen> - -<para>The current Shadow suite has a problem that causes the -<userinput>newgrp</userinput> command to fail. The following patch (also -appearing in Shadow's CVS code) fixes this problem:</para> - -<screen><userinput>patch -Np1 -i ../&shadow-patch;</userinput></screen> - -<para>Now prepare Shadow for compilation:</para> - -<screen><userinput>./configure --prefix=/usr --libdir=/usr/lib --enable-shared</userinput></screen> - -<para>Compile the package:</para> - -<screen><userinput>make</userinput></screen> - -<para>And install it:</para> - -<screen><userinput>make install</userinput></screen> - -<para>Shadow uses two files to configure authentication settings for the -system. Install these two config files:</para> - -<screen><userinput>cp etc/{limits,login.access} /etc</userinput></screen> - -<para>We want to change the password method to enable MD5 passwords which are -theoretically more secure than the default "crypt" method and also allow -password lengths greater than 8 characters. We also need to change the old -<filename class="directory">/var/spool/mail</filename> location for user -mailboxes to the current location at -<filename class="directory">/var/mail</filename>. We do this by changing the -relevant configuration file while copying it to its destination:</para> - -<screen><userinput>sed -e 's%/var/spool/mail%/var/mail%' \ - -e 's%#MD5_CRYPT_ENAB.no%MD5_CRYPT_ENAB yes%' \ - etc/login.defs.linux > /etc/login.defs</userinput></screen> - -<note><para>Be extra careful when typing all of the above. It is probably safer -to cut-and-paste it rather than try and type it all in.</para></note> - -<para>According to the man page of <userinput>vipw</userinput>, a -<userinput>vigr</userinput> program should exist too. Since the installation -procedure doesn't create this program, create a symlink manually:</para> - -<screen><userinput>ln -s vipw /usr/sbin/vigr</userinput></screen> - -<para>As the <filename>/bin/vipw</filename> symlink is redundant (and even -pointing to a non-existent file), remove it:</para> - -<screen><userinput>rm /bin/vipw</userinput></screen> - -<para>Now move the <userinput>sg</userinput> program to its proper place:</para> - -<screen><userinput>mv /bin/sg /usr/bin</userinput></screen> - -<para>And move Shadow's dynamic libraries to a more appropriate location:</para> - -<screen><userinput>mv /usr/lib/lib{shadow,misc}.so.0* /lib</userinput></screen> - -<para>As some packages expect to find the just-moved libraries in -<filename>/usr/lib</filename>, create the following symlinks:</para> - -<screen><userinput>ln -sf ../../lib/libshadow.so.0 /usr/lib/libshadow.so -ln -sf ../../lib/libmisc.so.0 /usr/lib/libmisc.so</userinput></screen> - -<para>Coreutils has already installed a <userinput>groups</userinput> program -in <filename>/usr/bin</filename>. If you wish, you can remove the one -installed by Shadow:</para> - -<screen><userinput>rm /bin/groups</userinput></screen> - -</sect2> - diff --git a/chapter06/shadowpwd.xml b/chapter06/shadowpwd.xml index f6238c0b1..d61415e08 100644 --- a/chapter06/shadowpwd.xml +++ b/chapter06/shadowpwd.xml @@ -7,7 +7,111 @@ Estimated required disk space: &shadow-compsize;</screen> &aa-shadowpwd-shortdesc; &aa-shadowpwd-dep; -&c6-shadowpwd-inst; -&c6-cf-shadowpwd; + +<sect2><title> </title><para> </para></sect2> + +<sect2> +<title>Installation of Shadow</title> + +<para>The <userinput>login</userinput>, <userinput>getty</userinput> and +<userinput>init</userinput> programs (and some others) maintain a number +of logfiles to record who are and who were logged in to the system. These +programs, however, don't create these logfiles when they don't exist, so if +you want this logging to occur you will have to create the files yourself. +The Shadow package needs to detect these files in their proper place, so we +create them now, with their proper permissions:</para> + +<screen><userinput>touch /var/run/utmp /var/log/{btmp,lastlog,wtmp} +chmod 644 /var/run/utmp /var/log/{btmp,lastlog,wtmp}</userinput></screen> + +<para>The <filename>/var/run/utmp</filename> file lists the users that are +currently logged in, the <filename>/var/log/wtmp</filename> file who +<emphasis>were</emphasis> logged in and when. +The <filename>/var/log/lastlog</filename> file shows for each user when he +or she last logged in, and the <filename>/var/log/btmp</filename> lists the +bad login attempts.</para> + +<para>Shadow hard-wires the path to the <userinput>passwd</userinput> binary +within the binary itself, but does this the wrong way. If a +<userinput>passwd</userinput> binary is not present before installing Shadow, +the package incorrectly assumes it is going to be located at +<filename>/bin/passwd</filename>, but then installs it in +<filename>/usr/bin/passwd</filename>. This will lead to errors about not finding +<filename>/bin/passwd</filename>. To work around this bug, create a dummy +<filename>passwd</filename> file, so that it gets hard-wired properly:</para> + +<screen><userinput>touch /usr/bin/passwd</userinput></screen> + +<para>The current Shadow suite has a problem that causes the +<userinput>newgrp</userinput> command to fail. The following patch (also +appearing in Shadow's CVS code) fixes this problem:</para> + +<screen><userinput>patch -Np1 -i ../&shadow-patch;</userinput></screen> + +<para>Now prepare Shadow for compilation:</para> + +<screen><userinput>./configure --prefix=/usr --libdir=/usr/lib --enable-shared</userinput></screen> + +<para>Compile the package:</para> + +<screen><userinput>make</userinput></screen> + +<para>And install it:</para> + +<screen><userinput>make install</userinput></screen> + +<para>Shadow uses two files to configure authentication settings for the +system. Install these two config files:</para> + +<screen><userinput>cp etc/{limits,login.access} /etc</userinput></screen> + +<para>We want to change the password method to enable MD5 passwords which are +theoretically more secure than the default "crypt" method and also allow +password lengths greater than 8 characters. We also need to change the old +<filename class="directory">/var/spool/mail</filename> location for user +mailboxes to the current location at +<filename class="directory">/var/mail</filename>. We do this by changing the +relevant configuration file while copying it to its destination:</para> + +<screen><userinput>sed -e 's%/var/spool/mail%/var/mail%' \ + -e 's%#MD5_CRYPT_ENAB.no%MD5_CRYPT_ENAB yes%' \ + etc/login.defs.linux > /etc/login.defs</userinput></screen> + +<note><para>Be extra careful when typing all of the above. It is probably safer +to cut-and-paste it rather than try and type it all in.</para></note> + +<para>According to the man page of <userinput>vipw</userinput>, a +<userinput>vigr</userinput> program should exist too. Since the installation +procedure doesn't create this program, create a symlink manually:</para> + +<screen><userinput>ln -s vipw /usr/sbin/vigr</userinput></screen> + +<para>As the <filename>/bin/vipw</filename> symlink is redundant (and even +pointing to a non-existent file), remove it:</para> + +<screen><userinput>rm /bin/vipw</userinput></screen> + +<para>Now move the <userinput>sg</userinput> program to its proper place:</para> + +<screen><userinput>mv /bin/sg /usr/bin</userinput></screen> + +<para>And move Shadow's dynamic libraries to a more appropriate location:</para> + +<screen><userinput>mv /usr/lib/lib{shadow,misc}.so.0* /lib</userinput></screen> + +<para>As some packages expect to find the just-moved libraries in +<filename>/usr/lib</filename>, create the following symlinks:</para> + +<screen><userinput>ln -sf ../../lib/libshadow.so.0 /usr/lib/libshadow.so +ln -sf ../../lib/libmisc.so.0 /usr/lib/libmisc.so</userinput></screen> + +<para>Coreutils has already installed a <userinput>groups</userinput> program +in <filename>/usr/bin</filename>. If you wish, you can remove the one +installed by Shadow:</para> + +<screen><userinput>rm /bin/groups</userinput></screen> + +</sect2> </sect1> + diff --git a/chapter06/sysklogd-inst.xml b/chapter06/sysklogd-inst.xml deleted file mode 100644 index 3ce0f9097..000000000 --- a/chapter06/sysklogd-inst.xml +++ /dev/null @@ -1,15 +0,0 @@ -<sect2><title> </title><para> </para></sect2> - -<sect2> -<title>Installation of Sysklogd</title> - -<para>Compile Sysklogd:</para> - -<screen><userinput>make</userinput></screen> - -<para>And install it:</para> - -<screen><userinput>make install</userinput></screen> - -</sect2> - diff --git a/chapter06/sysklogd.xml b/chapter06/sysklogd.xml index 53b5028cc..c5fee1038 100644 --- a/chapter06/sysklogd.xml +++ b/chapter06/sysklogd.xml @@ -7,7 +7,21 @@ Estimated required disk space: &sysklogd-compsize;</screen> &aa-sysklogd-shortdesc; &aa-sysklogd-dep; -&c6-sysklogd-inst; -&c6-cf-sysklogd; + +<sect2><title> </title><para> </para></sect2> + +<sect2> +<title>Installation of Sysklogd</title> + +<para>Compile Sysklogd:</para> + +<screen><userinput>make</userinput></screen> + +<para>And install it:</para> + +<screen><userinput>make install</userinput></screen> + +</sect2> </sect1> + diff --git a/chapter06/sysvinit-inst.xml b/chapter06/sysvinit-inst.xml deleted file mode 100644 index 08f24bf9c..000000000 --- a/chapter06/sysvinit-inst.xml +++ /dev/null @@ -1,29 +0,0 @@ -<sect2><title> </title><para> </para></sect2> - -<sect2> -<title>Installation of Sysvinit</title> - -<para>When run levels are changed (for example, when halting the system), -init sends the TERM and KILL signals to the processes which it started. -Init prints "Sending processes the TERM signal" to the screen. This seems -to imply that init is sending these signals to all the currently running -processes. To avoid this confusion, the init.c file can be modified, so -that the sentence reads "Sending processes started by init the TERM -signal".</para> - -<para>Edit the halt message:</para> - -<screen><userinput>cp src/init.c{,.backup} -sed 's/Sending processes/Sending processes started by init/g' \ - src/init.c.backup > src/init.c</userinput></screen> - -<para>Compile Sysvinit:</para> - -<screen><userinput>make -C src</userinput></screen> - -<para>And install it:</para> - -<screen><userinput>make -C src install</userinput></screen> - -</sect2> - diff --git a/chapter06/sysvinit.xml b/chapter06/sysvinit.xml index 69826f4d5..934e5cfd5 100644 --- a/chapter06/sysvinit.xml +++ b/chapter06/sysvinit.xml @@ -7,7 +7,35 @@ Estimated required disk space: &sysvinit-compsize;</screen> &aa-sysvinit-shortdesc; &aa-sysvinit-dep; -&c6-sysvinit-inst; -&c6-cf-sysvinit; + +<sect2><title> </title><para> </para></sect2> + +<sect2> +<title>Installation of Sysvinit</title> + +<para>When run levels are changed (for example, when halting the system), +init sends the TERM and KILL signals to the processes which it started. +Init prints "Sending processes the TERM signal" to the screen. This seems +to imply that init is sending these signals to all the currently running +processes. To avoid this confusion, the init.c file can be modified, so +that the sentence reads "Sending processes started by init the TERM +signal".</para> + +<para>Edit the halt message:</para> + +<screen><userinput>cp src/init.c{,.backup} +sed 's/Sending processes/Sending processes started by init/g' \ + src/init.c.backup > src/init.c</userinput></screen> + +<para>Compile Sysvinit:</para> + +<screen><userinput>make -C src</userinput></screen> + +<para>And install it:</para> + +<screen><userinput>make -C src install</userinput></screen> + +</sect2> </sect1> + diff --git a/chapter06/tar-inst.xml b/chapter06/tar-inst.xml deleted file mode 100644 index 035682096..000000000 --- a/chapter06/tar-inst.xml +++ /dev/null @@ -1,26 +0,0 @@ -<sect2><title> </title><para> </para></sect2> - -<sect2> -<title>Installation of Tar</title> - -<para>Prepare Tar for compilation:</para> - -<screen><userinput>./configure --prefix=/usr --bindir=/bin \ - --libexecdir=/usr/bin</userinput></screen> - -<para>Compile the package:</para> - -<screen><userinput>make</userinput></screen> - -<para>This package has a test suite available which can perform a number of -checks to ensure it built correctly. Should you choose to run it, the -following command will do so:</para> - -<screen><userinput>make check</userinput></screen> - -<para>And install the package:</para> - -<screen><userinput>make install</userinput></screen> - -</sect2> - diff --git a/chapter06/tar.xml b/chapter06/tar.xml index 94c05c86d..3e511f323 100644 --- a/chapter06/tar.xml +++ b/chapter06/tar.xml @@ -7,6 +7,32 @@ Estimated required disk space: &tar-compsize;</screen> &aa-tar-shortdesc; &aa-tar-dep; -&c6-tar-inst; + +<sect2><title> </title><para> </para></sect2> + +<sect2> +<title>Installation of Tar</title> + +<para>Prepare Tar for compilation:</para> + +<screen><userinput>./configure --prefix=/usr --bindir=/bin \ + --libexecdir=/usr/bin</userinput></screen> + +<para>Compile the package:</para> + +<screen><userinput>make</userinput></screen> + +<para>This package has a test suite available which can perform a number of +checks to ensure it built correctly. Should you choose to run it, the +following command will do so:</para> + +<screen><userinput>make check</userinput></screen> + +<para>And install the package:</para> + +<screen><userinput>make install</userinput></screen> + +</sect2> </sect1> + diff --git a/chapter06/texinfo-inst.xml b/chapter06/texinfo-inst.xml deleted file mode 100644 index 16c391535..000000000 --- a/chapter06/texinfo-inst.xml +++ /dev/null @@ -1,37 +0,0 @@ -<sect2><title> </title><para> </para></sect2> - -<sect2> -<title>Installation of Texinfo</title> - -<para>Prepare Texinfo for compilation:</para> - -<screen><userinput>./configure --prefix=/usr</userinput></screen> - -<para>Compile the package:</para> - -<screen><userinput>make</userinput></screen> - -<para>This package has a test suite available which can perform a number of -checks to ensure it built correctly. Should you choose to run it, the -following command will do so:</para> - -<screen><userinput>make check</userinput></screen> - -<para>Install the package:</para> - -<screen><userinput>make install</userinput></screen> - -<para>And optionally install the components belonging in a TeX installation:</para> - -<screen><userinput>make TEXMF=/usr/share/texmf install-tex</userinput></screen> - -<para>The meaning of the make option:</para> - -<itemizedlist> -<listitem><para><userinput>TEXMF=/usr/share/texmf</userinput>: The TEXMF -makefile variable holds the location of the root of your TeX tree if, for -example, you plan to install a TeX package later on.</para></listitem> -</itemizedlist> - -</sect2> - diff --git a/chapter06/texinfo.xml b/chapter06/texinfo.xml index 745c044f1..a00d157eb 100644 --- a/chapter06/texinfo.xml +++ b/chapter06/texinfo.xml @@ -7,6 +7,43 @@ Estimated required disk space: &texinfo-compsize;</screen> &aa-texinfo-shortdesc; &aa-texinfo-dep; -&c6-texinfo-inst; + +<sect2><title> </title><para> </para></sect2> + +<sect2> +<title>Installation of Texinfo</title> + +<para>Prepare Texinfo for compilation:</para> + +<screen><userinput>./configure --prefix=/usr</userinput></screen> + +<para>Compile the package:</para> + +<screen><userinput>make</userinput></screen> + +<para>This package has a test suite available which can perform a number of +checks to ensure it built correctly. Should you choose to run it, the +following command will do so:</para> + +<screen><userinput>make check</userinput></screen> + +<para>Install the package:</para> + +<screen><userinput>make install</userinput></screen> + +<para>And optionally install the components belonging in a TeX installation:</para> + +<screen><userinput>make TEXMF=/usr/share/texmf install-tex</userinput></screen> + +<para>The meaning of the make option:</para> + +<itemizedlist> +<listitem><para><userinput>TEXMF=/usr/share/texmf</userinput>: The TEXMF +makefile variable holds the location of the root of your TeX tree if, for +example, you plan to install a TeX package later on.</para></listitem> +</itemizedlist> + +</sect2> </sect1> + diff --git a/chapter06/utillinux-inst.xml b/chapter06/utillinux-inst.xml deleted file mode 100644 index 7bfd91bff..000000000 --- a/chapter06/utillinux-inst.xml +++ /dev/null @@ -1,43 +0,0 @@ -<sect2><title> </title><para> </para></sect2> - -<sect2> -<title>FHS compliance notes</title> - -<para>The FHS recommends that we use <filename>/var/lib/hwclock</filename>, -instead of the usual <filename>/etc</filename>, as the location for the -<filename>adjtime</filename> file. To make the <userinput>hwclock</userinput> -program FHS-compliant, run the following:</para> - -<screen><userinput>cp hwclock/hwclock.c{,.backup} -sed 's%etc/adjtime%var/lib/hwclock/adjtime%' \ - hwclock/hwclock.c.backup > hwclock/hwclock.c -mkdir -p /var/lib/hwclock</userinput></screen> - -</sect2> - -<sect2> -<title>Installation of Util-linux</title> - -<para>Prepare Util-linux for compilation:</para> - -<screen><userinput>./configure</userinput></screen> - -<para>Compile the package:</para> - -<screen><userinput>make HAVE_SLN=yes</userinput></screen> - -<para>The meaning of the make parameter:</para> - -<itemizedlist> -<listitem><para><userinput>HAVE_SLN=yes</userinput>: This prevents the -<userinput>sln</userinput> program (a statically linked -<userinput>ln</userinput>, already installed by Glibc) from being built -again.</para></listitem> -</itemizedlist> - -<para>And install the package:</para> - -<screen><userinput>make HAVE_SLN=yes install</userinput></screen> - -</sect2> - diff --git a/chapter06/utillinux.xml b/chapter06/utillinux.xml index 6238ca924..487736df2 100644 --- a/chapter06/utillinux.xml +++ b/chapter06/utillinux.xml @@ -7,6 +7,49 @@ Estimated required disk space: &util-linux-compsize;</screen> &aa-utillinux-shortdesc; &aa-utillinux-dep; -&c6-utillinux-inst; + +<sect2><title> </title><para> </para></sect2> + +<sect2> +<title>FHS compliance notes</title> + +<para>The FHS recommends that we use <filename>/var/lib/hwclock</filename>, +instead of the usual <filename>/etc</filename>, as the location for the +<filename>adjtime</filename> file. To make the <userinput>hwclock</userinput> +program FHS-compliant, run the following:</para> + +<screen><userinput>cp hwclock/hwclock.c{,.backup} +sed 's%etc/adjtime%var/lib/hwclock/adjtime%' \ + hwclock/hwclock.c.backup > hwclock/hwclock.c +mkdir -p /var/lib/hwclock</userinput></screen> + +</sect2> + +<sect2> +<title>Installation of Util-linux</title> + +<para>Prepare Util-linux for compilation:</para> + +<screen><userinput>./configure</userinput></screen> + +<para>Compile the package:</para> + +<screen><userinput>make HAVE_SLN=yes</userinput></screen> + +<para>The meaning of the make parameter:</para> + +<itemizedlist> +<listitem><para><userinput>HAVE_SLN=yes</userinput>: This prevents the +<userinput>sln</userinput> program (a statically linked +<userinput>ln</userinput>, already installed by Glibc) from being built +again.</para></listitem> +</itemizedlist> + +<para>And install the package:</para> + +<screen><userinput>make HAVE_SLN=yes install</userinput></screen> + +</sect2> </sect1> + diff --git a/chapter06/vim-inst.xml b/chapter06/vim-inst.xml deleted file mode 100644 index 28e261969..000000000 --- a/chapter06/vim-inst.xml +++ /dev/null @@ -1,37 +0,0 @@ -<sect2><title> </title><para> </para></sect2> - -<sect2> -<title>Installation of Vim</title> - -<para>Change the default locations of the <filename>vimrc</filename> and -<filename>gvimrc</filename> files to <filename -class="directory">/etc</filename>.</para> - -<screen><userinput>echo '#define SYS_VIMRC_FILE "/etc/vimrc"' >> src/feature.h -echo '#define SYS_GVIMRC_FILE "/etc/gvimrc"' >> src/feature.h</userinput></screen> - -<para>Now prepare Vim for compilation:</para> - -<screen><userinput>./configure --prefix=/usr</userinput></screen> - -<para>Compile the package:</para> - -<screen><userinput>make</userinput></screen> - -<para>And install the package:</para> - -<screen><userinput>make install</userinput></screen> - -<para>Vim can run in old-fashioned <emphasis>vi</emphasis> mode by -creating a symlink, which may be created with the following command:</para> - -<screen><userinput>ln -s vim /usr/bin/vi</userinput></screen> - -<para>If you plan to install the X Window system on your LFS -system, you might want to re-compile Vim after you have installed X. Vim -comes with a nice GUI version of the editor which requires X and a few -other libraries to be installed. For more information read the Vim -documentation.</para> - -</sect2> - diff --git a/chapter06/vim.xml b/chapter06/vim.xml index a35b54f8c..3c830af75 100644 --- a/chapter06/vim.xml +++ b/chapter06/vim.xml @@ -16,7 +16,43 @@ suggested installation instructions.</para> &aa-vim-shortdesc; &aa-vim-dep; -&c6-vim-inst; -&c6-cf-vim; + +<sect2><title> </title><para> </para></sect2> + +<sect2> +<title>Installation of Vim</title> + +<para>Change the default locations of the <filename>vimrc</filename> and +<filename>gvimrc</filename> files to <filename +class="directory">/etc</filename>.</para> + +<screen><userinput>echo '#define SYS_VIMRC_FILE "/etc/vimrc"' >> src/feature.h +echo '#define SYS_GVIMRC_FILE "/etc/gvimrc"' >> src/feature.h</userinput></screen> + +<para>Now prepare Vim for compilation:</para> + +<screen><userinput>./configure --prefix=/usr</userinput></screen> + +<para>Compile the package:</para> + +<screen><userinput>make</userinput></screen> + +<para>And install the package:</para> + +<screen><userinput>make install</userinput></screen> + +<para>Vim can run in old-fashioned <emphasis>vi</emphasis> mode by +creating a symlink, which may be created with the following command:</para> + +<screen><userinput>ln -s vim /usr/bin/vi</userinput></screen> + +<para>If you plan to install the X Window system on your LFS +system, you might want to re-compile Vim after you have installed X. Vim +comes with a nice GUI version of the editor which requires X and a few +other libraries to be installed. For more information read the Vim +documentation.</para> + +</sect2> </sect1> + diff --git a/chapter06/zlib-inst.xml b/chapter06/zlib-inst.xml deleted file mode 100644 index c142e51eb..000000000 --- a/chapter06/zlib-inst.xml +++ /dev/null @@ -1,64 +0,0 @@ -<sect2><title> </title><para> </para></sect2> - -<sect2> -<title>Installation of Zlib</title> - -<para>Zlib has a potential buffer overflow in its -<emphasis>gzprintf()</emphasis> function, that, though difficult to take -advantage of, should be taken care of by applying this patch:</para> - -<screen><userinput>patch -Np1 -i ../&zlib-patch;</userinput></screen> - -<para>Now prepare Zlib for compilation:</para> - -<screen><userinput>./configure --prefix=/usr --shared</userinput></screen> - -<para>Note: Zlib is known to build its shared library incorrectly if a CFLAGS -is specified in the environment. If you are using your own CFLAGS variables, -ensure you add the <emphasis role="strong">-fPIC</emphasis> directive during -this stage, and remove it afterwards.</para> - -<para>Compile the package:</para> - -<screen><userinput>make</userinput></screen> - -<para>Install the shared libraries:</para> - -<screen><userinput>make install</userinput></screen> - -<para>Now also build the non-shared libraries:</para> -<screen><userinput>make clean -./configure --prefix=/usr -make</userinput></screen> - -<para>This package has a test suite available which can perform a number of -checks to ensure it built correctly. Should you choose to run it, the -following command will do so:</para> - -<screen><userinput>make test</userinput></screen> - -<para>And install the package:</para> - -<screen><userinput>make install</userinput></screen> - -<para>The shared Zlib library should be installed in the -<filename>/lib</filename> directory. That way, in the event -that you must boot without the <filename>/usr</filename> -directory, vital system programs will still have access to -the library:</para> - -<screen><userinput>mv /usr/lib/libz.so.* /lib</userinput></screen> - -<para>The <filename>/usr/lib/libz.so</filename> symlink is -linked to a file which no longer exists, because we moved -it. Create a symbolic link to the new location of the -library:</para> - -<screen><userinput>ln -sf ../../lib/libz.so.1 /usr/lib/libz.so</userinput></screen> - -<para>Zlib does not install its manual page. Issue the -following command to install this documentation:</para> - -<screen><userinput>cp zlib.3 /usr/share/man/man3</userinput></screen> - -</sect2> diff --git a/chapter06/zlib.xml b/chapter06/zlib.xml index 0a204357d..fba00043f 100644 --- a/chapter06/zlib.xml +++ b/chapter06/zlib.xml @@ -7,7 +7,71 @@ Estimated required disk space: &zlib-compsize;</screen> &aa-zlib-shortdesc; &aa-zlib-dep; -&c6-zlib-inst; + +<sect2><title> </title><para> </para></sect2> + +<sect2> +<title>Installation of Zlib</title> + +<para>Zlib has a potential buffer overflow in its +<emphasis>gzprintf()</emphasis> function, that, though difficult to take +advantage of, should be taken care of by applying this patch:</para> + +<screen><userinput>patch -Np1 -i ../&zlib-patch;</userinput></screen> + +<para>Now prepare Zlib for compilation:</para> + +<screen><userinput>./configure --prefix=/usr --shared</userinput></screen> + +<para>Note: Zlib is known to build its shared library incorrectly if a CFLAGS +is specified in the environment. If you are using your own CFLAGS variables, +ensure you add the <emphasis role="strong">-fPIC</emphasis> directive during +this stage, and remove it afterwards.</para> + +<para>Compile the package:</para> + +<screen><userinput>make</userinput></screen> + +<para>Install the shared libraries:</para> + +<screen><userinput>make install</userinput></screen> + +<para>Now also build the non-shared libraries:</para> +<screen><userinput>make clean +./configure --prefix=/usr +make</userinput></screen> + +<para>This package has a test suite available which can perform a number of +checks to ensure it built correctly. Should you choose to run it, the +following command will do so:</para> + +<screen><userinput>make test</userinput></screen> + +<para>And install the package:</para> + +<screen><userinput>make install</userinput></screen> + +<para>The shared Zlib library should be installed in the +<filename>/lib</filename> directory. That way, in the event +that you must boot without the <filename>/usr</filename> +directory, vital system programs will still have access to +the library:</para> + +<screen><userinput>mv /usr/lib/libz.so.* /lib</userinput></screen> + +<para>The <filename>/usr/lib/libz.so</filename> symlink is +linked to a file which no longer exists, because we moved +it. Create a symbolic link to the new location of the +library:</para> + +<screen><userinput>ln -sf ../../lib/libz.so.1 /usr/lib/libz.so</userinput></screen> + +<para>Zlib does not install its manual page. Issue the +following command to install this documentation:</para> + +<screen><userinput>cp zlib.3 /usr/share/man/man3</userinput></screen> + +</sect2> </sect1> |