[lfs-support] Getting <su> in Chapter 5

Dan McGhee beesnees at grm.net
Mon Oct 7 15:09:52 PDT 2013

I use the more_control hint in my builds.  I need <su> before I start 
working in Ch. 6.  It's used to go back and forth between 'root' and a 
'package_user.' When coreutils still supplied <su>, the procedure was 
just to copy it to /tools/bin after installing coreutils to the build 
chain.  Su itself was not installed because user 'lfs' is the installer 
and coreutils wanted to install it suid root.  In the 'package users' 
system, there is no need for it to be suid root, but it's needed before 
the installation of shadow in Ch. 6.

One option is to install 'shadow' at the beginning of Ch. 6, but that 
leads to some hiccups down the road.  They're not insurmountable, but 
they can be frustrating.  I'm want to install only <su> from shadow 
before I get to Ch. 6.  My problem is that I know only enough about 
<make> and <make install> to make me dangerous, and I get bogged down 
reading the documentation.

Knowing that there are some packages in LFS that will either make one 
target or install one target or copy the desired binary from the source 
directory,  I looked in the configure and makefile and just couldn't see 
a way to do what I wanted.  After I compiled it, I found all the 
programs shadow installs in a directory called src. In it are sets of 
files in the form <filename.{,c,o}>.  Of course, in my situation I am 
interested in only su, su.c and su.o. At this point can I just copy su 
to /tools/bin? Do I need the other two files?  If so, where do they go?

Alternatively, I have a question about how to use <make install>.  The 
following is part of the output from <./install-sh --help>:

> Usage: ./install-sh [OPTION]... [-T] SRCFILE DSTFILE
>    or: ./install-sh [OPTION]... SRCFILES... DIRECTORY
>    or: ./install-sh [OPTION]... -t DIRECTORY SRCFILES...
>    or: ./install-sh [OPTION]... -d DIRECTORIES...
> In the 1st form, copy SRCFILE to DSTFILE.
> In the 2nd and 3rd, copy all SRCFILES to DIRECTORY.
> In the 4th, create DIRECTORIES.

The way I see this is that I'll get what I want if I run <make install 
su /tools/bin>
Is this correct?  Of course, I'm back to the copy mode if I can't 
install this as user lfs.  I do not want it suid.

I appreciate any and all help.


More information about the lfs-support mailing list