Forgot to "reply all". Resending. Sorry for double mail, Bruce.

On 31/12/2018 20:10, Bruce Dubbs wrote:
> On 12/31/2018 11:33 AM, Pierre Labastie wrote:
>> On 31/12/2018 12:27, Thomas Seeling wrote:
>>> Hallo,
>>>
>>>
>>> I've been entertaining myself by building LFS 8.3 over the weekend.
>>> Originally I wanted to measure the difference between an old Samsung SATA
>>> drive and a more recent SSD on an i5-6500 with 8 GB RAM but it turned out to
>>> be more of an jhalfs adventure ;)
>>>
>>> I'm using jhalfs from svn, not the 2.4 release which did not work for me in
>>> previous tries.
>>>
>>> On all occasions the makefile stopped after 146-revisedchroot with the sudo
>>> usage message.
>>>
>>>   Target 146-revisedchroot OK
>>> --------------------------------------------------------------------------------
>>>
>>> --------------------------------------------------------------------------------
>>>
>>> mk_BOOT
>>> You are going to CHROOT into /mnt/lfs lfs
>>> a password is required
>>> usage: sudo -h | -K | -k | -V
>>>
>>> It turns out that the CHROOT2 definition is missing from the generated
>>> Makefile. After I added that (basically CHROOT1 without /tools) I could
>>> continue.
>>
>> Looks like a bug, but I've just tried generating a Makefile from LFS-8.3, and
>> CHROOT2 is defined... I guess it is a certain mix of options, which triggers
>> the bug. Can you send me the "configuration" file you have used?
>>
>>>
>>> Next thing I noticed: if I have a common /boot partition where kernel and
>>> config file from a previous build (or from parallel installations) exist the
>>> "cp -iv" in 158-kernel effectively sends the machine to an infinite loop. It
>>> waits for confirmation to overwrite (-i) but there's no possibility to do 
>>> that
>>> in a headless process.
>>>
>>> Generally since interactive commands do not go well together with makefile
>>> automation I suggest the script template removes -i from cp, mv and similar
>>> commands. For the same reason rm should always include -f in automated 
>>> scripts
>>> in case something happens to be readonly.
> 
>> Normally, the instructions in the book should be compatible with scripting
>> (unless I've missed something). Bruce, shouldn't we remove those "-i" flags?
> 
> The only place I know of where we use -i is when we are installing the
> kernel.  That is used many times when reinstalling the kernel and I think that
> is needed.  For jhalfs the commands in Chapter 8 like "cp -iv ..." (four
> places) can be modified: sed -i 's/iv /v /'.

Well, I do not like jhalfs using scripts different from what is generated from
the book. It's a testing tool, primarily, so it should be as close to the book
as possible... I'll do that for the kernel page, if you insist on it, but the
-i flag is only useful for people:
- copy/paste-ing
- rebuilding a kernel, and wanting to be warned that they already have a
kernel with the same version (don't they know that?)
- wanting to be given the choice of copying their just compiled kernel to
/boot if there is already a kernel with the same name (why did they recompile
it if they were happy with the previous one?).
Frankly, that is a rather limited use case.

> 
>> For the "rm" instructions, I'd suggest not adding -f, because usually, rm is
>> used to remove either just installed files or unwanted files. If those files
>> are readonly, it means there is another issue.
> 
> where is that happening?
> 

Well, you are right, not at so many places... Here are the "rm" instructions
in the book (limited to those at the beginning of a line):
-----------
chapter06/shadow.xml:rm -v /lib/libshadow.so
chapter06/bzip2.xml:rm -v /usr/bin/{bunzip2,bzcat,bzip2}
chapter06/systemd.xml:rm -f /usr/bin/xsltproc</userinput></screen>
chapter06/systemd.xml:rm -f /run/nologin
chapter06/iproute2.xml:rm -fv man/man8/arpd.8</userinput></screen>
chapter06/revisedchroot.xml:rm -f /usr/lib/libbz2.a
chapter06/revisedchroot.xml:rm -f /usr/lib/lib{com_err,e2p,ext2fs,ss}.a
chapter06/revisedchroot.xml:rm -f /usr/lib/libltdl.a
chapter06/revisedchroot.xml:rm -f /usr/lib/libfl.a
chapter06/revisedchroot.xml:rm -f /usr/lib/libz.a</userinput></screen>
chapter06/procps.xml:rm testsuite/pgrep.test/pgrep.exp
chapter06/texinfo.xml:rm -v dir
-----------
Those which do not have "-f", I think it is better like that. For shadow, it
is in a commented out section anyway. For bzip2, the files have just been
installed. For procps, the file is in the build tree, and has just been
extracted. So it should be read-writable. It may happen that the test is
removed in the future, but not having "-f" will signal that, which is better
IMO. For texinfo, the instructions are in a "nodump" section. Actually, "-f"
could be needed there.

regards
Pierre
-- 
http://lists.linuxfromscratch.org/listinfo/lfs-support
FAQ: http://www.linuxfromscratch.org/blfs/faq.html
Unsubscribe: See the above information page

Do not top post on this list.

A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
A: Top-posting.
Q: What is the most annoying thing in e-mail?

http://en.wikipedia.org/wiki/Posting_style

Reply via email to