From 6869595169af2cd2180432d95188ee2c5cf5f17c Mon Sep 17 00:00:00 2001 From: Randy McMurchy Date: Wed, 5 Sep 2007 01:00:16 +0000 Subject: [PATCH] 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. git-svn-id: svn://svn.linuxfromscratch.org/BLFS/trunk/BOOK@7099 af4574ff-66df-0310-9fd7-8a98e5e911e0 --- general.ent | 2 +- introduction/welcome/changelog.xml | 12 ++++++++ postlfs/security/linux-pam.xml | 44 ++++++++++++++++++++---------- 3 files changed, 42 insertions(+), 16 deletions(-) diff --git a/general.ent b/general.ent index 401c357632..18a4ed1e0b 100644 --- a/general.ent +++ b/general.ent @@ -3,7 +3,7 @@ $LastChangedBy$ $Date$ --> - + diff --git a/introduction/welcome/changelog.xml b/introduction/welcome/changelog.xml index 36114ac8e5..5e9521d18f 100644 --- a/introduction/welcome/changelog.xml +++ b/introduction/welcome/changelog.xml @@ -41,6 +41,18 @@ --> + + September 5, 2007 + + + [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. + + + + September 4, 2007 diff --git a/postlfs/security/linux-pam.xml b/postlfs/security/linux-pam.xml index 8e53247fa9..17e54dd0f3 100644 --- a/postlfs/security/linux-pam.xml +++ b/postlfs/security/linux-pam.xml @@ -94,7 +94,7 @@ Install Linux-PAM by running the following commands: -./configure --libdir=/usr/lib \ +./configure --libdir=/lib \ --sbindir=/lib/security \ --enable-securedir=/lib/security \ --docdir=/usr/share/doc/Linux-PAM-&linux-pam-version; \ @@ -123,11 +123,16 @@ make 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 + +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 Command Explanations - --libdir=/usr/lib: This parameter results in + --libdir=/lib: This parameter results in the libraries being installed in - /usr/lib. + /lib as they may be required in + single-user mode. --sbindir=/lib/security: 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 /sbin directory. --enable-securedir=/lib/security: This @@ -173,13 +179,21 @@ done --> administrator, possibly in single-user mode, so it is moved to the appropriate directory. - mv -v /usr/lib/libpam*.so.0* /lib: This command - moves the dynamic libraries to /lib - as they may be required in single user mode. + mv -v /lib/libpam{,c,_misc}.la /usr/lib: This + command moves the Libtool library files to + /usr/lib as they are expected to + reside there. - ln -v -sf ...: These commands recreate the - .so symlinks as the libraries they - pointed to were moved to /lib. + sed -i 's| /lib| /usr/lib|' + /usr/lib/libpam_misc.la: This command corrects an installation + reference due to the file being moved in the previous step. + + for ...; do ...; done: These commands are used + to relocate the .so files into + /usr/lib. The + readlink 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.