LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Linux From Scratch
User Name
Password
Linux From Scratch This Forum is for the discussion of LFS.
LFS is a project that provides you with the steps necessary to build your own custom Linux system.

Notices



Reply
 
Search this Thread
Old 08-21-2010, 06:09 AM   #1
crts
Senior Member
 
Registered: Jan 2010
Posts: 1,604

Rep: Reputation: 446Reputation: 446Reputation: 446Reputation: 446Reputation: 446
LFS 6.6/6.6-rc1, Chapter 6.52: psmisc-22.10


Hi,

a couple of days ago I submitted the following to lfs-book support:
Quote:
Hello LFS maintainers,

I am not sure if this is the correct mailing list. While I was building LFS 6.6-rc1 I discovered a problem in chapter 6.52: psmisc-22.10.
According to the book the optional command

ln -sv killall /bin/pidof

can be issued at the end of the chapter. However, killall was installed in the directory

/usr/bin/killall

So executing this command results in a dead link. Instead it should be (if at all)

ln -sv /usr/bin/killall /bin/pidof

It is furthermore stated, that /bin/pidof will be replaced with a better version from the sysvinit package.
It should be made clear at this point that keeping that link instead of sysvinit's version will not work.
The syslogd daemon will not start with the provided configuration if psmisc's version is kept. I tried keeping psmisc's pidof
and encountered this problem. After removing the link and recreating it

ln -sv /sbin/killall5 /bin/pidof

my system worked as expected.

If this is the wrong place to bring this matter to your attention then please let me know where I can address this issue.
Thank you.
Since I haven't got any feedback yet, I would like to ask if anyone else has made similiar observations. Did something go wrong with my installation or might this be a genuine "bug" in the book?

Last edited by crts; 08-22-2010 at 10:05 AM.
 
Old 08-21-2010, 06:25 AM   #2
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374
Hi,

Looking back at some previous LFS version it seems that a configure option isn't present (be it on purpose or by mistake):

./configure --prefix=/usr --exec-prefix="" is what is used in 5.0 / 6.0 / 6.2 / 6.3 / 6.5 (to name a few )

I haven't run into this problem (I use Sysvinit's pidoff), but it is a valid observation on your part.
 
Old 08-21-2010, 08:22 AM   #3
crts
Senior Member
 
Registered: Jan 2010
Posts: 1,604

Original Poster
Rep: Reputation: 446Reputation: 446Reputation: 446Reputation: 446Reputation: 446
Hi druuna,

thanks for your input. I reconfigured my system to use psmisc's killall again and I think I found the offending part. As it seems the line in /etc/rc.d/init.d/functions

pidlist=`pidof -o $$ -o $PPID -x "$1"`

cannot be handled by killall. Changing this to


pidlist=`pidof -e "$1"`

seems to fix the problem. However, this time the syslogd daemon did get started - even with the faulty configuration. So I must correct my initial post regarding this issue. When I first encountered this error there were some other things that needed correction. Not starting of the daemon was probably related to something else.

Anyway, since keeping killall instead of killall5 would mean some sort of minor forking point in installing LFS I think the book should completely discard the alternative of keeping
killall.

Now I somehow need to find out why LFS-6.6-rc1 cannot host itself. It is no problem to build it when using the liveCD. But when using lfs-6.6-rc1 as host gcc-pass2 in chapter 5 does not succeed. I. e. somehow all following compilations start there include search in
/usr/include

I know that the liveCD should be the primary build host for LFS. But as a matter of principle I think that LFS should be able to host itself.

Last edited by crts; 08-21-2010 at 08:31 AM.
 
Old 08-21-2010, 08:44 AM   #4
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374
Hi again,

Using the --exec-prefix="" option (which is present in 22.10) would put killall in the correct location (/bin, not /usr/bin), not sure if you understood that from my previous post.

Another thing I noticed (typo??): /etc/init.d/functions -> /etc/rc.d/init.d/functions

You do realize that you are working with the first release candidate of LFS 6.6, which could have issues (same is true for rc2).

I do fully agree with you that LFS itself is a suitable host for building LFS, done so myself more then once. I never tried to use LFS version X as host to build LFS version X. Maybe there will be some package version problems (too new??).

Hope this helps.
 
Old 08-21-2010, 09:14 AM   #5
crts
Senior Member
 
Registered: Jan 2010
Posts: 1,604

Original Poster
Rep: Reputation: 446Reputation: 446Reputation: 446Reputation: 446Reputation: 446
Hi,

