aboutsummaryrefslogtreecommitdiffstats
path: root/chapter06
diff options
context:
space:
mode:
authorMarc Heerdink <gimli@linuxfromscratch.org>2001-12-10 15:23:46 +0000
committerMarc Heerdink <gimli@linuxfromscratch.org>2001-12-10 15:23:46 +0000
commit8c5e7152f076d6b68a23e6629a44b49763557f48 (patch)
treea1aefdf4de97412c9982138139b5afedc09f4361 /chapter06
parent7c77094da04a687209937c8bf15ced1d8bac404a (diff)
Resolved bug 192 and a version increase
git-svn-id: http://svn.linuxfromscratch.org/LFS/trunk/BOOK@1370 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689
Diffstat (limited to 'chapter06')
-rw-r--r--chapter06/glibc-exp.xml58
-rw-r--r--chapter06/glibc-inst.xml9
-rw-r--r--chapter06/shadowpwd-exp.xml8
-rw-r--r--chapter06/shadowpwd-inst.xml3
-rw-r--r--chapter06/sysvinit-inst.xml3
-rw-r--r--chapter06/utillinux-inst.xml3
-rw-r--r--chapter06/vim-inst.xml12
7 files changed, 39 insertions, 57 deletions
diff --git a/chapter06/glibc-exp.xml b/chapter06/glibc-exp.xml
index 80f51cd18..fdb7e3195 100644
--- a/chapter06/glibc-exp.xml
+++ b/chapter06/glibc-exp.xml
@@ -12,30 +12,20 @@ that it can't read the file, so we simply create an empty file (the empty file
will have Glibc default to using /lib and /usr/lib which is fine).</para>
<para><userinput>sed 's%\$(PERL)%/usr/bin/perl%'
-malloc/Makefile &gt; tmp~:</userinput> This sed command
-searches through <filename>malloc/Makefile</filename> and
+malloc/Makefile.backup &gt; malloc/Makefile:</userinput> This sed command
+searches through <filename>malloc/Makefile.backup</filename> and
converts all occurrences of <filename>$(PERL)</filename> to
-<filename>/usr/bin/perl</filename>. The output is then written to the
-file <filename>tmp~</filename>. This is done because Glibc can't
-autodetect perl since it hasn't been installed yet.</para>
-
-<para><userinput>mv tmp~ malloc/Makefile:</userinput> The file
-<filename>tmp~</filename> is now moved back to
-<filename>malloc/Makefile</filename>. We do this because
-when using sed, we can't write straight back to this file so we need to
-use a temporary file in between.</para>
-
-<para><userinput>sed 's/root/0' login/Makefile &gt;
-tmp~:</userinput> This sed command replaces all occurences of
-<filename>root</filename> in
-<filename>login/Makefile</filename> with 0. This is
-because as we don't have glibc on the LFS system yet, usernames can't
-be resolved to their user id's. Therefore, we replace the username
-root with the id 0. </para>
-
-<para><userinput>mv tmp~ login/Makefile:</userinput> As above, we are using
-a temporary file (<filename>tmp~</filename>) to store the
-edited Makefile and then copying it back over the original.</para>
+<filename>/usr/bin/perl</filename>. The output is then written to the
+original <filename>malloc/Makefile.in</filename> which is used during
+configuration. This is done because Glibc can't autodetect perl since
+it hasn't been installed yet.</para>
+
+<para><userinput>sed 's/root/0' login/Makefile.backup &gt;
+login/Makefile:</userinput> This sed command replaces all occurences of
+<filename>root</filename> in <filename>login/Makefile.backup</filename>
+with 0. This is because we don't have glibc on the LFS system yet, so
+usernames can't be resolved to their user id's. Therefore, we replace
+the username root with user id 0.</para>
<para><userinput>--enable-add-ons:</userinput> This enables the add-on that
we install with Glibc: linuxthreads</para>
@@ -44,18 +34,16 @@ we install with Glibc: linuxthreads</para>
pt_chown program to be installed in the /usr/bin directory.</para>
<para><userinput>sed 's/cross-compiling = yes/cross-compiling = no/'
-config.make &gt; config.make~:</userinput> This time, we're replacing
-<filename>cross-compiling = yes</filename> with
-<filename>cross-compiling = no</filename>. We do this because we are
-only building for our own system. Cross-compiling is used, for
-instance, to build a package for an Apple Power PC on an Intel system.
-The reason Glibc thinks we're cross-compiling is that it can't compile a
-test program to determine this, so it automatically defaults to a
-cross-compiler. The reason for the failed program is because Glibc
-hasn't been installed yet.</para>
-
-<para><userinput>mv config.make~ config.make:</userinput> Again, we are moving
-the temporary file over the original.</para>
+config.make.backup &gt; config.make:</userinput> This time, sed searches
+through <filename>config.make.backup</filename> and replaces all occurences
+of <filename>cross-compiling = yes</filename> with
+<filename>cross-compiling = no</filename>. We do this because we are
+only building for our own system. Cross-compiling is used, for instance,
+to build a package for an Apple Power PC on an Intel system. The reason
+Glibc thinks we're cross-compiling is that it can't compile a test program
+to determine this, so it automatically defaults to a cross-compiler.
+Compiling the test program failes because Glibc hasn't been installed
+yet.</para>
<para><userinput>exec /bin/bash:</userinput>This command will
start a new bash shell which will replace the current shell. This is
diff --git a/chapter06/glibc-inst.xml b/chapter06/glibc-inst.xml
index 96991e865..2eb2d7f54 100644
--- a/chapter06/glibc-inst.xml
+++ b/chapter06/glibc-inst.xml
@@ -17,19 +17,16 @@ it comes with.</para>
<para><screen><userinput>mknod -m 0666 /dev/null c 1 3 &amp;&amp;
touch /etc/ld.so.conf &amp;&amp;
cp malloc/Makefile malloc/Makefile.backup &amp;&amp;
-sed 's%\$(PERL)%/usr/bin/perl%' malloc/Makefile &gt; tmp~ &amp;&amp;
-mv tmp~ malloc/Makefile &amp;&amp;
+sed 's%\$(PERL)%/usr/bin/perl%' malloc/Makefile.backup &gt; malloc/Makefile &amp;&amp;
cp login/Makefile login/Makefile.backup &amp;&amp;
-sed 's/root/0/' login/Makefile &gt; tmp~ &amp;&amp;
-mv tmp~ login/Makefile &amp;&amp;
+sed 's/root/0/' login/Makefile.backup &gt; login/Makefile &amp;&amp;
mkdir ../glibc-build &amp;&amp;
cd ../glibc-build &amp;&amp;
../glibc-&glibc-version;/configure --prefix=/usr \
&nbsp;&nbsp;&nbsp;--enable-add-ons --libexecdir=/usr/bin &amp;&amp;
cp config.make config.make.backup &amp;&amp;
sed 's/cross-compiling = yes/cross-compiling = no/' \
-&nbsp;&nbsp;&nbsp;config.make &gt; tmp~ &amp;&amp;
-mv tmp~ config.make &amp;&amp;
+&nbsp;&nbsp;&nbsp;config.make.backup &gt; config.make &amp;&amp;
make &amp;&amp;
make install &amp;&amp;
make localedata/install-locales &amp;&amp;
diff --git a/chapter06/shadowpwd-exp.xml b/chapter06/shadowpwd-exp.xml
index e7bbb17c4..9df64bdd8 100644
--- a/chapter06/shadowpwd-exp.xml
+++ b/chapter06/shadowpwd-exp.xml
@@ -1,10 +1,10 @@
<sect2>
<title>Command explanations</title>
-<para><userinput>sed 's/\(.*\) (nflg || \(.*\))\(.*\)/\1\2\3/' src/useradd.c
-&gt; useradd.c.temp &amp;&amp;</userinput>: This sed is used to fix a
-compilation bug which occurs due to a variable (nflg) being used but not
-defined.</para>
+<para><userinput>sed 's/\(.*\) (nflg || \(.*\))\(.*\)/\1\2\3/'
+src/useradd.c.backup &gt; src/useradd.c &amp;&amp;</userinput>:
+This sed is used to fix a compilation bug which occurs due to a
+variable (nflg) being used but not defined.</para>
<para><userinput>cp limits login.access /etc:</userinput> These files
were not installed during the installation of the package so we copy
diff --git a/chapter06/shadowpwd-inst.xml b/chapter06/shadowpwd-inst.xml
index ae75a25b7..705d72fa8 100644
--- a/chapter06/shadowpwd-inst.xml
+++ b/chapter06/shadowpwd-inst.xml
@@ -11,8 +11,7 @@ following commands:</para>
<para><screen><userinput>cp src/useradd.c src/useradd.c.backup &amp;&amp;
sed 's/\(.*\) (nflg || \(.*\))\(.*\)/\1\2\3/' \
-&nbsp;&nbsp;&nbsp;src/useradd.c &gt; tmp~ &amp;&amp;
-mv tmp~ src/useradd.c &amp;&amp;
+&nbsp;&nbsp;&nbsp;src/useradd.c.backup &gt; src/useradd.c &amp;&amp;
./configure --prefix=/usr &amp;&amp;
make &amp;&amp;
make install &amp;&amp;
diff --git a/chapter06/sysvinit-inst.xml b/chapter06/sysvinit-inst.xml
index 5b1067718..5a52aa447 100644
--- a/chapter06/sysvinit-inst.xml
+++ b/chapter06/sysvinit-inst.xml
@@ -13,8 +13,7 @@ commands. If you don't want to change it, skip it.</para>
<para><screen><userinput>cp src/init.c src/init.c.backup &amp;&amp;
sed 's/\(.*\)\(Sending processes\)\(.*\)/\1\2 started by init\3/' \
-&nbsp;&nbsp;&nbsp;src/init.c &gt; tmp~ &amp;&amp;
-mv tmp~ src/init.c</userinput></screen></para>
+&nbsp;&nbsp;&nbsp;src/init.c.backup &gt; src/init.c</userinput></screen></para>
<para>Install Sysvinit by running the following commands:</para>
diff --git a/chapter06/utillinux-inst.xml b/chapter06/utillinux-inst.xml
index bee848020..794ce4ffd 100644
--- a/chapter06/utillinux-inst.xml
+++ b/chapter06/utillinux-inst.xml
@@ -7,8 +7,7 @@ util-linux package, FHS-compliant, run the following.</para>
<para><screen><userinput>cp hwclock/hwclock.c hwclock/hwclock.c.backup &amp;&amp;
sed 's%etc/adjtime%var/lib/hwclock/adjtime%' \
-&nbsp;&nbsp;&nbsp;hwclock/hwclock.c &gt; tmp~ &amp;&amp;
-mv tmp~ hwclock/hwclock.c &amp;&amp;
+&nbsp;&nbsp;&nbsp;hwclock/hwclock.c.backup &gt; hwclock/hwclock.c &amp;&amp;
mkdir -p /var/lib/hwclock</userinput></screen></para>
</sect2>
diff --git a/chapter06/vim-inst.xml b/chapter06/vim-inst.xml
index 176ff9300..a4a73002d 100644
--- a/chapter06/vim-inst.xml
+++ b/chapter06/vim-inst.xml
@@ -9,7 +9,8 @@ which are currently available are for Emacs, Joe and nano.</para>
<para>Install Vim by running the following commands:</para>
-<para><screen><userinput>sed '/shUntil\|link shRepeat/{
+<para><screen><userinput>cp runtime/syntax/sh.vim runtime/syntax/sh.vim.backup &amp;&amp;
+sed '/shUntil\|link shRepeat/{
&nbsp;&nbsp;&nbsp;/shUntil/N
&nbsp;&nbsp;&nbsp;/^/i\
&nbsp;&nbsp;&nbsp;if exists("b:is_kornshell") || exists("b:is_bash")
@@ -17,8 +18,7 @@ which are currently available are for Emacs, Joe and nano.</para>
&nbsp;&nbsp;&nbsp;/$/i\
&nbsp;&nbsp;&nbsp;endif
&nbsp;&nbsp;&nbsp;d
-&nbsp;&nbsp;&nbsp;}' runtime/syntax/sh.vim &gt; sh.vim.fixed &amp;&amp;
-mv sh.vim.fixed runtime/syntax/sh.vim &amp;&amp;
+&nbsp;&nbsp;&nbsp;}' runtime/syntax/sh.vim.backup &gt; runtime/syntax/sh.vim &amp;&amp;
./configure --prefix=/usr &amp;&amp;
make CPPFLAGS=-DSYS_VIMRC_FILE=\\\"/etc/vimrc\\\" &amp;&amp;
make install &amp;&amp;
@@ -41,7 +41,8 @@ for their temporary state files, like temporary save files for example.
If you wish vim to conform to the FHS, you should use this command set
instead of the one presented above:</para>
-<para><screen><userinput>sed '/shUntil\|link shRepeat/{
+<para><screen><userinput>cp runtime/syntax/sh.vim runtime/syntax/sh.vim.backup &amp;&amp;
+sed '/shUntil\|link shRepeat/{
&nbsp;&nbsp;&nbsp;/shUntil/N
&nbsp;&nbsp;&nbsp;/^/i\
&nbsp;&nbsp;&nbsp;if exists("b:is_kornshell") || exists("b:is_bash")
@@ -49,8 +50,7 @@ instead of the one presented above:</para>
&nbsp;&nbsp;&nbsp;/$/i\
&nbsp;&nbsp;&nbsp;endif
&nbsp;&nbsp;&nbsp;d
-&nbsp;&nbsp;&nbsp;}' runtime/syntax/sh.vim &gt; sh.vim.fixed &amp;&amp;
-mv sh.vim.fixed runtime/syntax/sh.vim &amp;&amp;
+&nbsp;&nbsp;&nbsp;}' runtime/syntax/sh.vim.backup &gt; runtime/syntax/sh.vim &amp;&amp;
./configure --prefix=/usr --localstatedir=/var/lib/vim &amp;&amp;
make CPPFLAGS=-DSYS_VIMRC_FILE=\\\"/etc/vimrc\\\" &amp;&amp;
make install &amp;&amp;