diff options
author | Mark Hymers <markh@linuxfromscratch.org> | 2001-08-23 22:38:49 +0000 |
---|---|---|
committer | Mark Hymers <markh@linuxfromscratch.org> | 2001-08-23 22:38:49 +0000 |
commit | 45714a7d3b3c0851d598d966a2ce9790e177c6e1 (patch) | |
tree | 0a575e047b942b5606f2bb2b06d539649b180482 /chapter05 | |
parent | b58a7ebf15eb69dffdc4c5cba84422a1fd1bdc08 (diff) |
[Bug 127] Clean up ln, mv and cp commands
git-svn-id: http://svn.linuxfromscratch.org/LFS/trunk/BOOK@1011 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689
Diffstat (limited to 'chapter05')
-rw-r--r-- | chapter05/bash-exp.xml | 2 | ||||
-rw-r--r-- | chapter05/bash-inst.xml | 4 | ||||
-rw-r--r-- | chapter05/bzip2-exp.xml | 28 | ||||
-rw-r--r-- | chapter05/bzip2-inst.xml | 2 | ||||
-rw-r--r-- | chapter05/fileutils-exp.xml | 12 | ||||
-rw-r--r-- | chapter05/fileutils-inst.xml | 6 | ||||
-rw-r--r-- | chapter05/gcc-exp.xml | 4 | ||||
-rw-r--r-- | chapter05/gcc-inst.xml | 6 | ||||
-rw-r--r-- | chapter05/gzip-inst.xml | 4 | ||||
-rw-r--r-- | chapter05/kernel-exp.xml | 8 | ||||
-rw-r--r-- | chapter05/kernel-inst.xml | 4 | ||||
-rw-r--r-- | chapter05/oldnsslib.xml | 2 | ||||
-rw-r--r-- | chapter05/shellutils-inst.xml | 4 | ||||
-rw-r--r-- | chapter05/textutils-inst.xml | 2 |
14 files changed, 30 insertions, 58 deletions
diff --git a/chapter05/bash-exp.xml b/chapter05/bash-exp.xml index 8338c3fd4..8e33c9c78 100644 --- a/chapter05/bash-exp.xml +++ b/chapter05/bash-exp.xml @@ -16,7 +16,7 @@ partition which has to be mounted at some point. Before that partition is mounted a user needs and will want to have bash available (it will be hard to execute the boot scripts without a shell for instance).</para> -<para><userinput>ln -s bash sh:</userinput> This command creates the sh +<para><userinput>ln -sf bash sh:</userinput> This command creates the sh symlink that points to bash. Most scripts run themselves via 'sh' (invoked by the #!/bin/sh as the first line in the scripts) which invokes a special bash mode. Bash will then behave (as closely as diff --git a/chapter05/bash-inst.xml b/chapter05/bash-inst.xml index eb6b96e1f..9dcd2775c 100644 --- a/chapter05/bash-inst.xml +++ b/chapter05/bash-inst.xml @@ -8,7 +8,7 @@ <userinput>make &&</userinput> <userinput>make install &&</userinput> <userinput>cd $LFS/bin &&</userinput> -<userinput>ln -s bash sh</userinput></screen></para> +<userinput>ln -sf bash sh</userinput></screen></para> <para>If the make install phase ends with something along the lines of</para> @@ -28,7 +28,7 @@ old version of the texinfo package. This error is not severe by any means: the info pages will be installed when we recompile bash dynamically in chapter 6, so you can ignore it. You do, however, have to run the last two commands manually (the <userinput>cd $LFS/bin</userinput> and -<userinput>ln -s bash sh</userinput> commands) because they won't be +<userinput>ln -sf bash sh</userinput> commands) because they won't be executed when the error occurs.</para> </sect2> diff --git a/chapter05/bzip2-exp.xml b/chapter05/bzip2-exp.xml index 9c8853566..83263ccbd 100644 --- a/chapter05/bzip2-exp.xml +++ b/chapter05/bzip2-exp.xml @@ -1,34 +1,6 @@ <sect2> <title>Command explanations</title> -<!-- -<para><userinput>sed: </userinput> The sed command here searches for the -string "$(CC) $(CFLAGS) -o" and replaces it by "$(CC) $(CFLAGS) -$(LDFLAGS) -o" in the Makefile file. We make that modification so it -will be easier to link bzip2 statically.</para> - -<para><userinput>...Makefile | make -f -:</userinput> Makefile -is the last parameter of the sed command which indicates the file to -search and replace in. Sed normally sends the modified file to stdout -(standard output), which will be the console. With the construction we -use, sed's output will be piped to the make program. Normally, when make -is started, it tries to find a number of files like Makefile. But we have -modified the Makefile file so we don't want make to use it. The "-f -" -parameter tells make to read it's input from another file, or from stdin -(standard input) which the dash (-) implies. This is one way to do it. -Another way would be to have sed write the output to a different file -and tell make with the -f parameter to read that alternate file.</para> - -<para><userinput>LDFLAGS=-static:</userinput> This is the second way we use to -link a package statically. This is also the most common way. -The -all-static value is only used with the binutils package and won't -be used throughout the rest of this book.</para> - -I HAVEN'T REMOVED THIS AS WE MAY NEED TO COPY SOME OF IT TO A LATER -PACKAGE. IS THIS THE CASE? - ---> - <para><userinput>make CC="gcc -static": </userinput>This is the method we use to tell gcc that we want bzip2 to be linked statically.</para> diff --git a/chapter05/bzip2-inst.xml b/chapter05/bzip2-inst.xml index aa5d87dd8..0490f0398 100644 --- a/chapter05/bzip2-inst.xml +++ b/chapter05/bzip2-inst.xml @@ -6,7 +6,7 @@ <para><screen><userinput>make CC="gcc -static" &&</userinput> <userinput>make PREFIX=$LFS/usr install &&</userinput> <userinput>cd $LFS/usr/bin &&</userinput> -<userinput>mv bzcat bunzip2 bzip2 bzip2recover $LFS/bin</userinput></screen></para> +<userinput>mv -f bzcat bunzip2 bzip2 bzip2recover $LFS/bin</userinput></screen></para> </sect2> diff --git a/chapter05/fileutils-exp.xml b/chapter05/fileutils-exp.xml index edb99ae09..fdaa829fd 100644 --- a/chapter05/fileutils-exp.xml +++ b/chapter05/fileutils-exp.xml @@ -2,13 +2,13 @@ <title>Command explanations</title> <para><screen><userinput>sed 's/\(.*\)\(fopen-safer\.c \)\\/\1\2atexit.c \\/' \</userinput> -<userinput> lib/Makefile.in > tmp &&</userinput> +<userinput> lib/Makefile.in > tmp &&</userinput> <userinput>sed 's/\(.*\)\(idcache\$U\.\$.*\)\\/\1\2atexit$U.$(OBJEXT) \\/' \</userinput> -<userinput> tmp > lib/Makefile.in : </userinput></screen> This is used -to fix a problem with building fileutils statically on glibc 2.2.3 systems. If -this isn't done, then there is the possibility of all of the fileutils -programs causing segmentation faults once chroot is entered in chapter -6.</para> +<userinput> tmp > lib/Makefile.in : </userinput></screen> This +is used to fix a problem with building fileutils statically on glibc 2.2.3 +systems. If this isn't done, then there is the possibility of all of the +fileutils programs causing segmentation faults once chroot is entered +in chapter 6.</para> <para><userinput>--libexecdir=$LFS/bin:</userinput> This configure option will set the program executable directory to $LFS/bin. This is normally set diff --git a/chapter05/fileutils-inst.xml b/chapter05/fileutils-inst.xml index 80f4c87e2..bd8a39378 100644 --- a/chapter05/fileutils-inst.xml +++ b/chapter05/fileutils-inst.xml @@ -7,9 +7,9 @@ segmentation faults once we enter chroot in Chapter 6. The sed commands for those using glibc-2.2.3 are: <screen><userinput>sed 's/\(.*\)\(fopen-safer\.c \)\\/\1\2atexit.c \\/' \</userinput> -<userinput> lib/Makefile.in > tmp &&</userinput> +<userinput> lib/Makefile.in > tmp &&</userinput> <userinput>sed 's/\(.*\)\(idcache\$U\.\$.*\)\\/\1\2atexit$U.$(OBJEXT) \\/' \</userinput> -<userinput> tmp > lib/Makefile.in</userinput></screen></para> +<userinput> tmp > lib/Makefile.in</userinput></screen></para> <para>Install fileutils by running the following commands: <screen><userinput>./configure --disable-nls \</userinput> @@ -17,7 +17,7 @@ those using glibc-2.2.3 are: <userinput>make LDFLAGS=-static &&</userinput> <userinput>make install &&</userinput> <userinput>cd $LFS/usr/bin &&</userinput> -<userinput>ln -s ../../bin/install</userinput></screen></para> +<userinput>ln -sf ../../bin/install</userinput></screen></para> <para>Once you have installed fileutils, you can test whether the segmentation fault problem has been avoided by running diff --git a/chapter05/gcc-exp.xml b/chapter05/gcc-exp.xml index 22ca7b411..b38c62086 100644 --- a/chapter05/gcc-exp.xml +++ b/chapter05/gcc-exp.xml @@ -16,11 +16,11 @@ and C++ compilers and not the other available compilers as they are, on the average, not often used. If those other compilers are needed, the --enable-languages parameter can be omitted.</para> -<para><userinput>ln -s ../usr/bin/cpp:</userinput> This +<para><userinput>ln -sf ../usr/bin/cpp:</userinput> This creates the $LFS/lib/cpp symlink. Some packages explicitly try to find cpp in /lib.</para> -<para><userinput>ln -s ../bin/cpp:</userinput> This +<para><userinput>ln -sf ../bin/cpp:</userinput> This creates the $LFS/usr/lib/cpp symlink as there are packages that expect cpp to be in /usr/lib.</para> diff --git a/chapter05/gcc-inst.xml b/chapter05/gcc-inst.xml index 37c54512a..a1b88c8f9 100644 --- a/chapter05/gcc-inst.xml +++ b/chapter05/gcc-inst.xml @@ -12,11 +12,11 @@ <userinput>make -e LDFLAGS=-static bootstrap &&</userinput> <userinput>make prefix=$LFS/usr install &&</userinput> <userinput>cd $LFS/lib &&</userinput> -<userinput>ln -s ../usr/bin/cpp &&</userinput> +<userinput>ln -sf ../usr/bin/cpp &&</userinput> <userinput>cd $LFS/usr/lib &&</userinput> -<userinput>ln -s ../bin/cpp &&</userinput> +<userinput>ln -sf ../bin/cpp &&</userinput> <userinput>cd $LFS/usr/bin &&</userinput> -<userinput>ln -s gcc cc</userinput></screen></para> +<userinput>ln -sf gcc cc</userinput></screen></para> </sect2> diff --git a/chapter05/gzip-inst.xml b/chapter05/gzip-inst.xml index 8d19c3cbb..478d68caa 100644 --- a/chapter05/gzip-inst.xml +++ b/chapter05/gzip-inst.xml @@ -8,8 +8,8 @@ unpacked.</para> <userinput>./configure --prefix=$LFS/usr &&</userinput> <userinput>make LDFLAGS=-static &&</userinput> <userinput>make install &&</userinput> -<userinput>cp $LFS/usr/bin/gunzip $LFS/usr/bin/gzip $LFS/bin &&</userinput> -<userinput>rm $LFS/usr/bin/gunzip $LFS/usr/bin/gzip</userinput></screen></para> +<userinput>cp -f $LFS/usr/bin/gunzip $LFS/usr/bin/gzip $LFS/bin &&</userinput> +<userinput>rm -f $LFS/usr/bin/gunzip $LFS/usr/bin/gzip</userinput></screen></para> </sect2> diff --git a/chapter05/kernel-exp.xml b/chapter05/kernel-exp.xml index 475984ee8..99890c9ed 100644 --- a/chapter05/kernel-exp.xml +++ b/chapter05/kernel-exp.xml @@ -20,13 +20,13 @@ checks, but what we do care about is that make dep creates those aforementioned files in $LFS/usr/src/linux/include/linux we will be needing later on.</para> -<para><userinput>cp -a ../src/linux/include/linux .</userinput> and -<userinput>mkdir asm && cp -a ../src/linux/include/asm/* .</userinput>: +<para><userinput>cp -af ../src/linux/include/linux .</userinput> and +<userinput>mkdir asm && cp -af ../src/linux/include/asm/* .</userinput>: These commands copy the kernel headers in the <filename>$LFS/usr/include</filename> directory.</para> -<para><userinput>chown root.root $LFS/usr/include/linux -R </userinput> and -<userinput>chown root.root $LFS/usr/include/asm -R </userinput>: +<para><userinput>chown -R root.root $LFS/usr/include/linux</userinput> and +<userinput>chown -R root.root $LFS/usr/include/asm</userinput>: These commands change the ownership of the <filename>$LFS/usr/include/linux</filename> and the <filename>$LFS/usr/include/asm</filename> directories, plus all the diff --git a/chapter05/kernel-inst.xml b/chapter05/kernel-inst.xml index 3ac2f4e01..12b4ac51e 100644 --- a/chapter05/kernel-inst.xml +++ b/chapter05/kernel-inst.xml @@ -14,10 +14,10 @@ command:</para> <userinput>yes "" | make config &&</userinput> <userinput>make dep &&</userinput> <userinput>cd $LFS/usr/include &&</userinput> -<userinput>cp -a ../src/linux/include/linux . &&</userinput> +<userinput>cp -af ../src/linux/include/linux . &&</userinput> <userinput>chown -R root.root $LFS/usr/include/linux &&</userinput> <userinput>mkdir asm &&</userinput> -<userinput>cp -a ../src/linux/include/asm/* asm &&</userinput> +<userinput>cp -af ../src/linux/include/asm/* asm &&</userinput> <userinput>chown -R root.root $LFS/usr/include/asm</userinput></screen></para> </sect2> diff --git a/chapter05/oldnsslib.xml b/chapter05/oldnsslib.xml index c7b3c2a17..30bda43cc 100644 --- a/chapter05/oldnsslib.xml +++ b/chapter05/oldnsslib.xml @@ -13,7 +13,7 @@ normal Linux system uses by simply executing the library, like this:</para> interesting information. If you have Glibc-2.0.x installed on your starting distribution, copy the NSS library files by running:</para> -<para><screen><userinput>cp -av /lib/libnss* $LFS/lib</userinput></screen></para> +<para><screen><userinput>cp -afv /lib/libnss* $LFS/lib</userinput></screen></para> </sect1> diff --git a/chapter05/shellutils-inst.xml b/chapter05/shellutils-inst.xml index 6e784c0c0..e6241b1e1 100644 --- a/chapter05/shellutils-inst.xml +++ b/chapter05/shellutils-inst.xml @@ -9,8 +9,8 @@ to be unpacked.</para> <userinput>make LDFLAGS=-static &&</userinput> <userinput>make install &&</userinput> <userinput>cd $LFS/usr/bin &&</userinput> -<userinput>mv date echo false pwd stty $LFS/bin &&</userinput> -<userinput>mv su true uname hostname $LFS/bin</userinput></screen></para> +<userinput>mv -f date echo false pwd stty $LFS/bin &&</userinput> +<userinput>mv -f su true uname hostname $LFS/bin</userinput></screen></para> </sect2> diff --git a/chapter05/textutils-inst.xml b/chapter05/textutils-inst.xml index fc56d6f8d..80f8e1d4c 100644 --- a/chapter05/textutils-inst.xml +++ b/chapter05/textutils-inst.xml @@ -6,7 +6,7 @@ <para><screen><userinput>./configure --prefix=$LFS/usr --disable-nls &&</userinput> <userinput>make LDFLAGS=-static &&</userinput> <userinput>make install &&</userinput> -<userinput>mv $LFS/usr/bin/cat $LFS/bin</userinput></screen></para> +<userinput>mv -f $LFS/usr/bin/cat $LFS/bin</userinput></screen></para> </sect2> |