yes, I do realize that I am working with rc-1. However, the affected packages and the bootscripts are the same version. And the --exec-prefix="" issue is also present in LFS6.6.

I will rebuild with LFS6.6. Maybe this will solve the host issue.
 
Old 08-21-2010, 09:38 AM   #6
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374
Hi,

I run LFS 6.6 stable atm (build with a slightly altered Debian 5.0/Lenny as host for a change ) and did not encounter any problems.

BTW: Do read the Errata for the 6.6 Version of the LFS Book. Their is an issue with the version requirements specified in the stable book. You need to use the versions (and check script) mentioned in the development book.

The expect location problem might be a none-issue: All available LFS packages - Single or Full
 
Old 08-22-2010, 09:27 AM   #7
crts
Senior Member
 
Registered: Jan 2010
Posts: 1,604

Original Poster
Rep: Reputation: 446Reputation: 446Reputation: 446Reputation: 446Reputation: 446
update

Ok, to be on the safe side I build the official stable LFS-6.6. As expected the behaviour is the same when /bin/pidof points to killall instead of killall5.
Attached below is a screenshot of the error if /etc/rc.d/init.d/functions is not edited as described earlier.
Attached Images
File Type: png lfs-snapshot.png (18.1 KB, 9 views)
 
Old 08-22-2010, 09:36 AM   #8
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374
Hi,

What happens if you build psmisc-22.10 with the "missing" option that is mentioned in the previous LFS versions (could still be a bug in the 6.6 documentation)

./configure --prefix=/usr --exec-prefix=""

Instead of the mentioned:

./configure --prefix=/usr

Do remove the already installed parts before trying this.
 
Old 08-22-2010, 10:04 AM   #9
crts
Senior Member
 
Registered: Jan 2010
Posts: 1,604

Original Poster
Rep: Reputation: 446Reputation: 446Reputation: 446Reputation: 446Reputation: 446
Quote:
Originally Posted by druuna View Post
Hi,

What happens if you build psmisc-22.10 with the "missing" option that is mentioned in the previous LFS versions (could still be a bug in the 6.6 documentation)

./configure --prefix=/usr --exec-prefix=""

Instead of the mentioned:

./configure --prefix=/usr

Do remove the already installed parts before trying this.
Hi druuna,

maybe it was not clear from my initial post but the intention was not primarily to "fix" the dead link.
The main focus was on verifying/falsifying that linking /bin/pidof to psmisc's killall is not an option as suggested in the book. The bootscripts provided will not be able to handle it without (minor) manual configuration. So I still think the book should not offer this option at all, i. e. remove the following lines in Chapter 6.52:
Quote:
By default, Psmisc's pidof program is not installed. This usually is not a problem because it is installed later in the
Sysvinit package, which provides a better pidof program. If Sysvinit will not be used for a particular system, complete
the installation of Psmisc by creating the following symlink:

ln -sv killall /bin/pidof
as I already stated in a previous post
Quote:
Anyway, since keeping killall instead of killall5 would mean some sort of minor forking point in installing LFS I think the book should completely discard the alternative of keeping
killall.
As for the --exec-prefix issue itself, I agree with you that the --exec-prefix option should be used, regardless of the dead link issue. Omitting it *might* raise some FHS compliance issues. But I am not sure about that. In previous versions (e.g. 6.5) of LFS only psmisc's pstree* binaries were installed in /usr/bin. fuser and peekfd were kept in /bin.

[EDIT]
For the sake of thoroughness I did reinstall with --exec-prefix="" option and all binaries were installed in /bin. So the option is still supported and psmisc behaves as in previous versions. This would prevent the dead link issue but the configuration issue that arises if killall is not replaced by killall5 still remains of course.

Last edited by crts; 08-22-2010 at 10:18 AM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
LFS 6.3, messed up somewhere prior to chapter 6.12 (gcc), how to restart chapter 6? Funkster Linux From Scratch 2 12-24-2008 07:30 AM
lfs chapter 6.12 deucedlt Linux From Scratch 1 08-13-2006 11:03 AM
LFS Book Chapter 6 - 1st step (chroot to /mnt/lfs) doens't work bauld Linux From Scratch 11 03-15-2006 01:31 AM
chapter 6.3 of LFS 6.1 Stamp Linux From Scratch 2 07-22-2005 08:10 AM
LFS 5.0 Chapter 5 cuco76 Linux From Scratch 1 11-23-2003 11:28 PM


All times are GMT -5. The time now is 07:33 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration