LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux From Scratch (https://www.linuxquestions.org/questions/linux-from-scratch-13/)
-   -   LFS 6.6/6.6-rc1, Chapter 6.52: psmisc-22.10 (https://www.linuxquestions.org/questions/linux-from-scratch-13/lfs-6-6-6-6-rc1-chapter-6-52-psmisc-22-10-a-827611/)

crts 08-21-2010 05:09 AM

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?

druuna 08-21-2010 05:25 AM

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.

crts 08-21-2010 07:22 AM

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.

druuna 08-21-2010 07:44 AM

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.

crts 08-21-2010 08:14 AM

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.

druuna 08-21-2010 08:38 AM

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

crts 08-22-2010 08:27 AM

update
 
1 Attachment(s)
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.

druuna 08-22-2010 08:36 AM

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.

crts 08-22-2010 09:04 AM

Quote:

Originally Posted by druuna (Post 4074084)
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.


All times are GMT -5. The time now is 06:44 AM.