r7099 - in trunk/BOOK: . introduction/welcome postlfs/security

randy at linuxfromscratch.org randy at linuxfromscratch.org
Tue Sep 4 18:00:16 PDT 2007


Author: randy
Date: 2007-09-04 19:00:16 -0600 (Tue, 04 Sep 2007)
New Revision: 7099

Modified:
   trunk/BOOK/general.ent
   trunk/BOOK/introduction/welcome/changelog.xml
   trunk/BOOK/postlfs/security/linux-pam.xml
Log:
Modified the Linux-PAM instructions to install the libraries into /lib and then use the 'readlink' command to create the symlinks so that the instructions are not version specific.

Modified: trunk/BOOK/general.ent
===================================================================
--- trunk/BOOK/general.ent	2007-09-04 12:50:55 UTC (rev 7098)
+++ trunk/BOOK/general.ent	2007-09-05 01:00:16 UTC (rev 7099)
@@ -3,7 +3,7 @@
 $Date$
 -->
 
-<!ENTITY day          "04">                   <!-- Always 2 digits -->
+<!ENTITY day          "05">                   <!-- Always 2 digits -->
 <!ENTITY month        "09">                   <!-- Always 2 digits -->
 <!ENTITY year         "2007">
 <!ENTITY version      "svn-&year;&month;&day;">

Modified: trunk/BOOK/introduction/welcome/changelog.xml
===================================================================
--- trunk/BOOK/introduction/welcome/changelog.xml	2007-09-04 12:50:55 UTC (rev 7098)
+++ trunk/BOOK/introduction/welcome/changelog.xml	2007-09-05 01:00:16 UTC (rev 7099)
@@ -42,6 +42,18 @@
 -->
 
     <listitem>
+      <para>September 5, 2007</para>
+      <itemizedlist>
+        <listitem>
+          <para>[randy] - Modified the Linux-PAM instructions to install
+          the libraries into /lib and then use the 'readlink' command to
+          create the symlinks so that the instructions are not version
+          specific.</para>
+        </listitem>
+      </itemizedlist>
+    </listitem>
+
+    <listitem>
       <para>September 4, 2007</para>
       <itemizedlist>
         <listitem>

Modified: trunk/BOOK/postlfs/security/linux-pam.xml
===================================================================
--- trunk/BOOK/postlfs/security/linux-pam.xml	2007-09-04 12:50:55 UTC (rev 7098)
+++ trunk/BOOK/postlfs/security/linux-pam.xml	2007-09-05 01:00:16 UTC (rev 7099)
@@ -94,7 +94,7 @@
     <para>Install <application>Linux-PAM</application> by
     running the following commands:</para>
 
-<screen><userinput>./configure --libdir=/usr/lib \
+<screen><userinput>./configure --libdir=/lib \
             --sbindir=/lib/security \
             --enable-securedir=/lib/security \
             --docdir=/usr/share/doc/Linux-PAM-&linux-pam-version; \
@@ -123,12 +123,17 @@
 
 <screen role="root"><userinput>make install &&
 chmod -v 4755 /lib/security/unix_chkpwd &&
+
 mv -v /lib/security/pam_tally /sbin &&
-mv -v /usr/lib/libpam*.so.0* /lib &&
-ln -v -sf ../../lib/libpam.so.0.81.6 /usr/lib/libpam.so &&
-ln -v -sf ../../lib/libpamc.so.0.81.0 /usr/lib/libpamc.so &&
-ln -v -sf ../../lib/libpam_misc.so.0.81.2 /usr/lib/libpam_misc.so</userinput></screen>
 
+mv -v /lib/libpam{,c,_misc}.la /usr/lib &&
+sed -i 's| /lib| /usr/lib|' /usr/lib/libpam_misc.la &&
+
+for LINK in libpam{,c,_misc}.so; do
+    ln -v -sf ../../lib/$(readlink /lib/${LINK}) /usr/lib/${LINK} &&
+    rm -v /lib/${LINK}
+done</userinput></screen>
+
     <!-- <para>If you downloaded the documentation, install it using the following
     command:</para>
 
@@ -142,14 +147,15 @@
   <sect2 role="commands">
     <title>Command Explanations</title>
 
-    <para><parameter>--libdir=/usr/lib</parameter>: This parameter results in
+    <para><parameter>--libdir=/lib</parameter>: This parameter results in
     the libraries being installed in
-    <filename class='directory'>/usr/lib</filename>.</para>
+    <filename class='directory'>/lib</filename> as they may be required in
+    single-user mode.</para>
 
     <para><parameter>--sbindir=/lib/security</parameter>: This parameter
-    results in two executables, one which is not intended to be run from the
+    results in two executables, one of which is not intended to be run from the
     command line, being installed in the same directory as the PAM modules.
-    One of the executables is later moved to the
+    The other executable is later moved to the
     <filename class='directory'>/sbin</filename> directory.</para>
 
     <para><parameter>--enable-securedir=/lib/security</parameter>: This
@@ -173,14 +179,22 @@
     administrator, possibly in single-user mode, so it is moved to the
     appropriate directory.</para>
 
-    <para><command>mv -v /usr/lib/libpam*.so.0* /lib</command>: This command
-    moves the dynamic libraries to <filename class='directory'>/lib</filename>
-    as they may be required in single user mode.</para>
+    <para><command>mv -v /lib/libpam{,c,_misc}.la /usr/lib</command>: This
+    command moves the <application>Libtool</application> library files to
+    <filename class='directory'>/usr/lib</filename> as they are expected to
+    reside there.</para>
 
-    <para><command>ln -v -sf ...</command>: These commands recreate the
-    <filename class='symlink'>.so</filename> symlinks as the libraries they
-    pointed to were moved to <filename class='directory'>/lib</filename>.</para>
+    <para><command>sed -i 's| /lib| /usr/lib|'
+    /usr/lib/libpam_misc.la</command>: This command corrects an installation
+    reference due to the file being moved in the previous step.</para>
 
+    <para><command>for ...; do ...; done</command>: These commands are used
+    to relocate the <filename class='symlink'>.so</filename> files into
+    <filename class='directory'>/usr/lib</filename>. The
+    <command>readlink</command> command is used so that the commands are not
+    specific to the names of the libraries, and will work regardless of the
+    version number extensions of the library names.</para>
+
   </sect2>
 
   <sect2 role="configuration">




More information about the blfs-book mailing list