[lfs-support] Getting <su> in Chapter 5 [SOLVED]
beesnees at grm.net
Tue Oct 8 09:14:57 PDT 2013
On 10/07/2013 08:33 PM, Bruce Dubbs wrote:
> Ken Moffat wrote:
>> On Mon, Oct 07, 2013 at 11:59:00PM +0100, Ken Moffat wrote:
>>> The usual way to look at what gets installed is to run 'make
>>> DESTDIR=/path/to/somewhere install [ optional args ]' - once you get
>>> into DESTDIR installs for looking at what is installed you will find
>>> some packages use other variables (often INSTALLROOT or something
>>> like that) - if shadow is such a package,then running *as a user*
>>> will fail. So try it as a user, to a directory which that user can
>>> write to.
>> OK, so you can't try a DESTDIR install as a normal user because you
>> are root and 'su' doesn't exist. Build outside the new system as
>> user lfs and do a DESTDIR, e.g. to /home/lfs/somewhere or
>> /tmp/somewhere. The same for su from old coreutils (my notes show
>> that I had to build all of coreutils to get su linked - there might
>> be a shorter series of commands - but NOT which old version of
>> coreutils last contained 'su'.
> If the only thing needed is su, then I'd build shadow with:
> ./configure && make && cp src/su /tools/bin
> It doesn't need to be suid since it's run by root.
> -- Bruce
Thanks to you both. Ken, I had forgotten about DESTDIR and was able to
refresh my memory.
I have su now in the tool chain. I won't need it until I get to CH. 6,
but with my OCD kicking in I wanted to build it just after coreutils in
CH. 5. I suppose it doesn't really make any difference, but...
Bruce, I've forgotten the "ins and outs" of login vs. nonlogin shells,
but in the package user system su is used to go from 'root' to 'pkgusr.'
Of course, then, it's run by root, but I have also used it to go from
'pkgusr' to 'root' so I don't have to keep logging in. The test for this
build will occur when I get to Ch. 6.
Thanks again to you both.
More information about the lfs-support