[lfs-dev] Some files on the final system are now created during the temporary tools phase

Pierre Labastie pierre.labastie at neuf.fr
Fri Jul 31 14:03:43 PDT 2020


On Fri, 2020-07-31 at 15:22 -0500, Bruce Dubbs via lfs-dev wrote:
> On 7/31/20 2:14 PM, Marcel van den Boer via lfs-dev wrote:
> 
> Thanks for this,
> 
> > I compared a completed system of SVN-20200721 with a backup of the 
> > temporary system and found that a few files from the temporary
> > system 
> > are not reinstalled on the final system as a side effect of the new
> > way 
> > of building LFS.
> > 
> > (1) Gawk hardlink.
> > /usr/bin/gawk-5.1.0 is still pointing to the temporary version of
> > the 
> > software. 'make install' does not replace this file if it already
> > exists.
> > Possible fix is to just remove the link before rebuilding, or patch
> > the 
> > Makefile to always overwrite it.
> 
> I think
>    sed -i '/LN =/ s/$/ -f/' Makefile.in
> can fix this.  I've not tested yet.
> 
> > (2) Perl.
> > Lots of files are not reinstalled, but are kept from the chapter 7
> > build 
> > instead. Not sure if these should be removed, if they should have
> > been 
> > rebuilt in chapter 8, or if Perl is aware of these files and does
> > not 
> > reinstall them if they are already present.
> > - 
> > /usr/lib/perl5/5.32/core_perl/{B,B.pm,Compress,Config.pod,Config_gi
> > t.pl,Cwd.pm,...,<many 
> > more>}
> > - 
> > /usr/share/perl5/core_perl/{AnyDBM_File.pm,App,Archive,Attribute,Au
> > toLoader.pm,AutoSplit.pm,...,<many 
> > more>}
> 
> We can try 'rm -rf /usr/lib/perl5' at teh start of Chapter 8.
> 
> > (3) Glibc header file (/usr/include/gnu/stubs-64.h).
> > Not sure about this one either. Could be that the build compares
> > the 
> > existing file and chooses not to overwrite it if it is unchanged.
> > The 
> > other 5 files in the same directory (like 'lib-names-64.h' and 
> > 'stubs.h') are re-created though.
> 
> We will need to wait for glibc-2.32 (due tomorrow) to check this.
> 
> > (4) All Linux API Headers.
> > This is probably as intended in this new set up. But you may want
> > to 
> > clarify in the book that most (if not all) of these headers are
> > kept on 
> > the final system, even though they are installed during the 
> > cross/temporary build phase.
> 
> Yes, the headers will not change between Chapters 7 and 10. I'm not
> sure 
> it is necessary to explain to the level of detail you suggest.
> 
> > (5) A few symlinks are now created way before chapter 8.
> > This is not an issue for most LFS builders. But it is good to know
> > that 
> > these are left out on your system if you only capture the files
> > built in 
> > chapter 8 for package management.
> > - /bin/sh
> > - /lib64/ld-linux-x86-64.so.2
> > - /lib64/ld-lsb-x86-64.so.3
> > - /usr/bin/awk
> > - /usr/bin/cc
> > I'm used to making package archives from the builds that are now
> > in 
> > chapter 8, and if some files remain untouched in that phase, they
> > are 
> > not captured at all right now. So, if (2) and (3) are not bugs,
> > then I 
> > may have to change my capture mechanism to begin tracking files
> > right 
> > from the start of the build.
> 
> We really don't support package management directly in the book.  I 
> think this type of information should go into a hint. 
> more_control_and_pkg_man.txt would be the most likely candidate if
> you 
> want to update it.

The problem doesn't occur with pacman/rpm/dpkg... because they do a
DESTDIR install, so always see a clean directory (note that installing
the package to the system requires to allow overwriting files).

But for PMs like porg, which log installed files, the problem is the
same as above.

Pierre



More information about the lfs-dev mailing list