diff options
author | Alex Gronenwoud <alex@linuxfromscratch.org> | 2003-10-22 22:26:46 +0000 |
---|---|---|
committer | Alex Gronenwoud <alex@linuxfromscratch.org> | 2003-10-22 22:26:46 +0000 |
commit | 360e2c43cd050de14a654927da9a7610af9e38ce (patch) | |
tree | fa36484dc5954a41335c6ec7ddf0b305c020129d /chapter06 | |
parent | 1612f40eb9f1b8ea766ea308e40d6b3fe14f6fc5 (diff) |
Adding some markup and doing miscellaneous shuffles.
git-svn-id: http://svn.linuxfromscratch.org/LFS/trunk/BOOK@3029 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689
Diffstat (limited to 'chapter06')
-rw-r--r-- | chapter06/adjustingtoolchain.xml | 4 | ||||
-rw-r--r-- | chapter06/changingowner.xml | 5 | ||||
-rw-r--r-- | chapter06/chroot.xml | 12 | ||||
-rw-r--r-- | chapter06/config-shadowpwd.xml | 9 | ||||
-rw-r--r-- | chapter06/createfiles.xml | 2 | ||||
-rw-r--r-- | chapter06/creatingdirs.xml | 3 | ||||
-rw-r--r-- | chapter06/gcc-2953-inst.xml | 2 | ||||
-rw-r--r-- | chapter06/makedev-inst.xml | 33 | ||||
-rw-r--r-- | chapter06/mountproc.xml | 4 | ||||
-rw-r--r-- | chapter06/perl-inst.xml | 2 | ||||
-rw-r--r-- | chapter06/pwdgroup.xml | 5 | ||||
-rw-r--r-- | chapter06/shadowpwd-inst.xml | 15 |
12 files changed, 48 insertions, 48 deletions
diff --git a/chapter06/adjustingtoolchain.xml b/chapter06/adjustingtoolchain.xml index f07562f9c..15630f878 100644 --- a/chapter06/adjustingtoolchain.xml +++ b/chapter06/adjustingtoolchain.xml @@ -44,7 +44,7 @@ this:</para> <screen><userinput>SPECFILE=/tools/lib/gcc-lib/*/*/specs && sed -e 's@/tools/lib/ld-linux.so.2@/lib/ld-linux.so.2@g' \ - $SPECFILE > newspecfile && + $SPECFILE > newspecfile && mv -f newspecfile $SPECFILE && unset SPECFILE</userinput></screen> @@ -65,7 +65,7 @@ name of your platform's dynamic linker in the above commands. Refer back to basic functions (compiling and linking) of the adjusted toolchain are working as expected. For this we are going to perform a simple sanity check:</para> -<screen><userinput>echo 'main(){}' > dummy.c +<screen><userinput>echo 'main(){}' > dummy.c gcc dummy.c readelf -l a.out | grep ': /lib'</userinput></screen> diff --git a/chapter06/changingowner.xml b/chapter06/changingowner.xml index e7ff8b12e..e70a56125 100644 --- a/chapter06/changingowner.xml +++ b/chapter06/changingowner.xml @@ -24,8 +24,9 @@ user <emphasis>root</emphasis> by running the following command:</para> <screen><userinput>chown -R 0:0 /tools</userinput></screen> -<para>The command uses "0:0" instead of "root:root", because chown is unable -to resolve the name "root" until the password file has been created.</para> +<para>The command uses "0:0" instead of "root:root", because +<userinput>chown</userinput> is unable to resolve the name "root" until the +password file has been created.</para> </sect1> diff --git a/chapter06/chroot.xml b/chapter06/chroot.xml index 25fc85295..b7f0d5a72 100644 --- a/chapter06/chroot.xml +++ b/chapter06/chroot.xml @@ -21,20 +21,14 @@ to enter the chroot environment:</para> PATH=/bin:/usr/bin:/sbin:/usr/sbin:/tools/bin \ /tools/bin/bash --login</userinput></screen> -<screen><userinput>set +h</userinput></screen> - <para>The <userinput>-i</userinput> option given to the <userinput>env</userinput> command will clear all variables of the chroot environment. After that, only the HOME, TERM, PS1 and PATH variables are set again. The TERM=$TERM construct will set the TERM variable inside chroot to the same value as outside chroot; this variable is needed for programs -like vim and less to operate properly. If you need other variables present, -such as CFLAGS or CXXFLAGS, this is a good place to set them again.</para> - -<para>Also note the use of the set +h directive. This tells bash to not use -its internal path hashing. Without this directive, bash will remember paths -to binaries. Since as we go thru chapter 6, we want to use our newly compiled -binaries as soon as they are installed, we turn off this function.</para> +like <userinput>vim</userinput> and <userinput>less</userinput> to operate +properly. If you need other variables present, such as CFLAGS or CXXFLAGS, +this is a good place to set them again.</para> <para>From this point on there's no need to use the LFS variable anymore, because everything you do will be restricted to the LFS file system -- since diff --git a/chapter06/config-shadowpwd.xml b/chapter06/config-shadowpwd.xml index d3373cde3..769292fbc 100644 --- a/chapter06/config-shadowpwd.xml +++ b/chapter06/config-shadowpwd.xml @@ -1,12 +1,13 @@ <sect2><title> </title><para> </para></sect2> -<sect2><title>Configuring Shadow Password Suite</title> +<sect2><title>Configuring Shadow</title> <para>This package contains utilities to modify users' passwords, add or delete users and groups, and the like. We're not going to explain what -'password shadowing' means. A full explanation can be found in the doc/HOWTO -file within the unpacked shadow password suite's source tree. There's one -thing to keep in mind if you decide to use shadow support: programs that +'password shadowing' means. A full explanation can be found in the +<filename>doc/HOWTO</filename> +file within the unpacked Shadow source tree. There's one +thing to keep in mind if you decide to use Shadow support: programs that need to verify passwords (for example xdm, ftp daemons, pop3 daemons) need to be 'shadow-compliant', that is they need to be able to work with shadowed passwords.</para> diff --git a/chapter06/createfiles.xml b/chapter06/createfiles.xml index d08e3671b..8e6069ca6 100644 --- a/chapter06/createfiles.xml +++ b/chapter06/createfiles.xml @@ -7,7 +7,7 @@ order to satisfy these programs, we create a number of symbolic links which will be replaced by real files throughout the course of this chapter when we're installing all the software.</para> -<screen><userinput>ln -s /tools/bin/{bash,pwd,cat,stty} /bin +<screen><userinput>ln -s /tools/bin/{bash,cat,pwd,stty} /bin ln -s /tools/bin/perl /usr/bin ln -s /tools/lib/libgcc_s.so.1 /usr/lib ln -s bash /bin/sh</userinput></screen> diff --git a/chapter06/creatingdirs.xml b/chapter06/creatingdirs.xml index 1b375fd7b..810526d25 100644 --- a/chapter06/creatingdirs.xml +++ b/chapter06/creatingdirs.xml @@ -23,7 +23,8 @@ mkdir -p /opt/{lib,man/man{1,2,3,4,5,6,7,8}}</userinput></screen> <para>Directories are, by default, created with permission mode 755, but this isn't desirable for all directories. We will make two changes: one to the home -directory of root, and another to the directories for temporary files.</para> +directory of <emphasis>root</emphasis>, and another to the directories for +temporary files.</para> <screen><userinput>chmod 0750 /root chmod 1777 /tmp /var/tmp</userinput></screen> diff --git a/chapter06/gcc-2953-inst.xml b/chapter06/gcc-2953-inst.xml index 58a3d5459..a45c341fd 100644 --- a/chapter06/gcc-2953-inst.xml +++ b/chapter06/gcc-2953-inst.xml @@ -30,7 +30,7 @@ the system GCC already installed in <filename class="directory">/usr</filename> <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> +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> diff --git a/chapter06/makedev-inst.xml b/chapter06/makedev-inst.xml index 1beaec722..15308031b 100644 --- a/chapter06/makedev-inst.xml +++ b/chapter06/makedev-inst.xml @@ -3,11 +3,11 @@ <sect2> <title>Creating devices</title> -<para>Please note that unpacking the MAKEDEV-&makedev-version;.bz2 file -doesn't create a directory for you to <userinput>cd</userinput> into, as -the file only contains a single shell script.</para> +<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 MAKEDEV 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> @@ -17,22 +17,23 @@ chmod 754 /dev/MAKEDEV</userinput></screen> <screen><userinput>cd /dev ./MAKEDEV -v generic-nopty</userinput></screen> -<para>The meaning of the option:</para> +<para>The meaning of the arguments:</para> <itemizedlist> -<listitem><para><userinput>-v generic-nopty</userinput>: The -<userinput>-v</userinput> parameter tells the MAKEDEV script to run in verbose -mode. The <userinput>generic-nopty</userinput> parameter instructs MAKEDEV 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> +<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 a device you need is missing, try running -<userinput>./MAKEDEV -v <device></userinput>. Alternatively, you may -create devices via the <emphasis>mknod</emphasis> program. Please refer to -the man and info pages of <emphasis>mknod</emphasis> if you need more +<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 diff --git a/chapter06/mountproc.xml b/chapter06/mountproc.xml index 5851c9cf7..bef20df46 100644 --- a/chapter06/mountproc.xml +++ b/chapter06/mountproc.xml @@ -5,7 +5,7 @@ <para>In order for certain programs to function properly, the <emphasis>proc</emphasis> and <emphasis>devpts</emphasis> file systems must be available within the chroot environment. A file system can be mounted as many -times and in as many places as you like, thus it's not a problem that the these +times and in as many places as you like, thus it's not a problem that these file systems are already mounted on your host system -- especially so because they are virtual file systems.</para> @@ -44,7 +44,7 @@ now the most common way for pseudo terminals (PTYs) to be implemented.</para> <para>The most likely cause is that your host system's kernel was compiled without support for the devpts file system. You can check which file systems your kernel supports by peeking into its internals with a command such as -<userinput>cat /proc/filesystems</userinput>. If for some reason, devpts is +<userinput>cat /proc/filesystems</userinput>. If for some reason devpts is listed there but the mount still doesn't work, check instead for a different file system variety called <emphasis>devfs</emphasis>. If devfs is listed then we'll be able to work around the problem by mounting the host's devfs file diff --git a/chapter06/perl-inst.xml b/chapter06/perl-inst.xml index e7a594f13..9b5466010 100644 --- a/chapter06/perl-inst.xml +++ b/chapter06/perl-inst.xml @@ -22,7 +22,7 @@ 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> +<screen><userinput>echo "127.0.0.1 localhost $(hostname)" > /etc/hosts</userinput></screen> <para>Now run the tests, if you wish:</para> diff --git a/chapter06/pwdgroup.xml b/chapter06/pwdgroup.xml index 24767482a..02243673f 100644 --- a/chapter06/pwdgroup.xml +++ b/chapter06/pwdgroup.xml @@ -49,6 +49,11 @@ the <quote>I have no name!</quote> prompt.</para> <screen><userinput>exec /tools/bin/bash --login +h</userinput></screen> +<para>Note the use of the <userinput>+h</userinput> directive. This tells +<userinput>bash</userinput> not to use its internal path hashing. Without this +directive, <userinput>bash</userinput> would remember the paths to binaries it +has executed. Since as we go through this chapter, we want to use our newly +compiled binaries as soon as they are installed, we turn off this function.</para> </sect1> diff --git a/chapter06/shadowpwd-inst.xml b/chapter06/shadowpwd-inst.xml index c6ef2893b..ecdfded3e 100644 --- a/chapter06/shadowpwd-inst.xml +++ b/chapter06/shadowpwd-inst.xml @@ -1,18 +1,15 @@ <sect2><title> </title><para> </para></sect2> <sect2> -<title>Installation of Shadow Password Suite</title> +<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. -To let the Shadow package (that is installed next) detect these files in their -proper place, create them now, with their proper permissions:</para> - -<para>Create these files with their proper permissions by running the -following commands:</para> +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> @@ -35,9 +32,9 @@ the package incorrectly assumes it is going to be located at <screen><userinput>touch /usr/bin/passwd</userinput></screen> -<para>The current shadow suite has a problem in the newgrp command which causes -it to fail. The following patch (also appearing in Shadow's CVS code) fixes -this problem.</para> +<para>The current Shadow suite has a problem that causes in 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> |