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

2020-07-31 Thread Marcel van den Boer via lfs-dev
I agree Package Management is not really something to focus on too much in
the book (because yes, there are a million ways to do it, and mine also
changes all the time). But I guess my point is that in the development
version of LFS the page that mentions Package Management is now placed at a
point at which some files and one package have already been installed, so
that's maybe too late. In the stable version it is placed before any of the
final files have been installed and at the exact moment package management
could begin.
-- 
http://lists.linuxfromscratch.org/listinfo/lfs-dev
FAQ: http://www.linuxfromscratch.org/faq/
Unsubscribe: See the above information page

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

2020-07-31 Thread Pierre Labastie via lfs-dev
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,..., > more>}
> > - 
> > /usr/share/perl5/core_perl/{AnyDBM_File.pm,App,Archive,Attribute,Au
> > toLoader.pm,AutoSplit.pm,..., > 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

-- 
http://lists.linuxfromscratch.org/listinfo/lfs-dev
FAQ: http://www.linuxfromscratch.org/faq/
Unsubscribe: See the above information page

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

2020-07-31 Thread Bruce Dubbs via lfs-dev

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_git.pl,Cwd.pm,...,more>}
- 
/usr/share/perl5/core_perl/{AnyDBM_File.pm,App,Archive,Attribute,AutoLoader.pm,AutoSplit.pm,...,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.


  -- Bruce


--
http://lists.linuxfromscratch.org/listinfo/lfs-dev
FAQ: http://www.linuxfromscratch.org/faq/
Unsubscribe: See the above information page

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

2020-07-31 Thread Marcel van den Boer via lfs-dev
Hi there,

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.

(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_git.pl,Cwd.pm,...,}
-
/usr/share/perl5/core_perl/{AnyDBM_File.pm,App,Archive,Attribute,AutoLoader.pm,AutoSplit.pm,...,}

(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.

(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.

(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.

- Marcel
-- 
http://lists.linuxfromscratch.org/listinfo/lfs-dev
FAQ: http://www.linuxfromscratch.org/faq/
Unsubscribe: See the above information page