On Wed, Oct 10, 2012 at 08:41:50AM +0100, David Buchan wrote: > Hi, > > Sorry if this is the second time I have sent this (not sure if I sent it > right the first time). > > I am building the current development lfs and am having the following > problem. > At the start of Chapter 6, once inside the chroot environment I am using > the hint "More Control and Package Management using Package Users". > Packages are installed as a unique user that is created specifically for > each package. > Since the first package is linux-libc-headers, the hint tells you to create > a user and group called linux-libc-headers. > The hint provides handy scripts to do the job of creating these new users > and groups. > One of these scripts tries to execute su - linux-libc-headers > But since su no longer exists in the /tools environment it fails. > su used to be in coreutils (therefore when compiling coreutils in chapter 5 > you could (as part of the hint) copy su into /tools). > But now su is only in shadow which is not installed in chapter 5. > > I have tried installing shadow in /tools as an extra to chapter 5, but > after executing su I get an exit status of 1 which means "permission > denied" according to "exitcodes.h" within shadow's source. > [ snip strace output ] > > The only solutions I can think of is to chroot in and out of LFS for each > user/package up until shadow, after which the hint should work as normal. > Or as someone suggested on IRC #lfs-support yesterday, I could install > everything up to and including shadow in chapter 6 as root. Then start > chapter 6 again using the hint. That would take much much longer as each > installation would fail for every file it tried to install, because each > package/user would try to overwrite each root owned file, failing each > time, and I'd have to manually correct these one at a time. > Or I could run through LFS 6.x where su is still inside coreutils. > > I have installed LFS using this hint in the past so I know it works, not > sure what versions though. > > Any thoughts would be greatly appreciated. > I'm reluctant to recommend the package users hint, but I recently played with DESTDIR installs [ in the end, I gave up - my requirement was better logging, and I found an easier method ] and for that I built su-tools at the end of chapter 5. i.e. untar coreutils-8.17 (latest version including su) ./configure --prefix=/tools make cp -v src/su /tools/bin/su-tools
These are the LFS-7.1 comands *without* make install : attempting to build only src/su is not worth the aggravation, much easier to build it all but only install the one binary. Alternatively, Bryan posted on -dev with a link to an earlier version of the hint (elsewhere in that thread I think he explained the difficulties with 'su' from shadow in this context) - http://www.mail-archive.com/[email protected]/msg17879.html ĸen -- das eine Mal als Tragödie, das andere Mal als Farce -- http://linuxfromscratch.org/mailman/listinfo/lfs-support FAQ: http://www.linuxfromscratch.org/lfs/faq.html Unsubscribe: See the above information page
