cvs commit: LFS/BOOK/chapter06 gzip.xml man.xml readjusting.xml shadow.xml sysvinit.xml util-linux.xml

winkie at linuxfromscratch.org winkie at linuxfromscratch.org
Mon Jun 7 12:16:21 PDT 2004


winkie      04/06/07 13:16:21

  Modified:    BOOK/chapter01 changelog.xml
               BOOK/chapter05 adjusting.xml udev.xml util-linux.xml
               BOOK/chapter06 gzip.xml man.xml readjusting.xml shadow.xml
                        sysvinit.xml util-linux.xml
  Log:
  Normalized usage of sed throughout the book
  
  Revision  Changes    Path
  1.791     +3 -0      LFS/BOOK/chapter01/changelog.xml
  
  Index: changelog.xml
  ===================================================================
  RCS file: /home/cvsroot/LFS/BOOK/chapter01/changelog.xml,v
  retrieving revision 1.790
  retrieving revision 1.791
  diff -u -r1.790 -r1.791
  --- changelog.xml	7 Jun 2004 18:57:42 -0000	1.790
  +++ changelog.xml	7 Jun 2004 19:16:20 -0000	1.791
  @@ -104,6 +104,9 @@
   </itemizedlist>
   </listitem>
   
  +<listitem><para>June 7, 2004 [winkie]: Normalized <quote>sed</quote> usage
  +throughout the book.</para></listitem>
  +
   <listitem><para>June 7, 2004 [winkie]: Use the
   <quote>gcc --print-file specs</quote> command to determine the location of the
   <quote>specs</quote> file.</para></listitem>
  
  
  
  1.6       +1 -1      LFS/BOOK/chapter05/adjusting.xml
  
  Index: adjusting.xml
  ===================================================================
  RCS file: /home/cvsroot/LFS/BOOK/chapter05/adjusting.xml,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- adjusting.xml	7 Jun 2004 18:57:42 -0000	1.5
  +++ adjusting.xml	7 Jun 2004 19:16:21 -0000	1.6
  @@ -40,7 +40,7 @@
   <!-- Ampersands are needed to allow cut and paste -->
   
   <screen><userinput>SPECFILE=`gcc --print-file specs` &&
  -sed -e 's@ /lib/ld-linux.so.2@ /tools/lib/ld-linux.so.2 at g' \
  +sed 's@ /lib/ld-linux.so.2@ /tools/lib/ld-linux.so.2 at g' \
       $SPECFILE > tempspecfile &&
   mv -f tempspecfile $SPECFILE &&
   unset SPECFILE</userinput></screen>
  
  
  
  1.6       +2 -2      LFS/BOOK/chapter05/udev.xml
  
  Index: udev.xml
  ===================================================================
  RCS file: /home/cvsroot/LFS/BOOK/chapter05/udev.xml,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- udev.xml	30 May 2004 13:41:03 -0000	1.5
  +++ udev.xml	7 Jun 2004 19:16:21 -0000	1.6
  @@ -42,12 +42,12 @@
   which is bad since we install udev in a non-standard location. Fix this by
   running the following:</para>
   
  -<screen><userinput>sed -i 's:\/sbin\/udev:/tools&:' udevstart.c</userinput></screen>
  +<screen><userinput>sed -i 's@/sbin/udev@/tools/sbin/udev at g' udevstart.c</userinput></screen>
   
   <para>Also assure that udev knows the correct location to look for its
   configuration files:</para>
   
  -<screen><userinput>sed -i 's:\/etc:/tools&:' etc/udev/udev.conf.in</userinput></screen>
  +<screen><userinput>sed -i 's@/etc@/tools/etc at g' etc/udev/udev.conf.in</userinput></screen>
   
   <para>Now compile Udev:</para>
   
  
  
  
  1.8       +1 -1      LFS/BOOK/chapter05/util-linux.xml
  
  Index: util-linux.xml
  ===================================================================
  RCS file: /home/cvsroot/LFS/BOOK/chapter05/util-linux.xml,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- util-linux.xml	7 Jun 2004 18:52:47 -0000	1.7
  +++ util-linux.xml	7 Jun 2004 19:16:21 -0000	1.8
  @@ -36,7 +36,7 @@
   from the <filename class="directory">/tools</filename> directory.  This is fixed by altering the configure
   script:</para>
   
  -<screen><userinput>sed -i "s@/usr/include@/tools/include at g" configure</userinput></screen>
  +<screen><userinput>sed -i 's@/usr/include@/tools/include at g' configure</userinput></screen>
   
   <para>Prepare Util-linux for compilation:</para>
   
  
  
  
  1.25      +1 -1      LFS/BOOK/chapter06/gzip.xml
  
  Index: gzip.xml
  ===================================================================
  RCS file: /home/cvsroot/LFS/BOOK/chapter06/gzip.xml,v
  retrieving revision 1.24
  retrieving revision 1.25
  diff -u -r1.24 -r1.25
  --- gzip.xml	24 May 2004 21:37:21 -0000	1.24
  +++ gzip.xml	7 Jun 2004 19:16:21 -0000	1.25
  @@ -38,7 +38,7 @@
   the location of the binary, the following command ensures that the new
   location gets placed into the script:</para>
   
  -<screen><userinput>sed -i 's%"BINDIR"%/bin%' gzexe.in</userinput></screen>
  +<screen><userinput>sed -i 's@"BINDIR"@/bin at g' gzexe.in</userinput></screen>
   
   <para>Compile the package:</para>
   
  
  
  
  1.31      +2 -2      LFS/BOOK/chapter06/man.xml
  
  Index: man.xml
  ===================================================================
  RCS file: /home/cvsroot/LFS/BOOK/chapter06/man.xml,v
  retrieving revision 1.30
  retrieving revision 1.31
  diff -u -r1.30 -r1.31
  --- man.xml	24 May 2004 21:37:21 -0000	1.30
  +++ man.xml	7 Jun 2004 19:16:21 -0000	1.31
  @@ -40,13 +40,13 @@
   switch to the <emphasis>PAGER</emphasis> variable so that escape sequences are
   properly handled by Less:</para>
   
  -<screen><userinput>sed -i 's/-is/&R/' configure</userinput></screen>
  +<screen><userinput>sed -i 's at -is@&R at g' configure</userinput></screen>
   
   <para>The third is also a sed substitution to comment out the <quote>MANPATH
   /usr/man</quote> line in the <filename>man.conf</filename> file to prevent
   redundant results when using programs such as <command>whatis</command>:</para>
   
  -<screen><userinput>sed -i 's%MANPATH./usr/man%#&%' src/man.conf.in</userinput></screen>
  +<screen><userinput>sed -i 's at MANPATH./usr/man@#&@g' src/man.conf.in</userinput></screen>
    
   <para>Now prepare Man for compilation:</para>
   
  
  
  
  1.4       +2 -5      LFS/BOOK/chapter06/readjusting.xml
  
  Index: readjusting.xml
  ===================================================================
  RCS file: /home/cvsroot/LFS/BOOK/chapter06/readjusting.xml,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- readjusting.xml	7 Jun 2004 18:57:42 -0000	1.3
  +++ readjusting.xml	7 Jun 2004 19:16:21 -0000	1.4
  @@ -52,11 +52,8 @@
   
   <!-- Ampersands are needed to allow cut and paste -->
   
  -<screen><userinput>SPECFILE=`gcc --print-file specs` &&
  -sed -e 's@ /tools/lib/ld-linux.so.2@ /lib/ld-linux.so.2 at g' \
  -    $SPECFILE > newspecfile &&
  -mv -f newspecfile $SPECFILE &&
  -unset SPECFILE</userinput></screen>
  +<screen><userinput>sed -i 's@ /tools/lib/ld-linux.so.2@ /lib/ld-linux.so.2 at g' \
  +    `gcc --print-file specs`</userinput></screen>
   
   <para>Again, cutting and pasting the above is recommended. And just like
   before, it is a good idea to visually inspect the specs file to verify the
  
  
  
  1.12      +3 -3      LFS/BOOK/chapter06/shadow.xml
  
  Index: shadow.xml
  ===================================================================
  RCS file: /home/cvsroot/LFS/BOOK/chapter06/shadow.xml,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- shadow.xml	24 May 2004 21:37:21 -0000	1.11
  +++ shadow.xml	7 Jun 2004 19:16:21 -0000	1.12
  @@ -66,9 +66,9 @@
   to its destination (it's probably better to cut-and-paste this rather than try
   and type it all in):</para>
   
  -<screen><userinput>sed -e 's%#MD5_CRYPT_ENAB.no%MD5_CRYPT_ENAB yes%' \
  -    -e 's%/var/spool/mail%/var/mail%' \
  -    etc/login.defs.linux > /etc/login.defs</userinput></screen>
  +<screen><userinput>cp etc/login.defs.linux /etc/login.defs
  +sed -i -e 's@#MD5_CRYPT_ENAB.no at MD5_CRYPT_ENAB yes@' \
  +    -e 's@/var/spool/mail@/var/mail@' /etc/login.defs</userinput></screen>
   
   <para>Move some misplaced symlinks/programs to their proper locations:</para>
   
  
  
  
  1.26      +2 -3      LFS/BOOK/chapter06/sysvinit.xml
  
  Index: sysvinit.xml
  ===================================================================
  RCS file: /home/cvsroot/LFS/BOOK/chapter06/sysvinit.xml,v
  retrieving revision 1.25
  retrieving revision 1.26
  diff -u -r1.25 -r1.26
  --- sysvinit.xml	24 May 2004 21:37:21 -0000	1.25
  +++ sysvinit.xml	7 Jun 2004 19:16:21 -0000	1.26
  @@ -36,9 +36,8 @@
   misinterpretation, you can modify the source so that these messages read like
   <quote>Sending processes started by init the TERM signal</quote> instead:</para>
   
  -<screen><userinput>cp src/init.c{,.backup}
  -sed 's/Sending processes/& started by init/g' \
  -    src/init.c.backup > src/init.c</userinput></screen>
  +<screen><userinput>sed -i 's at Sending processes@& started by init at g' \
  +    src/init.c</userinput></screen>
   
   <para>Compile Sysvinit:</para>
   
  
  
  
  1.9       +1 -3      LFS/BOOK/chapter06/util-linux.xml
  
  Index: util-linux.xml
  ===================================================================
  RCS file: /home/cvsroot/LFS/BOOK/chapter06/util-linux.xml,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- util-linux.xml	7 Jun 2004 18:52:47 -0000	1.8
  +++ util-linux.xml	7 Jun 2004 19:16:21 -0000	1.9
  @@ -35,9 +35,7 @@
   <filename>adjtime</filename> file. To make the <command>hwclock</command>
   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
  +<screen><userinput>sed -i 's at etc/adjtime at var/lib/hwclock/adjtime at g' hwclock/hwclock.c
   mkdir -p /var/lib/hwclock</userinput></screen>
   
   </sect2>
  
  
  



More information about the lfs-book mailing list